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

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-08-09 17:43:44 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-20060809174344-61ca8dac23ebe7cb
Main window preferences (size, position) are stored.

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

    * olive/frontend/gtk/__init__.py: simplified preference handling
    * olive/frontend/gtk/handler.py: window preferences are stored on quit

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
import olive.backend.errors as errors
32
32
import olive.backend.fileops as fileops
33
33
 
 
34
from dialog import OliveDialog
 
35
 
34
36
class OliveMove:
35
37
    """ Display the Move dialog and perform the needed actions. """
36
 
    def __init__(self, gladefile, comm, dialog):
 
38
    def __init__(self, gladefile, comm):
37
39
        """ Initialize the Move dialog. """
38
40
        self.gladefile = gladefile
39
 
        self.glade = gtk.glade.XML(self.gladefile, 'window_move', 'olive-gtk')
 
41
        self.glade = gtk.glade.XML(self.gladefile, 'window_move')
40
42
        
41
 
        # Communication object
42
43
        self.comm = comm
43
 
        # Dialog object
44
 
        self.dialog = dialog
 
44
        
 
45
        self.dialog = OliveDialog(self.gladefile)
45
46
        
46
47
        self.window = self.glade.get_widget('window_move')
47
48
        
66
67
        filename = self.comm.get_selected_right()
67
68
            
68
69
        if filename is None:
69
 
            self.dialog.error_dialog(_('No file was selected'),
70
 
                                     _('Please select a file from the list to proceed.'))
 
70
            self.dialog.error_dialog('No file was selected.')
71
71
            return
72
72
        
73
73
        source = self.comm.get_path() + '/' + filename
76
76
        try:
77
77
            fileops.move([source, destination])
78
78
        except errors.NotBranchError:
79
 
            self.dialog.error_dialog(_('File is not in a branch'),
80
 
                                     _('The selected file is not in a branch.'))
 
79
            self.dialog.error_dialog('Selected file is not in a branch.')
81
80
            return
82
81
        except errors.NotSameBranchError:
83
 
            self.dialog.error_dialog(_('Not the same branch'),
84
 
                                     _('The destination is not in the same branch.'))
 
82
            self.dialog.error_dialog('The destination is not in the same branch.')
85
83
            return
86
 
        except:
87
 
            raise
88
84
 
89
85
        self.close()
90
86
        self.comm.refresh_right()