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

  • Committer: Jelmer Vernooij
  • Date: 2007-07-15 18:39:52 UTC
  • Revision ID: jelmer@samba.org-20070715183952-y939vtf6e0skzihm
Make 'Add tag' dialog accessible from bzrk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
            self.append(item)
45
45
            self.show_all()
46
46
 
 
47
            item = gtk.MenuItem("_Tag Revision")
 
48
            item.connect('activate', self.show_tag)
 
49
            self.append(item)
 
50
            self.show_all()
 
51
 
47
52
    def show_diff(self, item):
48
53
        from bzrlib.plugins.gtk.diff import DiffWindow
49
54
        window = DiffWindow()
57
62
        from bzrlib.plugins.gtk.push import PushDialog
58
63
        dialog = PushDialog(self.repository, self.revids[0], self.branch)
59
64
        dialog.run()
 
65
 
 
66
    def show_tag(self, item):
 
67
        from bzrlib.plugins.gtk.tags import AddTagDialog
 
68
        dialog = AddTagDialog(self.repository, self.revids[0], self.branch)
 
69
        response = dialog.run()
 
70
        if response != gtk.RESPONSE_NONE:
 
71
            dialog.hide()
 
72
        
 
73
            if response == gtk.RESPONSE_OK:
 
74
                self.branch.lock_write()
 
75
                self.branch.tags.set_tag(dialog.tagname, dialog._revid)
 
76
                self.branch.unlock()
 
77
            
 
78
            dialog.destroy()