diff options
-rw-r--r-- | src/history.c | 2 | ||||
-rw-r--r-- | src/history.h | 2 | ||||
-rw-r--r-- | src/menu.cc | 4 | ||||
-rw-r--r-- | src/nav.c | 7 | ||||
-rw-r--r-- | src/uicmd.cc | 2 |
5 files changed, 9 insertions, 8 deletions
diff --git a/src/history.c b/src/history.c index d90d457e..15ab19db 100644 --- a/src/history.c +++ b/src/history.c @@ -77,7 +77,7 @@ int a_History_add_url(DilloUrl *url) /* * 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(); */ diff --git a/src/history.h b/src/history.h index 3b8fe3d3..beb0cdf9 100644 --- a/src/history.h +++ b/src/history.h @@ -11,7 +11,7 @@ extern "C" { 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); diff --git a/src/menu.cc b/src/menu.cc index d3a9be29..d802bddb 100644 --- a/src/menu.cc +++ b/src/menu.cc @@ -67,7 +67,7 @@ public: * 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 @@ static void Menu_history_cb(Widget *wid, void *data) { 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 @@ -194,7 +194,7 @@ static void Nav_stack_clean(BrowserWindow *bw) 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 @@ void a_Nav_expect_done(BrowserWindow *bw) } 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); @@ -475,7 +475,8 @@ void a_Nav_home(BrowserWindow *bw) 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); diff --git a/src/uicmd.cc b/src/uicmd.cc index df57e855..93836735 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -948,7 +948,7 @@ void a_UIcmd_add_bookmark(BrowserWindow *bw, const DilloUrl *url) 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); } |