Date: Tue, 4 Nov 2014 16:30:43 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274091 - head/tools/sched Message-ID: <201411041630.sA4GUhrp071138@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Tue Nov 4 16:30:42 2014 New Revision: 274091 URL: https://svnweb.freebsd.org/changeset/base/274091 Log: Bind Ctrl-Q as a global hotkey to exit. Bind Ctrl-W as a hotkey to close dialogs. Modified: head/tools/sched/schedgraph.py Modified: head/tools/sched/schedgraph.py ============================================================================== --- head/tools/sched/schedgraph.py Tue Nov 4 16:02:46 2014 (r274090) +++ head/tools/sched/schedgraph.py Tue Nov 4 16:30:42 2014 (r274091) @@ -286,6 +286,10 @@ class ColorConfigure(Toplevel): color = graph.getcolor(type[0]) if (color != ""): self.additem(type[0], color) + self.bind("<Control-w>", self.destroycb) + + def destroycb(self, event): + self.destroy() def additem(self, name, color): item = ColorConf(self.items, name, color) @@ -371,6 +375,10 @@ class SourceConfigure(Toplevel): self.addsource(source) self.drawbuttons() self.buttons.grid(row=1, column=0, sticky=W) + self.bind("<Control-w>", self.destroycb) + + def destroycb(self, event): + self.destroy() def addsource(self, source): if (self.irow > 30): @@ -485,6 +493,10 @@ class SourceStats(Toplevel): bd=1, relief=SUNKEN, width=10).grid( row=ypos, column=3, sticky=W+E) ypos += 1 + self.bind("<Control-w>", self.destroycb) + + def destroycb(self, event): + self.destroy() class SourceContext(Menu): @@ -527,6 +539,7 @@ class EventView(Toplevel): self.drawbuttons() event.displayref(canvas) self.bind("<Destroy>", self.destroycb) + self.bind("<Control-w>", self.destroycb) def destroycb(self, event): self.unbind("<Destroy>") @@ -1307,6 +1320,10 @@ class SchedGraph(Frame): self.pack(expand=1, fill="both") self.buildwidgets() self.layout() + self.bind_all("<Control-q>", self.quitcb) + + def quitcb(self, event): + self.quit() def buildwidgets(self): global status
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411041630.sA4GUhrp071138>