Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] (PR#3712) City choose production dialog
Home

[Freeciv-Dev] (PR#3712) City choose production dialog

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: dspeyer@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#3712) City choose production dialog
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Fri, 2 Apr 2004 18:19:17 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=3712 >

> [vasc - Fri Apr 02 20:14:34 2004]:

> Would making the icons optional be a satisfactory solution?

And here is the patch.

Index: client/options.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/options.c,v
retrieving revision 1.95
diff -u -r1.95 options.c
--- client/options.c    15 Mar 2004 06:05:17 -0000      1.95
+++ client/options.c    3 Apr 2004 01:49:39 -0000
@@ -72,6 +72,7 @@
 bool ask_city_name = TRUE;
 bool popup_new_cities = TRUE;
 bool keyboardless_goto = TRUE;
+bool show_task_icons = TRUE;
 
 /* This option is currently set by the client - not by the user. */
 bool update_city_text_in_refresh_tile = TRUE;
Index: client/options.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/options.h,v
retrieving revision 1.36
diff -u -r1.36 options.h
--- client/options.h    15 Mar 2004 06:05:17 -0000      1.36
+++ client/options.h    3 Apr 2004 01:49:39 -0000
@@ -46,6 +46,7 @@
 extern bool popup_new_cities;
 extern bool update_city_text_in_refresh_tile;
 extern bool keyboardless_goto;
+extern bool show_task_icons;
 
 enum client_option_type {
   COT_BOOL,
Index: client/gui-gtk-2.0/gui_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/gui_main.c,v
retrieving revision 1.69
diff -u -r1.69 gui_main.c
--- client/gui-gtk-2.0/gui_main.c       26 Mar 2004 19:30:53 -0000      1.69
+++ client/gui-gtk-2.0/gui_main.c       3 Apr 2004 01:49:39 -0000
@@ -124,10 +124,11 @@
 GtkWidget *government_ebox;
 
 client_option gui_options[] = {
-  GEN_BOOL_OPTION(meta_accelerators, N_("Use Alt/Meta for accelerators")),
-  GEN_BOOL_OPTION(map_scrollbars, N_("Show Map Scrollbars")),
-  GEN_BOOL_OPTION(keyboardless_goto, N_("Keyboardless goto")),
-  GEN_BOOL_OPTION(dialogs_on_top, N_("Keep dialogs on top")),
+  GEN_BOOL_OPTION(meta_accelerators,   N_("Use Alt/Meta for accelerators")),
+  GEN_BOOL_OPTION(map_scrollbars,      N_("Show Map Scrollbars")),
+  GEN_BOOL_OPTION(keyboardless_goto,   N_("Keyboardless goto")),
+  GEN_BOOL_OPTION(dialogs_on_top,      N_("Keep dialogs on top")),
+  GEN_BOOL_OPTION(show_task_icons,     N_("Show worklist task icons")),
 };
 const int num_gui_options = ARRAY_SIZE(gui_options);
 
Index: client/gui-gtk-2.0/wldlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/wldlg.c,v
retrieving revision 1.30
diff -u -r1.30 wldlg.c
--- client/gui-gtk-2.0/wldlg.c  3 Apr 2004 00:25:42 -0000       1.30
+++ client/gui-gtk-2.0/wldlg.c  3 Apr 2004 01:49:40 -0000
@@ -858,6 +858,11 @@
 
       gtk_tree_view_insert_column_with_data_func(view,
          i, titles[i], rend, cell_render_func, ppcity, NULL);
+      col = gtk_tree_view_get_column(view, i);
+
+      if (!show_task_icons) {
+       g_object_set(col, "visible", FALSE, NULL);
+      }
     } else {
       gint pos = i-1;
 
@@ -877,7 +882,9 @@
        *pcol = col;
       }
     }
-    g_object_set(rend, "height", UNIT_TILE_HEIGHT, NULL);
+    if (show_task_icons) {
+      g_object_set(rend, "height", UNIT_TILE_HEIGHT, NULL);
+    }
   }
 }
 

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