I agree with this. I just modeled it after the old end session dialog,2014-10-22 22:53 GMT+02:00 Alberts Muktupāvels <alberts muktupavels gmail com>:
>
>
> On Wed, Oct 22, 2014 at 11:29 PM, Balló György <ballogyor gmail com> wrote:
>>
>> 2014-10-22 20:59 GMT+02:00 Alberts Muktupāvels
>> <alberts muktupavels gmail com>:
>> >>> 1. Add support for suspend and hibernate with logind. This adds
>> >>> 'Suspend', 'Hibernate' and 'Hybrid Sleep' buttons to the shutdown
>> >>> dialog if logind is available on the system, and the user is allowed
>> >>> for these actions.
>> >>
>> >>
>> >> I agree that we should add these options, but I would like this to be
>> >> done
>> >> in different way.
>> >>
>> >> 1) GNOME Flashback.
>> >> 1.1) Add new enums to FlashbackLogoutAction -
>> >> FLASHBACK_LOGOUT_ACTION_HIBERNATE, FLASHBACK_LOGOUT_ACTION_SUSPEND,
>> >> FLASHBACK_LOGOUT_ACTION_HYBRID_SLEEP.
>> >> 1.2) Update update_dialog_text, setup_dialog for new actions.
>> >> 1.3) Update inhibit_dialog_response to emit confirmed for new actions
>> >> 1.4) Update org.gnome.SessionManager.EndSessionDialog.xml:
>> >> 1.4.1) Update summary for dialog types - 3 for .., 4 for ..., 5 for.
>> >> 1.4.2) Add new signals - ConfirmedHibernate, ConfirmedSuspend,
>> >> ConfirmedHybridSleep
>> >>
>> >> 2) GNOME Panel.
>> >> Did not think much here but I think that we should do something like
>> >> this.
>> >> 2.1) First i think we should update panel-session-manager.
>> >> 2.1.1) Add new proxy for communication directly with EndSessionDialog.
>> >> Should connect to new signals ConfirmedHibernetate, ConfirmedSuspend,
>> >> ConfirmedHybridSleep.
>> >> 2.1.2) Add new functions that will return if these new options are
>> >> available to user. Just like
>> >> panel_session_manager_is_shutdown_available.
>> >> 2.1.3) Add new functions to request new actions. Just like
>> >> panel_session_manager_request_shutdown, but only using end session
>> >> dialog
>> >> proxy and calling directly Open method.
>> >> 2.1.4) Update user-menu. Here I want see ubuntu style - all available
>> >> options should be shown here. - Logout, Reboot, Shutdown, Hibernate,
>> >> Suspend, Hybrid Sleep.
>> >>
>> >> I would like to leave end-session-dialog for only showing dialog to
>> >> confirm or cancel action. Also I do not like adding extra buttons to
>> >> dialog.
>> >>
>> >> What do you think about this?
>> >
>> >
>> > I already done GNOME Flashback part.
>>
>> It's a much more complicated implementation than mine, but fine for me
>> if you implement this. Why don't you call logind directly from the end
>> session dialog rather than sending the signal back to the panel? I
>> would prefer if the end session dialog would be able to do
>> suspend/hibernate on its own, without the panel.
>
>
> I don't like idea to add extra buttons in that dialog. You added extra
> response for restart, but it is already supported by dialog. It only needs
> to be opened as restart dialog.
but if you add a separated menu item for the restart action on the
panel, then it's not needed.
> Also I think that lock screen button should be removed from dialog, but I
> will leave it at least for now. What point of opening dialog if you want
> lock screen? Simply choose lock screen from user menu.
Agree.
> Why open dialog through session manager if we are not going to use it in any
> way if we want simply hibernate or suspend? If you want suspend and will
> leave dialog open for 60 seconds it will take default action - shutdown.
Agree. I didn't say to use the session manager for suspend/hibernate.
Use logind directly.
> And gnome-flashback is not meant to be used without gnome-panel so this is
> not a problem in any way.
I disagree with this. I think that flashback components should be
reusable as much as possible. If I understand, you want to implement
hibernate/suspend in the following way:
1. User click on the menu item in gnome-panel.
2. End session dialog opens, user click on the accept button.
3. End session dialog passes back the signal to gnome-panel.
4. gnome-panel calls logind.
5. logind do the action.
But I would prefer this:
1. User click on the menu item in gnome-panel.
2. End session dialog opens, user click on the accept button.
3. End session dialog calls logind.
4. logind do the action.