/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to olive/frontend/gtk/handler.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-08-02 20:35:25 UTC
  • mto: (0.14.1 main) (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060802203525-9cb57147463c2672
Implemented context menu for the file list.

2006-08-02  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * cmenu.ui: context menu UIManager description added
    * setup.py: install cmenu.ui to the appropriate place
    * olive/frontend/gtk/menu.py: implement the context menus
    * olive/frontend/gtk/__init__.py: added button_press_event for file list
    * olive/frontend/gtk/handler.py: handling that even (show popup menu)

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
from checkout import OliveCheckout
35
35
from commit import OliveCommit
36
36
from dialog import OliveDialog
 
37
from menu import OliveMenu
37
38
from push import OlivePush
38
39
from remove import OliveRemove
39
40
 
44
45
        self.comm = comm
45
46
        
46
47
        self.dialog = OliveDialog(self.gladefile)
 
48
        
 
49
        self.menu = OliveMenu(self.gladefile, self.comm, self.dialog)
47
50
    
48
51
    def on_about_activate(self, widget):
49
52
        self.dialog.about()
92
95
        remove = OliveRemove(self.gladefile, self.comm)
93
96
        remove.display()
94
97
    
 
98
    def on_treeview_right_button_press_event(self, widget, event):
 
99
        """ Occurs when somebody right-clicks in the file list. """
 
100
        if event.button == 3:
 
101
            self.menu.right_context_menu().popup(None, None, None, 0,
 
102
                                                 event.time)
 
103
        
95
104
    def on_treeview_right_row_activated(self, treeview, path, view_column):
96
105
        """ Occurs when somebody double-clicks or enters an item in the
97
106
        file list. """