summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/cache.c2
-rw-r--r--src/history.c3
-rw-r--r--src/nav.c6
-rw-r--r--src/ui.cc11
5 files changed, 19 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 9c81d269..3e430b8d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;
diff --git a/src/nav.c b/src/nav.c
index 4652baa2..39638219 100644
--- a/src/nav.c
+++ b/src/nav.c
@@ -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) {
diff --git a/src/ui.cc b/src/ui.cc
index 90b5f26f..943a2409 100644
--- a/src/ui.cc
+++ b/src/ui.cc
@@ -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') {