Author: cazfi
Date: Tue Dec  9 20:15:36 2014
New Revision: 27214

URL: http://svn.gna.org/viewcvs/freeciv?rev=27214&view=rev
Log:
Added gui-specific "zoom" commandline option for gtk3-client

See patch #5499

Modified:
    trunk/client/gui-gtk-3.0/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=27214&r1=27213&r2=27214&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.0/gui_main.c (original)
+++ trunk/client/gui-gtk-3.0/gui_main.c Tue Dec  9 20:15:36 2014
@@ -262,6 +262,12 @@
              _("This client accepts the standard Gtk command-line options\n"
                "after '--'. See the Gtk documentation.\n\n"));
 
+  fc_fprintf(stderr,
+             _("Other gui-specific options are:\n"));
+
+  fc_fprintf(stderr,
+             _("-z, --zoom LEVEL\tSet zoom level\n\n"));
+
   /* TRANS: No full stop after the URL, could cause confusion. */
   fc_fprintf(stderr, _("Report bugs at %s\n"), BUG_URL);
 }
@@ -275,10 +281,17 @@
   int i = 1;
 
   while (i < argc) {
+    char *option = NULL;
+
     if (is_option("--help", argv[i])) {
       print_usage();
       exit(EXIT_SUCCESS);
+    } else if ((option = get_option_malloc("--zoom", argv, &i, argc))) {
+      char *endptr;
+
+      set_map_zoom(strtof(option, &endptr));
     }
+
     i++;
   }
 }


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

Reply via email to