Commit 97b1ff2f authored by Cosimo Cecchi's avatar Cosimo Cecchi

list-view: unfreeze updates on focus out

It's not really right, as GtkTreeView should always emit
editing-canceled on the right renderer for us, but if you click away
from the entry, it doesn't, so this is just a workaround until the GTK+
bug is fixed.
parent 3645b11f
......@@ -1188,6 +1188,17 @@ sort_column_changed_callback (GtkTreeSortable *sortable,
view->details->last_sort_attr = sort_attr;
}
static void
editable_focus_out_cb (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
NautilusListView *view = user_data;
nautilus_view_unfreeze_updates (NAUTILUS_VIEW (view));
view->details->editable_widget = NULL;
}
static void
cell_renderer_editing_started_cb (GtkCellRenderer *renderer,
GtkCellEditable *editable,
......@@ -1208,6 +1219,9 @@ cell_renderer_editing_started_cb (GtkCellRenderer *renderer,
&start_offset, &end_offset);
gtk_editable_select_region (GTK_EDITABLE (entry), start_offset, end_offset);
g_signal_connect (entry, "focus-out-event",
G_CALLBACK (editable_focus_out_cb), list_view);
nautilus_clipboard_set_up_editable
(GTK_EDITABLE (entry),
nautilus_view_get_ui_manager (NAUTILUS_VIEW (list_view)),
......
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