aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--AUTHORS2
-rw-r--r--Makefile14
-rw-r--r--examples/config/config1
-rw-r--r--examples/data/scripts/follow.js15
-rwxr-xr-xexamples/data/scripts/uzbl-tabbed16
-rwxr-xr-xmisc/cleanprocs-files.sh10
-rwxr-xr-xmisc/env.sh17
-rwxr-xr-xmisc/fifotest.sh20
-rw-r--r--src/uzbl-core.c8
10 files changed, 53 insertions, 54 deletions
diff --git a/.gitignore b/.gitignore
index 2ddbb60..8c08dc0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,8 @@
uzbl-core
*.o
+*.lo
*.pyc
+*.sw[a-z]
*~
tags
-uzbl-cookie-manager
+sandbox
diff --git a/AUTHORS b/AUTHORS
index fe97f86..b3ce2e2 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -31,6 +31,7 @@ In alphabetical order:
Cedric Staub - Javascript cookies
Chris Mason - code snippets such as basic cookie handler
Chris van Dijk (quigybo) - work on uzbl-tabbed
+ Christer Sjöholm - uzbl-tabbed bugfixes
Ciprian Dorin, Craciun - patches
Daiki Ueno (ueno) - fix for crash when opening image in new window
Damien Leon - misc
@@ -67,6 +68,7 @@ In alphabetical order:
Moritz Lenz - small doc fix
Nicolas Pouillard - refactored scroll command
Olivier Schwander - auto file:// prepend
+ Olof-Joachim Frahm - bugfixes
Paul Tomak - formfiller.sh script, uzbl vim syntax
Paweł Zuzelski (pawelz) <pawelz@pld-linux.org> - http auth handler, misc patches
Peter Suschlik - backwards searching
diff --git a/Makefile b/Makefile
index 62bc9b5..91b66b6 100644
--- a/Makefile
+++ b/Makefile
@@ -74,7 +74,7 @@ test-uzbl-core-sandbox: uzbl-core
make DESTDIR=./sandbox RUN_PREFIX=`pwd`/sandbox/usr/local install-uzbl-core
make DESTDIR=./sandbox RUN_PREFIX=`pwd`/sandbox/usr/local install-example-data
cp -np ./misc/env.sh ./sandbox/env.sh
- source ./sandbox/env.sh && uzbl-core --uri http://www.uzbl.org --verbose
+ . ./sandbox/env.sh && uzbl-core --uri http://www.uzbl.org --verbose
make DESTDIR=./sandbox uninstall
rm -rf ./sandbox/usr
@@ -83,9 +83,9 @@ test-uzbl-browser-sandbox: uzbl-browser
make DESTDIR=./sandbox RUN_PREFIX=`pwd`/sandbox/usr/local install-uzbl-browser
make DESTDIR=./sandbox RUN_PREFIX=`pwd`/sandbox/usr/local install-example-data
cp -np ./misc/env.sh ./sandbox/env.sh
- -source ./sandbox/env.sh && uzbl-event-manager restart -avv
- source ./sandbox/env.sh && uzbl-browser --uri http://www.uzbl.org --verbose
- source ./sandbox/env.sh && uzbl-event-manager stop -ivv
+ -. ./sandbox/env.sh && uzbl-event-manager restart -avv
+ . ./sandbox/env.sh && uzbl-browser --uri http://www.uzbl.org --verbose
+ . ./sandbox/env.sh && uzbl-event-manager stop -ivv
make DESTDIR=./sandbox uninstall
rm -rf ./sandbox/usr
@@ -94,9 +94,9 @@ test-uzbl-tabbed-sandbox: uzbl-browser
make DESTDIR=./sandbox RUN_PREFIX=`pwd`/sandbox/usr/local install-uzbl-browser
make DESTDIR=./sandbox RUN_PREFIX=`pwd`/sandbox/usr/local install-example-data
cp -np ./misc/env.sh ./sandbox/env.sh
- -source ./sandbox/env.sh && uzbl-event-manager restart -avv
- source ./sandbox/env.sh && ./sandbox/home/.local/share/uzbl/scripts/uzbl-tabbed
- source ./sandbox/env.sh && uzbl-event-manager stop -ivv
+ -. ./sandbox/env.sh && uzbl-event-manager restart -avv
+ . ./sandbox/env.sh && ./sandbox/home/.local/share/uzbl/scripts/uzbl-tabbed
+ . ./sandbox/env.sh && uzbl-event-manager stop -ivv
make DESTDIR=./sandbox uninstall
rm -rf ./sandbox/usr
diff --git a/examples/config/config b/examples/config/config
index 6de0b59..089fc8d 100644
--- a/examples/config/config
+++ b/examples/config/config
@@ -185,6 +185,7 @@ set ebind = @mode_bind global,-insert
# Resets keycmd and returns to default mode.
@on_event ESCAPE @set_mode
@on_event ESCAPE event KEYCMD_CLEAR
+@on_event ESCAPE js uzbl.follow.clearHints()
@bind <Escape> = event ESCAPE
@bind <Ctrl>[ = event ESCAPE
diff --git a/examples/data/scripts/follow.js b/examples/data/scripts/follow.js
index 536256b..b7b0d82 100644
--- a/examples/data/scripts/follow.js
+++ b/examples/data/scripts/follow.js
@@ -98,12 +98,17 @@ uzbl.follow.elementInViewport = function(el) {
}
// Removes all hints/leftovers that might be generated
-// by this script.
-uzbl.follow.removeAllHints = function(doc) {
+// by this script in the given document.
+uzbl.follow.removeHints = function(doc) {
var elements = doc.getElementById(uzbldivid);
if (elements) elements.parentNode.removeChild(elements);
}
+// Clears all hints in every document
+uzbl.follow.clearHints = function() {
+ this.documents().forEach(uzbl.follow.removeHints);
+}
+
// Generate a hint for an element with the given label
// Here you can play around with the style of the hints!
uzbl.follow.generateHint = function(doc, el, label, top, left) {
@@ -153,7 +158,7 @@ uzbl.follow.reDrawHints = function(elems, chars) {
var positions = elements.map(uzbl.follow.elementPosition);
this.documents().forEach(function(doc) {
- uzbl.follow.removeAllHints(doc);
+ uzbl.follow.removeHints(doc);
if (!doc.body) return;
doc.hintdiv = doc.createElement('div');
doc.hintdiv.id = uzbldivid;
@@ -211,7 +216,7 @@ uzbl.follow.followLinks = function(follow) {
var s = follow.split('');
var linknr = this.labelToInt(follow);
- var followable = 'a, area, textarea, select, input:not([type=hidden]), button';
+ var followable = 'a, area, textarea, select, input:not([type=hidden]), button, *[onclick]';
var uri = 'a, area, frame, iframe';
//var focusable = 'a, area, textarea, select, input:not([type=hidden]), button, frame, iframe, applet, object';
//var desc = '*[title], img[alt], applet[alt], area[alt], input[alt]';
@@ -230,7 +235,7 @@ uzbl.follow.followLinks = function(follow) {
var el = elems[linknr];
// clear all of our hints
- this.documents().forEach(uzbl.follow.removeAllHints);
+ this.clearHints();
if (newwindow) {
// we're opening a new window using the URL attached to this element
diff --git a/examples/data/scripts/uzbl-tabbed b/examples/data/scripts/uzbl-tabbed
index 2a5f481..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":
@@ -510,12 +513,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()
@@ -578,6 +581,11 @@ class UzblTabbed:
self.window.set_title("Uzbl Browser")
self.window.set_border_width(0)
+ # this prevents the window from expanding if the contents of the
+ # statusbar are wider than the window.
+ # i suspect this is not the right way to do this.
+ self.window.set_geometry_hints(min_width=1)
+
# Set main window icon
icon_path = config['icon_path']
if os.path.exists(icon_path):
@@ -1019,7 +1027,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)
diff --git a/misc/cleanprocs-files.sh b/misc/cleanprocs-files.sh
deleted file mode 100755
index 463d1fb..0000000
--- a/misc/cleanprocs-files.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-killall uzbl; killall strace;
-killall -9 uzbl; killall -9 strace
-
-rm -rf /tmp/uzbl_*
-
-echo "Uzbl processes:"
-ps aux | grep uzbl | grep -v grep
-echo "Uzbl /tmp entries:"
-ls -alh /tmp/uzbl* 2>/dev/null
diff --git a/misc/env.sh b/misc/env.sh
index 68377f2..f815c44 100755
--- a/misc/env.sh
+++ b/misc/env.sh
@@ -10,14 +10,21 @@
# Maybe we should spawn processes from here with an 'exec' at the end?
# Re-define our home location inside the sandbox dir.
-export HOME=$(pwd)/sandbox/home
+HOME=$(pwd)/sandbox/home
+export HOME
# Export default XDG_{DATA,CACHE,..}_HOME locations inside the sandbox
# directory according to defaults in the xdg specification.
# <http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html>
-export XDG_DATA_HOME=$HOME/.local/share
-export XDG_CACHE_HOME=$HOME/.cache
-export XDG_CONFIG_HOME=$HOME/.config
+XDG_DATA_HOME=$HOME/.local/share
+export XDG_DATA_HOME
+
+XDG_CACHE_HOME=$HOME/.cache
+export XDG_CACHE_HOME
+
+XDG_CONFIG_HOME=$HOME/.config
+export XDG_CONFIG_HOME
# Needed to run uzbl-browser etc from here.
-export PATH="$(pwd)/sandbox/usr/local/bin:$PATH"
+PATH="$(pwd)/sandbox/usr/local/bin:$PATH"
+export PATH
diff --git a/misc/fifotest.sh b/misc/fifotest.sh
deleted file mode 100755
index 8ad0593..0000000
--- a/misc/fifotest.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-if [ -z "$1" ]
-then
- echo "Need fifo filename!" >&2
- exit 2
-fi
-while :
-do
- echo 'uri dns.be'
- echo 'uri dns.be' > $1
- sleep 2
- echo 'uri www.archlinux.org'
- echo 'uri www.archlinux.org' > $1
- sleep 2
- echo 'uri icanhascheezburger.com'
- echo 'uri icanhascheezburger.com' > $1
- sleep 2
- echo 'back'
- echo 'back' > $1
-done
diff --git a/src/uzbl-core.c b/src/uzbl-core.c
index ec2d347..e498762 100644
--- a/src/uzbl-core.c
+++ b/src/uzbl-core.c
@@ -1131,8 +1131,6 @@ spawn_sh_sync(WebKitWebView *web_view, GArray *argv, GString *result) {
void
run_parsed_command(const CommandInfo *c, GArray *a, GString *result) {
- c->function(uzbl.gui.web_view, a, result);
-
/* send the COMMAND_EXECUTED event, except for set and event/request commands */
if(strcmp("set", c->key) &&
strcmp("event", c->key) &&
@@ -1143,12 +1141,18 @@ run_parsed_command(const CommandInfo *c, GArray *a, GString *result) {
guint i = 0;
while ((p = argv_idx(a, i++)))
g_string_append_printf(param, " '%s'", p);
+
+ /* might be destructive on array a */
+ c->function(uzbl.gui.web_view, a, result);
+
send_event(COMMAND_EXECUTED, NULL,
TYPE_NAME, c->key,
TYPE_FORMATTEDSTR, param->str,
NULL);
g_string_free(param, TRUE);
}
+ else
+ c->function(uzbl.gui.web_view, a, result);
if(result) {
g_free(uzbl.state.last_result);