Author: cazfi
Date: Sun Jan  3 19:02:03 2016
New Revision: 31340

URL: http://svn.gna.org/viewcvs/freeciv?rev=31340&view=rev
Log:
Added support for resetting zoom level from gtk3-client commandline

See patch #6767

Modified:
    branches/S2_6/client/gui-gtk-3.0/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=31340&r1=31339&r2=31340&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 Sun Jan  3 19:02:03 2016
@@ -281,7 +281,8 @@
   fc_fprintf(stderr,
              _("-r, --resolution MODE\tAssume given resolution screen\n"));
   fc_fprintf(stderr,
-             _("-z, --zoom LEVEL\tSet zoom level\n\n"));
+             /* TRANS: Keep word 'default' untranslated */
+             _("-z, --zoom LEVEL\tSet zoom level. Use value 'default' to 
reset.\n\n"));
 
   /* TRANS: No full stop after the URL, could cause confusion. */
   fc_fprintf(stderr, _("Report bugs at %s\n"), BUG_URL);
@@ -304,8 +305,12 @@
     } else if ((option = get_option_malloc("--zoom", argv, &i, argc))) {
       char *endptr;
 
-      gui_options.zoom_set = TRUE;
-      gui_options.zoom_default_level = strtof(option, &endptr);
+      if (strcmp("default", option)) {
+        gui_options.zoom_set = TRUE;
+        gui_options.zoom_default_level = strtof(option, &endptr);
+      } else {
+        gui_options.zoom_set = FALSE;
+      }
     } else if ((option = get_option_malloc("--resolution", argv, &i, argc))) {
       if (!string_to_video_mode(option, &vmode)) {
         fc_fprintf(stderr, _("Illegal video mode '%s'"), option);


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

Reply via email to