GNOME Bugzilla – Bug 688915
EndSessionDialog: Add a Close method
Last modified: 2013-02-12 15:15:27 UTC
Created attachment 229691 [details] [review] patch When there are multiple sessions, we may get a polkit dialog in response to clicking 'Reboot' in the end session dialog. If the polkit dialog gets canceled or otherwise ends unsuccessfully, we are left with the lightbox that the end session dialog puts up when 'Reboot' is clicked. To remove the lightbox and make the session fully functional again, gnome-session will call Close.
Review of attachment 229691 [details] [review]: ::: js/ui/endSessionDialog.js @@ +51,3 @@ <arg type="ao" direction="in" /> </method> +<method name="Close"/> I think you'll need a small method to implement close down below (like OpenAsync). It can probably just call this.close. Also, need a space between quote and /
Created attachment 230707 [details] [review] EndSessionDialog: Add a Close method When there are multiple sessions, we may get a polkit dialog in response to clicking 'Reboot' in the end session dialog. If the polkit dialog gets canceled or otherwise ends unsuccessfully, we are left with the lightbox that the end session dialog puts up when 'Reboot' is clicked. To remove the lightbox and make the session fully functional again, gnome-session will call Close.
Review of attachment 230707 [details] [review]: ::: js/ui/endSessionDialog.js @@ -476,2 @@ this._updateButtons(); - unnecessary whitespace chang here @@ +492,3 @@ + + + CloseAsync: function(parameters, invocation) { If you call it CloseAsync instead of Close you have to do something like invocation.return_value(null). Normally, you wouldn't make it Async unless you need to defer returning the call until later. @@ +493,3 @@ + + CloseAsync: function(parameters, invocation) { + this.close(global.get_current_time()); global.get_current_time() is fine, but it's optional. if you don't pass a parameter that's what gets used.
Created attachment 235764 [details] [review] EndSessionDialog: Add a Close method When there are multiple sessions, we may get a polkit dialog in response to clicking 'Reboot' in the end session dialog. If the polkit dialog gets canceled or otherwise ends unsuccessfully, we are left with the lightbox that the end session dialog puts up when 'Reboot' is clicked. To remove the lightbox and make the session fully functional again, gnome-session will call Close.
Ping. We need this to make the gnome-session logout changes fully functional.
Review of attachment 235764 [details] [review]: This seems OK. ::: js/ui/endSessionDialog.js @@ +491,3 @@ })); + }, + Extra whitespace.
Attachment 235764 [details] pushed as 151c699 - EndSessionDialog: Add a Close method