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

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-08-19 23:56:40 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-20060819235640-abdb3ecf8553b547
Fixed a bug when double-clicking a file.

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

    * olive/frontend/handler.py: fixed a long existing bug: double-clicking a
      file should open it with an application (supported under Windows)

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    def __init__(self, gladefile, comm, dialog):
36
36
        """ Initialize the Add file(s) dialog. """
37
37
        self.gladefile = gladefile
38
 
        self.glade = gtk.glade.XML(self.gladefile, 'window_add', 'olive-gtk')
 
38
        self.glade = gtk.glade.XML(self.gladefile, 'window_add')
39
39
        
40
40
        # Communication object
41
41
        self.comm = comm
67
67
            filename = self.comm.get_selected_right()
68
68
            
69
69
            if filename is None:
70
 
                self.dialog.error_dialog(_('No file was selected'),
71
 
                                         _('Please select a file from the list,\nor choose the other option.'))
 
70
                self.dialog.error_dialog('No file was selected',
 
71
                                         'Please select a file from the list,\nor choose the other option.')
72
72
                return
73
73
            
74
74
            try:
75
75
                fileops.add([directory + '/' + filename])
76
76
            except errors.NotBranchError:
77
 
                self.dialog.error_dialog(_('Directory is not a branch'),
78
 
                                         _('You can perform this action only in a branch.'))
 
77
                self.dialog.error_dialog('Directory is not a branch',
 
78
                                         'You can perform this action only in a branch.')
79
79
                self.comm.set_busy(self.window, False)
80
80
                return
81
81
            except:
85
85
            try:
86
86
                fileops.add([directory], True)
87
87
            except errors.NotBranchError:
88
 
                self.dialog.error_dialog(_('Directory is not a branch'),
89
 
                                         _('You can perform this action only in a branch.'))
 
88
                self.dialog.error_dialog('Directory is not a branch',
 
89
                                         'You can perform this action only in a branch.')
90
90
                self.comm.set_busy(self.window, False)
91
91
                return
92
92
            except: