Author: cazfi
Date: Thu Feb 23 06:00:24 2017
New Revision: 35062

URL: http://svn.gna.org/viewcvs/freeciv?rev=35062&view=rev
Log:
Fixed zoom out and in to work when '+' or '-' require 'shift'

Reported by Jochen Trumpf <jochent>

See gna bug #25237

Modified:
    branches/S2_6/client/gui-gtk-3.0/gui_main.c
    branches/S2_6/client/gui-gtk-3.22/gui_main.c

Modified: branches/S2_6/client/gui-gtk-3.0/gui_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/gui_main.c?rev=35062&r1=35061&r2=35062&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.0/gui_main.c (original)
+++ branches/S2_6/client/gui-gtk-3.0/gui_main.c Thu Feb 23 06:00:24 2017
@@ -489,8 +489,14 @@
     }
   } else if (!(ev->state & GDK_CONTROL_MASK)) {
     switch (ev->keyval) {
+    default:
+      break;
+    }
+  }
 
 #ifdef GTK3_ZOOM_ENABLED
+  if (!(ev->state & GDK_CONTROL_MASK)) {
+    switch (ev->keyval) {
     case GDK_KEY_plus:
       zoom_step_up();
       return TRUE;
@@ -498,12 +504,12 @@
     case GDK_KEY_minus:
       zoom_step_down();
       return TRUE;
-#endif /* GTK3_ZOOM_ENABLED */
 
     default:
       break;
     }
   }
+#endif /* GTK3_ZOOM_ENABLED */
 
   /* Return here if observer */
   if (client_is_observer()) {

Modified: branches/S2_6/client/gui-gtk-3.22/gui_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gui_main.c?rev=35062&r1=35061&r2=35062&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.22/gui_main.c        (original)
+++ branches/S2_6/client/gui-gtk-3.22/gui_main.c        Thu Feb 23 06:00:24 2017
@@ -468,8 +468,14 @@
     }
   } else if (!(ev->state & GDK_CONTROL_MASK)) {
     switch (ev->keyval) {
+    default:
+      break;
+    }
+  }
 
 #ifdef GTK3_ZOOM_ENABLED
+  if (!(ev->state & GDK_CONTROL_MASK)) {
+    switch (ev->keyval) {
     case GDK_KEY_plus:
       zoom_step_up();
       return TRUE;
@@ -477,12 +483,12 @@
     case GDK_KEY_minus:
       zoom_step_down();
       return TRUE;
-#endif /* GTK3_ZOOM_ENABLED */
 
     default:
       break;
     }
   }
+#endif /* GTK3_ZOOM_ENABLED */
 
   /* Return here if observer */
   if (client_is_observer()) {


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to