[gevice] import new script, add new menuitems



commit 9b595c34cc694cd577abda0037b5454f0d115196
Author: Alejandro Valdes Jimenez <avaldes lenny utalca cl>
Date:   Tue May 5 20:02:56 2009 -0400

    import new script, add new menuitems
---
 src/gevice.py |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/src/gevice.py b/src/gevice.py
index c4ef047..629d696 100755
--- a/src/gevice.py
+++ b/src/gevice.py
@@ -40,6 +40,7 @@ import gevicedevice
 import gevicemodel
 import gevicedatabase
 import geviceexport
+import gevicemaintainer
 
 
 # menu and toolbar
@@ -67,6 +68,11 @@ UI = '''<ui>
       <menuitem action="telnet"/>
       <menuitem action="local"/>
     </menu>
+    <menu action="Maintainer">
+      <menuitem action="Mark"/>
+      <menuitem action="TypeOfLink"/>
+      <menuitem action="TypeOfDev"/>
+    </menu>
     <menu action="ActionsMenu">
       <menuitem action="AddDevice"/>
       <menuitem action="RemoveDevice"/>
@@ -145,6 +151,7 @@ class Gevice:
             ('ViewMenu', None, _('_View')),
             ('Protocol', None, _('_Protocol')),
             ('HelpMenu', None, _('_Help')),
+            ('Maintainer', None, _('_Maintainer')),
             ('ActionsMenu', None, _('_Actions')),
             ('Open', gtk.STOCK_DISCONNECT, _('Connect'), None, _('Connect to database'), self.on_action_open),
             ('OpenLocalTerminal', gtk.STOCK_HOME, _('Local'), None, _('Open Local Terminal'), self.on_action_open_local_terminal),
@@ -167,6 +174,9 @@ class Gevice:
             ('Expand', gtk.STOCK_INDENT, _('Expand'), None, _('Expand tree of device selected'), self.on_action_expand),
             ('Decrease', gtk.STOCK_UNINDENT, _('Decrease'), None, _('Decrease tree of device selected'), self.on_action_decrease),
             ('Diagram', gtk.STOCK_CONVERT, _('Create diagram'),None, _('Create diagram of devices with your children'), self.on_action_diagram),
+            ('Mark', gtk.STOCK_EDIT, _('Mark'),None, _('Mark'), self.on_action_mark),
+            ('TypeOfLink', gtk.STOCK_EDIT, _('Type of link'),None, _('Type of Link'), self.on_action_typeoflink),
+            ('TypeOfDev', gtk.STOCK_EDIT, _('Type of device'),None, _('Type of device'), self.on_action_typeofdev),
         ])
 
         self.actiongroup_window.add_toggle_actions([
@@ -354,6 +364,18 @@ class Gevice:
 
         return button
 
+    def on_action_mark (gevice,action):
+        dialogmaintainer = gevicemaintainer.GeviceMaintainer ()
+        dialogmaintainer.load_interface ("Mark")
+        dialogmaintainer.show_interface ()
+        #dialogmaintainer.load_data ("select * from marca order by 1")
+
+    def on_action_typeofdev (gevice,action):
+        pass
+
+    def on_action_typeoflink (gevice,action):
+        pass
+
     def on_action_export (gevice,action):
         dialogexport = geviceexport.GeviceExport ()
         dialogexport.load_interface (gevice)



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