Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] (PR#9667) CMA GUI Bug
Home

[Freeciv-Dev] (PR#9667) CMA GUI Bug

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#9667) CMA GUI Bug
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Sun, 14 Nov 2004 14:06:28 -0800
Reply-to: rt@xxxxxxxxxxx

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

> [chrisk - Wed Aug 11 12:09:10 2004]:
> 
> 
> CVS 11 AUG 2004 GTK2
> 
> When you open a city window --> cma, the top most preset is not only
hilited
> but *activated* for the city.

Changed it so you need to double-click to activate a CMA preset. This
fixes the bug.

Index: client/gui-gtk-2.0/cma_fe.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/cma_fe.c,v
retrieving revision 1.20
diff -u -r1.20 cma_fe.c
--- client/gui-gtk-2.0/cma_fe.c 13 Nov 2004 23:22:43 -0000      1.20
+++ client/gui-gtk-2.0/cma_fe.c 14 Nov 2004 22:05:12 -0000
@@ -74,8 +74,6 @@
 static void cma_release_callback(GtkWidget *w, gpointer data);
 static void cma_activate_preset_callback(GtkTreeView *view, GtkTreePath *path,
                                         GtkTreeViewColumn *col, gpointer data);
-static void cma_select_preset_callback(GtkTreeSelection *selection,
-                                      gpointer data);
 
 static void hscale_changed(GtkAdjustment *get, gpointer data);
 static void set_hscales(const struct cm_parameter *const parameter,
@@ -199,8 +197,6 @@
   gtk_container_add(GTK_CONTAINER(sw), view);
   gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0);
 
-  g_signal_connect(pdialog->selection, "changed",
-                  G_CALLBACK(cma_select_preset_callback), pdialog);
   g_signal_connect(view, "row_activated",
                   G_CALLBACK(cma_activate_preset_callback), pdialog);
   g_signal_connect(view, "key-press-event",
@@ -425,33 +421,16 @@
 }
 
 /****************************************************************
- callback for removing a preset from the preset view
+ callback for selecting a preset from the preset view
 *****************************************************************/
 static void cma_activate_preset_callback(GtkTreeView *view, GtkTreePath *path,
                                         GtkTreeViewColumn *col, gpointer data)
 {
   struct cma_dialog *pdialog = (struct cma_dialog *) data;
   int preset_index;
-
-  preset_index = gtk_tree_path_get_indices(path) [0];
-
-  /* Double-click to remove preset from list */
-  cma_preset_remove(pdialog, preset_index);
-}
-
-/****************************************************************
- callback for selecting a preset from the preset view
-*****************************************************************/
-static void cma_select_preset_callback(GtkTreeSelection *selection,
-                                      gpointer data)
-{
-  struct cma_dialog *pdialog = (struct cma_dialog *) data;
-  int preset_index;
   const struct cm_parameter *pparam;
 
-  if ((preset_index = gtk_tree_selection_get_row(selection)) == -1) {
-    return;
-  }
+  preset_index = gtk_tree_path_get_indices(path) [0];
 
   pparam = cmafec_preset_get_parameter(preset_index);
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#9667) CMA GUI Bug, Vasco Alexandre da Silva Costa <=