Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] (PR#12761) remove make_modal parameter of popup_city_dialo
Home

[Freeciv-Dev] (PR#12761) remove make_modal parameter of popup_city_dialo

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12761) remove make_modal parameter of popup_city_dialog
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 10 Apr 2005 10:44:57 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12761 >

This patch removes the make_modal parameter of the popup_city_dialog 
function.

1.  The function internally ignores it (gtk2 client).
2.  It is always FALSE.
3.  It will always be FALSE (modal dialogs = bad).
4.  Most/all other dialog functions have already had make_modal removed.

Only the gtk2 client is updated.

This is the only make_modal parameter left in client/include/*.h. 
However grepping may turn up some other remnants of modal dialogs, which 
should generally also be removed.

-jason

Index: client/control.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/control.c,v
retrieving revision 1.167
diff -u -r1.167 control.c
--- client/control.c    6 Apr 2005 21:24:41 -0000       1.167
+++ client/control.c    10 Apr 2005 17:41:14 -0000
@@ -1471,7 +1471,7 @@
   }
   /* Otherwise use popups. */
   else if (pcity && can_player_see_city_internals(game.player_ptr, pcity)) {
-    popup_city_dialog(pcity, FALSE);
+    popup_city_dialog(pcity);
   }
   else if (unit_list_size(ptile->units) == 0 && !pcity
            && punit_focus) {
Index: client/messagewin_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/messagewin_common.c,v
retrieving revision 1.20
diff -u -r1.20 messagewin_common.c
--- client/messagewin_common.c  28 Mar 2005 17:05:54 -0000      1.20
+++ client/messagewin_common.c  10 Apr 2005 17:41:14 -0000
@@ -199,7 +199,7 @@
        *
        * In both cases, it would be better if the popup button weren't
        * highlighted at all - this is left up to the GUI. */
-      popup_city_dialog(pcity, FALSE);
+      popup_city_dialog(pcity);
     }
   }
 }
Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.486
diff -u -r1.486 packhand.c
--- client/packhand.c   1 Apr 2005 00:05:59 -0000       1.486
+++ client/packhand.c   10 Apr 2005 17:41:15 -0000
@@ -603,7 +603,7 @@
       (!game.player_ptr->ai.control)) {
     update_menus();
     if (!city_dialog_is_open(pcity)) {
-      popup_city_dialog(pcity, FALSE);
+      popup_city_dialog(pcity);
     }
   }
 
Index: client/gui-gtk-2.0/citydlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/citydlg.c,v
retrieving revision 1.124
diff -u -r1.124 citydlg.c
--- client/gui-gtk-2.0/citydlg.c        10 Apr 2005 01:59:31 -0000      1.124
+++ client/gui-gtk-2.0/citydlg.c        10 Apr 2005 17:41:15 -0000
@@ -169,8 +169,6 @@
   Impr_Type_id sell_id;
 
   int cwidth;
-
-  bool is_modal;
 };
 
 static GtkRcStyle *info_label_style[NUM_INFO_STYLES] = { NULL, NULL, NULL };
@@ -198,8 +196,7 @@
 static void create_and_append_cma_page(struct city_dialog *pdialog);
 static void create_and_append_settings_page(struct city_dialog *pdialog);
 
-static struct city_dialog *create_city_dialog(struct city *pcity,
-                                             bool make_modal);
+static struct city_dialog *create_city_dialog(struct city *pcity);
 
 static void city_dialog_update_title(struct city_dialog *pdialog);
 static void city_dialog_update_citizens(struct city_dialog *pdialog);
@@ -423,12 +420,12 @@
 /****************************************************************
 popup the dialog 10% inside the main-window 
 *****************************************************************/
