Author: cazfi
Date: Fri May  6 20:53:27 2016
New Revision: 32608

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

See patch #7190

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

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=32608&r1=32607&r2=32608&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 Fri May  6 20:53:27 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: branches/S2_6/configure.ac
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/configure.ac?rev=32608&r1=32607&r2=32608&view=diff
==============================================================================
--- branches/S2_6/configure.ac  (original)
+++ branches/S2_6/configure.ac  Fri May  6 20:53:27 2016
@@ -400,18 +400,20 @@
   fi
 done
 
+AC_ARG_WITH([zoom],
+  [AS_HELP_STRING([--with-zoom], [expose experimental/WIP zoom support on 
gtk3-client to user])],
+  [AC_DEFINE([GTK3_ZOOM_ENABLED], [1], [Experimental zoom functionality 
exposed to user])])
+
 AC_ARG_WITH([xaw],
-  AS_HELP_STRING([--with-xaw], [use the Xaw widget set for the xaw client]),
-WITH_XAW=1
-)
+  [AS_HELP_STRING([--with-xaw], [use the Xaw widget set for the xaw client])],
+  [WITH_XAW=1])
 
 AC_ARG_WITH([xaw3d],
-  AS_HELP_STRING([--with-xaw3d], [use the Xaw3d widget set for the xaw 
client]),
-WITH_XAW3D=1
-)
+  [AS_HELP_STRING([--with-xaw3d], [use the Xaw3d widget set for the xaw 
client])],
+  [WITH_XAW3D=1])
 
 if test "x$WITH_XAW" != "x" && test "x$WITH_XAW3D" != "x" ; then
-  AC_MSG_ERROR(Cannot use both --with-xaw and --with-xaw3d at the same time)
+  AC_MSG_ERROR([Cannot use both --with-xaw and --with-xaw3d at the same time])
 fi
 
 AC_ARG_ENABLE([svnrev],


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

Reply via email to