From 82cf9578d821a68d275f1ee13f182d85913acb04 Mon Sep 17 00:00:00 2001 From: Barrucadu Date: Sun, 17 May 2009 22:29:17 +0100 Subject: [PATCH] Changed insert_mode into toggle_insert_mode. --- README | 2 +- examples/configs/sampleconfig | 2 +- examples/configs/sampleconfig-dev | 2 +- uzbl.c | 46 ++++++++++++++++++------------------- uzbl.h | 2 +- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/README b/README index e170e67..bdfb403 100644 --- a/README +++ b/README @@ -161,7 +161,7 @@ actions follows: * `exit` * `search ` * `search_reverse ` -* `insert_mode` +* `toggle_insert_mode` * `runcmd` - can be used for running a command such as SET or BIND diff --git a/examples/configs/sampleconfig b/examples/configs/sampleconfig index ada1134..3cca85c 100644 --- a/examples/configs/sampleconfig +++ b/examples/configs/sampleconfig @@ -76,7 +76,7 @@ bind gh = uri http://www.uzbl.org bind o _ = uri %s bind :wiki _ = uri http://wiki.archlinux.org/index.php/Special:Search?search=%s&go=Go bind gg _ = uri http://www.google.com/search?q=%s -bind i = insert_mode +bind i = toggle_insert_mode #TODO: no 'toggle' command? bind B = spawn /usr/share/uzbl/examples/scripts/insert_bookmark.sh bind U = spawn /usr/share/uzbl/examples/scripts/load_url_from_history.sh diff --git a/examples/configs/sampleconfig-dev b/examples/configs/sampleconfig-dev index 337da7b..de60187 100644 --- a/examples/configs/sampleconfig-dev +++ b/examples/configs/sampleconfig-dev @@ -77,7 +77,7 @@ bind gh = uri http://www.uzbl.org bind o _ = uri %s bind :wiki _ = uri http://wiki.archlinux.org/index.php/Special:Search?search=%s&go=Go bind gg _ = uri http://www.google.com/search?q=%s -bind i = insert_mode +bind i = toggle_insert_mode #TODO: no 'toggle' command? bind B = spawn ./examples/scripts/insert_bookmark.sh bind U = spawn ./examples/scripts/load_url_from_history.sh diff --git a/uzbl.c b/uzbl.c index 1b8e8bc..2c3f8b3 100644 --- a/uzbl.c +++ b/uzbl.c @@ -394,27 +394,27 @@ VIEWFUNC(go_forward) static struct {char *name; Command command;} cmdlist[] = { - { "back", view_go_back }, - { "forward", view_go_forward }, - { "scroll_vert", scroll_vert }, - { "scroll_horz", scroll_horz }, - { "scroll_begin", scroll_begin }, - { "scroll_end", scroll_end }, - { "reload", view_reload, }, - { "reload_ign_cache", view_reload_bypass_cache}, - { "stop", view_stop_loading, }, - { "zoom_in", view_zoom_in, }, //Can crash (when max zoom reached?). - { "zoom_out", view_zoom_out, }, - { "uri", load_uri }, - { "script", run_js }, - { "toggle_status", toggle_status_cb }, - { "spawn", spawn }, - { "sh", spawn_sh }, - { "exit", close_uzbl }, - { "search", search_forward_text }, - { "search_reverse", search_reverse_text }, - { "insert_mode", set_insert_mode }, - { "runcmd", runcmd } + { "back", view_go_back }, + { "forward", view_go_forward }, + { "scroll_vert", scroll_vert }, + { "scroll_horz", scroll_horz }, + { "scroll_begin", scroll_begin }, + { "scroll_end", scroll_end }, + { "reload", view_reload, }, + { "reload_ign_cache", view_reload_bypass_cache}, + { "stop", view_stop_loading, }, + { "zoom_in", view_zoom_in, }, //Can crash (when max zoom reached?). + { "zoom_out", view_zoom_out, }, + { "uri", load_uri }, + { "script", run_js }, + { "toggle_status", toggle_status_cb }, + { "spawn", spawn }, + { "sh", spawn_sh }, + { "exit", close_uzbl }, + { "search", search_forward_text }, + { "search_reverse", search_reverse_text }, + { "toggle_insert_mode", toggle_insert_mode }, + { "runcmd", runcmd } }; static void @@ -457,11 +457,11 @@ file_exists (const char * filename) { } void -set_insert_mode(WebKitWebView *page, const gchar *param) { +toggle_insert_mode(WebKitWebView *page, const gchar *param) { (void)page; (void)param; - uzbl.behave.insert_mode = TRUE; + uzbl.behave.insert_mode = ! uzbl.behave.insert_mode; update_title(); } diff --git a/uzbl.h b/uzbl.h index 49a275d..251d270 100644 --- a/uzbl.h +++ b/uzbl.h @@ -258,7 +258,7 @@ static bool file_exists (const char * filename); void -set_insert_mode(WebKitWebView *page, const gchar *param); +toggle_insert_mode(WebKitWebView *page, const gchar *param); static void load_uri (WebKitWebView * web_view, const gchar *param); -- 1.7.9.5