Commit 4d2c8c1a authored by Cosimo Cecchi's avatar Cosimo Cecchi

view: don't update undo actions for inactive views

If the view is not active, our menus are not merged in, so we shouldn't
try to update the relative actions underway, as they're not in the
action group.

This fixes crashers/warnings when doing a file operation with more than
one view open.
parent 67322dde
......@@ -2546,6 +2546,10 @@ static void
undo_manager_changed_cb (NautilusFileUndoManager* manager,
NautilusView *view)
if (!view->details->active) {
update_undo_actions (view);
......@@ -2602,7 +2606,6 @@ nautilus_view_init (NautilusView *view)
NautilusDirectory *scripts_directory;
NautilusDirectory *templates_directory;
char *templates_uri;
NautilusFileUndoManager* manager;
......@@ -2677,9 +2680,8 @@ nautilus_view_init (NautilusView *view)
G_CALLBACK (schedule_update_menus), view);
manager = nautilus_file_undo_manager_get ();
g_signal_connect_object (manager, "undo-changed",
G_CALLBACK (undo_manager_changed_cb), view, 0);
g_signal_connect_object (nautilus_file_undo_manager_get (), "undo-changed",
G_CALLBACK (undo_manager_changed_cb), view, 0);
/* Accessibility */
atk_object = gtk_widget_get_accessible (GTK_WIDGET (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