summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2007-11-03 21:31:59 +0100
committerjcid <devnull@localhost>2007-11-03 21:31:59 +0100
commite6dfd06634d9d7930585b920bdaea62f0ac4c92d (patch)
treefd2e701b2fc41779d97d911ccf81509cba9ee3dc
parent0774029d6efaf8e6bd8fe2fd095070123322dfe2 (diff)
Fixed following image links after loading the image.
-rw-r--r--src/html.cc26
-rw-r--r--src/nav.c6
-rw-r--r--src/ui.cc2
3 files changed, 16 insertions, 18 deletions
diff --git a/src/html.cc b/src/html.cc
index 7f2e2dad..a841573d 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -295,25 +295,23 @@ bool DilloHtmlLB::HtmlLinkReceiver::click (Widget *widget, int link, int img,
{
BrowserWindow *bw = lb->bw;
- if (img != -1) {
+ if ((img != -1) && (lb->images->get(img)->image)) {
+ // clicked an image that has not already been loaded
DilloUrl *pattern;
- if (lb->images->get(img)->image) {
- // has not already been loaded
- if (event->button == 1){
- // load all instances of this image
- pattern = lb->images->get(img)->url;
+ if (event->button == 1){
+ // load all instances of this image
+ pattern = lb->images->get(img)->url;
+ } else {
+ if (event->button == 2){
+ // load all images
+ pattern = NULL;
} else {
- if (event->button == 2){
- // load all images
- pattern = NULL;
- } else {
- return false;
- }
+ return false;
}
-
- Html_load_images(lb, pattern);
}
+
+ Html_load_images(lb, pattern);
return true;
}
diff --git a/src/nav.c b/src/nav.c
index cb57f868..1abd1844 100644
--- a/src/nav.c
+++ b/src/nav.c
@@ -189,12 +189,12 @@ static void Nav_open_url(BrowserWindow *bw, const DilloUrl *url, int offset)
/* Get the url of the current page */
idx = a_Nav_stack_ptr(bw);
old_url = a_History_get_url(NAV_UIDX(bw, idx));
- MSG("Nav_open_url: idx=%d old_url='%s'\n", idx, URL_STR(old_url));
+ _MSG("Nav_open_url: idx=%d old_url='%s'\n", idx, URL_STR(old_url));
/* Record current scrolling position */
if (old_url) {
a_UIcmd_get_scroll_xy(bw, &x, &y);
Nav_set_scroll_pos(bw, idx, x, y);
- MSG("Nav_open_url: saved scroll of '%s' at x=%d y=%d\n",
+ _MSG("Nav_open_url: saved scroll of '%s' at x=%d y=%d\n",
URL_STR(old_url), x, y);
}
@@ -279,7 +279,7 @@ void a_Nav_expect_done(BrowserWindow *bw)
/* Scroll to were we were in this page */
Nav_get_scroll_pos(bw, &posx, &posy);
a_UIcmd_set_scroll_xy(bw, posx, posy);
- MSG("Nav: expect_done scrolling to x=%d y=%d\n", posx, posy);
+ _MSG("Nav: expect_done scrolling to x=%d y=%d\n", posx, posy);
}
Nav_stack_clean(bw);
a_UIcmd_set_buttons_sens(bw);
diff --git a/src/ui.cc b/src/ui.cc
index 8f58e192..240fa290 100644
--- a/src/ui.cc
+++ b/src/ui.cc
@@ -237,7 +237,7 @@ void b1_cb(Widget *wid, void *cb_data)
int k = event_key();
if (k && k <= 7) {
_MSG("[%s], mouse button %d was pressed\n", button_names[bn], k);
- MSG("mouse button %d was pressed\n", k);
+ _MSG("mouse button %d was pressed\n", k);
}
switch (bn) {
case UI_BACK: