[orca/orca-gnome3: 13/87] Remember plugin status when reopen preferences dialog



commit d810d399e8b5e7ab4899a8bd069ecb77d575bec2
Author: José Ignacio �lvarez Ruiz <jialvarez emergya es>
Date:   Wed Mar 2 10:52:39 2011 +0100

    Remember plugin status when reopen preferences dialog

 src/orca/baseplugins/test.py |   36 ------------------------------------
 src/orca/pluglib/manager.py  |    3 ++-
 2 files changed, 2 insertions(+), 37 deletions(-)
---
diff --git a/src/orca/baseplugins/test.py b/src/orca/baseplugins/test.py
index 288ae0c..17e6814 100644
--- a/src/orca/baseplugins/test.py
+++ b/src/orca/baseplugins/test.py
@@ -31,40 +31,4 @@ class testPlugin(IPlugin):
     def __init__(self):
         print 'Hello World (plugin started)!'
 
-from event_manager import EventManager, Event, event_manager as em
-
-def func1(*args):
-    print "Im the func1 with args: " + str(args)
-
-def func2(*args):
-    print "Im the func2 with args: " + str(args)
-
-def func3(*args):
-    print "Im the func3 with args: " + str(args)
-
-
-# Create some events
-event1 = Event('event1')
-event2 = Event('event2')
-
-em.add_event(event1)
-em.add_event(event2)
-
-# Connecting functions with events
-em.connect('event1', func3, [1,2])
-em.connect('event1', func2)
-em.connect('event2', func1)
-
-# Sending signals
-print "sending event1 from test plugin..."
-em.signal('event1')
-print "sending event2 from test plugin..."
-em.signal('event2')
-
-# sending signal with arguments
-print "sending event1 from test plugin with arguments..."
-em.signal('event1', [1,2,3])
-
-print "\n"
-
 IPlugin.register(testPlugin)
diff --git a/src/orca/pluglib/manager.py b/src/orca/pluglib/manager.py
index bc31067..40a5478 100644
--- a/src/orca/pluglib/manager.py
+++ b/src/orca/pluglib/manager.py
@@ -203,7 +203,8 @@ class ModulePluginManager(IPluginManager):
             raise PluginManagerError, 'No plugin named %s' % plugin_name
 
     def is_plugin_enabled(self, plugin_name):
-        return self.plugins[plugin_name]['active']
+        check_plugin = self.store_conf.getPluginByName(plugin_name)
+        return check_plugin['active']
 
     _plugin_paths = None
 



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