projects
/
uzbl-mobile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d14b903
)
Add action 'keycmd_bs' for backspacing a char
author
DuClare
<akarinotengoku@gmail.com>
Thu, 28 May 2009 12:53:09 +0000
(15:53 +0300)
committer
DuClare
<akarinotengoku@gmail.com>
Thu, 28 May 2009 12:53:09 +0000
(15:53 +0300)
uzbl.c
patch
|
blob
|
history
uzbl.h
patch
|
blob
|
history
diff --git
a/uzbl.c
b/uzbl.c
index
ba6655a
..
a8b97c4
100644
(file)
--- a/
uzbl.c
+++ b/
uzbl.c
@@
-567,7
+567,8
@@
static struct {char *name; Command command[2];} cmdlist[] =
{ "toggle_insert_mode", {toggle_insert_mode, 0} },
{ "runcmd", {runcmd, NOSPLIT} },
{ "set", {set_var, NOSPLIT} },
{ "toggle_insert_mode", {toggle_insert_mode, 0} },
{ "runcmd", {runcmd, NOSPLIT} },
{ "set", {set_var, NOSPLIT} },
- { "dump_config", {act_dump_config, 0} }
+ { "dump_config", {act_dump_config, 0} },
+ { "keycmd_bs", {keycmd_bs, 0} }
};
static void
};
static void
@@
-747,6
+748,14
@@
new_window_load_uri (const gchar * uri) {
}
static void
}
static void
+keycmd_bs (WebKitWebView *page, GArray *argv) {
+ (void)page;
+ (void)argv;
+ g_string_truncate(uzbl.state.keycmd, uzbl.state.keycmd->len - 1);
+ update_title();
+}
+
+static void
close_uzbl (WebKitWebView *page, GArray *argv) {
(void)page;
(void)argv;
close_uzbl (WebKitWebView *page, GArray *argv) {
(void)page;
(void)argv;
@@
-1856,10
+1865,8
@@
key_press_cb (GtkWidget* window, GdkEventKey* event)
return TRUE;
}
return TRUE;
}
- if ((event->keyval == GDK_BackSpace) && (uzbl.state.keycmd->len > 0)) {
- g_string_truncate(uzbl.state.keycmd, uzbl.state.keycmd->len - 1);
- update_title();
- }
+ if (event->keyval == GDK_BackSpace)
+ keycmd_bs(NULL, NULL);
gboolean key_ret = FALSE;
if ((event->keyval == GDK_Return) || (event->keyval == GDK_KP_Enter))
gboolean key_ret = FALSE;
if ((event->keyval == GDK_Return) || (event->keyval == GDK_KP_Enter))
diff --git
a/uzbl.h
b/uzbl.h
index
8618675
..
b7a5565
100644
(file)
--- a/
uzbl.h
+++ b/
uzbl.h
@@
-306,6
+306,9
@@
static void
new_window_load_uri (const gchar * uri);
static void
new_window_load_uri (const gchar * uri);
static void
+keycmd_bs (WebKitWebView *page, GArray *argv);
+
+static void
close_uzbl (WebKitWebView *page, GArray *argv);
static gboolean
close_uzbl (WebKitWebView *page, GArray *argv);
static gboolean