summaryrefslogtreecommitdiffstats
path: root/equipment.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-04-23 19:54:11 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-04-23 19:54:11 -0700
commit698892329a3f981ff762300427bb43f34b553baf (patch)
tree06f2b9ad56cab3993ec4f48a7285ec1d0447ff32 /equipment.c
parent9470f713d05b489fec32457a4d2eba759bc64d7a (diff)
downloadsubsurface-698892329a3f981ff762300427bb43f34b553baf.tar.gz
Fix edit callback for weight system
Linus found this embarrassing bug: double clicking on a weight system in order to edit it launched the edit function for the first cylinder instead. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'equipment.c')
-rw-r--r--equipment.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/equipment.c b/equipment.c
index d537cf7b1..b74d85b7b 100644
--- a/equipment.c
+++ b/equipment.c
@@ -1343,6 +1343,14 @@ static void row_activated_cb(GtkTreeView *tree_view,
edit_cb(NULL, tree_view);
}
+static void ws_row_activated_cb(GtkTreeView *tree_view,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ GtkTreeModel *model)
+{
+ ws_edit_cb(NULL, tree_view);
+}
+
GtkWidget *cylinder_list_widget(void)
{
GtkListStore *model = cylinder_list.model;
@@ -1380,7 +1388,7 @@ GtkWidget *weightsystem_list_widget(void)
tree_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model));
gtk_widget_set_can_focus(tree_view, FALSE);
- g_signal_connect(tree_view, "row-activated", G_CALLBACK(row_activated_cb), model);
+ g_signal_connect(tree_view, "row-activated", G_CALLBACK(ws_row_activated_cb), model);
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view));
gtk_tree_selection_set_mode(GTK_TREE_SELECTION(selection), GTK_SELECTION_BROWSE);