/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/menu.py

  • Committer: Jelmer Vernooij
  • Date: 2006-09-27 20:30:59 UTC
  • mto: (0.12.2 olive)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: jelmer@samba.org-20060927203059-85792ae0a81db524
Bunch of small fixes, cleanups and simplifications.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
class OliveMenu:
34
34
    """ This class is responsible for building the context menus. """
35
 
    def __init__(self, comm):
 
35
    def __init__(self):
36
36
        # Load the UI file
37
37
        if sys.platform == 'win32':
38
38
            self.uifile = os.path.dirname(sys.executable) + "/share/olive/cmenu.ui"
48
48
                print _('UI description file cannot be found.')
49
49
                sys.exit(1)
50
50
        
51
 
        self.comm = comm
52
 
        
53
51
        # Create the file list context menu
54
52
        self.ui = gtk.UIManager()
55
53
        
135
133
            
136
134
        if filename is None:
137
135
            error_dialog(_('No file was selected'),
138
 
                                     _('Please select a file from the list,\nor choose the other option.'))
 
136
                         _('Please select a file from the list,\nor choose the other option.'))
139
137
            return
140
138
        
141
139
        try:
142
140
            bzrlib.add.smart_add([directory + '/' + filename])
143
141
        except errors.NotBranchError:
144
142
            error_dialog(_('Directory is not a branch'),
145
 
                                     _('You can perform this action only in a branch.'))
 
143
                         _('You can perform this action only in a branch.'))
146
144
            return
147
145
        
148
146
        self.comm.refresh_right()
155
153
        
156
154
        if filename is None:
157
155
            error_dialog(_('No file was selected'),
158
 
                                     _('Please select a file from the list,\nor choose the other option.'))
 
156
                         _('Please select a file from the list,\nor choose the other option.'))
159
157
            return
160
158
        
161
159
        try:
170
168
            error_dialog(_('File not versioned'),
171
169
                                     _('The selected file is not versioned.'))
172
170
            return
173
 
        except:
174
 
            raise
175
171
        
176
172
        self.comm.refresh_right()
177
173