FS#289 - Small bugfix + extension to uzbl-tabbed
|
DetailsSorry for posting the patch here, I am too lazy to subscribe to the mailing list.
The patch is against the current version of uzbl-tabbed from the master branch in git. Note: I am not an experienced python programmer, it might be a bad or incorrect code. Changes: (add) Now a value of window_size is read from config file (the old version always uses hardcoded value), examples: set window_size = m # maximize window set window_size = 300,300 # width,height (fix) The uri parameter of the NEW_TAB event is a utf-8 string. Since this string is not properly encoded in the old version, URL containing non-ascii characters cannot be opened in a new tab. *** uzbl-tabbed.orig 2011-12-23 22:36:46.000000000 +0300 --- uzbl-tabbed 2011-12-23 22:11:22.000000000 +0300 *************** *** 156,157 **** --- 156,160 ---- + import urllib + import urlparse + from gobject import io_add_watch, source_remove, timeout_add, IO_IN, IO_HUP *************** *** 488,489 **** --- 491,504 ---- self.parent.tabs[tab].title_changed(True) + elif var == "window_size": + if config['window_size'] == "m": + uzbl.window.maximize() + else: + try: + window_size = map(int, config['window_size'].split(',')) + uzbl.window.resize(*window_size) + + except: + print_exc() + error("Invalid value for window_size in config file.") + *************** *** 633,635 **** print_exc() ! error("Invalid value for default_size in config file.") --- 648,650 ---- print_exc() ! error("Invalid value for window_size in config file.") *************** *** 876,878 **** sid = tab.get_id() ! uri = uri.strip() name = "%d-%d" % (os.getpid(), self.next_pid()) --- 891,898 ---- sid = tab.get_id() ! ! uri_parsed = urlparse.urlsplit(uri.strip().encode('utf-8')) ! query_quoted = urllib.urlencode(urlparse.parse_qsl(uri_parsed.query, True), True) ! path_quoted = urllib.quote(uri_parsed.path) ! uri = urlparse.urlunsplit((uri_parsed.scheme, uri_parsed.netloc, path_quoted, query_quoted, uri_parsed.fragment)) ! name = "%d-%d" % (os.getpid(), self.next_pid()) |
This task depends upon
Where should I send it then?
I have a fork of uzbl in my repository with the patch applied:
https://github.com/hoverisk/uzbl/commit/c965fff3730beb481fcc221b118d6e87ae065b8a
If somebody reads bugreports here, please add this patch.