Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] (PR#10962) Bugs
Home

[Freeciv-Dev] (PR#10962) Bugs

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ktocomp@xxxxxxxx
Subject: [Freeciv-Dev] (PR#10962) Bugs
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Fri, 12 Nov 2004 11:43:47 -0800
Reply-to: rt@xxxxxxxxxxx

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

> [ktocomp@xxxxxxxx - Wed Nov 10 15:49:43 2004]:
> 
> Another bugs found:
> 1. When the sciences are too much the screen(F6) is "jumping"(on 800x600)

This patch should help with that.

> 2. When popup city in the last tab "New people are:(entertainers, 
> scientist, taxmen)" I choose what I want, but it is always scientist.

This still needs some looking into.

Index: client/gui-gtk-2.0/repodlgs.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/repodlgs.c,v
retrieving revision 1.65
diff -u -u -r1.65 repodlgs.c
--- client/gui-gtk-2.0/repodlgs.c       10 Nov 2004 17:01:59 -0000      1.65
+++ client/gui-gtk-2.0/repodlgs.c       12 Nov 2004 19:41:58 -0000
@@ -66,7 +66,7 @@
 static GtkWidget *science_current_label, *science_goal_label;
 static GtkWidget *science_change_menu_button, *science_goal_menu_button;
 static GtkWidget *science_help_toggle;
-static GtkListStore *science_model[4];
+static GtkListStore *science_model[3];
 static int science_dialog_shell_is_modal;
 static GtkWidget *popupmenu, *goalmenu;
 
@@ -235,13 +235,16 @@
   w = gtk_label_new("");
   gtk_box_pack_start(GTK_BOX(hbox), w, TRUE, FALSE, 0);
 
-  hbox = gtk_hbox_new(TRUE, 0);
-  gtk_box_pack_start(GTK_BOX(science_dialog_shell->vbox),
-                    hbox, TRUE, TRUE, 5);
+  sw = gtk_scrolled_window_new(NULL, NULL);
+  gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
+      GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
+  gtk_box_pack_start(GTK_BOX(science_dialog_shell->vbox), sw, TRUE, TRUE, 5);
 
+  hbox = gtk_hbox_new(TRUE, 0);
+  gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), hbox);
 
 
-  for (i=0; i<4; i++) {
+  for (i=0; i<ARRAY_SIZE(science_model); i++) {
     GtkWidget *view;
     GtkTreeSelection *selection;
     GtkCellRenderer *renderer;
@@ -401,7 +404,7 @@
 
   gtk_label_set_text(GTK_LABEL(science_label), science_dialog_text());
 
-  for (i=0; i<4; i++) {
+  for (i=0; i<ARRAY_SIZE(science_model); i++) {
     gtk_list_store_clear(science_model[i]);
   }
 
@@ -419,11 +422,12 @@
     GValue value = { 0, };
 
     j = GPOINTER_TO_INT(g_list_nth_data(sorting_list, i));
-    gtk_list_store_append(science_model[i%4], &it);
+    gtk_list_store_append(science_model[i%ARRAY_SIZE(science_model)], &it);
 
     g_value_init(&value, G_TYPE_STRING);
     g_value_set_static_string(&value, advances[j].name);
-    gtk_list_store_set_value(science_model[i%4], &it, 0, &value);
+    gtk_list_store_set_value(science_model[i%ARRAY_SIZE(science_model)], &it,
+       0, &value);
     g_value_unset(&value);
   }
   g_list_free(sorting_list);

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