From: Ben Pfaff Date: Mon, 1 Sep 2014 00:57:29 +0000 (-0700) Subject: psppire-dialog-action-var-info: Only allow "Jump To" with one variable. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=491cd3744c11da45ac6e41c734e4a33c19b060c9;hp=3e98eec9f2c774a7c695944c15de651ecd120430;p=pspp psppire-dialog-action-var-info: Only allow "Jump To" with one variable. Until now, when at least one variable was selected, the user could click on "Jump To", which would jump to the first selected variable. This commit changes behavior so that "Jump To" is only enabled when exactly one variable is selected, which makes it a lot less confusing about which variable will be jumped to. Suggested by Bastián Díaz . --- diff --git a/src/ui/gui/psppire-dialog-action-var-info.c b/src/ui/gui/psppire-dialog-action-var-info.c index a638be441f..d6b974f687 100644 --- a/src/ui/gui/psppire-dialog-action-var-info.c +++ b/src/ui/gui/psppire-dialog-action-var-info.c @@ -52,7 +52,7 @@ treeview_item_selected (gpointer data) GtkTreeView *tv = GTK_TREE_VIEW (pda->source); GtkTreeSelection *selection = gtk_tree_view_get_selection (tv); - return gtk_tree_selection_count_selected_rows (selection) > 0; + return gtk_tree_selection_count_selected_rows (selection) == 1; } static gchar *