Author: cazfi
Date: Mon May  9 14:59:19 2016
New Revision: 32630

URL: http://svn.gna.org/viewcvs/freeciv?rev=32630&view=rev
Log:
Add handling of '+' and '-' to adjust zoom level on gtk3- and gtk3x-clients.

See patch #5903

Modified:
    trunk/client/gui-gtk-3.0/gui_main.c
    trunk/client/gui-gtk-3.x/gui_main.c

Modified: trunk/client/gui-gtk-3.0/gui_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/gui_main.c?rev=32630&r1=32629&r2=32630&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.0/gui_main.c (original)
+++ trunk/client/gui-gtk-3.0/gui_main.c Mon May  9 14:59:19 2016
@@ -460,7 +460,23 @@
 
     default:
       break;
-    };
+    }
+  } else if (!(ev->state & GDK_CONTROL_MASK)) {
+    switch (ev->keyval) {
+
+#ifdef GTK3_ZOOM_ENABLED
+    case GDK_KEY_plus:
+      zoom_step_up();
+      return TRUE;
+
+    case GDK_KEY_minus:
+      zoom_step_down();
+      return TRUE;
+#endif /* GTK3_ZOOM_ENABLED */
+
+    default:
+      break;
+    }
   }
 
   /* Return here if observer */

Modified: trunk/client/gui-gtk-3.x/gui_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.x/gui_main.c?rev=32630&r1=32629&r2=32630&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.x/gui_main.c (original)
+++ trunk/client/gui-gtk-3.x/gui_main.c Mon May  9 14:59:19 2016
@@ -463,7 +463,23 @@
 
     default:
       break;
-    };
+    }
+  } else if (!(ev->state & GDK_CONTROL_MASK)) {
+    switch (ev->keyval) {
+
+#ifdef GTK3_ZOOM_ENABLED
+    case GDK_KEY_plus:
+      zoom_step_up();
+      return TRUE;
+
+    case GDK_KEY_minus:
+      zoom_step_down();
+      return TRUE;
+#endif /* GTK3_ZOOM_ENABLED */
+
+    default:
+      break;
+    }
   }
 
   /* Return here if observer */


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

Reply via email to