Complete.Org: Mailing Lists: Archives: freeciv-dev: March 1999:
[Freeciv-Dev] eliminate "flags are transparent" option?
Home

[Freeciv-Dev] eliminate "flags are transparent" option?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] eliminate "flags are transparent" option?
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Thu, 4 Mar 1999 22:51:02 +1100

Can we get rid of the flags_are_transparent option,
and treat it as though it is always on?  For the Engels
tiles I don't think there is any point to not having
the flags transparent, and for the classic tiles it
now makes no difference either way (I made the transparent
parts opaque when revising the flags).  So I think the
option is just confusing.

This patch removes the option, though the flags_are_transparent
variable is still in the code, just with value=1 always.

-- David
diff -u -r --exclude-from exclude freeciv-cvs/client/Freeciv.h 
freeciv-mod/client/Freeciv.h
--- freeciv-cvs/client/Freeciv.h        Mon Mar  1 19:22:57 1999
+++ freeciv-mod/client/Freeciv.h        Thu Mar  4 22:44:39 1999
@@ -701,18 +701,11 @@
 "Freeciv*optionmovetoggle.fromVert:       optionbelltoggle",
 "Freeciv*optionmovetoggle.fromHoriz:      optionmovelabel",
 "Freeciv*optionmovetoggle.internalHeight: 0",
-"Freeciv*optionflaglabel.label:         Flags are transparent\\ \\ \\ \\ \\ \\ 
",
-"Freeciv*optionflaglabel.borderWidth:   0",
-"Freeciv*optionflaglabel.fromVert:      optionmovetoggle",
-"Freeciv*optionflagtoggle.label:          Yes",
-"Freeciv*optionflagtoggle.fromVert:       optionmovetoggle",
-"Freeciv*optionflagtoggle.fromHoriz:      optionflaglabel",
-"Freeciv*optionflagtoggle.internalHeight: 0",
 "Freeciv*optionaipopuplabel.label:         Popup dialogs in AI Mode\\ \\ \\ ",
 "Freeciv*optionaipopuplabel.borderWidth:   0",
-"Freeciv*optionaipopuplabel.fromVert:      optionflagtoggle",
+"Freeciv*optionaipopuplabel.fromVert:      optionmovetoggle",
 "Freeciv*optionaipopuptoggle.label:          Yes",
-"Freeciv*optionaipopuptoggle.fromVert:       optionflagtoggle",
+"Freeciv*optionaipopuptoggle.fromVert:       optionmovetoggle",
 "Freeciv*optionaipopuptoggle.fromHoriz:      optionaipopuplabel",
 "Freeciv*optionaipopuptoggle.internalHeight: 0",
 "Freeciv*optionaiturndonelabel.label:         Manual Turn Done in AI Mode",
diff -u -r --exclude-from exclude freeciv-cvs/client/optiondlg.c 
freeciv-mod/client/optiondlg.c
--- freeciv-cvs/client/optiondlg.c      Sun Feb 21 11:47:22 1999
+++ freeciv-mod/client/optiondlg.c      Thu Mar  4 22:44:23 1999
@@ -49,7 +49,6 @@
 extern int use_solid_color_behind_units;
 extern int sound_bell_at_new_turn;
 extern int smooth_move_units;
-extern int flags_are_transparent;
 extern int ai_popup_windows;
 extern int ai_manual_turn_done;
 extern int auto_center_on_unit;
@@ -72,7 +71,6 @@
   GEN_OPT(use_solid_color_behind_units),
   GEN_OPT(sound_bell_at_new_turn),
   GEN_OPT(smooth_move_units),
-  GEN_OPT(flags_are_transparent),
   GEN_OPT(ai_popup_windows),
   GEN_OPT(ai_manual_turn_done),
   GEN_OPT(auto_center_on_unit),
@@ -87,7 +85,6 @@
 Widget option_bg_toggle;
 Widget option_bell_toggle;
 Widget option_move_toggle;
-Widget option_flag_toggle;
 Widget option_aipopup_toggle;
 Widget option_aiturndone_toggle;
 Widget option_autocenter_toggle;
@@ -113,8 +110,6 @@
                 XtNlabel, sound_bell_at_new_turn?"Yes":"No", NULL);
   XtVaSetValues(option_move_toggle, XtNstate, smooth_move_units,
                 XtNlabel, smooth_move_units?"Yes":"No", NULL);
