deskbar-applet r1976 - in trunk: . deskbar/core
- From: sebp svn gnome org
- To: svn-commits-list gnome org
- Subject: deskbar-applet r1976 - in trunk: . deskbar/core
- Date: Fri, 29 Feb 2008 11:58:29 +0000 (GMT)
Author: sebp
Date: Fri Feb 29 11:58:29 2008
New Revision: 1976
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=1976&view=rev
Log:
Update INSTRUCTIONS when the default browser changes
Modified:
trunk/ChangeLog
trunk/deskbar/core/CoreImpl.py
trunk/deskbar/core/ModuleLoader.py
Modified: trunk/deskbar/core/CoreImpl.py
==============================================================================
--- trunk/deskbar/core/CoreImpl.py (original)
+++ trunk/deskbar/core/CoreImpl.py Fri Feb 29 11:58:29 2008
@@ -391,14 +391,18 @@
enabled_browser_modules.append(module.__class__.__name__)
self._module_list.remove_module(module)
+ # Refresh instructions
+ module.__class__.has_requirements ()
+ # Add module to self._disabled_module_list
self._module_loader.emit("module-not-initialized", module)
+ # Remove modules of new browser from self._disabled_module_list
filename = None
- for module in self._disabled_module_list:
- if module[1].__module__ == new_browser:
+ for (icon, module, activatable) in self._disabled_module_list:
+ if module.__module__ == new_browser:
if filename is None:
- filename = module[1].filename
- self._disabled_module_list.remove_module(module[1])
+ filename = module.filename
+ self._disabled_module_list.remove_module(module)
if filename is not None:
self._module_loader.load(filename)
Modified: trunk/deskbar/core/ModuleLoader.py
==============================================================================
--- trunk/deskbar/core/ModuleLoader.py (original)
+++ trunk/deskbar/core/ModuleLoader.py Fri Feb 29 11:58:29 2008
@@ -127,7 +127,6 @@
# Check that the given requirements for the handler are met
if not getattr(module, "has_requirements" )():
LOGGER.warning("Class %s in file %s has missing requirements. Skipping." % (handler, filename))
- module.class_instance = module
self.emit("module-not-initialized", module)
else:
valid_modules.append(module)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]