Author: cazfi
Date: Sat Dec 19 22:04:26 2015
New Revision: 31105

URL: http://svn.gna.org/viewcvs/freeciv?rev=31105&view=rev
Log:
Updated gtk3x-client sources to refer options reserved for it instead of 
gtk3-client
options.

See patch #6685

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

Modified: trunk/client/gui-gtk-3.x/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.x/citydlg.c?rev=31105&r1=31104&r2=31105&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.x/citydlg.c  (original)
+++ trunk/client/gui-gtk-3.x/citydlg.c  Sat Dec 19 22:04:26 2015
@@ -3246,13 +3246,13 @@
 
   /* Save size of the city dialog. */
   GUI_GTK_OPTION(citydlg_xsize)
-    = CLIP(GUI_GTK3_CITYDLG_MIN_XSIZE,
+    = CLIP(GUI_GTK4_CITYDLG_MIN_XSIZE,
            gtk_widget_get_allocated_width(pdialog->shell),
-           GUI_GTK3_CITYDLG_MAX_XSIZE);
+           GUI_GTK4_CITYDLG_MAX_XSIZE);
   GUI_GTK_OPTION(citydlg_ysize)
-    = CLIP(GUI_GTK3_CITYDLG_MIN_XSIZE,
+    = CLIP(GUI_GTK4_CITYDLG_MIN_XSIZE,
            gtk_widget_get_allocated_height(pdialog->shell),
-           GUI_GTK3_CITYDLG_MAX_XSIZE);
+           GUI_GTK4_CITYDLG_MAX_XSIZE);
 
   last_page
     = gtk_notebook_get_current_page(GTK_NOTEBOOK(pdialog->notebook));

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=31105&r1=31104&r2=31105&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.x/gui_main.c (original)
+++ trunk/client/gui-gtk-3.x/gui_main.c Sat Dec 19 22:04:26 2015
@@ -1565,20 +1565,19 @@
 }
 
 /**************************************************************************
-  Migrate gtk3 client specific options from gtk2 client options.
-**************************************************************************/
-static void migrate_options_from_gtk2(void)
-{
-  log_normal(_("Migrating options from gtk2 to gtk3 client"));
-
-#define MIGRATE_OPTION(opt) GUI_GTK_OPTION(opt) = gui_options.gui_gtk2_##opt;
+  Migrate gtk3x client specific options from gtk3 client options.
+**************************************************************************/
+static void migrate_options_from_gtk3(void)
+{
+  log_normal(_("Migrating options from gtk3 to gtk3x client"));
+
+#define MIGRATE_OPTION(opt) GUI_GTK_OPTION(opt) = gui_options.gui_gtk3_##opt;
 #define MIGRATE_STR_OPTION(opt) \
-  strncpy(GUI_GTK_OPTION(opt), gui_options.gui_gtk2_##opt,      \
+  strncpy(GUI_GTK_OPTION(opt), gui_options.gui_gtk3_##opt,      \
           sizeof(GUI_GTK_OPTION(opt)));
 
   /* Default theme name is never migrated */
-  /* Fullscreen not migrated as gtk3-client differs from gtk2-client in a way 
that
-   * user is likely to want default even if gtk2-client setting differs. */
+  MIGRATE_OPTION(fullscreen);
   MIGRATE_OPTION(map_scrollbars);
   MIGRATE_OPTION(dialogs_on_top);
   MIGRATE_OPTION(show_task_icons);
@@ -1613,21 +1612,7 @@
 #undef MIGRATE_OPTION
 #undef MIGRATE_STR_OPTION
 
-  GUI_GTK_OPTION(migrated_from_gtk2) = TRUE;
-}
-
-/**************************************************************************
-  Migrate gtk3 client specific options from freeciv-2.5 options
-**************************************************************************/
-static void migrate_options_from_2_5(void)
-{
-  if (!gui_options.first_boot) {
-    log_normal(_("Migrating gtk3-client options from freeciv-2.5 options."));
-
-    GUI_GTK_OPTION(fullscreen) = gui_options.migrate_fullscreen;
-
-    GUI_GTK_OPTION(migrated_from_2_5) = TRUE;
-  }
+  GUI_GTK_OPTION(migrated_from_gtk3) = TRUE;
 }
 
 /**************************************************************************
@@ -1660,11 +1645,8 @@
   gtk_widget_set_name(toplevel, "Freeciv");
   root_window = gtk_widget_get_window(toplevel);
 
-  if (!GUI_GTK_OPTION(migrated_from_gtk2)) {
-    migrate_options_from_gtk2();
-  }
-  if (!GUI_GTK_OPTION(migrated_from_2_5)) {
-    migrate_options_from_2_5();
+  if (!GUI_GTK_OPTION(migrated_from_gtk3)) {
+    migrate_options_from_gtk3();
   }
 
   if (GUI_GTK_OPTION(fullscreen)) {

Modified: trunk/client/gui-gtk-3.x/gui_main.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.x/gui_main.h?rev=31105&r1=31104&r2=31105&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.x/gui_main.h (original)
+++ trunk/client/gui-gtk-3.x/gui_main.h Sat Dec 19 22:04:26 2015
@@ -18,9 +18,9 @@
 /* client */
 #include "gui_main_g.h"
 
-#define GUI_GTK_OPTION(optname) gui_options.gui_gtk3_##optname
-#define GUI_GTK_OPTION_STR(optname) "gui_gtk3_" #optname
-#define GUI_GTK_DEFAULT_THEME_NAME FC_GTK3_DEFAULT_THEME_NAME
+#define GUI_GTK_OPTION(optname) gui_options.gui_gtk4_##optname
+#define GUI_GTK_OPTION_STR(optname) "gui_gtk4_" #optname
+#define GUI_GTK_DEFAULT_THEME_NAME FC_GTK4_DEFAULT_THEME_NAME
 
 /* network string charset conversion */
 gchar *ntoh_str(const gchar *netstr);


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

Reply via email to