From f0bc65cfca369c5be69f798aa743138cd0c8942b Mon Sep 17 00:00:00 2001 From: Christer Sjöholm Date: Sun, 20 Mar 2011 11:37:57 +0100 Subject: Fixes NEXT_TAB and PREV_TAB in uzbl-tabbed. The detection of an argument was incorrect. --- examples/data/scripts/uzbl-tabbed | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/data/scripts/uzbl-tabbed b/examples/data/scripts/uzbl-tabbed index 13e4e44..c953062 100755 --- a/examples/data/scripts/uzbl-tabbed +++ b/examples/data/scripts/uzbl-tabbed @@ -507,12 +507,12 @@ class UzblInstance: self.parent.new_tab(args[0], '', 0, next=True) elif type == "NEXT_TAB": - if args[0]: + if args: self.parent.next_tab(int(args[0])) else: self.parent.next_tab() elif type == "PREV_TAB": - if args[0]: + if args: self.parent.prev_tab(int(args[0])) else: self.parent.prev_tab() -- cgit v1.2.3 From ee35babdd9ebfcb605d2c642357153850cb125e4 Mon Sep 17 00:00:00 2001 From: Christer Sjöholm Date: Sun, 20 Mar 2011 12:07:58 +0100 Subject: Fix for uzbl-tabbed new-tab. Some times the uri may be a unicode string, so we convert it to a str as required by gobject.spawn_async(). This happens when a page want to open an url in a new window. --- examples/data/scripts/uzbl-tabbed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/data/scripts/uzbl-tabbed b/examples/data/scripts/uzbl-tabbed index c953062..d3cfe2f 100755 --- a/examples/data/scripts/uzbl-tabbed +++ b/examples/data/scripts/uzbl-tabbed @@ -1016,7 +1016,7 @@ class UzblTabbed: title = config['new_tab_title'] cmd = ['uzbl-browser', '-n', name, '-s', str(sid), - '--connect-socket', self.socket_path, '--uri', uri] + '--connect-socket', self.socket_path, '--uri', str(uri)] gobject.spawn_async(cmd, flags=gobject.SPAWN_SEARCH_PATH) uzbl = UzblInstance(self, tab, name, uri, title, switch) -- cgit v1.2.3 From 37fe833febdb26a03816e7a82c5b649fdc0984f3 Mon Sep 17 00:00:00 2001 From: Christer Sjöholm Date: Sun, 20 Mar 2011 12:20:09 +0100 Subject: Allow NEW_TAB to be called without an URI The new instance tries to open the CWD, a blank page would be nicer. --- examples/data/scripts/uzbl-tabbed | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/data/scripts/uzbl-tabbed b/examples/data/scripts/uzbl-tabbed index d3cfe2f..72de00e 100755 --- a/examples/data/scripts/uzbl-tabbed +++ b/examples/data/scripts/uzbl-tabbed @@ -498,7 +498,10 @@ class UzblInstance: elif type == "LOAD_COMMIT": self.uri = args[0] elif type == "NEW_TAB": - self.parent.new_tab(args[0]) + if args: + self.parent.new_tab(args[0]) + else: + self.parent.new_tab() elif type == "NEW_BG_TAB": self.parent.new_tab(args[0], '', 0) elif type == "NEW_TAB_NEXT": -- cgit v1.2.3