Changeset 2ca16bc4dfca…
Parent f7cd5039ad3f…
by
Changes to 2 files · Browse files at 2ca16bc4dfca Showing diff from parent f7cd5039ad3f Diff from another changeset...
@@ -99,6 +99,10 @@ notebook.add_accelerator('thg-close', accelgroup, key,
modifier, gtk.ACCEL_VISIBLE)
notebook.connect('thg-close', self.close_notebook)
+ key, modifier = gtk.accelerator_parse(mod+'n')
+ notebook.add_accelerator('thg-new', accelgroup, key,
+ modifier, gtk.ACCEL_VISIBLE)
+ notebook.connect('thg-new', self.new_notebook)
self.stbar = gtklib.StatusBar()
self.stbar.sttext.set_property('use-markup', True)
@@ -218,6 +222,9 @@ else:
self.close_current_page()
+ def new_notebook(self, notebook):
+ self.add_search_page()
+
def add_search_page(self):
frame = gtk.Frame()
frame.set_border_width(10)
|
@@ -36,8 +36,9 @@ for sig in ('thg-exit', 'thg-close', 'thg-refresh', 'thg-accept'):
gobject.signal_new(sig, gtk.Window,
gobject.SIGNAL_ACTION, gobject.TYPE_NONE, ())
-gobject.signal_new('thg-close', gtk.Notebook,
- gobject.SIGNAL_ACTION, gobject.TYPE_NONE, ())
+for sig in ('thg-close', 'thg-new'):
+ gobject.signal_new(sig, gtk.Notebook,
+ gobject.SIGNAL_ACTION, gobject.TYPE_NONE, ())
gtkmainalive = False
def dispatch(args):
|
Loading...