diff options
author | portix <portix@gmx.net> | 2013-05-21 21:19:44 +0200 |
---|---|---|
committer | portix <portix@gmx.net> | 2013-05-21 21:19:44 +0200 |
commit | 03f09e4a4abfcf2ae40d7500c1c900a0ca3e5fd5 (patch) | |
tree | 97584c2b2e927d6fe5bc25129910ff383a5521d8 | |
parent | dc1e4d5605aa9a9e92105b0cda8da0fe11fbcd28 (diff) | |
download | dwb-03f09e4a4abfcf2ae40d7500c1c900a0ca3e5fd5.zip |
Fixing hints_rapid opes ndefault searchengine
-rw-r--r-- | scripts/base.js | 19 | ||||
-rw-r--r-- | src/dwb.c | 5 |
2 files changed, 10 insertions, 14 deletions
diff --git a/scripts/base.js b/scripts/base.js index 8d309480..626effd2 100644 --- a/scripts/base.js +++ b/scripts/base.js @@ -620,20 +620,15 @@ Object.freeze((function () { { e.target = null; } - if (type > 0) + if (type == HintTypes.HINT_T_IMAGES) { - switch (type) - { - case HintTypes.HINT_T_IMAGES: - ret = e.src; p_clear(); - return ret; - case HintTypes.HINT_T_URL : - ret = e.hasAttribute("href") ? e.href : e.src; p_clear(); - return ret; - default: break; - } + ret = e.src; + } + else if (type == HintTypes.HINT_T_URL) + { + ret = e.hasAttribute("href") ? e.href : e.src; } - if ((tagname && (tagname == "input" || tagname == "textarea"))) + else if ((tagname && (tagname == "input" || tagname == "textarea"))) { if (type == "radio" || type == "checkbox") { @@ -2166,6 +2166,7 @@ dwb_update_hints(GdkEventKey *e) { com = "followActive"; snprintf(json, sizeof(json), "{ \"type\" : \"%d\" }", hint_map[dwb.state.hint_type].arg); + ret = true; } else if (DWB_COMPLETE_KEY(e)) { @@ -2190,8 +2191,8 @@ dwb_update_hints(GdkEventKey *e) { buffer = js_call_as_function(MAIN_FRAME(), CURRENT_VIEW()->js_base, com, *json ? json : NULL, *json ? kJSTypeObject : kJSTypeUndefined, &buffer); } - if (buffer != NULL) { - + if (buffer != NULL) + { if (dwb_evaluate_hints(buffer) == STATUS_END) ret = true; g_free(buffer); |