[gnome-panel] [panel] Do not queue load of an applet if it's already being loaded



commit 53998ae038e38e2a19409381194fb07a246a60d0
Author: Vincent Untz <vuntz gnome org>
Date:   Mon Sep 6 19:53:12 2010 +0200

    [panel] Do not queue load of an applet if it's already being loaded
    
    This avoids an issue where an applet is added to the load queue each
    time a panel is created (or for other events), which will result later
    on in having this applet listed several times in the list of loading
    applets.

 gnome-panel/applet.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gnome-panel/applet.c b/gnome-panel/applet.c
index 86f02e2..0bc522e 100644
--- a/gnome-panel/applet.c
+++ b/gnome-panel/applet.c
@@ -841,6 +841,11 @@ panel_applet_on_load_queue (const char *id)
 		if (strcmp (applet->id, id) == 0)
 			return TRUE;
 	}
+	for (li = panel_applets_loading; li != NULL; li = li->next) {
+		PanelAppletToLoad *applet = li->data;
+		if (strcmp (applet->id, id) == 0)
+			return TRUE;
+	}
 	return FALSE;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]