Subversion Repositories basico

Rev

Rev 4 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 74
Line 27... Line 27...
27
        self.tasks = self.gui.get_service('Tasks')
27
        self.tasks = self.gui.get_service('Tasks')
28
        self.im = self.gui.get_service('IM')
28
        self.im = self.gui.get_service('IM')
29
29
30
30
31
    def create_popup_menu_by_task(self, task):
31
    def create_popup_menu_by_task(self, task):
32
        #~ self.log.debug(task)
-
 
33
        menu = Gtk.Menu()
32
        menu = Gtk.Menu()
34
        ICONS_DIR = self.get_var('ICONS')
33
        ICONS_DIR = self.get_var('ICONS')
35
        sapnoteview = self.gui.get_widget('sapnoteview')
34
        sapnoteview = self.gui.get_widget('sapnoteview')
36
35
37
        item = Gtk.ImageMenuItem()
36
        item = Gtk.ImageMenuItem()
Line 57... Line 56...
57
        sapnoteview = self.gui.get_widget('sapnoteview')
56
        sapnoteview = self.gui.get_widget('sapnoteview')
58
        sapnoteview.select_by_task(task, active)
57
        sapnoteview.select_by_task(task, active)
59
58
60
59
61
    def create_popup_menu_by_sapnote(self, sid):
60
    def create_popup_menu_by_sapnote(self, sid):
62
        sapnote = self.sap.get_node(sid)
-
 
63
        sapnoteview = self.gui.get_widget('sapnoteview')
-
 
64
        component = sapnote['componentkey']
-
 
65
        category = sapnote['category']
-
 
66
        ICONS_DIR = self.get_var('ICONS')
-
 
-
 
61
        return None
-
 
62
        #~ db = self.get_service('DB')
-
 
63
        #~ sapnote = db.get_sapnote_metadata(sid)
-
 
64
        #~ sapnoteview = self.gui.get_widget('sapnoteview')
-
 
65
        #~ component = sapnote['componentkey']
-
 
66
        #~ category = sapnote['category']
-
 
67
        #~ ICONS_DIR = self.get_var('ICONS')
67
68
68
        menu = Gtk.Menu()
-
 
-
 
69
        #~ menu = Gtk.Menu()
69
70
70
        item = Gtk.ImageMenuItem()
-
 
71
        icon = self.im.get_image_icon('component', 24, 24)
-
 
72
        item.set_image(icon)
-
 
73
        item.set_always_show_image(True)
-
 
74
        item.set_label("Select all SAP Notes with component %s" % component)
-
 
75
        item.connect("activate", self.select_by_component, component, True)
-
 
76
        menu.append(item)
-
 
-
 
71
        #~ item = Gtk.ImageMenuItem()
-
 
72
        #~ icon = self.im.get_image_icon('component', 24, 24)
-
 
73
        #~ item.set_image(icon)
-
 
74
        #~ item.set_always_show_image(True)
-
 
75
        #~ item.set_label("Select all SAP Notes with component %s" % component)
-
 
76
        #~ item.connect("activate", self.select_by_component, component, True)
-
 
77
        #~ menu.append(item)
77
78
78
        return menu
-
 
-
 
79
        #~ return menu
79
80
80
81
81
    def create_popup_menu_by_component(self, component):
82
    def create_popup_menu_by_component(self, component):
82
        #~ self.log.debug(component)
-
 
83
        menu = Gtk.Menu()
83
        menu = Gtk.Menu()
84
        ICONS_DIR = self.get_var('ICONS')
84
        ICONS_DIR = self.get_var('ICONS')
85
        sapnoteview = self.gui.get_widget('sapnoteview')
85
        sapnoteview = self.gui.get_widget('sapnoteview')
86
86
87
        item = Gtk.ImageMenuItem()
87
        item = Gtk.ImageMenuItem()