Commits

Ronny Pfannschmidt committed 6e93a68

automated action rewrite of pida-plugins/nosetest/nosetest.py
actionsconfig: 242 275
actions:
test_python on_test h
show_test_python on_toggle_results h
methods:
def create_actions(self):
def on_toggle_results(self, action): -> show_test_python
def on_test(self, action): -> test_python

Comments (0)

Files changed (1)

pida-plugins/nosetest/nosetest.py

 
 class PythonActionsConfig(ActionsConfig):
 
-    def create_actions(self):
-        self.create_action(
-            'test_python',
-            gtk.Action,
+
+    actions = [
+        gtk.Action('test_python',
             _('Python Unit Tester'),
             _('Run the python unitTester'),
-            'gtk-apply',
-            self.on_test,
-        )
-        self.create_action(
-            'show_test_python',
-            gtk.ToggleAction,
+            'gtk-apply'),
+        gtk.ToggleAction('show_test_python',
             _('Python Unit Tester'),
             _('Show the python unitTester'),
-            'none',
-            self.on_toggle_results,
-        )
+            'none'),
+    ]
 
-    def on_toggle_results(self, action):
+    def on_show_test_python(self, action):
         if action.get_active():
             self.svc.show_results()
         else:
             self.svc.hide_results()
 
-    def on_test(self, action):
+    def on_test_python(self, action):
         show_action = self.get_action('show_test_python')
         if not show_action.get_active():
             show_action.activate()