Commit b643a1ff authored by Harald Judt's avatar Harald Judt

Fix broken shortcut renaming (bug #11885)

This fixes the shortcut renaming feature broken by f60acf89
"Allow <ctrl> + middle click in shortcut and treeview panes" and
also removes the weird-looking "selection in selection" which maybe can
only be noticed by some themes, but is reproducible with Greybird.
parent 65adfa65
......@@ -459,7 +459,7 @@ thunar_shortcuts_view_button_press_event (GtkWidget *widget,
gtk_tree_view_set_cursor (GTK_TREE_VIEW (widget), path, NULL, FALSE);
gtk_tree_view_set_cursor (GTK_TREE_VIEW (widget), path, gtk_tree_view_get_column (GTK_TREE_VIEW (view), 0), FALSE);
/* remember the button as pressed and handle it in the release handler */
view->pressed_button = event->button;
......@@ -1359,6 +1359,7 @@ thunar_shortcuts_view_renamed (GtkCellRenderer *renderer,
ThunarShortcutsView *view)
GtkTreeModel *model;
GtkTreePath *path;
GtkTreeIter iter;
GtkTreeModel *child_model;
GtkTreeIter child_iter;
......@@ -1373,6 +1374,11 @@ thunar_shortcuts_view_renamed (GtkCellRenderer *renderer,
child_model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (model));
gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (model), &child_iter, &iter);
thunar_shortcuts_model_rename (THUNAR_SHORTCUTS_MODEL (child_model), &child_iter, text);
/* unset the cell focus and only focus the column to avoid the weird-looking double selection */
path = gtk_tree_model_get_path (model, &iter);
gtk_tree_view_set_cursor (GTK_TREE_VIEW (view), path, gtk_tree_view_get_column (GTK_TREE_VIEW (view), 0), FALSE);
gtk_tree_path_free (path);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment