Force selection update on tab switch.
authorNick Schermer <nick@xfce.org>
Tue, 18 Dec 2012 18:54:56 +0000 (19:54 +0100)
committerNick Schermer <nick@xfce.org>
Tue, 18 Dec 2012 18:54:56 +0000 (19:54 +0100)
TO make sure the standardview actions are up2date.

thunar/thunar-standard-view.c
thunar/thunar-window.c

index e807296..7cdaadb 100644 (file)
@@ -1017,7 +1017,6 @@ thunar_standard_view_realize (GtkWidget *widget)
   /* we need update the selection state based on the clipboard content */
   g_signal_connect_swapped (G_OBJECT (standard_view->clipboard), "changed",
                             G_CALLBACK (thunar_standard_view_selection_changed), standard_view);
-  thunar_standard_view_selection_changed (standard_view);
 
   /* determine the icon factory for the screen on which we are realized */
   icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (widget));
index f554d65..6c51a52 100644 (file)
@@ -1456,6 +1456,9 @@ thunar_window_notebook_switch_page (GtkWidget    *notebook,
   /* integrate the standard view action in the ui */
   thunar_component_set_ui_manager (THUNAR_COMPONENT (page), window->ui_manager);
 
+  /* update the actions */
+  thunar_standard_view_selection_changed (THUNAR_STANDARD_VIEW (page));
+
   gtk_widget_grab_focus (page);
 }