summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2011-09-28 18:39:03 +0200
committerportix <portix@gmx.net>2011-09-28 18:39:03 +0200
commit1cf97f3fc6a5f3eb81142a0085692b3b3a3534ec (patch)
treecfc19d5454f31fda4fe8507f9087562c5d0053c1
parente980e9a99ae47af46994cc4446541c3f4cda40de (diff)
downloaddwb-1cf97f3fc6a5f3eb81142a0085692b3b3a3534ec.zip
New command stop_loading
-rw-r--r--doc/dwb.14
-rw-r--r--src/commands.c8
-rw-r--r--src/commands.h1
-rw-r--r--src/config.h1
-rw-r--r--src/dwb.c2
-rw-r--r--util/keys.in1
6 files changed, 17 insertions, 0 deletions
diff --git a/doc/dwb.1 b/doc/dwb.1
index 9749e3ac..58f25dac 100644
--- a/doc/dwb.1
+++ b/doc/dwb.1
@@ -190,6 +190,10 @@ Reload focused view (command
Reload focused view without using any cached data (command
.BR reload_bypass_cache ).
.TP
+.BR C-s
+Stop loading current page (command
+.BR stop_loading ).
+.TP
.BR [n]zi
Zoom in [n times] (command
.BR zoom_in ).
diff --git a/src/commands.c b/src/commands.c
index 9b18da2a..8c79d397 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -256,6 +256,14 @@ commands_reload_bypass_cache(KeyMap *km, Arg *arg) {
}
/*}}}*/
+/* commands_stop_loading {{{*/
+DwbStatus
+commands_stop_loading(KeyMap *km, Arg *arg) {
+ webkit_web_view_stop_loading(WEBVIEW_FROM_ARG(arg));
+ return STATUS_OK;
+}
+/*}}}*/
+
/* commands_view_source(Arg) {{{*/
DwbStatus
commands_view_source(KeyMap *km, Arg *arg) {
diff --git a/src/commands.h b/src/commands.h
index f4d0017b..c1a63f73 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -58,6 +58,7 @@ DwbStatus commands_push_master(KeyMap *, Arg *);
DwbStatus commands_quickmark(KeyMap *, Arg *);
DwbStatus commands_reload(KeyMap *, Arg *);
DwbStatus commands_reload_bypass_cache(KeyMap *, Arg *);
+DwbStatus commands_stop_loading(KeyMap *, Arg *);
DwbStatus commands_resize_master(KeyMap *, Arg *);
DwbStatus commands_save_files(KeyMap *, Arg *);
DwbStatus commands_save_session(KeyMap *, Arg *);
diff --git a/src/config.h b/src/config.h
index 4250d51f..88d28646 100644
--- a/src/config.h
+++ b/src/config.h
@@ -67,6 +67,7 @@ static KeyValue KEYS[] = {
{ "scroll_up", { "k", 0, }, },
{ "show_keys", { "Sk", 0, }, },
{ "show_settings", { "Ss", 0, }, },
+ { "stop_loading", { "s", GDK_CONTROL_MASK, }, },
{ "toggle_bottomstack", { "tb", 0, }, },
{ "toggle_maximized", { "gm", 0, }, },
{ "view_source", { "gf", 0, }, },
diff --git a/src/dwb.c b/src/dwb.c
index 30a2330b..81637c64 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -181,6 +181,8 @@ static FunctionMap FMAP [] = {
(Func)commands_reload, NULL, ALWAYS_SM, },
{ { "reload_bypass_cache", "Reload current page without using any cached data", }, 1,
(Func)commands_reload_bypass_cache, NULL, ALWAYS_SM, },
+ { { "stop_loading", "Stop loading current page", }, 1,
+ (Func)commands_stop_loading, NULL, ALWAYS_SM, },
{ { "remove_view", "Close view", }, 1,
(Func)commands_remove_view, NULL, ALWAYS_SM, },
{ { "save_quickmark", "Save a quickmark for this page", }, 0,
diff --git a/util/keys.in b/util/keys.in
index 37da84f7..72216b70 100644
--- a/util/keys.in
+++ b/util/keys.in
@@ -16,6 +16,7 @@ history_back Go back
history_forward Go forward
reload Reload current page
reload_bypass_cache Reload without using any cached data
+stop_loading Stop loading current page
insert_mode Insert mode
pass_through Go in pass-through mode, all keys are directly send to the webview
view_source View page source