/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/status.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:
32
32
import bzrlib
33
33
import bzrlib.errors as errors
34
34
 
35
 
if (bzrlib.version_info[0] == 0) and (bzrlib.version_info[1] < 9):
 
35
if bzrlib.version_info < (0, 9):
36
36
    # function deprecated after 0.9
37
37
    from bzrlib.delta import compare_trees
38
38
 
43
43
 
44
44
class OliveStatus:
45
45
    """ Display Status window and perform the needed actions. """
46
 
    def __init__(self, gladefile, comm):
47
 
        """ Initialize the Diff window. """
 
46
    def __init__(self, gladefile, comm, dialog):
 
47
        """ Initialize the Status window. """
48
48
        self.gladefile = gladefile
49
49
        self.glade = gtk.glade.XML(self.gladefile, 'window_status')
50
50
        
 
51
        # Communication object
51
52
        self.comm = comm
52
 
        
53
 
        self.dialog = OliveDialog(self.gladefile)
 
53
        # Dialog object
 
54
        self.dialog = dialog
54
55
        
55
56
        # Get the Status window widget
56
57
        self.window = self.glade.get_widget('window_status')
97
98
        column.add_attribute(cell, "text", 0)
98
99
        self.treeview.append_column(column)
99
100
        
100
 
        if (bzrlib.version_info[0] == 0) and (bzrlib.version_info[1] < 9):
 
101
        if bzrlib.version_info < (0, 9):
101
102
            delta = compare_trees(self.old_tree, self.wt)
102
103
        else:
103
104
            delta = self.wt.changes_from(self.old_tree)
135
136
    def display(self):
136
137
        """ Display the Diff window. """
137
138
        if self.notbranch:
138
 
            self.dialog.error_dialog('Directory is not a branch.')
 
139
            self.dialog.error_dialog('Directory is not a branch',
 
140
                                     'You can perform this action only in a branch.')
139
141
            self.close()
140
142
        else:
141
143
            self.window.show_all()