# HG changeset patch # User Adrian Buehlmann <adr...@cadifra.com> # Date 1270680546 -7200 # Node ID 502e0d07ca205c2978f2d238b9f312e898d1dec9 # Parent d5d83aaa82cc5876be8b5078abfb57fe8c8b5b01 thgmq: add hide button
using gtk.STOCK_CANCEL icon diff --git a/tortoisehg/hgtk/commit.py b/tortoisehg/hgtk/commit.py --- a/tortoisehg/hgtk/commit.py +++ b/tortoisehg/hgtk/commit.py @@ -453,6 +453,7 @@ class GCommit(GStatus): self.mqwidget = thgmq.MQWidget(self.repo, accelgroup, self.tooltips) self.mqwidget.connect('repo-invalidated', self.repo_invalidated) + self.mqwidget.connect('hide-mq', lambda *a: self.enable_mqpanel(False)) def wrapframe(widget): frame = gtk.Frame() diff --git a/tortoisehg/hgtk/history.py b/tortoisehg/hgtk/history.py --- a/tortoisehg/hgtk/history.py +++ b/tortoisehg/hgtk/history.py @@ -1649,6 +1649,7 @@ class GLog(gdialog.GWindow): self.mqwidget.connect('patch-selected', self.patch_selected) self.mqwidget.connect('repo-invalidated', self.repo_invalidated) self.mqwidget.connect('files-dropped', self.files_dropped) + self.mqwidget.connect('hide-mq', lambda *a: self.enable_mqpanel(False)) def wrapframe(widget): frame = gtk.Frame() diff --git a/tortoisehg/hgtk/thgmq.py b/tortoisehg/hgtk/thgmq.py --- a/tortoisehg/hgtk/thgmq.py +++ b/tortoisehg/hgtk/thgmq.py @@ -85,6 +85,9 @@ class MQWidget(gtk.VBox): gobject.TYPE_NONE, (object, # list of dropped files/dirs str)) # raw string data + ,'hide-mq': (gobject.SIGNAL_RUN_FIRST, + gobject.TYPE_NONE, + ()) } def __init__(self, repo, accelgroup=None, tooltips=None): @@ -131,6 +134,10 @@ class MQWidget(gtk.VBox): gtklib.idle_add_single_call(after_init) self.pack_start(tbar, False, False) + hidebtn = tbar.append_button(gtk.STOCK_CANCEL, _('Hide')) + hidebtn.connect('clicked', lambda *a: self.emit('hide-mq')) + self.btn['hide'] = hidebtn + # center pane mainbox = gtk.VBox() self.pack_start(mainbox, True, True) ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop