diff options
author | 2009-04-30 22:46:39 +0100 | |
---|---|---|
committer | 2009-04-30 22:46:39 +0100 | |
commit | 0197c110e1e23317be850f8858dd8bbd0230a5f7 (patch) | |
tree | dc9f92f4dc060140d771798b1c0712ed3cba9995 | |
parent | 9e5d3734daffb36e5acf20f9f731739548764da8 (diff) | |
parent | 65453b4165e73013d607f147b78c9a9aa9c05394 (diff) |
Merge branch 'master' of git://github.com/anydot/uzbl into anydot/master
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | TODO | 4 | ||||
-rw-r--r-- | examples/configs/sampleconfig | 2 | ||||
-rw-r--r-- | examples/configs/sampleconfig-dev | 2 | ||||
-rw-r--r-- | uzbl.c | 32 | ||||
-rw-r--r-- | uzblctrl.c | 1 |
6 files changed, 36 insertions, 11 deletions
@@ -2,13 +2,13 @@ CPPFLAGS=$(shell pkg-config --cflags gtk+-2.0 webkit-1.0) -Wall -W LDFLAGS=$(shell pkg-config --libs gtk+-2.0 webkit-1.0) all: uzbl uzblctrl -test: +test: uzbl ./uzbl --uri http://www.uzbl.org -test-config: +test-config: uzbl ./uzbl --uri http://www.uzbl.org --config examples/configs/sampleconfig-dev -test-config-real: +test-config-real: uzbl ./uzbl --uri http://www.uzbl.org --config /usr/share/uzbl/examples/configs/sampleconfig clean: @@ -26,9 +26,7 @@ ASAP * see if/how we can remove /bin/bash from scripts * unify internal and external bindings. * unify command triggering, whether they came in through fifo or keybind -* add to bottom /* vi: set et ts=4: */ * ideal uri editor: awesome mode like FF, some keyb shortcuts (erase search string, go to end/begin of string,..), history (if you patch dmenu to be in vertical mode and you order correctly, that's it), support copy paste -* get rid of the home page concept. allow user to make keybinds to go to one or more "homepages". a home page is nothing special. * blinking cursor when not in insert mode is confusing. i suggest dimming it's color if possible * open in new window -> uzbl: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0. * make it more clear to newbs insert vs command @@ -40,6 +38,8 @@ ASAP * document a bit how insert mode, command mode, always_insert_mode, modkey etc work * find a simple format (ascii doc, markdow, textile,..) to format uzbl docs (and remain "plaintext") while still being able to generate html for it so we can use them on the website * allow users to customize order, separating, colors,.. of items in statusbar using pango markup thing +* mention bugtracker in readme, move tickets from github to new bugtracker +* default value for fifo_dir so we don't need to if(fifo_dir) SOMEDAY: check if we can make the settings loading less hard coded. eg( keep a list of all settings, and for each one, try to load it) diff --git a/examples/configs/sampleconfig b/examples/configs/sampleconfig index f6e8688..b5d598a 100644 --- a/examples/configs/sampleconfig +++ b/examples/configs/sampleconfig @@ -26,7 +26,7 @@ m = forward s = stop r = refresh R = reload -h = uri http://www.uzbl.org +gh = uri http://www.uzbl.org f = follow_link_here F = follow_link_new_tab w = follow_link_new_window diff --git a/examples/configs/sampleconfig-dev b/examples/configs/sampleconfig-dev index f6390b8..3953d79 100644 --- a/examples/configs/sampleconfig-dev +++ b/examples/configs/sampleconfig-dev @@ -26,7 +26,7 @@ m = forward s = stop r = refresh R = reload -h = uri http://www.uzbl.org +gh = uri http://www.uzbl.org f = follow_link_here F = follow_link_new_tab w = follow_link_new_window @@ -61,6 +61,7 @@ static gint load_progress; static Window xwin = 0; static char fifo_path[64]; static char socket_path[108]; +static GString *keycmd; /* state variables (initial values coming from command line arguments but may be changed later) */ static gchar* uri = NULL; @@ -522,6 +523,8 @@ static void update_title (GtkWindow* window) { GString* string_long = g_string_new (""); GString* string_short = g_string_new (""); + + g_string_append_printf(string_long, "%s ", keycmd->str); if (!always_insert_mode) g_string_append (string_long, (insert_mode ? "[I] " : "[C] ")); if (main_title) { @@ -564,18 +567,35 @@ key_press_cb (WebKitWebView* page, GdkEventKey* event) return FALSE; //TURN OFF/ON INSERT MODE - if ((insert_mode && (event->keyval == GDK_Escape)) || (!insert_mode && (event->string[0] == 'i'))) { + if ((insert_mode && (event->keyval == GDK_Escape)) || (!insert_mode && (event->string[0] == 'i') && !keycmd->len)) { insert_mode = !insert_mode || always_insert_mode; update_title (GTK_WINDOW (main_window)); return TRUE; } - if ((!insert_mode || (event->state == modmask)) && (action = g_hash_table_lookup(bindings, event->string))) { - parse_command(action->name, action->param); + if (insert_mode && event->state != modmask) + return FALSE; + + + if (event->keyval == GDK_Escape) { + g_string_truncate(keycmd, 0); + + update_title (GTK_WINDOW (main_window)); + return TRUE; } - return !insert_mode; + g_string_append(keycmd, event->string); + + if ((action = g_hash_table_lookup(bindings, keycmd->str))) { + g_string_truncate(keycmd, 0); + + parse_command(action->name, action->param); + } + + update_title (GTK_WINDOW (main_window)); + + return TRUE; } static GtkWidget* @@ -765,6 +785,8 @@ main (int argc, char* argv[]) { /* initialize hash table */ bindings = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, free_action); + keycmd = g_string_new(""); + settings_init (); commands_hash (); @@ -797,6 +819,8 @@ main (int argc, char* argv[]) { gtk_main (); + g_string_free(keycmd, TRUE); + unlink (socket_path); unlink (fifo_path); @@ -61,3 +61,4 @@ main(int argc, char* argv[]) { return 0; } +/* vi: set et ts=4: */ |