[Xfce4-commits] <xfce4-panel:xfce-4.8> Launcher: Don't reconstruct the items on save (bug #7952).

Nick Schermer noreply at xfce.org
Sat Sep 10 11:04:03 CEST 2011


Updating branch refs/heads/xfce-4.8
         to 0c6af4b455ae3195d210c7bd869eab17c7abca47 (commit)
       from 466eb9d13590edca58ab9f6e2358085e75960c77 (commit)

commit 0c6af4b455ae3195d210c7bd869eab17c7abca47
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Sep 10 10:45:32 2011 +0200

    Launcher: Don't reconstruct the items on save (bug #7952).
    
    During save we notified the items entirely, but this
    is wrong because it also constructs the items again,
    makeing the icons flicker for a moment.
    
    (cherry picked from commit 55783f562a0645eb9032f53b1db039761a1d49b1)

 plugins/launcher/launcher.c |   19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 255d3e1..b159913 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -65,7 +65,6 @@ static gboolean           launcher_plugin_remote_event                  (XfcePan
                                                                          const gchar          *name,
                                                                          const GValue         *value);
 static void               launcher_plugin_save_delayed                  (LauncherPlugin       *plugin);
-static void               launcher_plugin_save                          (XfcePanelPlugin      *panel_plugin);
 static void               launcher_plugin_orientation_changed           (XfcePanelPlugin      *panel_plugin,
                                                                          GtkOrientation        orientation);
 static gboolean           launcher_plugin_size_changed                  (XfcePanelPlugin      *panel_plugin,
@@ -268,7 +267,6 @@ launcher_plugin_class_init (LauncherPluginClass *klass)
   plugin_class = XFCE_PANEL_PLUGIN_CLASS (klass);
   plugin_class->construct = launcher_plugin_construct;
   plugin_class->free_data = launcher_plugin_free_data;
-  plugin_class->save = launcher_plugin_save;
   plugin_class->orientation_changed = launcher_plugin_orientation_changed;
   plugin_class->size_changed = launcher_plugin_size_changed;
   plugin_class->configure_plugin = launcher_plugin_configure_plugin;
@@ -1084,7 +1082,10 @@ launcher_plugin_free_data (XfcePanelPlugin *panel_plugin)
     }
 
   if (plugin->save_timeout_id != 0)
-    g_source_remove (plugin->save_timeout_id);
+    {
+      g_source_remove (plugin->save_timeout_id);
+      launcher_plugin_save_delayed_timeout (plugin);
+    }
 
   /* destroy the menu and timeout */
   launcher_plugin_menu_destroy (plugin);
@@ -1185,7 +1186,8 @@ launcher_plugin_save_delayed_timeout_destroyed (gpointer user_data)
 static gboolean
 launcher_plugin_save_delayed_timeout (gpointer user_data)
 {
-  launcher_plugin_save (XFCE_PANEL_PLUGIN (user_data));
+  /* make sure the items are stored */
+  g_object_notify (G_OBJECT (user_data), "items");
 
   return FALSE;
 }
@@ -1206,15 +1208,6 @@ launcher_plugin_save_delayed (LauncherPlugin *plugin)
 
 
 static void
-launcher_plugin_save (XfcePanelPlugin *panel_plugin)
-{
-  /* make sure the items are stored */
-  g_object_notify (G_OBJECT (panel_plugin), "items");
-}
-
-
-
-static void
 launcher_plugin_orientation_changed (XfcePanelPlugin *panel_plugin,
                                      GtkOrientation   orientation)
 {


More information about the Xfce4-commits mailing list