From 963a4bd1d5575f049182feceeddf0f9df980ecef Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Sun, 31 Jan 2010 20:29:35 +0800 Subject: Update the default uzbl-core config to something useful. --- src/config.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/config.h b/src/config.h index e9b9a8e..7c4bae5 100644 --- a/src/config.h +++ b/src/config.h @@ -1,10 +1,11 @@ const struct { /*@null@*/ char *command; } default_config[] = { -{ "set status_format = \\@[\\@keycmd]\\@ \\@[\\@TITLE]\\@ - Uzbl browser"}, -{ "set title_format_long = \\@keycmd \\@TITLE - Uzbl browser <\\@NAME> > \\@SELECTED_URI"}, -{ "set title_format_short = \\@TITLE - Uzbl browser <\\@NAME>"}, -{ "set max_conns = 100"}, /* WebkitGTK default: 10 */ -{ "set max_conns_host = 6"}, /* WebkitGTK default: 2 */ -{ NULL } +{ "set status_format = \\@[\\@TITLE]\\@ - \\@[\\@uri]\\@ - \\@NAME" }, +{ "set show_status = 1" }, +{ "set title_format_long = \\@keycmd \\@TITLE - Uzbl browser <\\@NAME> > \\@SELECTED_URI" }, +{ "set title_format_short = \\@TITLE - Uzbl browser <\\@NAME>" }, +{ "set max_conns = 100" }, /* WebkitGTK default: 10 */ +{ "set max_conns_host = 6" }, /* WebkitGTK default: 2 */ +{ NULL } }; -- cgit v1.2.3 From d84527478bd98176d8c207f1882500118e073785 Mon Sep 17 00:00:00 2001 From: Paweł Zuzelski Date: Tue, 12 Jan 2010 23:21:53 +0100 Subject: Don't strip binary. Strip moved to separate target Makefile should not strip binary. It should be handled by package manager. --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8fe702d..1b77f6f 100644 --- a/Makefile +++ b/Makefile @@ -34,9 +34,6 @@ uzbl-core: ${TOBJ} # why doesn't ${OBJ} work? @echo LINKING object files @${CC} -o $@ ${OBJ} ${LDFLAGS} @echo ... done. - @echo Stripping binary - @strip $@ - @echo ... done. uzbl-browser: uzbl-core @@ -94,6 +91,11 @@ clean: cd ./tests/; $(MAKE) clean rm -rf ./sandbox/ +strip: + @echo Stripping binary + @strip uzbl-core + @echo ... done. + install: install-uzbl-core install-uzbl-browser install-uzbl-tabbed install-uzbl-core: all -- cgit v1.2.3 From 35b590b223f7be07e08262cbd221829811db0952 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Tue, 2 Feb 2010 20:37:02 +0800 Subject: Default follow keys to numbers and fix follower script argument order. Conflicts: examples/config/config --- examples/config/config | 2 +- examples/data/scripts/follow.js | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/config/config b/examples/config/config index eb30cc1..99fadfb 100644 --- a/examples/config/config +++ b/examples/config/config @@ -313,7 +313,7 @@ set follow_hint_keys = 0123456789 #set follow_hint_keys = qwerty #set follow_hint_keys = asdfghjkl; #set follow_hint_keys = thsnd-rcgmvwb/;789aefijkopquxyz234 -@cbind fl* = script @scripts_dir/follow.js '%s @{follow_hint_keys}' +@cbind fl* = script @scripts_dir/follow.js '@{follow_hint_keys} %s' # --- Form filler binds --- # this script allows you to configure (per domain) values to fill in form diff --git a/examples/data/scripts/follow.js b/examples/data/scripts/follow.js index 12b3765..afb327f 100644 --- a/examples/data/scripts/follow.js +++ b/examples/data/scripts/follow.js @@ -263,8 +263,7 @@ function followLinks(follow) { } } -//Parse input: first argument is user input, second is defined hint keys. +//Parse input: first argument is follow keys, second is user input. var args = '%s'.split(' '); -var charset = args[1]; - -followLinks(args[0]); +var charset = args[0]; +followLinks(args[1]); -- cgit v1.2.3 From e5f66977baaf3ad06d84648018d2d8128f7a6f28 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Tue, 2 Feb 2010 20:37:35 +0800 Subject: Re-fix order of follow.js arguments. Conflicts: examples/config/config --- examples/config/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/config/config b/examples/config/config index 99fadfb..b2ebdbd 100644 --- a/examples/config/config +++ b/examples/config/config @@ -313,7 +313,7 @@ set follow_hint_keys = 0123456789 #set follow_hint_keys = qwerty #set follow_hint_keys = asdfghjkl; #set follow_hint_keys = thsnd-rcgmvwb/;789aefijkopquxyz234 -@cbind fl* = script @scripts_dir/follow.js '@{follow_hint_keys} %s' +@cbind fl* = script @scripts_dir/follow.js '@follow_hint_keys %s' # --- Form filler binds --- # this script allows you to configure (per domain) values to fill in form -- cgit v1.2.3 From ca0273c78b9878b2559be38584aa0ab2e28ae80d Mon Sep 17 00:00:00 2001 From: Paweł Zuzelski Date: Tue, 12 Jan 2010 14:07:36 +0100 Subject: Strip leading whitespaces from uri. --- src/uzbl-core.c | 7 +++++++ src/uzbl-core.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/uzbl-core.c b/src/uzbl-core.c index da61093..bc62e61 100644 --- a/src/uzbl-core.c +++ b/src/uzbl-core.c @@ -2483,6 +2483,13 @@ initialize(int argc, char *argv[]) { void load_uri_imp(gchar *uri) { GString* newuri; + + /* Strip leading whitespaces */ + while (*uri) { + if (!isspace(*uri)) break; + uri++; + } + if (g_strstr_len (uri, 11, "javascript:") != NULL) { eval_js(uzbl.gui.web_view, uri, NULL); return; diff --git a/src/uzbl-core.h b/src/uzbl-core.h index 70a383c..c7c9528 100644 --- a/src/uzbl-core.h +++ b/src/uzbl-core.h @@ -28,6 +28,7 @@ #include #include +#include #include #include #include -- cgit v1.2.3 From 4001c9e918477be55ba2a41dc7bea31bf4848380 Mon Sep 17 00:00:00 2001 From: Paweł Zuzelski Date: Tue, 12 Jan 2010 14:16:54 +0100 Subject: better way to check WebKit version use webkit_major_version(), webkit_minor_version() and webkit_micro_version() functions to obtain webkit version instead of accessing WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION and WEBKIT_MICRO_VERSION directly. WEBKIT_M*_VERSION are defined in header files included by uzbl code, so they contain WebKit version that uzbl was compiled against. webkit_m*_version() functions return WebKit version that is realy used at the moment. --- src/uzbl-core.c | 6 +++--- tests/test-expand.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/uzbl-core.c b/src/uzbl-core.c index bc62e61..e23a64e 100644 --- a/src/uzbl-core.c +++ b/src/uzbl-core.c @@ -2467,9 +2467,9 @@ initialize(int argc, char *argv[]) { } event_buffer_timeout(10); - uzbl.info.webkit_major = WEBKIT_MAJOR_VERSION; - uzbl.info.webkit_minor = WEBKIT_MINOR_VERSION; - uzbl.info.webkit_micro = WEBKIT_MICRO_VERSION; + uzbl.info.webkit_major = webkit_major_version(); + uzbl.info.webkit_minor = webkit_minor_version(); + uzbl.info.webkit_micro = webkit_micro_version(); uzbl.info.arch = ARCH; uzbl.info.commit = COMMIT; diff --git a/tests/test-expand.c b/tests/test-expand.c index 4dcd82d..7ea3d61 100644 --- a/tests/test-expand.c +++ b/tests/test-expand.c @@ -72,11 +72,11 @@ test_useragent (void) { void test_WEBKIT_VERSION (void) { GString* expected = g_string_new(""); - g_string_append(expected, itos(WEBKIT_MAJOR_VERSION)); + g_string_append(expected, itos(webkit_major_version())); g_string_append(expected, " "); - g_string_append(expected, itos(WEBKIT_MINOR_VERSION)); + g_string_append(expected, itos(webkit_minor_version())); g_string_append(expected, " "); - g_string_append(expected, itos(WEBKIT_MICRO_VERSION)); + g_string_append(expected, itos(webkit_micro_version())); g_assert_cmpstr(expand("@WEBKIT_MAJOR @WEBKIT_MINOR @WEBKIT_MICRO", 0), ==, g_string_free(expected, FALSE)); } -- cgit v1.2.3 From f8d6c936bd4fb3574f93811c6dcfce4b4ee39052 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Tue, 2 Feb 2010 20:59:04 +0100 Subject: update comments about usability --- examples/data/scripts/follow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/data/scripts/follow.js b/examples/data/scripts/follow.js index afb327f..a42447c 100644 --- a/examples/data/scripts/follow.js +++ b/examples/data/scripts/follow.js @@ -1,5 +1,5 @@ /* This is the basic linkfollowing script. - * Its pretty stable, only using numbers to navigate. + * Its pretty stable, and you configure which keys to use for hinting * * TODO: Some pages mess around a lot with the zIndex which * lets some hints in the background. -- cgit v1.2.3 From abbffe5c3a11a6a70f7a5c6b978d37afb3266878 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 18 Feb 2010 21:08:35 +0200 Subject: Added required "=" in fixed zoom binds --- examples/config/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/config/config b/examples/config/config index b2ebdbd..7a9e2f9 100644 --- a/examples/config/config +++ b/examples/config/config @@ -218,8 +218,8 @@ set ebind = @mode_bind global,-insert @cbind + = zoom_in @cbind - = zoom_out @cbind T = toggle_zoom_type -@cbind 1 = set zoom_level 1.0 -@cbind 2 = set zoom_level 2.0 +@cbind 1 = set zoom_level = 1.0 +@cbind 2 = set zoom_level = 2.0 # --- Appearance binds --- @cbind t = toggle_status -- cgit v1.2.3 From 332941e9d86e9c2a5238620390fcc39ffccaeed4 Mon Sep 17 00:00:00 2001 From: Dmytro Milinevskyy Date: Fri, 26 Feb 2010 00:29:30 +0200 Subject: [uzbl-tabbed] add support for opening tab next to current and background tabs --- examples/config/config | 7 +++++++ examples/data/scripts/uzbl-tabbed | 11 +++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/examples/config/config b/examples/config/config index cc42c54..86befeb 100644 --- a/examples/config/config +++ b/examples/config/config @@ -235,7 +235,9 @@ set ebind = @mode_bind global,-insert # --- Uzbl tabbed binds --- # Tab opening @cbind gn = event NEW_TAB +@cbind gN = event NEW_TAB_NEXT @cbind go_ = event NEW_TAB %s +@cbind gO_ = event NEW_TAB_NEXT %s @cbind gY = sh 'echo "event NEW_TAB `xclip -selection primary -o`" > $4' # Closing / resting @cbind gC = exit @@ -346,6 +348,11 @@ menu_editable_add Open in @external_editor = script @scripts_dir/extedit.js # === Context menu items ===================================================== # Default context menu +menu_link_add Open in Tab = event NEW_TAB \@SELECTED_URI +menu_link_add Open in Next Tab = event NEW_TAB_NEXT \@SELECTED_URI +menu_link_add Open in BG Tab = event NEW_BG_TAB \@SELECTED_URI +menu_link_add Open in Next BG Tab = event NEW_BG_TAB_NEXT \@SELECTED_URI +menu_separator separator_1 menu_add Google = set uri = http://google.com menu_add Go Home = set uri = http://uzbl.org menu_separator separator_1 diff --git a/examples/data/scripts/uzbl-tabbed b/examples/data/scripts/uzbl-tabbed index 7bd90d5..e3e890d 100755 --- a/examples/data/scripts/uzbl-tabbed +++ b/examples/data/scripts/uzbl-tabbed @@ -488,6 +488,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)) @@ -966,7 +973,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 @@ -974,7 +981,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()) -- cgit v1.2.3 From 69380293dc1fdf65a7e105b55150e9feee715e2c Mon Sep 17 00:00:00 2001 From: Dmytro Milinevskyy Date: Fri, 26 Feb 2010 01:08:57 +0200 Subject: [uzbl-tabbed] correctly wait for child uzbl-core when tab is closed --- examples/data/scripts/uzbl-tabbed | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/data/scripts/uzbl-tabbed b/examples/data/scripts/uzbl-tabbed index e3e890d..e542dbf 100755 --- a/examples/data/scripts/uzbl-tabbed +++ b/examples/data/scripts/uzbl-tabbed @@ -371,8 +371,9 @@ class SocketClient: class UzblInstance: '''Uzbl instance meta-data/meta-action object.''' - def __init__(self, parent, tab, name, uri, title, switch): + def __init__(self, parent, tab, name, uri, title, switch, process): + self.process = process self.parent = parent self.tab = tab self.name = name @@ -527,6 +528,7 @@ class UzblInstance: if self._client: self._client.close() self._client = None + self.process.wait() class UzblTabbed: @@ -994,9 +996,9 @@ class UzblTabbed: cmd = ['uzbl-browser', '-n', name, '-s', str(sid), '--connect-socket', self.socket_path, '--uri', uri] - subprocess.Popen(cmd) # TODO: do i need close_fds=True ? + process = subprocess.Popen(cmd) # TODO: do i need close_fds=True ? - uzbl = UzblInstance(self, tab, name, uri, title, switch) + uzbl = UzblInstance(self, tab, name, uri, title, switch, process) SocketClient.instances_queue[name] = uzbl self.tabs[tab] = uzbl -- cgit v1.2.3 From 8e34c38f9709a38872a962e78e1d5096f4ddf05b Mon Sep 17 00:00:00 2001 From: Dmytro Milinevskyy Date: Fri, 26 Feb 2010 01:56:32 +0200 Subject: reverted commit --- examples/data/scripts/uzbl-tabbed | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/data/scripts/uzbl-tabbed b/examples/data/scripts/uzbl-tabbed index e542dbf..e3e890d 100755 --- a/examples/data/scripts/uzbl-tabbed +++ b/examples/data/scripts/uzbl-tabbed @@ -371,9 +371,8 @@ class SocketClient: class UzblInstance: '''Uzbl instance meta-data/meta-action object.''' - def __init__(self, parent, tab, name, uri, title, switch, process): + def __init__(self, parent, tab, name, uri, title, switch): - self.process = process self.parent = parent self.tab = tab self.name = name @@ -528,7 +527,6 @@ class UzblInstance: if self._client: self._client.close() self._client = None - self.process.wait() class UzblTabbed: @@ -996,9 +994,9 @@ class UzblTabbed: cmd = ['uzbl-browser', '-n', name, '-s', str(sid), '--connect-socket', self.socket_path, '--uri', uri] - process = subprocess.Popen(cmd) # TODO: do i need close_fds=True ? + subprocess.Popen(cmd) # TODO: do i need close_fds=True ? - uzbl = UzblInstance(self, tab, name, uri, title, switch, process) + uzbl = UzblInstance(self, tab, name, uri, title, switch) SocketClient.instances_queue[name] = uzbl self.tabs[tab] = uzbl -- cgit v1.2.3 From 82e9bb809df2563824609dccc2278d41dbf645bc Mon Sep 17 00:00:00 2001 From: Dmytro Milinevskyy Date: Fri, 26 Feb 2010 02:09:28 +0200 Subject: [uzbl-tabbed] correctly wait for child uzbl-core when tab is closed --- examples/data/scripts/uzbl-tabbed | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/data/scripts/uzbl-tabbed b/examples/data/scripts/uzbl-tabbed index 7bd90d5..8d0d34a 100755 --- a/examples/data/scripts/uzbl-tabbed +++ b/examples/data/scripts/uzbl-tabbed @@ -371,8 +371,9 @@ class SocketClient: class UzblInstance: '''Uzbl instance meta-data/meta-action object.''' - def __init__(self, parent, tab, name, uri, title, switch): + def __init__(self, parent, tab, name, uri, title, switch, process): + self.process = process self.parent = parent self.tab = tab self.name = name @@ -520,6 +521,7 @@ class UzblInstance: if self._client: self._client.close() self._client = None + self.process.wait() class UzblTabbed: @@ -987,9 +989,9 @@ class UzblTabbed: cmd = ['uzbl-browser', '-n', name, '-s', str(sid), '--connect-socket', self.socket_path, '--uri', uri] - subprocess.Popen(cmd) # TODO: do i need close_fds=True ? + process = subprocess.Popen(cmd) # TODO: do i need close_fds=True ? - uzbl = UzblInstance(self, tab, name, uri, title, switch) + uzbl = UzblInstance(self, tab, name, uri, title, switch, process) SocketClient.instances_queue[name] = uzbl self.tabs[tab] = uzbl -- cgit v1.2.3 From 7a2c2ccb54ce5d525248d8fde53b7c136eea7f04 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sat, 27 Feb 2010 11:52:13 +0100 Subject: disabled extedit and scroll-percentage as they dont work anyway since Uzbl object is disabled, and some folks were confused --- examples/config/config | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/config/config b/examples/config/config index cc42c54..efab5c5 100644 --- a/examples/config/config +++ b/examples/config/config @@ -60,7 +60,7 @@ set new_window = sh 'uzbl-browser -u $8' # Load commit handlers @on_event LOAD_COMMIT @set_status recv -@on_event LOAD_COMMIT script @scripts_dir/scroll-percentage.js +#@on_event LOAD_COMMIT script @scripts_dir/scroll-percentage.js # Reset the keycmd on navigation @on_event LOAD_COMMIT @set_mode @@ -331,11 +331,12 @@ set formfiller = spawn @scripts_dir/formfiller # --- External edit script configuration & binds --- # Edit form input fields in an external editor (gvim, emacs, urxvt -e vim, ..) +# disabled since Uzbl object is gone set external_editor = gvim #set external_editor = xterm -e vim -@cbind E = script @scripts_dir/extedit.js +#@cbind E = script @scripts_dir/extedit.js # And add menu option. -menu_editable_add Open in @external_editor = script @scripts_dir/extedit.js +#menu_editable_add Open in @external_editor = script @scripts_dir/extedit.js # --- Examples --- # Example showing how to use uzbl's fifo to execute a command. -- cgit v1.2.3 From 8b9e54521e362b3782f1ab2baa80e3b21059966e Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sat, 27 Feb 2010 11:57:05 +0100 Subject: explain t binding --- examples/config/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/config/config b/examples/config/config index efab5c5..cd6a0c0 100644 --- a/examples/config/config +++ b/examples/config/config @@ -267,7 +267,7 @@ set preset = event PRESET_TABS @cbind !dump = sh "echo dump_config > $4" # Reload config @cbind !reload = sh "sed '/^# === Post-load misc commands/,$d' $1 > $4" -# Uzbl Terminal. TODO explain why this is useful +# If you want to see all events being triggered: @cbind t = sh 'xterm -e "socat unix-connect:$5 -"' #@cbind t = sh 'urxvt -e socat unix-connect:$5 -' -- cgit v1.2.3 From b10556e23caccdaf1909e453170a086671fa8a94 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Sun, 28 Feb 2010 17:50:38 +0800 Subject: process.wait() will hang if the instance sigterms, use poll() + timeout. --- examples/data/scripts/uzbl-tabbed | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/examples/data/scripts/uzbl-tabbed b/examples/data/scripts/uzbl-tabbed index 8d0d34a..ea130f5 100755 --- a/examples/data/scripts/uzbl-tabbed +++ b/examples/data/scripts/uzbl-tabbed @@ -521,7 +521,18 @@ class UzblInstance: if self._client: self._client.close() self._client = None - self.process.wait() + + pid = self.process.pid + timeout = time.time() + 5 + + while self.process.poll() is None and time.time() < timeout: + # Sleep between polls. + time.sleep(0.1) + + if self.process.poll() is None: + # uzbl instance didn't exit in time. + error("quit timeout expired, sending SIGTERM to uzbl instance") + self.process.terminate() class UzblTabbed: -- cgit v1.2.3 From 31a3ac216e6fb3978e57031e8cdf996c3bf819c9 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Sun, 28 Feb 2010 21:54:52 +0800 Subject: These example tabbed menu bindings are better suited on the wiki. We also need to remember people use uzbl-browser as much as uzbl-tabbed. These example menu items only work when using uzbl-tabbed and clutter the context menu for uzbl-browser users. --- examples/config/config | 5 ----- 1 file changed, 5 deletions(-) diff --git a/examples/config/config b/examples/config/config index 150d1ea..8cfa6a6 100644 --- a/examples/config/config +++ b/examples/config/config @@ -349,11 +349,6 @@ set external_editor = gvim # === Context menu items ===================================================== # Default context menu -menu_link_add Open in Tab = event NEW_TAB \@SELECTED_URI -menu_link_add Open in Next Tab = event NEW_TAB_NEXT \@SELECTED_URI -menu_link_add Open in BG Tab = event NEW_BG_TAB \@SELECTED_URI -menu_link_add Open in Next BG Tab = event NEW_BG_TAB_NEXT \@SELECTED_URI -menu_separator separator_1 menu_add Google = set uri = http://google.com menu_add Go Home = set uri = http://uzbl.org menu_separator separator_1 -- cgit v1.2.3 From ee479db76d8ddca24d01572f61956e06727ceca4 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Sun, 28 Feb 2010 22:00:19 +0800 Subject: We are clearing the keycmd on the wrong LOAD event (causing frustration) --- examples/config/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/config/config b/examples/config/config index 8cfa6a6..10bf722 100644 --- a/examples/config/config +++ b/examples/config/config @@ -57,12 +57,12 @@ set new_window = sh 'uzbl-browser -u $8' # Load start handler @on_event LOAD_START @set_status wait +# Reset the keycmd on navigation +@on_event LOAD_START @set_mode # Load commit handlers @on_event LOAD_COMMIT @set_status recv #@on_event LOAD_COMMIT script @scripts_dir/scroll-percentage.js -# Reset the keycmd on navigation -@on_event LOAD_COMMIT @set_mode # Load finish handlers @on_event LOAD_FINISH @set_status done -- cgit v1.2.3 From 770c910b4dd7b49df881812deea4b2c505985473 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Sun, 28 Feb 2010 23:37:00 +0800 Subject: Config comment clarification for the t bind. --- examples/config/config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/config/config b/examples/config/config index 10bf722..ae97443 100644 --- a/examples/config/config +++ b/examples/config/config @@ -269,7 +269,8 @@ set preset = event PRESET_TABS @cbind !dump = sh "echo dump_config > $4" # Reload config @cbind !reload = sh "sed '/^# === Post-load misc commands/,$d' $1 > $4" -# If you want to see all events being triggered: +# Use socat to directly inject commands into uzbl-core and view events +# raised by uzbl-core: @cbind t = sh 'xterm -e "socat unix-connect:$5 -"' #@cbind t = sh 'urxvt -e socat unix-connect:$5 -' -- cgit v1.2.3 From e63d10759211b6fc96626f2c9c100b45e550ca69 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Mon, 1 Mar 2010 01:16:03 +0800 Subject: Segfaulting when uzbl.behave.commands hash table already destroyed. --- src/uzbl-core.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/uzbl-core.c b/src/uzbl-core.c index 6cf8b10..c288b5f 100644 --- a/src/uzbl-core.c +++ b/src/uzbl-core.c @@ -502,7 +502,10 @@ clean_up(void) { g_free(uzbl.info.pid_str); g_free(uzbl.state.executable_path); - g_hash_table_destroy(uzbl.behave.commands); + if (uzbl.behave.commands) { + g_hash_table_destroy(uzbl.behave.commands); + uzbl.behave.commands = NULL; + } if(uzbl.state.event_buffer) g_ptr_array_free(uzbl.state.event_buffer, TRUE); @@ -1084,9 +1087,9 @@ eval_js(WebKitWebView * web_view, gchar *script, GString *result, const char *fi size_t size; JSStringRef prop, val; JSObjectRef exc = JSValueToObject(context, js_exc, NULL); - + printf("Exception occured while executing script:\n"); - + /* Print file */ prop = JSStringCreateWithUTF8CString("sourceURL"); val = JSValueToStringCopy(context, JSObjectGetProperty(context, exc, prop, NULL), NULL); @@ -1110,7 +1113,7 @@ eval_js(WebKitWebView * web_view, gchar *script, GString *result, const char *fi } JSStringRelease(prop); JSStringRelease(val); - + /* Print message */ val = JSValueToStringCopy(context, exc, NULL); size = JSStringGetMaximumUTF8CStringSize(val); -- cgit v1.2.3 From d7e60e00dc876d74dc603d908b37d8257d8e1583 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Tue, 2 Mar 2010 01:23:30 +0800 Subject: Rename the global config dict to `global_config`. --- examples/data/scripts/uzbl-event-manager | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/data/scripts/uzbl-event-manager b/examples/data/scripts/uzbl-event-manager index 9624b14..757dc27 100755 --- a/examples/data/scripts/uzbl-event-manager +++ b/examples/data/scripts/uzbl-event-manager @@ -348,7 +348,7 @@ class EventHandler(object): class UzblInstance(object): # Give all plugins access to the main config dict. - config = CONFIG + global_config = CONFIG def __init__(self, parent, client_socket): -- cgit v1.2.3 From 944536c6f035816dced88347fcefad6148def7f3 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Tue, 2 Mar 2010 02:04:20 +0800 Subject: Given export method `prepend` option and now allows non-callable exports --- examples/data/scripts/uzbl-event-manager | 41 +++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/examples/data/scripts/uzbl-event-manager b/examples/data/scripts/uzbl-event-manager index 757dc27..99773ae 100755 --- a/examples/data/scripts/uzbl-event-manager +++ b/examples/data/scripts/uzbl-event-manager @@ -385,21 +385,40 @@ class UzblInstance(object): print (u'%s!-- %s' % (' ' * self.depth, msg)).encode('utf-8') - def export(self, name, function): - '''Export `function(uzbl, *args, ..)` inside a plugin to the uzbl - object like so `uzbl.function(*args, ..)`. This will allow other - plugins to call functions inside the current plugin (which is currently - calling this function) via the uzbl object.''' - - self.__dict__.__setitem__(name, partial(function, self)) + def export(self, attr, object, prepend=True): + '''Attach an object to the current class instance. This is the + preferred method of sharing functionality, functions and objects + between plugins. + + If the object is callable you may wish to turn the callable object in + to an "instance method call" by using the `functools.partial(..)` + tool to prepend the `self` object to the callable objects argument + list. + + Example session from a plugins POV: + >>> config_dict = {'foo': 'data..', 'bar': 'other data..'} + >>> uzbl.export('config', config_dict) + >>> uzbl.config is config_dict + True + >>> print uzbl.config['foo'] + data.. + >>> uzbl.export('get', lambda uzbl, key: uzbl.config[key]) + >>> print uzbl.get('bar') + other data.. + ''' + + if prepend and callable(object): + object = partial(object, self) + + self.__dict__.__setitem__(attr, object) def export_dict(self, export_dict): - '''Export multiple (name, function)'s at once inside a dict of the - form `{name1: function1, name2: function2, ...}`.''' + '''Export multiple (attr, object)'s at once inside a dict of the + form `{attr1: object1, attr2: object2, ...}`.''' - for (name, function) in export_dict.items(): - self.export(name, function) + for (attr, object) in export_dict.items(): + self.export(attr, object) def connect(self, event, handler, *args, **kargs): -- cgit v1.2.3 From 86bfb8f9dd916d1b604145d29cd7f1b5675c4415 Mon Sep 17 00:00:00 2001 From: Dmytro Milinevskyy Date: Tue, 2 Mar 2010 01:48:56 +0200 Subject: [build] do not rebuild objects any time and remove 'why doesn't work?' --- Makefile | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 79a7297..8415180 100644 --- a/Makefile +++ b/Makefile @@ -8,32 +8,31 @@ LDFLAGS!=echo `pkg-config --libs gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0` -p SRC = $(wildcard src/*.c) HEAD = $(wildcard src/*.h) -TOBJ = $(SRC:.c=.o) -OBJ = $(foreach obj, $(TOBJ), $(notdir $(obj))) +OBJ = $(foreach obj, $(SRC:.c=.o), $(notdir $(obj))) all: uzbl-browser options options: @echo - @echo BUILD OPTIONS: + @echo "BUILD OPTIONS:" @echo "CFLAGS = ${CFLAGS}" @echo "LDFLAGS = ${LDFLAGS}" @echo @echo See the README file for usage instructions. +VPATH:=src .c.o: - @echo COMPILING $< + @echo -n "COMPILING $<" @${CC} -c ${CFLAGS} $< - @echo ... done. + @echo " ... done." ${OBJ}: ${HEAD} -uzbl-core: ${TOBJ} # why doesn't ${OBJ} work? - @echo - @echo LINKING object files +uzbl-core: ${OBJ} + @echo -n "LINKING object files" @${CC} -o $@ ${OBJ} ${LDFLAGS} - @echo ... done. + @echo " ... done." uzbl-browser: uzbl-core @@ -50,7 +49,7 @@ RUN_PREFIX?=$(PREFIX) force: # When compiling unit tests, compile uzbl as a library first -tests: ${TOBJ} force +tests: ${OBJ} force $(CC) -shared -Wl ${OBJ} -o ./tests/libuzbl-core.so cd ./tests/; $(MAKE) -- cgit v1.2.3 From 9b3b2e66df97cc49476924ab9eec47a4dde74eef Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Wed, 3 Mar 2010 14:49:36 +0800 Subject: Handle stdout and stderr flush errors (caused by read-only fd's?) --- examples/data/scripts/uzbl-event-manager | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/data/scripts/uzbl-event-manager b/examples/data/scripts/uzbl-event-manager index 99773ae..a0afcb3 100755 --- a/examples/data/scripts/uzbl-event-manager +++ b/examples/data/scripts/uzbl-event-manager @@ -201,8 +201,12 @@ def daemonize(): sys.stderr.write("fork #2 failed") sys.exit(1) - sys.stdout.flush() - sys.stderr.flush() + try: + sys.stdout.flush() + sys.stderr.flush() + + except: + pass devnull = '/dev/null' stdin = file(devnull, 'r') -- cgit v1.2.3 From 930e69732ebb35bd862d33065befaa918229ffb9 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Fri, 5 Mar 2010 14:21:15 +0800 Subject: Strip whitespace. --- examples/data/scripts/follower.js | 26 +++++++++++++------------- examples/data/scripts/instance-select-wmii.sh | 2 +- examples/data/scripts/uzblcat | 1 - 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/examples/data/scripts/follower.js b/examples/data/scripts/follower.js index 604b779..dc37b46 100644 --- a/examples/data/scripts/follower.js +++ b/examples/data/scripts/follower.js @@ -16,7 +16,7 @@ // be done with: // // @on_event LOAD_COMMIT script /path/to/follower.js -// +// // Then you can bind it to a key: // // @bind f* = js follower.follow('%s', matchSpec, handler, hintStyler) @@ -26,7 +26,7 @@ // set these to follower.genericMatchSpec, follower.genericHandler and // follower.genericHintStyler respectively. // -// For example, +// For example, // // @bind f* = js follower.follow('%s', follower.genericMatchSpec, follower.genericHandler, follower.genericHintStyler) // @bind F* = js follower.follow('%s', follower.onlyLinksMatchSpec, follower.newPageHandler, follower.newPageHintStyler) @@ -53,7 +53,7 @@ // * What elements are hinted. // * The style of the hints displayed. // * How the hints are handled. -// +// // In order to customize behavior, write an alternative, and pass that in to // follower.follow invocation. You _will_ have to modify this script, but only // locally, it beats having to copy the entire script under a new name and @@ -75,11 +75,11 @@ String.prototype.lpad = function(padding, length) { return padded; } -function Follower() { +function Follower() { // Globals - var uzblID = 'uzbl-follow'; // ID to apply to each hint. - var uzblContainerID = 'uzbl-follow-container'; // ID to apply to the div containing hints. + var uzblID = 'uzbl-follow'; // ID to apply to each hint. + var uzblContainerID = 'uzbl-follow-container'; // ID to apply to the div containing hints. // Translation table, used to display something other than numbers as hint // labels. Typically set to the ten keys of the home row. @@ -147,7 +147,7 @@ function Follower() { } Uzbl.run("event SET_KEYCMD"); } - + // Handler to open links in a new page. The rest is the same as before. this.newPageHandler = function(node) { if (node) { @@ -387,24 +387,24 @@ function Follower() { // The main hinting function. I don't know how to do default values to // functions, so all arguments must be specified. Use generics if you must. this.follow = function(target, matchSpec, handler, hintStyler) { - var container = generateHintContainer(); // Get a container to hold all hints. + var container = generateHintContainer(); // Get a container to hold all hints. var allHintables = generateHintables(matchSpec); // Get all items that can be hinted. - hintables = filterHintables(allHintables, target); // Filter them based on current input. - + hintables = filterHintables(allHintables, target); // Filter them based on current input. + clearHints(); // Clear existing hints, if any. if (hintables[0].length == 0) { // Nothing was hinted, user pressed an unknown key, maybe? // Do nothing. } else if (hintables[0].length == 1) { - handler(hintables[0][0]); // Only one hint remains, handle it. + handler(hintables[0][0]); // Only one hint remains, handle it. } else { - drawHints(container, hintables, hintStyler); // Draw whatever hints remain. + drawHints(container, hintables, hintStyler); // Draw whatever hints remain. } return; }; -} +} // Make on-click links clickable. try { diff --git a/examples/data/scripts/instance-select-wmii.sh b/examples/data/scripts/instance-select-wmii.sh index 2bf13ba..fdd27e6 100755 --- a/examples/data/scripts/instance-select-wmii.sh +++ b/examples/data/scripts/instance-select-wmii.sh @@ -6,7 +6,7 @@ # you can select one from a list, or go to the next/previous one # It does not change the layout (stacked/tiled/floating) nor does it # changes the size or viewing mode of a uzbl window -# When your current uzbl window is maximized, the one you change to +# When your current uzbl window is maximized, the one you change to # will be maximized as well. # See http://www.uzbl.org/wiki/wmii for more info # $1 must be one of 'list', 'next', 'prev' diff --git a/examples/data/scripts/uzblcat b/examples/data/scripts/uzblcat index e955608..4aa4b9e 100755 --- a/examples/data/scripts/uzblcat +++ b/examples/data/scripts/uzblcat @@ -9,4 +9,3 @@ for line in stdin: stdout.write(line[0:-1]) # vim: set noet ff=unix - -- cgit v1.2.3 From c3c63b671d0ae706512fe196b1eb1cc79a2950c9 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Mon, 8 Mar 2010 16:59:26 +0800 Subject: Echo each compiler and linker call in the Makefile. --- Makefile | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 8415180..1ead5ec 100644 --- a/Makefile +++ b/Makefile @@ -10,30 +10,19 @@ SRC = $(wildcard src/*.c) HEAD = $(wildcard src/*.h) OBJ = $(foreach obj, $(SRC:.c=.o), $(notdir $(obj))) -all: uzbl-browser options - -options: - @echo - @echo "BUILD OPTIONS:" - @echo "CFLAGS = ${CFLAGS}" - @echo "LDFLAGS = ${LDFLAGS}" - @echo - @echo See the README file for usage instructions. +all: uzbl-browser VPATH:=src .c.o: - @echo -n "COMPILING $<" + @echo -e "${CC} -c ${CFLAGS} $<" @${CC} -c ${CFLAGS} $< - @echo " ... done." ${OBJ}: ${HEAD} uzbl-core: ${OBJ} - @echo -n "LINKING object files" + @echo -e "\n${CC} -o $@ ${OBJ} ${LDFLAGS}" @${CC} -o $@ ${OBJ} ${LDFLAGS} - @echo " ... done." - uzbl-browser: uzbl-core -- cgit v1.2.3 From e1cc27677b92c5ce520c692566fd38420b70b3c7 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Mon, 8 Mar 2010 17:40:47 +0800 Subject: Use itertools.count instead of custom counter function. --- examples/data/scripts/uzbl-event-manager | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/examples/data/scripts/uzbl-event-manager b/examples/data/scripts/uzbl-event-manager index a0afcb3..a3fed98 100755 --- a/examples/data/scripts/uzbl-event-manager +++ b/examples/data/scripts/uzbl-event-manager @@ -39,6 +39,7 @@ from signal import signal, SIGTERM from optparse import OptionParser from traceback import print_exc from functools import partial +from itertools import count def xdghome(key, default): @@ -107,15 +108,6 @@ def error(msg): sys.stderr.write("%s: error: %s\n" % (SCRIPTNAME, msg)) -def counter(): - '''Generate unique object id's.''' - - i = 0 - while True: - i += 1 - yield i - - def find_plugins(plugin_dirs): '''Find all event manager plugins in the plugin dirs and return a dictionary of {'plugin-name.py': '/full/path/to/plugin-name.py', ...}''' @@ -322,7 +314,7 @@ def parse_msg(uzbl, msg): class EventHandler(object): - nexthid = counter().next + nexthid = count().next def __init__(self, event, handler, *args, **kargs): if not callable(handler): -- cgit v1.2.3 From 894a162e83d1151fd53e0ba5fd2b3714a1d1b06a Mon Sep 17 00:00:00 2001 From: root Date: Tue, 9 Mar 2010 11:35:59 +0200 Subject: Avoid stdout flushing when not tty --- examples/data/scripts/uzbl-event-manager | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/data/scripts/uzbl-event-manager b/examples/data/scripts/uzbl-event-manager index a3fed98..7fa4a09 100755 --- a/examples/data/scripts/uzbl-event-manager +++ b/examples/data/scripts/uzbl-event-manager @@ -193,13 +193,10 @@ def daemonize(): sys.stderr.write("fork #2 failed") sys.exit(1) - try: + if sys.stdout.isatty(): sys.stdout.flush() sys.stderr.flush() - except: - pass - devnull = '/dev/null' stdin = file(devnull, 'r') stdout = file(devnull, 'a+') -- cgit v1.2.3 From ab06b604f5b75870dbb2aeae5be7585f703145e8 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Thu, 11 Mar 2010 15:48:41 +0800 Subject: Remove linker arg in CFLAGS and remove duplicate "-pthread" in LDFLAGS. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 1ead5ec..6526ce6 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # first entries are for gnu make, 2nd for BSD make. see http://lists.uzbl.org/pipermail/uzbl-dev-uzbl.org/2009-July/000177.html -CFLAGS:=-std=c99 $(shell pkg-config --cflags gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -lgthread-2.0 -DCOMMIT="\"$(shell ./misc/hash.sh)\"" $(CPPFLAGS) -fPIC -W -Wall -Wextra -pedantic -CFLAGS!=echo -std=c99 `pkg-config --cflags gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0` -ggdb -Wall -W -DARCH='"\""'`uname -m`'"\""' -lgthread-2.0 -DCOMMIT='"\""'`./misc/hash.sh`'"\""' $(CPPFLAGS) -fPIC -W -Wall -Wextra -pedantic +CFLAGS:=-std=c99 $(shell pkg-config --cflags gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -DCOMMIT="\"$(shell ./misc/hash.sh)\"" $(CPPFLAGS) -fPIC -W -Wall -Wextra -pedantic +CFLAGS!=echo -std=c99 `pkg-config --cflags gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0` -ggdb -Wall -W -DARCH='"\""'`uname -m`'"\""' -DCOMMIT='"\""'`./misc/hash.sh`'"\""' $(CPPFLAGS) -fPIC -W -Wall -Wextra -pedantic -LDFLAGS:=$(shell pkg-config --libs gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0) -pthread $(LDFLAGS) -LDFLAGS!=echo `pkg-config --libs gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0` -pthread $(LDFLAGS) +LDFLAGS:=$(shell pkg-config --libs gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0) $(LDFLAGS) +LDFLAGS!=echo `pkg-config --libs gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0` $(LDFLAGS) SRC = $(wildcard src/*.c) HEAD = $(wildcard src/*.h) -- cgit v1.2.3 From 3b8249493fdb4ed2325d8d5371cebda5c6a98bf4 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Thu, 11 Mar 2010 16:16:49 +0800 Subject: Check stdout a tty before flushing. --- examples/data/scripts/uzbl-cookie-daemon | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/data/scripts/uzbl-cookie-daemon b/examples/data/scripts/uzbl-cookie-daemon index fde8b8e..ed88de4 100755 --- a/examples/data/scripts/uzbl-cookie-daemon +++ b/examples/data/scripts/uzbl-cookie-daemon @@ -269,8 +269,9 @@ def daemonize(): sys.stderr.write("fork #2 failed") sys.exit(1) - sys.stdout.flush() - sys.stderr.flush() + if sys.stdout.isatty(): + sys.stdout.flush() + sys.stderr.flush() devnull = '/dev/null' stdin = file(devnull, 'r') -- cgit v1.2.3 From 5aa9a876c8a0e6812a1ca2217227f99e24635f6e Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Thu, 11 Mar 2010 17:27:01 +0800 Subject: Replace all @'s in uri's from xclip with %40 to avoid expansion. --- examples/config/config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/config/config b/examples/config/config index ae97443..e01611e 100644 --- a/examples/config/config +++ b/examples/config/config @@ -186,7 +186,7 @@ set ebind = @mode_bind global,-insert # === Mouse bindings ========================================================= # Middle click open in new window -@bind = sh 'if [ "\@SELECTED_URI" ]; then uzbl-browser -u "\@SELECTED_URI"; else echo "uri $(xclip -o)" > $4; fi' +@bind = sh 'if [ "\@SELECTED_URI" ]; then uzbl-browser -u "\@SELECTED_URI"; else echo "uri $(xclip -o | sed s/\\\@/%40/g)" > $4; fi' # === Keyboard bindings ====================================================== @@ -238,7 +238,7 @@ set ebind = @mode_bind global,-insert @cbind gN = event NEW_TAB_NEXT @cbind go_ = event NEW_TAB %s @cbind gO_ = event NEW_TAB_NEXT %s -@cbind gY = sh 'echo "event NEW_TAB `xclip -selection primary -o`" > $4' +@cbind gY = sh 'echo "event NEW_TAB `xclip -selection primary -o | sed s/\\\@/%40/g`" > $4' # Closing / resting @cbind gC = exit @cbind gQ = event CLEAN_TABS @@ -296,9 +296,9 @@ set toggle_cmd_ins = @toggle_modes command insert @cbind yy = sh 'echo -n $7 | xclip' # Go the page from primary selection -@cbind p = sh 'echo "uri `xclip -selection primary -o`" > $4' +@cbind p = sh 'echo "uri `xclip -selection primary -o | sed s/\\\@/%40/g`" > $4' # Go to the page in clipboard -@cbind P = sh 'echo "uri `xclip -selection clipboard -o`" > $4' +@cbind P = sh 'echo "uri `xclip -selection clipboard -o | sed s/\\\@/%40/g`" > $4' # Start a new uzbl instance from the page in primary selection @cbind 'p = sh 'exec uzbl-browser --uri $(xclip -o)' -- cgit v1.2.3 From 5f6fe61088d70438ac50da1ace531925061f5704 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Thu, 11 Mar 2010 21:20:31 +0100 Subject: Remove keycmd testcase. The builtin-keycmd code has been dropped Tests were broken since: commit 71b5ffdc987f4e4d8431093d4b22fd8024124770 Author: Rob Date: Mon Mar 1 13:04:27 2010 +0100 get rid of obsolete keycmd code --- tests/test-expand.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tests/test-expand.c b/tests/test-expand.c index 7ea3d61..f64aba8 100644 --- a/tests/test-expand.c +++ b/tests/test-expand.c @@ -30,12 +30,6 @@ extern UzblCore uzbl; extern gchar* expand(char*, guint); extern void make_var_to_name_hash(void); -void -test_keycmd (void) { - uzbl.state.keycmd = "gg winslow"; - g_assert_cmpstr(expand("@keycmd", 0), ==, "gg winslow"); -} - void test_uri (void) { g_assert_cmpstr(expand("@uri", 0), ==, ""); @@ -184,7 +178,6 @@ main (int argc, char *argv[]) { g_type_init(); g_test_init(&argc, &argv, NULL); - g_test_add_func("/test-expand/@keycmd", test_keycmd); g_test_add_func("/test-expand/@useragent", test_useragent); g_test_add_func("/test-expand/@uri", test_uri); g_test_add_func("/test-expand/@TITLE", test_TITLE); -- cgit v1.2.3