changeset 1663:1a88fc9331c8

merge
author Jorge Arellano Cid <jcid@dillo.org>
date Fri, 23 Apr 2010 12:24:46 -0400
parents 3accd3e00cd2 (current diff) 53307b7407e1 (diff)
children 9e081321c25b
files
diffstat 5 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/history.c	Fri Apr 23 14:53:33 2010 +0200
+++ b/src/history.c	Fri Apr 23 12:24:46 2010 -0400
@@ -77,7 +77,7 @@
 /*
  * Return the DilloUrl field (by index)
  */
-DilloUrl *a_History_get_url(int idx)
+const DilloUrl *a_History_get_url(int idx)
 {
    _MSG("a_History_get_url: ");
    /* History_show(); */
--- a/src/history.h	Fri Apr 23 14:53:33 2010 +0200
+++ b/src/history.h	Fri Apr 23 12:24:46 2010 -0400
@@ -11,7 +11,7 @@
 
 int a_History_add_url(DilloUrl *url);
 void a_History_set_title_by_url(const DilloUrl *url, const char *title);
-DilloUrl *a_History_get_url(int idx);
+const DilloUrl *a_History_get_url(int idx);
 const char *a_History_get_title(int idx, int force);
 const char *a_History_get_title_by_url(const DilloUrl *url, int force);
 void a_History_freeall(void);
--- a/src/menu.cc	Fri Apr 23 14:53:33 2010 +0200
+++ b/src/menu.cc	Fri Apr 23 12:24:46 2010 -0400
@@ -67,7 +67,7 @@
  * TODO: erase the URL on popup close.
  */
 void CustItem::draw() {
-   DilloUrl *url;
+   const DilloUrl *url;
 
    if (flags() & SELECTED) {
       url = a_History_get_url(history_list[(VOIDP2INT(user_data()))-1]);
@@ -287,7 +287,7 @@
 {
    int mb = ((CustItem*)wid)->button();
    int offset = history_direction * VOIDP2INT(data);
-   DilloUrl *url = a_History_get_url(history_list[VOIDP2INT(data)-1]);
+   const DilloUrl *url = a_History_get_url(history_list[VOIDP2INT(data)-1]);
 
    if (mb == 2) {
       // Middle button, open in a new window/tab
--- a/src/nav.c	Fri Apr 23 14:53:33 2010 +0200
+++ b/src/nav.c	Fri Apr 23 12:24:46 2010 -0400
@@ -194,7 +194,7 @@
 static void Nav_open_url(BrowserWindow *bw, const DilloUrl *url,
                          const DilloUrl *requester, int offset)
 {
-   DilloUrl *old_url;
+   const DilloUrl *old_url;
    bool_t MustLoad, ForceReload, Repush, IgnoreScroll;
    int x, y, idx, ClientKey;
    DilloWeb *Web;
@@ -319,7 +319,7 @@
    }
 
    if (goto_old_scroll) {
-      /* Scroll to were we were in this page */
+      /* Scroll to where 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);
@@ -405,11 +405,12 @@
 static void Nav_redirection0_callback(void *data)
 {
    BrowserWindow *bw = (BrowserWindow *)data;
+   const DilloUrl *referer_url = a_History_get_url(NAV_TOP_UIDX(bw));
    _MSG(">>>> Nav_redirection0_callback <<<<\n");
 
    if (bw->meta_refresh_status == 2) {
       Nav_stack_move_ptr(bw, -1);
-      a_Nav_push(bw, bw->meta_refresh_url,a_History_get_url(NAV_TOP_UIDX(bw)));
+      a_Nav_push(bw, bw->meta_refresh_url, referer_url);
    }
    a_Url_free(bw->meta_refresh_url);
    bw->meta_refresh_url = NULL;
@@ -475,7 +476,8 @@
 static void Nav_reload_callback(void *data)
 {
    BrowserWindow *bw = data;
-   DilloUrl *h_url, *r_url;
+   const DilloUrl *h_url;
+   DilloUrl *r_url;
    int choice, confirmed = 1;
 
    a_Nav_cancel_expect(bw);
--- a/src/uicmd.cc	Fri Apr 23 14:53:33 2010 +0200
+++ b/src/uicmd.cc	Fri Apr 23 12:24:46 2010 -0400
@@ -948,7 +948,7 @@
 void a_UIcmd_page_popup(void *vbw, bool_t has_bugs, void *v_cssUrls)
 {
    BrowserWindow *bw = (BrowserWindow*)vbw;
-   DilloUrl *url = a_History_get_url(NAV_TOP_UIDX(bw));
+   const DilloUrl *url = a_History_get_url(NAV_TOP_UIDX(bw));
    a_Menu_page_popup(bw, url, has_bugs, v_cssUrls);
 }