Author: cazfi
Date: Thu Oct 22 16:26:04 2015
New Revision: 30167

URL: http://svn.gna.org/viewcvs/freeciv?rev=30167&view=rev
Log:
Removed gtk3-client option about Better Fog of War that did nothing.

See patch #6440

Modified:
    branches/S2_5/client/gui-gtk-3.0/gui_main.c
    branches/S2_5/client/gui-gtk-3.0/menu.c
    branches/S2_5/client/options.c
    branches/S2_5/client/options.h

Modified: branches/S2_5/client/gui-gtk-3.0/gui_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-3.0/gui_main.c?rev=30167&r1=30166&r2=30167&view=diff
==============================================================================
--- branches/S2_5/client/gui-gtk-3.0/gui_main.c (original)
+++ branches/S2_5/client/gui-gtk-3.0/gui_main.c Thu Oct 22 16:26:04 2015
@@ -1604,7 +1604,6 @@
   MIGRATE_OPTION(dialogs_on_top);
   MIGRATE_OPTION(show_task_icons);
   MIGRATE_OPTION(enable_tabs);
-  MIGRATE_OPTION(better_fog);
   MIGRATE_OPTION(show_chat_message_time);
   MIGRATE_OPTION(new_messages_go_to_top);
   MIGRATE_OPTION(show_message_window_buttons);

Modified: branches/S2_5/client/gui-gtk-3.0/menu.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-3.0/menu.c?rev=30167&r1=30166&r2=30167&view=diff
==============================================================================
--- branches/S2_5/client/gui-gtk-3.0/menu.c     (original)
+++ branches/S2_5/client/gui-gtk-3.0/menu.c     Thu Oct 22 16:26:04 2015
@@ -771,18 +771,6 @@
   if (draw_fog_of_war ^ gtk_toggle_action_get_active(action)) {
     key_fog_of_war_toggle();
     view_menu_update_sensitivity();
-  }
-}
-
-/****************************************************************
-  Action "SHOW_BETTER_FOG_OF_WAR" callback.
-*****************************************************************/
-static void show_better_fog_of_war_callback(GtkToggleAction *action,
-                                            gpointer data)
-{
-  if (gui_gtk3_better_fog ^ gtk_toggle_action_get_active(action)) {
-    gui_gtk3_better_fog ^= 1;
-    update_map_canvas_visible();
   }
 }
 
@@ -1517,7 +1505,7 @@
       {"SHOW_FOG_OF_WAR", NULL, _("Fog of _War"),
        NULL, NULL, G_CALLBACK(show_fog_of_war_callback), FALSE},
       {"SHOW_BETTER_FOG_OF_WAR", NULL, _("Better Fog of War"),
-       NULL, NULL, G_CALLBACK(show_better_fog_of_war_callback), FALSE},
+       NULL, NULL, NULL, FALSE},
 
       {"FULL_SCREEN", NULL, _("_Fullscreen"),
        "<Alt>Return", NULL, G_CALLBACK(full_screen_callback), FALSE}
@@ -1962,7 +1950,6 @@
   menus_set_sensitive(safe_group, "SHOW_UNIT_SHIELDS",
                       draw_units || draw_focus_unit);
   menus_set_sensitive(safe_group, "SHOW_FOCUS_UNIT", !draw_units);
-  menus_set_sensitive(safe_group, "SHOW_BETTER_FOG_OF_WAR", draw_fog_of_war);
 }
 
 /****************************************************************************
@@ -2527,13 +2514,11 @@
   menus_set_active(safe_group, "SHOW_UNIT_SHIELDS", draw_unit_shields);
   menus_set_active(safe_group, "SHOW_FOCUS_UNIT", draw_focus_unit);
   menus_set_active(safe_group, "SHOW_FOG_OF_WAR", draw_fog_of_war);
-  if (tileset_use_hard_coded_fog(tileset)) {
-    menus_set_visible(safe_group, "SHOW_BETTER_FOG_OF_WAR", TRUE, TRUE);
-    menus_set_active(safe_group, "SHOW_BETTER_FOG_OF_WAR",
-                     gui_gtk3_better_fog);
-  } else {
-    menus_set_visible(safe_group, "SHOW_BETTER_FOG_OF_WAR", FALSE, FALSE);
-  }
+
+  /* To avoid run-time errors from gtk3, we have to have this action,
+   * really used by gtk2-client only, defined also in gtk3-client code.
+   * We just don't show it to the user. */
+  menus_set_visible(safe_group, "SHOW_BETTER_FOG_OF_WAR", FALSE, FALSE);
 
   view_menu_update_sensitivity();
 

Modified: branches/S2_5/client/options.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/options.c?rev=30167&r1=30166&r2=30167&view=diff
==============================================================================
--- branches/S2_5/client/options.c      (original)
+++ branches/S2_5/client/options.c      Thu Oct 22 16:26:04 2015
@@ -200,7 +200,6 @@
 bool gui_gtk3_dialogs_on_top = TRUE;
 bool gui_gtk3_show_task_icons = TRUE;
 bool gui_gtk3_enable_tabs = TRUE;
-bool gui_gtk3_better_fog = TRUE;
 bool gui_gtk3_show_chat_message_time = FALSE;
 bool gui_gtk3_new_messages_go_to_top = FALSE;
 bool gui_gtk3_show_message_window_buttons = TRUE;
@@ -2398,13 +2397,6 @@
                      "be shown as separate tabs rather than in popup "
                      "dialogs."),
                   COC_INTERFACE, GUI_GTK3, TRUE, NULL),
-  GEN_BOOL_OPTION(gui_gtk3_better_fog,
-                  N_("Better fog-of-war drawing"),
-                  N_("If this is enabled then a better method is used "
-                     "for drawing fog-of-war.  It is not any slower but "
-                     "will consume about twice as much memory."),
-                  COC_GRAPHICS, GUI_GTK3,
-                  TRUE, view_option_changed_callback),
   GEN_BOOL_OPTION(gui_gtk3_show_chat_message_time,
                   N_("Show time for each chat message"),
                   N_("If this option is enabled then all chat messages "

Modified: branches/S2_5/client/options.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/options.h?rev=30167&r1=30166&r2=30167&view=diff
==============================================================================
--- branches/S2_5/client/options.h      (original)
+++ branches/S2_5/client/options.h      Thu Oct 22 16:26:04 2015
@@ -184,7 +184,6 @@
 extern bool gui_gtk3_dialogs_on_top;
 extern bool gui_gtk3_show_task_icons;
 extern bool gui_gtk3_enable_tabs;
-extern bool gui_gtk3_better_fog;
 extern bool gui_gtk3_show_chat_message_time;
 extern bool gui_gtk3_new_messages_go_to_top;
 extern bool gui_gtk3_show_message_window_buttons;


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

Reply via email to