[rhmessaging-commits] rhmessaging commits: r1843 - mgmt/cumin/python/cumin.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Mon Apr 7 11:30:19 EDT 2008


Author: justi9
Date: 2008-04-07 11:30:19 -0400 (Mon, 07 Apr 2008)
New Revision: 1843

Modified:
   mgmt/cumin/python/cumin/model.py
Log:
Use the base class get_title, and rename remove on registration to
"unregister".



Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py	2008-04-07 14:57:29 UTC (rev 1842)
+++ mgmt/cumin/python/cumin/model.py	2008-04-07 15:30:19 UTC (rev 1843)
@@ -377,10 +377,15 @@
     def __init__(self, model, name, mint_class):
         super(LocalClass, self).__init__(model, name, mint_class)
 
-        self.Add(self, "add")
-        self.Edit(self, "edit")
-        self.Remove(self, "remove")
+        action = self.Add(self, "add")
+        action.title = "Add"
 
+        action = self.Edit(self, "edit")
+        action.title = "Edit"
+
+        action = self.Remove(self, "remove")
+        action.title = "Remove"
+
     class Add(CuminAction):
         def __init__(self, cls, name):
             super(LocalClass.Add, self).__init__(cls, name)
@@ -389,9 +394,6 @@
             frame = self.cumin_class.show_object(session, object)
             return frame.show_add(session)
 
-        def get_title(self, session):
-            return "Add"
-
         def do_invoke(self, object, args, completion):
             assert object is None
 
@@ -416,9 +418,6 @@
             frame = self.cumin_class.show_object(session, object)
             return frame.show_edit(session)
 
-        def get_title(self, session):
-            return "Edit"
-
         def do_invoke(self, object, args, completion):
             try:
                 object.set(**args)
@@ -437,9 +436,6 @@
             frame = self.cumin_class.show_object(session, object)
             return frame.show_remove(session)
 
-        def get_title(self, session):
-            return "Remove"
-
         def do_invoke(self, object, args, completion):
             try:
                 object.destroySelf();
@@ -974,6 +970,8 @@
         prop.title = "Port"
         prop.summary = True
 
+        self.remove.title = "Unregister"
+
     def get_title(self, session):
         return "Broker Registration"
 




More information about the rhmessaging-commits mailing list