summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2013-05-21 21:19:44 +0200
committerportix <portix@gmx.net>2013-05-21 21:19:44 +0200
commit03f09e4a4abfcf2ae40d7500c1c900a0ca3e5fd5 (patch)
tree97584c2b2e927d6fe5bc25129910ff383a5521d8
parentdc1e4d5605aa9a9e92105b0cda8da0fe11fbcd28 (diff)
downloaddwb-03f09e4a4abfcf2ae40d7500c1c900a0ca3e5fd5.zip
Fixing hints_rapid opes ndefault searchengine
-rw-r--r--scripts/base.js19
-rw-r--r--src/dwb.c5
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")
{
diff --git a/src/dwb.c b/src/dwb.c
index d880f425..ca59c412 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -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);