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 757909 - Add a help overlay for shortcuts
Add a help overlay for shortcuts
Status: RESOLVED FIXED
Product: gnome-photos
Classification: Applications
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: GNOME photos maintainer(s)
GNOME photos maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-11-10 18:40 UTC by Debarshi Ray
Modified: 2015-11-18 19:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Added help overlay for shortcuts with the new GtkShortcutsWindow (6.44 KB, patch)
2015-11-13 10:13 UTC, Umang Jain
none Details | Review
Shortcut Window (33.86 KB, image/jpeg)
2015-11-13 10:21 UTC, Umang Jain
  Details
Shortcut Window[updated] (32.76 KB, image/jpeg)
2015-11-13 17:52 UTC, Umang Jain
  Details
Added help overlay for shortcuts with the new GtkShortcutsWindow (6.12 KB, patch)
2015-11-13 18:23 UTC, Umang Jain
none Details | Review
Added help overlay for shortcuts with the new GtkShortcutsWindow (6.76 KB, patch)
2015-11-15 18:06 UTC, Umang Jain
none Details | Review
Added help overlay for shortcuts with the new GtkShortcutsWindow (7.53 KB, patch)
2015-11-17 19:12 UTC, Umang Jain
none Details | Review
Added help overlay for shortcuts with the new GtkShortcutsWindow (7.54 KB, patch)
2015-11-17 19:46 UTC, Umang Jain
needs-work Details | Review
Add a help overlay for shortcuts (8.82 KB, patch)
2015-11-18 19:09 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2015-11-10 18:40:39 UTC
Let's add a help overlay for shortcuts to play with the new GtkShortcutsWindow in gtk+.
Comment 1 Umang Jain 2015-11-13 10:13:25 UTC
Created attachment 315393 [details] [review]
Added help overlay for shortcuts with the new GtkShortcutsWindow
Comment 2 Umang Jain 2015-11-13 10:21:22 UTC
Created attachment 315394 [details]
Shortcut Window
Comment 3 Debarshi Ray 2015-11-13 10:43:43 UTC
Review of attachment 315393 [details] [review]:

Thanks for the patch, Umang. It looks great. A few comments below:

According to https://wiki.gnome.org/Initiatives/GnomeGoals/ShortcutWindows , we should add a "Keyboard Shortcuts" entry in the application menu.

::: src/help-overlay.ui
@@ +51,3 @@
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Gear Menu</property>

The term "gear menu" is an informal one. It's not even relevant these days because we changed the icon to be a hamburger. I think a more proper term would be "action menu".

@@ +52,3 @@
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Gear Menu</property>
+                <property name="accelerator">F12</property>

F10, not F12.

@@ +114,3 @@
+                <property name="title" translatable="yes">Exit from preview mode</property>
+                <property name="accelerator">&lt;alt&gt;Left</property>
+              </object>

Alt+left is not just for the preview only. eg., if you are inside a collection, then it will take you out of it. Maybe put it in "navigation"?

::: src/photos.gresource.xml
@@ +16,3 @@
   <gresource prefix="/org/gnome/Photos/gtk">
     <file alias="menus.ui" preprocess="xml-stripblanks" compressed="true">photos-menus.ui</file>
+<file alias="help-overlay.ui" preprocess="xml-stripblanks" compressed="true">help-overlay.ui</file>

This should aligned.

@@ +27,3 @@
     <file alias="image-filter-symbolic.svg">../data/icons/image-filter-symbolic.svg</file>
     <file alias="image-sharpen-symbolic.svg">../data/icons/image-sharpen-symbolic.svg</file>
+

Stray newline. Please remove it.
Comment 4 Umang Jain 2015-11-13 17:52:09 UTC
Created attachment 315424 [details]
Shortcut Window[updated]
Comment 5 Umang Jain 2015-11-13 18:23:28 UTC
Created attachment 315427 [details] [review]
Added help overlay for shortcuts with the new GtkShortcutsWindow
Comment 6 Umang Jain 2015-11-15 18:06:30 UTC
Created attachment 315634 [details] [review]
Added help overlay for shortcuts with the new GtkShortcutsWindow

https://bugzilla.gnome.org/show_bug.cgi?id=757909

Added Shortcut item in Application menu
Comment 7 Debarshi Ray 2015-11-16 15:08:16 UTC
Review of attachment 315634 [details] [review]:

Nice patch. I see that you figured out the 'win.show-help-overlay' bit yourself. Good. A few comments:

The new help-overlay.ui should be added to po/POTFILES.in.

::: src/help-overlay.ui
@@ +93,3 @@
+                <property name="visible">1</property>
+                <property name="title" translatable="yes">Exit from preview mode</property>
+                <property name="accelerator">&lt;alt&gt;Left</property>

I think this should be labelled "Go back" because you can use this while inside a collection too. Also, to resolve the LTR vs RTL situation we need two entries - one for Alt+Left and another for Alt+Right with the direction property set on them. You will need latest gtk+ master and you can look at gnome-documents for an example.

::: src/photos-menus.ui
@@ +9,3 @@
+        <attribute name="action">win.show-help-overlay</attribute>
+        <attribute name="label" translatable="yes">Keyboard shortcuts</attribute>
+      </item>

This should be the first item in the next section. ie. just above "help".
Comment 8 Umang Jain 2015-11-17 19:12:09 UTC
Created attachment 315785 [details] [review]
Added help overlay for shortcuts with the new GtkShortcutsWindow
Comment 9 Umang Jain 2015-11-17 19:46:30 UTC
Created attachment 315788 [details] [review]
Added help overlay for shortcuts with the new GtkShortcutsWindow
Comment 10 Debarshi Ray 2015-11-18 19:07:50 UTC
Review of attachment 315788 [details] [review]:

Much better.

::: src/help-overlay.ui
@@ +61,3 @@
+                <property name="accelerator">&lt;Primary&gt;a</property>
+              </object>
+            </child>

Search and select all only work in the 'overview' and should have their own group.

@@ +67,3 @@
+                <property name="title" translatable="yes">Quit</property>
+                <property name="accelerator">&lt;Primary&gt;q</property>
+              </object>

I would put the quit at the top.
Comment 11 Debarshi Ray 2015-11-18 19:09:24 UTC
Created attachment 315851 [details] [review]
Add a help overlay for shortcuts

I took the liberty to fix the above issues, bumped the GTK+ requirement and pushed it to master.
Comment 12 Debarshi Ray 2015-11-18 19:10:22 UTC
Thanks for your work on this, Umang.