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

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-08-05 15:26:04 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-20060805152604-10a00894d1db30b5
Some minor tweaks to the Diff window.

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

    * olive/frontend/gtk/diff.py: Diff window now destroyed if not a branch
    * olive.glade: added shadow to Diff window's scrollbars

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
        
65
65
        self.dialog = OliveDialog(self.gladefile)
66
66
        
 
67
        # Get some important widgets
 
68
        self.window = self.glade.get_widget('window_diff')
 
69
        self.treeview = self.glade.get_widget('treeview_diff_files')
 
70
 
67
71
        # Check if current location is a branch
68
72
        try:
69
73
            (self.wt, path) = WorkingTree.open_containing(self.comm.get_path())
84
88
        # Set the old working tree
85
89
        self.old_tree = self.wt.branch.repository.revision_tree(self.wt.branch.last_revision())
86
90
        
87
 
        # Get the Diff window widget
88
 
        self.window = self.glade.get_widget('window_diff')
89
 
        
90
91
        # Dictionary for signal_autoconnect
91
92
        dic = { "on_button_diff_close_clicked": self.close,
92
93
                "on_treeview_diff_files_cursor_changed": self.cursor_changed }
104
105
        """ Display the Diff window. """
105
106
        if self.notbranch:
106
107
            self.dialog.error_dialog('Directory is not a branch.')
 
108
            self.close()
107
109
        else:
108
110
            self.window.show_all()
109
111
    
110
112
    def _create_file_view(self):
111
113
        """ Create the list of files. """
112
114
        self.model = gtk.TreeStore(str, str)
113
 
        self.treeview = self.glade.get_widget('treeview_diff_files')
114
115
        self.treeview.set_model(self.model)
115
116
        
116
117
        cell = gtk.CellRendererText()