diff options
author | DuClare <akarinotengoku@gmail.com> | 2009-05-26 16:00:51 +0300 |
---|---|---|
committer | DuClare <akarinotengoku@gmail.com> | 2009-05-26 16:00:51 +0300 |
commit | c7a26e5ad25b49dfb5532c9f33321ad815272cd1 (patch) | |
tree | 928f7ad6f178cb2ca927e4f7f34c7ef6c61d1a55 | |
parent | 6c11777067bdb8aac09bba78d54caea04f85e059 (diff) |
Add action dehilight, make ESC dehilight
-rw-r--r-- | uzbl.c | 9 | ||||
-rw-r--r-- | uzbl.h | 3 |
2 files changed, 12 insertions, 0 deletions
@@ -532,6 +532,7 @@ static struct {char *name; Command command[2];} cmdlist[] = { "exit", {close_uzbl, 0} }, { "search", {search_forward_text, NOSPLIT} }, { "search_reverse", {search_reverse_text, NOSPLIT} }, + { "dehilight", {dehilight, 0} }, { "toggle_insert_mode", {toggle_insert_mode, 0} }, { "runcmd", {runcmd, NOSPLIT} }, { "set", {set_var, NOSPLIT} } @@ -683,6 +684,13 @@ search_reverse_text (WebKitWebView *page, GArray *argv) { } static void +dehilight (WebKitWebView *page, GArray *argv) { + (void) argv; + webkit_web_view_set_highlight_text_matches (page, FALSE); +} + + +static void new_window_load_uri (const gchar * uri) { GString* to_execute = g_string_new (""); g_string_append_printf (to_execute, "%s --uri '%s'", uzbl.state.executable_path, uri); @@ -1775,6 +1783,7 @@ key_press_cb (GtkWidget* window, GdkEventKey* event) if (event->keyval == GDK_Escape) { g_string_truncate(uzbl.state.keycmd, 0); update_title(); + dehilight(uzbl.gui.web_view, NULL); return TRUE; } @@ -394,6 +394,9 @@ static void search_reverse_text (WebKitWebView *page, GArray *argv); static void +dehilight (WebKitWebView *page, GArray *argv); + +static void run_js (WebKitWebView * web_view, GArray *argv); static void |