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 727301 - Properties dialog should have a X close button - not "Done"
Properties dialog should have a X close button - not "Done"
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
3.12.x
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
ready
Depends on:
Blocks:
 
 
Reported: 2014-03-29 16:26 UTC by Allan Day
Modified: 2014-03-31 14:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] Properties dialog should have a X close button instead of "Done" (902 bytes, patch)
2014-03-30 16:09 UTC, Felipe Borges
needs-work Details | Review
Properties dialog should have a X close button instead of "Done" (1.08 KB, patch)
2014-03-31 14:16 UTC, Felipe Borges
needs-work Details | Review
properties: Use a X close button instead of "Done" (998 bytes, patch)
2014-03-31 14:41 UTC, Debarshi Ray
committed Details | Review

Description Allan Day 2014-03-29 16:26:22 UTC
The properties dialog is a presentation dialog: https://wiki.gnome.org/Design/HIG/Dialogs#Presentation_Dialogs

It should have a close button in the corner of the header bar (like standard window header bars), not a "Done" button.
Comment 1 Felipe Borges 2014-03-30 16:09:03 UTC
Created attachment 273291 [details] [review]
[PATCH] Properties dialog should have a X close button instead of  "Done"

My smallest patch ever.
Comment 2 Debarshi Ray 2014-03-31 08:11:25 UTC
Review of attachment 273291 [details] [review]:

Thanks for the patch Felipe! Could you please add the URL to this bug in the commit message? You can consider git-bz for submitting patches, if you want to.

::: src/properties.js
@@ -64,1 @@
         this.widget.set_default_response(Gtk.ResponseType.CLOSE);

You need to remove the set_default_response call too. The dialog no longer has a widget that will emit CLOSE. Pressing ESC or the close button emits DELETE_EVENT.
Comment 3 Debarshi Ray 2014-03-31 09:39:24 UTC
(In reply to comment #2)
> ::: src/properties.js
> @@ -64,1 @@
>          this.widget.set_default_response(Gtk.ResponseType.CLOSE);
> 
> You need to remove the set_default_response call too. The dialog no longer has
> a widget that will emit CLOSE. Pressing ESC or the close button emits
> DELETE_EVENT.

Or maybe change the set_default_response to DELETE_EVENT so that pressing ENTER after changing the title continues to close the dialog? It will still close the dialog with your current patch, but I don't see the need to emit two different responses because the dialog is "instant apply".
Comment 4 Felipe Borges 2014-03-31 14:16:08 UTC
Created attachment 273333 [details] [review]
Properties dialog should have a X close button instead of "Done"
Comment 5 Debarshi Ray 2014-03-31 14:40:08 UTC
Review of attachment 273333 [details] [review]:

::: src/properties.js
@@ -62,3 @@
                                         hexpand: true });
-        this.widget.add_button(_("Done"), Gtk.ResponseType.CLOSE);
-        this.widget.set_default_response(Gtk.ResponseType.CLOSE);

Sorry for misleading you Felipe. Setting the default_response to DELETE_EVENT won't work because there is no button associated with it anymore. The user either has to hit ESC or click X. Hitting ENTER in the entry won't work.
Comment 6 Debarshi Ray 2014-03-31 14:41:46 UTC
Created attachment 273334 [details] [review]
properties: Use a X close button instead of "Done"

Fixed up your last patch to not set the default_response to DELETE_EVENT and committed it.
Comment 7 Debarshi Ray 2014-03-31 14:42:24 UTC
Thanks for working on this.