Author: cazfi
Date: Thu Oct 22 16:25:55 2015
New Revision: 30166

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

See patch #6440

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

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=30166&r1=30165&r2=30166&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 Thu Oct 22 16:25:55 2015
@@ -1567,7 +1567,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_6/client/gui-gtk-3.0/menu.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/menu.c?rev=30166&r1=30165&r2=30166&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.0/menu.c     (original)
+++ branches/S2_6/client/gui-gtk-3.0/menu.c     Thu Oct 22 16:25:55 2015
@@ -806,18 +806,6 @@
   if (options.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 (options.gui_gtk3_better_fog ^ gtk_toggle_action_get_active(action)) {
-    options.gui_gtk3_better_fog ^= 1;
-    update_map_canvas_visible();
   }
 }
 
@@ -1580,7 +1568,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}
@@ -2034,7 +2022,6 @@
   menus_set_sensitive(safe_group, "SHOW_UNIT_SHIELDS",
                       options.draw_units || options.draw_focus_unit);
   menus_set_sensitive(safe_group, "SHOW_FOCUS_UNIT", !options.draw_units);
-  menus_set_sensitive(safe_group, "SHOW_BETTER_FOG_OF_WAR", 
options.draw_fog_of_war);
 }
 
 /****************************************************************************
@@ -2658,13 +2645,11 @@
   menus_set_active(safe_group, "SHOW_UNIT_SHIELDS", options.draw_unit_shields);
   menus_set_active(safe_group, "SHOW_FOCUS_UNIT", options.draw_focus_unit);
   menus_set_active(safe_group, "SHOW_FOG_OF_WAR", options.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",
-                     options.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_6/client/options.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/options.c?rev=30166&r1=30165&r2=30166&view=diff
==============================================================================
--- branches/S2_6/client/options.c      (original)
+++ branches/S2_6/client/options.c      Thu Oct 22 16:25:55 2015
@@ -219,7 +219,6 @@
   .gui_gtk3_dialogs_on_top = TRUE,
   .gui_gtk3_show_task_icons = TRUE,
   .gui_gtk3_enable_tabs = TRUE,
-  .gui_gtk3_better_fog = TRUE,
   .gui_gtk3_show_chat_message_time = FALSE,
   .gui_gtk3_new_messages_go_to_top = FALSE,
   .gui_gtk3_show_message_window_buttons = TRUE,
@@ -2487,13 +2486,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_6/client/options.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/options.h?rev=30166&r1=30165&r2=30166&view=diff
==============================================================================
--- branches/S2_6/client/options.h      (original)
+++ branches/S2_6/client/options.h      Thu Oct 22 16:25:55 2015
@@ -233,7 +233,6 @@
   bool gui_gtk3_dialogs_on_top;
   bool gui_gtk3_show_task_icons;
   bool gui_gtk3_enable_tabs;
-  bool gui_gtk3_better_fog;
   bool gui_gtk3_show_chat_message_time;
   bool gui_gtk3_new_messages_go_to_top;
   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