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 761076 - Add keyboard shortcuts for edit and export
Add keyboard shortcuts for edit and export
Status: RESOLVED FIXED
Product: gnome-photos
Classification: Applications
Component: general
3.19.x
Other All
: Normal enhancement
: ---
Assigned To: GNOME photos maintainer(s)
GNOME photos maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-01-25 08:58 UTC by Debarshi Ray
Modified: 2016-01-27 10:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Shortcut for Edit & Export (3.32 KB, patch)
2016-01-26 18:06 UTC, Umang Jain
none Details | Review
application: Add shortcuts for edit and export (3.31 KB, patch)
2016-01-27 10:50 UTC, Debarshi Ray
none Details | Review

Description Debarshi Ray 2016-01-25 08:58:25 UTC
It would be nice to add keyboard shortcuts / accelerators for the edit and export actions. Since both words start with an 'e' we have to think of something different for one of them. We can start with ctrl+e for edit, and ctrl+x for export.
Comment 1 Umang Jain 2016-01-26 18:06:22 UTC
Created attachment 319787 [details] [review]
Shortcut for Edit & Export
Comment 2 Debarshi Ray 2016-01-27 10:49:42 UTC
Review of attachment 319787 [details] [review]:

Thanks for the nice patch. It works as expected.

::: src/photos-application.c
@@ +1289,3 @@
   const gchar *delete_accels[3] = {"Delete", "KP_Delete", NULL};
+  const gchar *edit_accels[2] = {"<Primary>e", NULL};
+  const gchar *export_accels[2] = {"<Primary>x", NULL};

Nitpick: s/export/save/ to match the name of the action.

::: src/photos-preview-menu.ui
@@ +9,3 @@
         <attribute name="action">app.save-current</attribute>
         <attribute name="label" translatable="yes">Export…</attribute>
+        <attribute name="accel">&lt;Primary&gt;x</attribute>

This bit is actually not needed. I know we do specify the keyboard accelerator in this file in a few cases, but I think we can remove them. It is enough to add them via gtk_application_set_accels_for_action.
Comment 3 Debarshi Ray 2016-01-27 10:50:36 UTC
Created attachment 319810 [details] [review]
application: Add shortcuts for edit and export

I made the above adjustments and pushed to master.
Comment 4 Debarshi Ray 2016-01-27 10:50:52 UTC
Thanks for your efforts!