summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2011-10-01 22:54:20 +0200
committerportix <portix@gmx.net>2011-10-01 22:54:20 +0200
commit790371ed30e84a151d5fab1bba87666aa9edd5be (patch)
tree574a2b11884dd17a16b8514ade669a17ba85dc6c
parentac08c97851f94562e8ed3c1fc0a0b7aae3082fe8 (diff)
downloaddwb-790371ed30e84a151d5fab1bba87666aa9edd5be.zip
Fix command mode
-rw-r--r--src/commands.c9
-rw-r--r--src/commands.h2
-rw-r--r--src/dwb.c12
3 files changed, 12 insertions, 11 deletions
diff --git a/src/commands.c b/src/commands.c
index 78ea74d0..0661de06 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -894,4 +894,13 @@ DwbStatus
commands_open_editor(KeyMap *km, Arg *arg) {
return dwb_open_in_editor();
}/*}}}*/
+
+/* dwb_command_mode {{{*/
+DwbStatus
+commands_command_mode(KeyMap *km, Arg *arg) {
+ dwb_set_normal_message(dwb.state.fview, false, ":");
+ dwb_focus_entry();
+ dwb.state.mode = COMMAND_MODE;
+ return STATUS_OK;
+}/*}}}*/
/*}}}*/
diff --git a/src/commands.h b/src/commands.h
index 99eac3a0..7afe981b 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -90,4 +90,6 @@ DwbStatus commands_fullscreen(KeyMap *, Arg *);
DwbStatus commands_pass_through(KeyMap *, Arg *);
DwbStatus commands_open_editor(KeyMap *, Arg *);
DwbStatus commands_insert_mode(KeyMap *, Arg *);
+DwbStatus commands_command_mode(KeyMap *, Arg *);
+
#endif
diff --git a/src/dwb.c b/src/dwb.c
index 9d1c3141..02a7eb10 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -53,7 +53,6 @@ static gboolean dwb_sync_history(gpointer);
static TabBarVisible dwb_eval_tabbar_visible(const char *arg);
-static gboolean dwb_command_mode(Arg *arg);
static void dwb_reload_layout(GList *, WebSettings *);
static char * dwb_test_userscript(const char *);
@@ -114,7 +113,7 @@ static FunctionMap FMAP [] = {
{ { "new_window", "New window for next navigation", }, 0,
(Func)commands_new_window_or_view, NULL, NEVER_SM, { .n = OPEN_NEW_WINDOW}, },
{ { "command_mode", "Enter command mode", }, 0,
- (Func)dwb_command_mode, NULL, POST_SM, },
+ (Func)commands_command_mode, NULL, POST_SM, },
{ { "decrease_master", "Decrease master area", }, 1,
(Func)commands_resize_master, "Cannot decrease further", ALWAYS_SM, { .n = 5 } },
{ { "download_hint", "Download via hints", }, 0,
@@ -2371,15 +2370,6 @@ dwb_eval_key(GdkEventKey *e) {
}/*}}}*/
-/* dwb_command_mode {{{*/
-static gboolean
-dwb_command_mode(Arg *arg) {
- dwb_set_normal_message(dwb.state.fview, false, ":");
- dwb_focus_entry();
- dwb.state.mode = COMMAND_MODE;
- return true;
-}/*}}}*/
-
/* dwb_insert_mode(Arg *arg) {{{*/
DwbStatus
dwb_insert_mode(void) {