/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 viz/branchwin.py

  • Committer: Daniel Schierbeck
  • Date: 2007-11-09 18:20:24 UTC
  • mto: This revision was merged to the branch mainline in revision 393.
  • Revision ID: daniel.schierbeck@gmail.com-20071109182024-8qq63rlhwzs47385
Made it possible to tag revisions again.

Show diffs side-by-side

added added

removed removed

Lines of Context:
395
395
        gobject.idle_add(self.set_revision, revision.revision_id)
396
396
 
397
397
    def _tag_revision_cb(self, w):
398
 
        dialog = AddTagDialog(self.branch.repository, self.treeview.get_revision().revision_id, self.branch)
399
 
        response = dialog.run()
400
 
        if response != gtk.RESPONSE_NONE:
401
 
            dialog.hide()
402
 
        
403
 
            if response == gtk.RESPONSE_OK:
404
 
                try:
405
 
                    self.branch.lock_write()
406
 
                    self.branch.tags.set_tag(dialog.tagname, dialog._revid)
407
 
                finally:
408
 
                    self.branch.unlock()
 
398
        try:
 
399
            self.treeview.set_sensitive(False)
 
400
            self.branch.unlock()
 
401
            dialog = AddTagDialog(self.branch.repository, self.treeview.get_revision().revision_id, self.branch)
 
402
            response = dialog.run()
 
403
            if response != gtk.RESPONSE_NONE:
 
404
                dialog.hide()
409
405
            
410
 
            dialog.destroy()
 
406
                if response == gtk.RESPONSE_OK:
 
407
                    try:
 
408
                        self.branch.lock_write()
 
409
                        self.branch.tags.set_tag(dialog.tagname, dialog._revid)
 
410
                    finally:
 
411
                        self.branch.unlock()
 
412
                
 
413
                dialog.destroy()
 
414
 
 
415
        finally:
 
416
            self.branch.lock_read()
 
417
            self.treeview.set_sensitive(True)
411
418
 
412
419
    def _col_visibility_changed(self, col, property):
413
420
        self.config.set_user_option(property + '-column-visible', col.get_active())