summaryrefslogtreecommitdiff
path: root/src/commands.c
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2012-01-04 00:02:33 +0100
committerportix <portix@gmx.net>2012-01-04 00:02:33 +0100
commitc791677ae407fa756d53e34b2ca704e4ed870e9f (patch)
treed88506c997125e221cf39ccfd293ffc79dfe8a43 /src/commands.c
parent126f3131ec5635c7c244c0887d54c6772c7ed059 (diff)
downloaddwb-c791677ae407fa756d53e34b2ca704e4ed870e9f.zip
Rapid hint mode
Diffstat (limited to 'src/commands.c')
-rw-r--r--src/commands.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/commands.c b/src/commands.c
index 21f6b4de..6b2a9f24 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -36,7 +36,6 @@ static int inline dwb_floor(double x) {
static int inline modulo(int x, int y) {
return x - dwb_floor((double)x/y) * y;
}
-
/* commands.h {{{*/
/* commands_simple_command(keyMap *km) {{{*/
void
@@ -173,27 +172,7 @@ commands_search(KeyMap *km, Arg *arg) {
/* commands_show_hints {{{*/
DwbStatus
commands_show_hints(KeyMap *km, Arg *arg) {
- DwbStatus ret = STATUS_OK;
- if (dwb.state.nv == OPEN_NORMAL) {
- dwb_set_open_mode(arg->n | OPEN_VIA_HINTS);
- }
- if (dwb.state.mode != HINT_MODE) {
- gtk_entry_set_text(GTK_ENTRY(dwb.gui.entry), "");
- char *command = g_strdup_printf("DwbHintObj.showHints(%d, %s)", MIN(arg->i, HINT_T_URL), arg->n != OPEN_NORMAL ? "true" : "false");
- char *jsret = dwb_execute_script(MAIN_FRAME(), command, true);
- g_free(command);
- if (jsret != NULL) {
- ret = dwb_evaluate_hints(jsret);
- g_free(jsret);
- if (ret == STATUS_END) {
- return ret;
- }
- }
- dwb.state.mode = HINT_MODE;
- dwb.state.hint_type = arg->i;
- entry_focus();
- }
- return ret;
+ return dwb_show_hints(arg);
}/*}}}*/
/* commands_show_keys(KeyMap *km, Arg *arg){{{*/