deskbar-applet r2127 - in branches/gnome-2-22: . deskbar/core



Author: sebp
Date: Thu Apr 17 10:57:54 2008
New Revision: 2127
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2127&view=rev

Log:
Fixed crash when two modules with same name should be loaded. Warn instead.

Modified:
   branches/gnome-2-22/ChangeLog
   branches/gnome-2-22/deskbar/core/ModuleList.py

Modified: branches/gnome-2-22/deskbar/core/ModuleList.py
==============================================================================
--- branches/gnome-2-22/deskbar/core/ModuleList.py	(original)
+++ branches/gnome-2-22/deskbar/core/ModuleList.py	Thu Apr 17 10:57:54 2008
@@ -100,8 +100,9 @@
         to the row containg the module. If there's no such row, it will append it.
         """
         for mod in self:
-            if mod == module:
+            if mod.__class__.__name__ == module.__class__.__name__:
                 # We don't want a duplicate module
+                LOGGER.warning("You tried to add a module twice. Not adding %r from %s", mod, mod.get_filename())
                 return
                 
         if iter is None:



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