/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-13 14:08:06 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-20060813140806-3364d3e02a086d51
Modified OliveDialog class interface; huge cleanups.

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

    * olive/frontend/gtk/branch.py: display number of revisions branched
    * olive/frontend/gtk/*: use new dialog interface with detailed descriptions
    * olive/frontend/gtk/dialog.py: modified according to GNOME HIG (primary
      and secondary text)

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
 
 
36
34
class OliveMove:
37
35
    """ Display the Move dialog and perform the needed actions. """
38
 
    def __init__(self, gladefile, comm):
 
36
    def __init__(self, gladefile, comm, dialog):
39
37
        """ Initialize the Move dialog. """
40
38
        self.gladefile = gladefile
41
39
        self.glade = gtk.glade.XML(self.gladefile, 'window_move')
42
40
        
 
41
        # Communication object
43
42
        self.comm = comm
44
 
        
45
 
        self.dialog = OliveDialog(self.gladefile)
 
43
        # Dialog object
 
44
        self.dialog = dialog
46
45
        
47
46
        self.window = self.glade.get_widget('window_move')
48
47
        
67
66
        filename = self.comm.get_selected_right()
68
67
            
69
68
        if filename is None:
70
 
            self.dialog.error_dialog('No file was selected.')
 
69
            self.dialog.error_dialog('No file was selected',
 
70
                                     'Please select a file from the list to proceed.')
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('Selected file is not in a branch.')
 
79
            self.dialog.error_dialog('File is not in a branch',
 
80
                                     'The selected file is not in a branch.')
80
81
            return
81
82
        except errors.NotSameBranchError:
82
 
            self.dialog.error_dialog('The destination is not in the same branch.')
 
83
            self.dialog.error_dialog('Not the same branch',
 
84
                                     'The destination is not in the same branch.')
83
85
            return
 
86
        except:
 
87
            raise
84
88
 
85
89
        self.close()
86
90
        self.comm.refresh_right()