Source

vpackager / src / vpackager / dbviews.py

Diff from to

src/vpackager/dbviews.py

         gtk.Menu.__init__(self)
         self.menu_actions = {}
         for item in items:
-            self.menu_actions[
-                item.replace(' ','_').lower()] = gtk.MenuItem(item)
-            mitem = self.menu_actions[item.replace(' ', '_').lower()]
+            #self.menu_actions[
+            #    item.replace(' ','_').lower()] = gtk.ImageMenuItem(item)
+            mitem = gtk.ImageMenuItem(item[0])
+            mimg = gtk.image_new_from_stock(item[1], gtk.ICON_SIZE_MENU)
+            mitem.set_image(mimg)
+            self.menu_actions[item[0].replace(' ','_').lower()] = mitem
+            #mitem = self.menu_actions[item.replace(' ', '_').lower()]
             mitem.show()
             self.append(mitem)
 
     def __init__(self):
         gtk.VBox.__init__(self)
         self.rc_menu = RCMenu(items = [
-            'Job Details', 'Delete Job', 'Edit Job'])
+            ('Job Details', gtk.STOCK_INFO),
+            ('Delete Job', gtk.STOCK_DELETE),
+            ('Edit Job', gtk.STOCK_EDIT)])
         self.exposed_widgets = {}
         self.banner_area = gtk.HBox()
         #self.pack_start(self.banner_area, False, True, 4)
     def __init__(self):
         QueueView.__init__(self)
         self.banner_label.set_label('Job History')
-        self.rc_menu = RCMenu(items=['About Job', 'Rebuild Job',
-                                     'View Build Log', 'View Build Script'])
+        self.rc_menu = RCMenu(items=[
+            ('About Job', gtk.STOCK_INFO),
+            ('Rebuild Job', gtk.STOCK_EXECUTE),
+            ('View Build Log', gtk.STOCK_FILE),
+            ('View Build Script', gtk.STOCK_FILE)])
 
     def tree_click_event(self, tree, event, data=None):
         """ Events triggered with the treeview is clicked """
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.