Author: cazfi
Date: Fri May  6 20:53:18 2016
New Revision: 32607

URL: http://svn.gna.org/viewcvs/freeciv?rev=32607&view=rev
Log:
Expose gtk3-client WIP zoom functionality to user only if configured with new 
--with-zoom
option.

See patch #7190

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

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=32607&r1=32606&r2=32607&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.0/gui_main.c (original)
+++ trunk/client/gui-gtk-3.0/gui_main.c Fri May  6 20:53:18 2016
@@ -281,10 +281,15 @@
   fc_fprintf(stderr,
              _("-r, --resolution WIDTHxHEIGHT\tAssume given resolution "
                "screen\n"));
+
+#ifdef GTK3_ZOOM_ENABLED
   fc_fprintf(stderr,
              /* TRANS: Keep word 'default' untranslated */
              _("-z, --zoom LEVEL\tSet zoom level; use value 'default' "
                "to reset\n\n"));
+#else
+  fc_fprintf(stderr, "\n");
+#endif /* GTK3_ZOOM_ENABLED */
 
   /* TRANS: No full stop after the URL, could cause confusion. */
   fc_fprintf(stderr, _("Report bugs at %s\n"), BUG_URL);
@@ -304,6 +309,8 @@
     if (is_option("--help", argv[i])) {
       print_usage();
       exit(EXIT_SUCCESS);
+
+#ifdef GTK3_ZOOM_ENABLED
     } else if ((option = get_option_malloc("--zoom", argv, &i, argc))) {
       char *endptr;
 
@@ -313,6 +320,8 @@
       } else {
         gui_options.zoom_set = FALSE;
       }
+#endif /* GTK3_ZOOM_ENABLED */
+
     } 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);

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=32607&r1=32606&r2=32607&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.x/gui_main.c (original)
+++ trunk/client/gui-gtk-3.x/gui_main.c Fri May  6 20:53:18 2016
@@ -281,10 +281,15 @@
   fc_fprintf(stderr,
              _("-r, --resolution WIDTHxHEIGHT\tAssume given resolution "
                "screen\n"));
+
+#ifdef GTK3_ZOOM_ENABLED
   fc_fprintf(stderr,
              /* TRANS: Keep word 'default' untranslated */
              _("-z, --zoom LEVEL\tSet zoom level; use value 'default' "
                "to reset\n\n"));
+#else
+  fc_fprintf(stderr, "\n");
+#endif /* GTK3_ZOOM_ENABLED */
 
   /* TRANS: No full stop after the URL, could cause confusion. */
   fc_fprintf(stderr, _("Report bugs at %s\n"), BUG_URL);
@@ -304,6 +309,8 @@
     if (is_option("--help", argv[i])) {
       print_usage();
       exit(EXIT_SUCCESS);
+
+#ifdef GTK3_ZOOM_ENABLED
     } else if ((option = get_option_malloc("--zoom", argv, &i, argc))) {
       char *endptr;
 
@@ -313,6 +320,8 @@
       } else {
         gui_options.zoom_set = FALSE;
       }
+#endif /* GTK3_ZOOM_ENABLED */
+
     } 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);

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=32607&r1=32606&r2=32607&view=diff
==============================================================================
--- trunk/configure.ac  (original)
+++ trunk/configure.ac  Fri May  6 20:53:18 2016
@@ -448,6 +448,10 @@
     client=yes
   fi
 done
+
+AC_ARG_WITH([zoom],
+  [AS_HELP_STRING([--with-zoom], [expose experimental/WIP zoom support on 
gtk3-clients to user])],
+  [AC_DEFINE([GTK3_ZOOM_ENABLED], [1], [Experimental zoom functionality 
exposed to user])])
 
 AC_ARG_ENABLE([svnrev],
   AS_HELP_STRING([--enable-svnrev], [get svn revision to version information]),


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

Reply via email to