-  XtVaSetValues(option_flag_toggle, XtNstate, flags_are_transparent,
-                XtNlabel, flags_are_transparent?"Yes":"No", NULL);
   XtVaSetValues(option_aipopup_toggle, XtNstate, ai_popup_windows,
                 XtNlabel, ai_popup_windows?"Yes":"No", NULL);
   XtVaSetValues(option_aiturndone_toggle, XtNstate, ai_manual_turn_done,
@@ -180,13 +175,6 @@
                                                toggleWidgetClass, 
                                                option_form,
                                                NULL);
-  XtVaCreateManagedWidget("optionflaglabel",
-                          labelWidgetClass,
-                         option_form, NULL);
-  option_flag_toggle = XtVaCreateManagedWidget("optionflagtoggle",
-                                              toggleWidgetClass,
-                                              option_form,
-                                              NULL);
   XtVaCreateManagedWidget("optionaipopuplabel",
                           labelWidgetClass,
                          option_form, NULL);
@@ -243,7 +231,6 @@
   XtAddCallback(option_bg_toggle, XtNcallback, toggle_callback, NULL);
   XtAddCallback(option_bell_toggle, XtNcallback, toggle_callback, NULL);
   XtAddCallback(option_move_toggle, XtNcallback, toggle_callback, NULL);
-  XtAddCallback(option_flag_toggle, XtNcallback, toggle_callback, NULL);
   XtAddCallback(option_aipopup_toggle, XtNcallback, toggle_callback, NULL);
   XtAddCallback(option_aiturndone_toggle, XtNcallback, toggle_callback, NULL);
   XtAddCallback(option_autocenter_toggle, XtNcallback, toggle_callback, NULL);
@@ -287,8 +274,6 @@
   sound_bell_at_new_turn=b;
   XtVaGetValues(option_move_toggle, XtNstate, &b, NULL);
   smooth_move_units=b;
-  XtVaGetValues(option_flag_toggle, XtNstate, &b, NULL);
-  flags_are_transparent=b;
   XtVaGetValues(option_aipopup_toggle, XtNstate, &b, NULL);
   ai_popup_windows=b;
   XtVaGetValues(option_aiturndone_toggle, XtNstate, &b, NULL);
@@ -416,6 +401,11 @@
          goto next_line;
        }
       }
+    }
+    
+    if ((s = strstr(buffer, "flags_are_transparent"))) {
+      /* old option, don't give a warning message */
+      goto next_line;          
     }
     
     append_output_window("Unknown variable found in option file: input is:");
diff -u -r --exclude-from exclude freeciv-cvs/data/Freeciv 
freeciv-mod/data/Freeciv
--- freeciv-cvs/data/Freeciv    Mon Mar  1 18:54:47 1999
+++ freeciv-mod/data/Freeciv    Thu Mar  4 22:41:37 1999
@@ -923,21 +923,12 @@
 Freeciv*optionmovetoggle.fromHoriz:      optionmovelabel
 Freeciv*optionmovetoggle.internalHeight: 0
 
-Freeciv*optionflaglabel.label:         Flags are transparent\ \ \ \ \ \ 
-Freeciv*optionflaglabel.borderWidth:   0
-Freeciv*optionflaglabel.fromVert:      optionmovetoggle
-
-Freeciv*optionflagtoggle.label:          Yes
-Freeciv*optionflagtoggle.fromVert:       optionmovetoggle
-Freeciv*optionflagtoggle.fromHoriz:      optionflaglabel
-Freeciv*optionflagtoggle.internalHeight: 0
-
 Freeciv*optionaipopuplabel.label:         Popup dialogs in AI Mode\ \ \ 
 Freeciv*optionaipopuplabel.borderWidth:   0
-Freeciv*optionaipopuplabel.fromVert:      optionflagtoggle
+Freeciv*optionaipopuplabel.fromVert:      optionmovetoggle
 
 Freeciv*optionaipopuptoggle.label:          Yes
-Freeciv*optionaipopuptoggle.fromVert:       optionflagtoggle
+Freeciv*optionaipopuptoggle.fromVert:       optionmovetoggle
 Freeciv*optionaipopuptoggle.fromHoriz:      optionaipopuplabel
 Freeciv*optionaipopuptoggle.internalHeight: 0
 

[Prev in Thread] Current Thread [Next in Thread]