Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] Re: (PR#9649) extra line in unit report
Home

[Freeciv-Dev] Re: (PR#9649) extra line in unit report

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#9649) extra line in unit report
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Mon, 9 Aug 2004 23:28:37 -0700
Reply-to: rt@xxxxxxxxxxx

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

On 2004-08-10 00:00:37, Christian Knoke wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=9649 >
> 
> 
> CVS 09 AUG 2004 GTK2
> 
> $SUBJECT
> 
> see attached png.
> 
> reproducible from savegame (available on request)
> 
> Christian
>
I think this behavior is intended, but of course its wrong

repodlg.c:1046:
    if (row < n-2 && unit_type_exists(activeunits_type[row])) {
      is_unit_type = TRUE;
    } else {
      is_unit_type = FALSE;
    }
--
and repodlg.c:1232
    gtk_list_store_append(activeunits_store, &it);
    gtk_list_store_set(activeunits_store, &it,
            1, FALSE,
            2, 0,
            3, 0,
            4, 0,
            5, 0,
            6, 0,
            7, FALSE, -1);
    g_value_init(&value, G_TYPE_STRING);
    g_value_set_static_string(&value, "");
    gtk_list_store_set_value(activeunits_store, &it, 0, &value);
--
attached patch should remove this extra line

--
mateusz


----------------------------------------------------------------------
To moze byc ekscytujace lato... >>> http://link.interia.pl/f181c

Index: repodlgs.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/repodlgs.c,v
retrieving revision 1.53
diff -u -r1.53 repodlgs.c
--- repodlgs.c  2 Aug 2004 23:19:35 -0000       1.53
+++ repodlgs.c  10 Aug 2004 06:25:02 -0000
@@ -1039,7 +1039,7 @@
     
     n = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(activeunits_store), 
NULL);
 
-    if (row < n-2 && unit_type_exists(activeunits_type[row])) {
+    if (row < n - 1 && unit_type_exists(activeunits_type[row])) {
       is_unit_type = TRUE;
     } else {
       is_unit_type = FALSE;
@@ -1232,20 +1232,6 @@
     gtk_list_store_append(activeunits_store, &it);
     gtk_list_store_set(activeunits_store, &it,
            1, FALSE,
-           2, 0,
-           3, 0,
-           4, 0,
-           5, 0,
-           6, 0,
-           7, FALSE, -1);
-    g_value_init(&value, G_TYPE_STRING);
-    g_value_set_static_string(&value, "");
-    gtk_list_store_set_value(activeunits_store, &it, 0, &value);
-    g_value_unset(&value);
-
-    gtk_list_store_append(activeunits_store, &it);
-    gtk_list_store_set(activeunits_store, &it,
-           1, FALSE,
            2, unittotals.building_count,
            3, unittotals.active_count,
            4, unittotals.upkeep_shield,


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#9649) extra line in unit report, Mateusz Stefek <=