diff options
author | jcid <devnull@localhost> | 2007-11-21 02:31:24 +0100 |
---|---|---|
committer | jcid <devnull@localhost> | 2007-11-21 02:31:24 +0100 |
commit | d57413d5a92a875aca6327fb227207a2eba95e81 (patch) | |
tree | 2b123f97e11d7c29402e25c0d06e7873893a370b | |
parent | e3dc26c04e15024ffb1b130c626bb4d5e8c7bdff (diff) |
- Switched dillo to push a URL with fragment (anchor) into the stack.
- Re-enabled scrolling with Up/Down arrows.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/cache.c | 2 | ||||
-rw-r--r-- | src/history.c | 3 | ||||
-rw-r--r-- | src/nav.c | 6 | ||||
-rw-r--r-- | src/ui.cc | 11 |
5 files changed, 19 insertions, 8 deletions
@@ -40,8 +40,9 @@ dillo-fltk2 - Reimplemented html.cc using a class, removed the linkblock, and hooked memory-release to dw destruction. - Switched UI shortcuts from a global event handler to UI::handle. - - Bound Ctrl+Space to fullscreen toggle. - Patches: Jorge Arellano + - Bound Ctrl+Space to toggle fullscreen mode. + - Switched dillo to push a URL with fragment (anchor) into the stack. + Patches: Jorge Arellano Cid +- Connected signals to <li> elements (fixes links within lists). - Enabled text, background-color and geometry in preferences. - Enabled clicking over image links. diff --git a/src/cache.c b/src/cache.c index 18347099..4f7f074c 100644 --- a/src/cache.c +++ b/src/cache.c @@ -478,7 +478,7 @@ static void Cache_parse_header(CacheEntry_t *entry, entry->Flags |= CA_TempRedirect; /* 302 Temporary Redirect */ location_str = Cache_parse_field(header, "Location"); - entry->Location = a_Url_new(location_str, URL_STR_(entry->Url), 0, 0, 0); + entry->Location = a_Url_new(location_str,URL_STR_(entry->Url),0,0,0); dFree(location_str); } else if (strncmp(header + 9, "404", 3) == 0) { diff --git a/src/history.c b/src/history.c index f9d35ba7..ad08611b 100644 --- a/src/history.c +++ b/src/history.c @@ -38,7 +38,8 @@ int a_History_add_url(DilloUrl *url) int i, idx; for (i = 0; i < history_size; ++i) - if (a_Url_cmp(history[i].url, url) == 0) + if (!a_Url_cmp(history[i].url, url) && + !strcmp(URL_FRAGMENT(history[i].url), URL_FRAGMENT(url))) return i; idx = history_size; @@ -201,11 +201,11 @@ static void Nav_open_url(BrowserWindow *bw, const DilloUrl *url, int offset) /* Update navigation-stack-pointer (offset may be zero) */ Nav_stack_move_ptr(bw, offset); - /* Page must be reloaded, if old and new url (without anchor) differ */ + /* Page must be reloaded, if old and new url (considering anchor) differ */ MustLoad = ForceReload || !old_url; if (old_url){ - MustLoad |= (a_Url_cmp(old_url, url) != 0); - MustLoad |= strcmp(URL_STR(old_url), a_UIcmd_get_location_text(bw)); + MustLoad |= (a_Url_cmp(old_url, url) || + strcmp(URL_FRAGMENT(old_url), URL_FRAGMENT(url))); } if (MustLoad) { @@ -64,7 +64,7 @@ int NewInput::handle(int e) int k = event_key(); bool ctrl = event_state(CTRL); - _MSG("NewInput::handle event=%d", e); + _MSG("NewInput::handle event=%d\n", e); if (ctrl && (k == 'o' || k == 'r' || k == HomeKey || k == EndKey)) return 0; if ((e == KEY || e == KEYUP) && @@ -653,6 +653,15 @@ int UI::handle(int event) { int ret = 0; + _MSG("UI::handle event=%d\n", event); + + // Let FLTK pass these events to child widgets. + if (event == KEY) { + if (event_key() == UpKey || event_key() == DownKey) + return 0; + } + + // Handle these shortcuts here. if (event == SHORTCUT) { if (event_state(CTRL)) { if (event_key() == 'l') { |