psppire-dialog-action-var-info: Only allow "Jump To" with one variable.
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 1 Sep 2014 00:57:29 +0000 (17:57 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 1 Sep 2014 00:57:29 +0000 (17:57 -0700)
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 <diaz.bastian@ymail.com> .

src/ui/gui/psppire-dialog-action-var-info.c

index a638be441fb6e17df561179122b92e3a59d1a795..d6b974f6877975b9a2952cd93d76e3b38d67b552 100644 (file)
@@ -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 *