diff options
author | portix <portix@gmx.net> | 2012-07-17 11:15:38 +0200 |
---|---|---|
committer | portix <portix@gmx.net> | 2012-07-17 11:15:38 +0200 |
commit | ba2f8de50728d4ff8d1026b39bbdfa7d390874c9 (patch) | |
tree | ba31e11352fb547691e741c57768ee34e7f47a22 /src | |
parent | 71c8610b5ac009f2b9781be7d707380740ba6412 (diff) | |
download | dwb-ba2f8de50728d4ff8d1026b39bbdfa7d390874c9.zip |
Expand tilde in adblock_init, closing #200
Diffstat (limited to 'src')
-rw-r--r-- | src/adblock.c | 2 | ||||
-rw-r--r-- | src/callback.c | 3 | ||||
-rw-r--r-- | src/dwb.c | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/adblock.c b/src/adblock.c index b96ca725..b6d16527 100644 --- a/src/adblock.c +++ b/src/adblock.c @@ -824,6 +824,8 @@ adblock_init() { if (!GET_BOOL("adblocker")) return false; char *filterlist = GET_CHAR("adblocker-filterlist"); + char buffer[PATH_MAX]; + filterlist = util_expand_home(buffer, filterlist, PATH_MAX); if (filterlist == NULL) return false; if (!g_file_test(filterlist, G_FILE_TEST_EXISTS)) { diff --git a/src/callback.c b/src/callback.c index 33f14600..dfa5c54c 100644 --- a/src/callback.c +++ b/src/callback.c @@ -160,8 +160,9 @@ callback_key_press(GtkWidget *w, GdkEventKey *e) { } if (e->keyval == GDK_KEY_Escape) { - if (dwb.state.mode & COMPLETION_MODE) + if (dwb.state.mode & COMPLETION_MODE) { completion_clean_completion(true); + } else dwb_change_mode(NORMAL_MODE, true); ret = false; @@ -1820,7 +1820,7 @@ dwb_prompt_snooper_cb(GtkWidget *w, GdkEventKey *e, int *state) { return false; switch (e->keyval) { case GDK_KEY_Return: *state = 0; ret = true; break; - case GDK_KEY_Escape: ret = true; break; + case GDK_KEY_Escape: *state = -1; ret = true; break; default: return false; } dwb.state.mode &= ~CONFIRM; |