From 931dd7496af6b3e6ad1d129335a7806ee245b14d 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 4039096..0502951 100755 --- a/examples/data/scripts/uzbl-tabbed +++ b/examples/data/scripts/uzbl-tabbed @@ -510,12 +510,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 23559dab4f44ccfef4edb7db19e2ec3e3671bf5a 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 0502951..04635fc 100755 --- a/examples/data/scripts/uzbl-tabbed +++ b/examples/data/scripts/uzbl-tabbed @@ -1024,7 +1024,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 2d0e769245445eba8ec6f63c7bd122040d35f5e4 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 04635fc..2d7d7c9 100755 --- a/examples/data/scripts/uzbl-tabbed +++ b/examples/data/scripts/uzbl-tabbed @@ -501,7 +501,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