diff mbox

[4/5] gtk: Fix zoom in accelerator

Message ID 785b0e2d768f9d77a3cf798e02b4e640b3d11dc5.1398360849.git.crobinso@redhat.com
State New
Headers show

Commit Message

Cole Robinson April 24, 2014, 5:35 p.m. UTC
The accelerator was ctrl+shift+'+', but '+' required a shift key already,
so the accelerator didn't trigger. Switch it to ctrl+shift+'='

Signed-off-by: Cole Robinson <crobinso@redhat.com>
---
 ui/gtk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Gerd Hoffmann April 25, 2014, 9:09 a.m. UTC | #1
On Do, 2014-04-24 at 13:35 -0400, Cole Robinson wrote:
> The accelerator was ctrl+shift+'+', but '+' required a shift key already,
> so the accelerator didn't trigger. Switch it to ctrl+shift+'='

Hmm?  For me the accelerator is ctrl+alt.

Also which keys need shift and which don't depends on the keyboard
layout.  My german keyboard has a unshifted '+' ...

cheers,
  Gerd
Cole Robinson April 25, 2014, 8:43 p.m. UTC | #2
On 04/25/2014 05:09 AM, Gerd Hoffmann wrote:
> On Do, 2014-04-24 at 13:35 -0400, Cole Robinson wrote:
>> The accelerator was ctrl+shift+'+', but '+' required a shift key already,
>> so the accelerator didn't trigger. Switch it to ctrl+shift+'='
> 
> Hmm?  For me the accelerator is ctrl+alt.
> 
> Also which keys need shift and which don't depends on the keyboard
> layout.  My german keyboard has a unshifted '+' ...
> 

Yeah, this patch is bogus :/ Let's drop it.

Thanks,
Cole
diff mbox

Patch

diff --git a/ui/gtk.c b/ui/gtk.c
index 117b0eb..45a61da 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -94,7 +94,7 @@  static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh)
 #define GDK_KEY_f GDK_f
 #define GDK_KEY_g GDK_g
 #define GDK_KEY_q GDK_q
-#define GDK_KEY_plus GDK_plus
+#define GDK_KEY_equal GDK_equal
 #define GDK_KEY_minus GDK_minus
 #endif
 
@@ -1399,7 +1399,7 @@  static GtkWidget *gd_create_menu_view(GtkDisplayState *s, GtkAccelGroup *accel_g
     s->zoom_in_item = gtk_menu_item_new_with_mnemonic(_("Zoom _In"));
     gtk_menu_item_set_accel_path(GTK_MENU_ITEM(s->zoom_in_item),
                                  "<QEMU>/View/Zoom In");
-    gtk_accel_map_add_entry("<QEMU>/View/Zoom In", GDK_KEY_plus,
+    gtk_accel_map_add_entry("<QEMU>/View/Zoom In", GDK_KEY_equal,
                             HOTKEY_MODIFIERS);
     gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), s->zoom_in_item);