[Xfce4-commits] <thunar:master> Only force ui update when switching tabs.

Nick Schermer noreply at xfce.org
Sun Oct 28 20:16:03 CET 2012


Updating branch refs/heads/master
         to ff39388ed16ad760426dec03e6df9b1e0593eb33 (commit)
       from 39b83cfba6234bbafea25ebd31da8cf06432005e (commit)

commit ff39388ed16ad760426dec03e6df9b1e0593eb33
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Oct 28 19:22:53 2012 +0100

    Only force ui update when switching tabs.

 thunar/thunar-standard-view.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index 325e985..1101d80 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -1150,6 +1150,7 @@ thunar_standard_view_set_ui_manager (ThunarComponent *component,
 {
   ThunarStandardView *standard_view = THUNAR_STANDARD_VIEW (component);
   GError             *error = NULL;
+  gboolean            ui_ensure_update = FALSE;
 
   /* leave if nothing changed */
   if (standard_view->ui_manager == ui_manager)
@@ -1184,6 +1185,7 @@ thunar_standard_view_set_ui_manager (ThunarComponent *component,
 
       /* force update to remove all actions and proxies */
       gtk_ui_manager_ensure_update (standard_view->ui_manager);
+      ui_ensure_update = TRUE;
 
       /* drop the reference on the previous UI manager */
       g_object_unref (G_OBJECT (standard_view->ui_manager));
@@ -1214,7 +1216,8 @@ thunar_standard_view_set_ui_manager (ThunarComponent *component,
       (*THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->connect_ui_manager) (standard_view, ui_manager);
 
       /* force update to avoid flickering */
-      gtk_ui_manager_ensure_update (standard_view->ui_manager);
+      if (ui_ensure_update)
+        gtk_ui_manager_ensure_update (standard_view->ui_manager);
     }
 
   /* let others know that we have a new manager */


More information about the Xfce4-commits mailing list