Changeset 1a3b24f78901…
Parent 5b5f89c6cf61…
by
Changes to one file · Browse files at 1a3b24f78901 Showing diff from parent 5b5f89c6cf61 Diff from another changeset...
@@ -5,6 +5,7 @@ # This software may be used and distributed according to the terms of the
# GNU General Public License version 2, incorporated herein by reference.
+import os
import gtk
import gobject
@@ -113,6 +114,11 @@ pnewbtn.connect('clicked', self.pnew_clicked)
self.btn['pnew'] = pnewbtn
+ pgraphbtn = tbar.append_stock(gtk.STOCK_EDIT,
+ _('Edit patch dependency graph'))
+ pgraphbtn.connect('clicked', self.edit_pgraph_clicked)
+ self.btn['pnew'] = pnewbtn
+
## separator
tbar.append_space()
@@ -722,6 +728,17 @@ def reapply_clicked(self, toolbutton):
pass
+ def edit_pgraph_clicked(self, toolbutton):
+ opts = {} # TODO: How to find user ID
+ mgr = self.pbranch.patchmanager(self.repo.ui, self.repo, opts)
+ oldtext = mgr.graphdesc()
+ # run editor in the repository root
+ olddir = os.getcwd()
+ os.chdir(self.repo.root)
+ newtext = self.repo.ui.edit(oldtext, opts.get('user'))
+ os.chdir(olddir)
+ mgr.updategraphdesc(newtext)
+
### context menu signal handlers ###
def pnew_activated(self, menuitem, row):
|
Loading...