After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 688915 - EndSessionDialog: Add a Close method
EndSessionDialog: Add a Close method
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks: 688076
 
 
Reported: 2012-11-23 06:23 UTC by Matthias Clasen
Modified: 2013-02-12 15:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.12 KB, patch)
2012-11-23 06:23 UTC, Matthias Clasen
needs-work Details | Review
EndSessionDialog: Add a Close method (1.85 KB, patch)
2012-12-04 23:33 UTC, Matthias Clasen
needs-work Details | Review
EndSessionDialog: Add a Close method (1.51 KB, patch)
2013-02-12 05:02 UTC, Matthias Clasen
committed Details | Review

Description Matthias Clasen 2012-11-23 06:23:57 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.
Comment 1 Ray Strode [halfline] 2012-12-04 23:16:28 UTC
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 /
Comment 2 Matthias Clasen 2012-12-04 23:33:02 UTC
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.
Comment 3 Ray Strode [halfline] 2012-12-05 20:11:31 UTC
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.
Comment 4 Matthias Clasen 2013-02-12 05:02:40 UTC
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.
Comment 5 Matthias Clasen 2013-02-12 05:03:44 UTC
Ping. We need this to make the gnome-session logout changes fully functional.
Comment 6 Jasper St. Pierre (not reading bugmail) 2013-02-12 05:10:21 UTC
Review of attachment 235764 [details] [review]:

This seems OK.

::: js/ui/endSessionDialog.js
@@ +491,3 @@
                                     }));
+    },
+

Extra whitespace.
Comment 7 Matthias Clasen 2013-02-12 15:15:23 UTC
Attachment 235764 [details] pushed as 151c699 - EndSessionDialog: Add a Close method