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

Merge some fixes from Alexander Belchenko

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
            error_dialog(_('Directory does not have a working tree'),
88
88
                         _('Operation aborted.'))
89
89
            self.close()
90
 
            dialog_shown = False
 
90
            return False
91
91
        if self.notbranch:
92
92
            error_dialog(_('Directory is not a branch'),
93
93
                         _('You can perform this action only in a branch.'))
94
94
            self.close()
95
 
            dialog_shown = False
 
95
            return False
96
96
        else:
97
97
            if self.wt.branch.get_bound_location() is not None:
98
98
                # we have a checkout, so the local commit checkbox must appear
108
108
            
109
109
            self.textview.modify_font(pango.FontDescription("Monospace"))
110
110
            self.window.show()
111
 
            dialog_shown = True
112
 
        if dialog_shown:
113
 
            # Gives the focus to the commit message area
114
 
            self.textview.grab_focus()
115
 
        return dialog_shown
 
111
            return True
116
112
    
117
113
    def _create_file_view(self):
118
114
        self.file_store = gtk.ListStore(gobject.TYPE_BOOLEAN,   # [0] checkbox
155
151
            self.file_store.append([ True, path+marker, _('modified'), path ])
156
152
    
157
153
    def _create_pending_merges(self):
 
154
        if not self.pending:
 
155
            # hide unused pending merge part
 
156
            scrolled_window = self.glade.get_widget('scrolledwindow_commit_pending')
 
157
            parent = scrolled_window.get_parent()
 
158
            parent.remove(scrolled_window)
 
159
            parent = self.pending_label.get_parent()
 
160
            parent.remove(self.pending_label)
 
161
            return
 
162
        
158
163
        liststore = gtk.ListStore(gobject.TYPE_STRING,
159
164
                                  gobject.TYPE_STRING,
160
165
                                  gobject.TYPE_STRING)
167
172
        self.pending_view.append_column(gtk.TreeViewColumn(_('Summary'),
168
173
                                        gtk.CellRendererText(), text=2))
169
174
        
170
 
        if not self.pending:
171
 
            return
172
 
        
173
175
        for item in self.pending:
174
176
            liststore.append([ item['date'],
175
177
                               item['committer'],