-void popup_city_dialog(struct city *pcity, bool make_modal)
+void popup_city_dialog(struct city *pcity)
 {
   struct city_dialog *pdialog;
 
   if (!(pdialog = get_city_dialog(pcity))) {
-    pdialog = create_city_dialog(pcity, make_modal);
+    pdialog = create_city_dialog(pcity);
   }
 
   gtk_window_present(GTK_WINDOW(pdialog->shell));
@@ -1184,8 +1181,7 @@
 /****************************************************************
 ...
 *****************************************************************/
-static struct city_dialog *create_city_dialog(struct city *pcity,
-                                             bool make_modal)
+static struct city_dialog *create_city_dialog(struct city *pcity)
 {
   struct city_dialog *pdialog;
 
@@ -1325,8 +1321,6 @@
   /* need to do this every time a new dialog is opened. */
   city_dialog_update_prev_next();
 
-  pdialog->is_modal = make_modal;
-
   gtk_widget_show_all(GTK_DIALOG(pdialog->shell)->vbox);
   gtk_widget_show_all(GTK_DIALOG(pdialog->shell)->action_area);
 
Index: client/gui-gtk-2.0/cityrep.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/cityrep.c,v
retrieving revision 1.71
diff -u -r1.71 cityrep.c
--- client/gui-gtk-2.0/cityrep.c        10 Apr 2005 03:31:22 -0000      1.71
+++ client/gui-gtk-2.0/cityrep.c        10 Apr 2005 17:41:15 -0000
@@ -1028,7 +1028,7 @@
     center_tile_mapcanvas(pcity->tile);
   }
 
-  popup_city_dialog(pcity, 0);
+  popup_city_dialog(pcity);
 }
 
 /****************************************************************
Index: client/gui-gtk-2.0/dialogs.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/dialogs.c,v
retrieving revision 1.98
diff -u -r1.98 dialogs.c
--- client/gui-gtk-2.0/dialogs.c        28 Mar 2005 16:59:14 -0000      1.98
+++ client/gui-gtk-2.0/dialogs.c        10 Apr 2005 17:41:16 -0000
@@ -186,7 +186,7 @@
     }
 
     if (pcity) {
-      popup_city_dialog(pcity, 0);
+      popup_city_dialog(pcity);
     }
     break;
   }
Index: client/include/citydlg_g.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/include/citydlg_g.h,v
retrieving revision 1.7
diff -u -r1.7 citydlg_g.h
--- client/include/citydlg_g.h  3 Sep 2004 04:22:36 -0000       1.7
+++ client/include/citydlg_g.h  10 Apr 2005 17:41:16 -0000
@@ -17,7 +17,7 @@
 
 #include "citydlg_common.h"
 
-void popup_city_dialog(struct city *pcity, bool make_modal);
+void popup_city_dialog(struct city *pcity);
 void popdown_city_dialog(struct city *pcity);
 void popdown_all_city_dialogs(void);
 void refresh_city_dialog(struct city *pcity);
Index: data/isophex.tilespec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/isophex.tilespec,v
retrieving revision 1.12
diff -u -r1.12 isophex.tilespec
--- data/isophex.tilespec       18 Mar 2005 00:38:55 -0000      1.12
+++ data/isophex.tilespec       10 Apr 2005 17:41:16 -0000
@@ -36,6 +36,9 @@
 ; offset the citybar text by this amount (from the city tile origin)
 citybar_offset_y = 20
 
+; offset the citybar text by this amount (from the city tile origin)
+citybar_offset_y = 20
+
 ; Hex data.
 is_hex = 1
 is_isometric = 0
@@ -62,6 +65,7 @@
 files = 
   "misc/colors.spec",
   "misc/overlays.spec",
+  "misc/citybar.spec",
   "isophex/terrain1.spec",
   "isophex/terrain2.spec",
   "isophex/darkness.spec",
Index: data/isotrident.tilespec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/isotrident.tilespec,v
retrieving revision 1.35
diff -u -r1.35 isotrident.tilespec
--- data/isotrident.tilespec    18 Mar 2005 00:38:55 -0000      1.35
+++ data/isotrident.tilespec    10 Apr 2005 17:41:16 -0000
@@ -38,6 +38,9 @@
 ; offset the citybar text by this amount (from the city tile origin)
 citybar_offset_y = 20
 
+; offset the citybar text by this amount (from the city tile origin)
+citybar_offset_y = 20
+
 ; Font size (points) to use to draw city names and productions:
 city_names_font_size = 10
 city_productions_font_size = 10
@@ -54,6 +57,7 @@
 files = 
   "misc/colors.spec",
   "misc/overlays.spec",
+  "misc/citybar.spec",
   "isotrident/terrain1.spec",
   "isotrident/terrain2.spec",
   "isotrident/tiles.spec",
Index: data/trident.tilespec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/trident.tilespec,v
retrieving revision 1.35
diff -u -r1.35 trident.tilespec
--- data/trident.tilespec       18 Mar 2005 00:38:55 -0000      1.35
+++ data/trident.tilespec       10 Apr 2005 17:41:16 -0000
@@ -34,6 +34,9 @@
 ; offset the citybar text by this amount (from the city tile origin)
 citybar_offset_y = 27
 
+; offset the citybar text by this amount (from the city tile origin)
+citybar_offset_y = 27
+
 ; Font size (points) to use to draw city names and productions:
 city_names_font_size = 10
 city_productions_font_size = 10
@@ -50,6 +53,7 @@
 files = 
   "misc/colors.spec",
   "misc/overlays.spec",
+  "misc/citybar.spec",
   "trident/tiles.spec",
   "misc/small.spec",
   "trident/units.spec",
Index: data/trident_shields.tilespec
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/trident_shields.tilespec,v
retrieving revision 1.26
diff -u -r1.26 trident_shields.tilespec
--- data/trident_shields.tilespec       18 Mar 2005 00:38:55 -0000      1.26
+++ data/trident_shields.tilespec       10 Apr 2005 17:41:16 -0000
@@ -25,6 +25,9 @@
 ; offset the citybar text by this amount (from the city tile origin)
 citybar_offset_y = 27
 
+; offset the citybar text by this amount (from the city tile origin)
+citybar_offset_y = 27
+
 ; Do not blend hills and mountains together.
 is_mountainous = 0
 
@@ -53,6 +56,7 @@
 files = 
   "misc/colors.spec",
   "misc/overlays.spec",
+  "misc/citybar.spec",
   "trident/tiles.spec",
   "misc/small.spec",
   "trident/units.spec",

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12761) remove make_modal parameter of popup_city_dialog, Jason Short <=