/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

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2007-01-30 11:33:28 UTC
  • mto: (157.1.2 trunk) (170.1.3 trunk)
  • mto: This revision was merged to the branch mainline in revision 138.
  • Revision ID: szilveszter.farkas@gmail.com-20070130113328-0rkiwk3c8ch77vha
Allow to commit single files from the context menu (Fixed: #54983)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
import gobject
26
26
import pango
27
27
 
 
28
import os.path
 
29
 
28
30
import bzrlib.errors as errors
29
31
from bzrlib import osutils
30
32
 
301
303
 
302
304
        for path, id, kind in self.delta.added:
303
305
            marker = osutils.kind_marker(kind)
304
 
            self._file_store.append([ True, path+marker, _('added'), path ])
 
306
            if self.selected is not None:
 
307
                if path == os.path.join(self.wtpath, self.selected):
 
308
                    self._file_store.append([ True, path+marker, _('added'), path ])
 
309
                else:
 
310
                    self._file_store.append([ False, path+marker, _('added'), path ])
 
311
            else:
 
312
                self._file_store.append([ True, path+marker, _('added'), path ])
305
313
 
306
314
        for path, id, kind in self.delta.removed:
307
315
            marker = osutils.kind_marker(kind)
308
 
            self._file_store.append([ True, path+marker, _('removed'), path ])
 
316
            if self.selected is not None:
 
317
                if path == os.path.join(self.wtpath, self.selected):
 
318
                    self._file_store.append([ True, path+marker, _('removed'), path ])
 
319
                else:
 
320
                    self._file_store.append([ False, path+marker, _('removed'), path ])
 
321
            else:
 
322
                self._file_store.append([ True, path+marker, _('removed'), path ])
309
323
 
310
324
        for oldpath, newpath, id, kind, text_modified, meta_modified in self.delta.renamed:
311
325
            marker = osutils.kind_marker(kind)
313
327
                changes = _('renamed and modified')
314
328
            else:
315
329
                changes = _('renamed')
316
 
            self._file_store.append([ True,
317
 
                                      oldpath+marker + '  =>  ' + newpath+marker,
318
 
                                      changes,
319
 
                                      newpath
320
 
                                    ])
 
330
            if self.selected is not None:
 
331
                if newpath == os.path.join(self.wtpath, self.selected):
 
332
                    self._file_store.append([ True,
 
333
                                              oldpath+marker + '  =>  ' + newpath+marker,
 
334
                                              changes,
 
335
                                              newpath
 
336
                                            ])
 
337
                else:
 
338
                    self._file_store.append([ False,
 
339
                                              oldpath+marker + '  =>  ' + newpath+marker,
 
340
                                              changes,
 
341
                                              newpath
 
342
                                            ])
 
343
            else:
 
344
                self._file_store.append([ True,
 
345
                                          oldpath+marker + '  =>  ' + newpath+marker,
 
346
                                          changes,
 
347
                                          newpath
 
348
                                        ])
321
349
 
322
350
        for path, id, kind, text_modified, meta_modified in self.delta.modified:
323
351
            marker = osutils.kind_marker(kind)
324
 
            self._file_store.append([ True, path+marker, _('modified'), path ])
 
352
            if self.selected is not None:
 
353
                if path == os.path.join(self.wtpath, self.selected):
 
354
                    self._file_store.append([ True, path+marker, _('modified'), path ])
 
355
                else:
 
356
                    self._file_store.append([ False, path+marker, _('modified'), path ])
 
357
            else:
 
358
                self._file_store.append([ True, path+marker, _('modified'), path ])
325
359
    
326
360
    def _create_pending_merges(self):
327
361
        if not self.pending: