Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2005:
[Freeciv-Dev] (PR#12334) wrong sorting of techs
Home

[Freeciv-Dev] (PR#12334) wrong sorting of techs

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#12334) wrong sorting of techs
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Sun, 2 Oct 2005 16:12:04 -0700
Reply-to: bugs@xxxxxxxxxxx

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

> [chrisk - Tue Aug 23 14:49:52 2005]:
> 
> S2_0 CVS GTK2
> 
> In the player tab, player->Intelligence->Techs, and in
> player->meeting->add clause->advances, the techs are sorted by english
> wording, which means they are in chaotic order for any other language.
> 
> For the second, I think in diplodlg.c below line 231 a sorting of the
> items could be implemented; for the first, in inteldlg.c below line 235,
> maybe a GtkTreeSortable could be used.
> 
> Unfortunately, this is beyond my skills.

This patch should solve the issue for inteldlg.c. It will go in CVS HEAD
and S2_0 ASAP.

Index: client/gui-gtk-2.0/inteldlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/inteldlg.c,v
retrieving revision 1.23
diff -u -u -r1.23 inteldlg.c
--- client/gui-gtk-2.0/inteldlg.c       21 Jun 2005 16:21:00 -0000      1.23
+++ client/gui-gtk-2.0/inteldlg.c       2 Oct 2005 23:10:51 -0000
@@ -241,6 +241,8 @@
 
   /* techs tab. */
   pdialog->techs = gtk_list_store_new(2, G_TYPE_BOOLEAN, G_TYPE_STRING);
+  gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(pdialog->techs),
+      1, GTK_SORT_ASCENDING);
 
   view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(pdialog->techs));
   g_object_unref(pdialog->techs);

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12334) wrong sorting of techs, Vasco Alexandre da Silva Costa <=