diff options
author | Mason Larobina <mason.larobina@gmail.com> | 2010-02-28 21:48:52 +0800 |
---|---|---|
committer | Mason Larobina <mason.larobina@gmail.com> | 2010-02-28 21:48:52 +0800 |
commit | d15a6df517f0cc37fb7d8cb0aaf61548057240ca (patch) | |
tree | e7277305eab64e44955eac6b2dc0a4a8d0f762a3 /examples/data | |
parent | b10556e23caccdaf1909e453170a086671fa8a94 (diff) | |
parent | 8e34c38f9709a38872a962e78e1d5096f4ddf05b (diff) |
Merge branch 'ext-tabs' of git://github.com/niamster/uzbl into experimental
Diffstat (limited to 'examples/data')
-rwxr-xr-x | examples/data/scripts/uzbl-tabbed | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/examples/data/scripts/uzbl-tabbed b/examples/data/scripts/uzbl-tabbed index ea130f5..f07bae4 100755 --- a/examples/data/scripts/uzbl-tabbed +++ b/examples/data/scripts/uzbl-tabbed @@ -489,6 +489,13 @@ class UzblInstance: self.parent.update_tablist() elif type == "NEW_TAB": self.parent.new_tab(args) + elif type == "NEW_BG_TAB": + self.parent.new_tab(args, '', 0) + elif type == "NEW_TAB_NEXT": + self.parent.new_tab(args, next=True) + elif type == "NEW_BG_TAB_NEXT": + self.parent.new_tab(args, '', 0, next=True) + elif type == "NEXT_TAB": if args: self.parent.next_tab(int(args)) @@ -979,7 +986,7 @@ class UzblTabbed: return False - def new_tab(self, uri='', title='', switch=None): + def new_tab(self, uri='', title='', switch=None, next=False): '''Add a new tab to the notebook and start a new instance of uzbl. Use the switch option to negate config['switch_to_new_tabs'] option when you need to load multiple tabs at a time (I.e. like when @@ -987,7 +994,7 @@ class UzblTabbed: tab = gtk.Socket() tab.show() - self.notebook.append_page(tab) + self.notebook.insert_page(tab, position=next and self.notebook.get_current_page() + 1 or -1) sid = tab.get_id() uri = uri.strip() name = "%d-%d" % (os.getpid(), self.next_pid()) |