summaryrefslogtreecommitdiff
path: root/src/commands.c
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2012-01-08 17:05:27 +0100
committerportix <portix@gmx.net>2012-01-08 17:05:27 +0100
commit4d05555a25fa4e63e17b57d9ce9afa720bde20fe (patch)
tree8a8e55a84b181afb4c36b9a63335da64dafa6207 /src/commands.c
parentc5c5f84a082075ccd5a77df8203fd8ede3aa19f3 (diff)
downloaddwb-4d05555a25fa4e63e17b57d9ce9afa720bde20fe.zip
Remove toggalbe unbound setting shortcuts, introducing set and toggle_setting instead
Diffstat (limited to 'src/commands.c')
-rw-r--r--src/commands.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/commands.c b/src/commands.c
index 7c7d73fc..32ae007c 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -719,6 +719,7 @@ commands_toggle_bars(KeyMap *km, Arg *arg) {
gtk_widget_set_visible(dwb.gui.bottombox, dwb.state.bar_visible & BAR_VIS_STATUS);
return STATUS_OK;
}/*}}}*/
+/* commands_presentation_mode {{{*/
DwbStatus
commands_presentation_mode(KeyMap *km, Arg *arg) {
if (! dwb.state.fullscreen)
@@ -726,7 +727,8 @@ commands_presentation_mode(KeyMap *km, Arg *arg) {
commands_fullscreen(km, arg);
commands_toggle_bars(km, arg);
return STATUS_OK;
-}
+}/*}}}*/
+/* commands_toggle_lock_protect {{{*/
DwbStatus
commands_toggle_lock_protect(KeyMap *km, Arg *arg) {
GList *gl = dwb.state.nummod < 0 ? dwb.state.fview : g_list_nth(dwb.state.views, dwb.state.nummod-1);
@@ -738,7 +740,8 @@ commands_toggle_lock_protect(KeyMap *km, Arg *arg) {
if (arg->n & LP_VISIBLE && gl != dwb.state.fview)
gtk_widget_set_visible(v->scroll, LP_VISIBLE(v));
return STATUS_OK;
-}
+}/*}}}*/
+/* commands_execute_javascript {{{*/
DwbStatus
commands_execute_javascript(KeyMap *km, Arg *arg) {
static char *script;
@@ -750,5 +753,20 @@ commands_execute_javascript(KeyMap *km, Arg *arg) {
}
dwb_execute_script(webkit_web_view_get_focused_frame(CURRENT_WEBVIEW()), script, false);
return STATUS_OK;
-}
+}/*}}}*/
+/* commands_set {{{*/
+DwbStatus
+commands_set(KeyMap *km, Arg *arg) {
+ const char *command = util_str_chug(arg->p);
+ char **args = g_strsplit(command, " ", 2);
+ DwbStatus ret = dwb_set_setting(args[0], args[1]);
+ g_strfreev(args);
+ return ret;
+}/*}}}*/
+/* commands_set {{{*/
+DwbStatus
+commands_toggle_setting(KeyMap *km, Arg *arg) {
+ const char *command = util_str_chug(arg->p);
+ return dwb_toggle_setting(command);
+}/*}}}*/
/*}}}*/