diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/IO/IO.c | 4 | ||||
-rw-r--r-- | src/dns.c | 2 | ||||
-rw-r--r-- | src/html.cc | 5 | ||||
-rw-r--r-- | src/menu.cc | 6 | ||||
-rw-r--r-- | src/plain.cc | 4 | ||||
-rw-r--r-- | src/ui.cc | 2 | ||||
-rw-r--r-- | src/web.cc | 2 |
7 files changed, 14 insertions, 11 deletions
diff --git a/src/IO/IO.c b/src/IO/IO.c index 060fe200..8adb3658 100644 --- a/src/IO/IO.c +++ b/src/IO/IO.c @@ -255,7 +255,7 @@ static int IO_callback(int fd, IOData_t *io) */ static void IO_fd_read_cb(int fd, void *data) { - int io_key = (int)data; + int io_key = VOIDP2INT(data); IOData_t *io = IO_get(io_key); /* There should be no more events on already closed FDs --Jcid */ @@ -274,7 +274,7 @@ static void IO_fd_read_cb(int fd, void *data) */ static void IO_fd_write_cb(int fd, void *data) { - int io_key = (int)data; + int io_key = VOIDP2INT(data); IOData_t *io = IO_get(io_key); if (io == NULL) { @@ -498,7 +498,7 @@ static void Dns_assign_channels(void) */ static void Dns_timeout_client(void *data) { - int channel = (int)data; + int channel = VOIDP2INT(data); DnsServer *srv = &dns_server[channel]; if (srv->ip_ready) { diff --git a/src/html.cc b/src/html.cc index 393c79fc..4ed2855c 100644 --- a/src/html.cc +++ b/src/html.cc @@ -2423,8 +2423,9 @@ static DilloImage *Html_add_new_image(DilloHtml *html, char *tag, /* Add a new image widget to this page */ Image = a_Image_new(0, 0, alt_ptr, S_TOP(html)->current_bg_color); if (add) { - Html_add_widget(html, (Widget*)Image->dw, - width_ptr, height_ptr, style_attrs); + Widget *w = (Widget*)Image->dw; + Html_add_widget(html, w, width_ptr, height_ptr, style_attrs); + Html_connect_signals(html, w); } dFree(width_ptr); diff --git a/src/menu.cc b/src/menu.cc index 1de42acf..a4c84b5c 100644 --- a/src/menu.cc +++ b/src/menu.cc @@ -57,8 +57,10 @@ public: * TODO: erase the URL on popup close. */ void NewItem::draw() { + DilloUrl *url; + if (flags() & SELECTED) { - DilloUrl *url = a_History_get_url(history_list[((int)user_data())-1]); + url = a_History_get_url(history_list[(VOIDP2INT(user_data()))-1]); a_UIcmd_set_msg(popup_bw, "%s", URL_STR(url)); } Item::draw(); @@ -170,7 +172,7 @@ static void Menu_bugmeter_about_cb(Widget* ) static void Menu_history_cb(Widget *wid, void *data) { int k = event_button(); - int offset = history_direction * (int)data; + int offset = history_direction * VOIDP2INT(data); if (k == 2) { /* middle button, open in a new window */ diff --git a/src/plain.cc b/src/plain.cc index be7b1e4c..1240716f 100644 --- a/src/plain.cc +++ b/src/plain.cc @@ -124,9 +124,9 @@ static DilloPlain *Plain_new(BrowserWindow *bw) styleAttrs.initValues (); styleAttrs.margin.setVal (5); styleAttrs.font = style::Font::create (layout, &fontAttrs); - styleAttrs.color = style::Color::createSimple (layout, 0x0000ff); + styleAttrs.color = style::Color::createSimple (layout, prefs.text_color); styleAttrs.backgroundColor = - style::Color::createSimple (layout, 0xdcd1ba); + style::Color::createSimple (layout, prefs.bg_color); plain->widgetStyle = style::Style::create (layout, &styleAttrs); /* The context menu */ @@ -232,7 +232,7 @@ void location_cb(Widget *wid, void *data) */ void b1_cb(Widget *wid, void *cb_data) { - int bn = (int)cb_data; + int bn = VOIDP2INT(cb_data); int k = event_key(); if (k && k <= 7) { _MSG("[%s], mouse button %d was pressed\n", button_names[bn], k); @@ -85,7 +85,7 @@ int a_Web_dispatch_by_type (const char *Type, DilloWeb *Web, styleAttrs.font = style::Font::create (layout, &fontAttrs); styleAttrs.color = style::Color::createSimple (layout, 0xff0000); styleAttrs.backgroundColor = - style::Color::createSimple (layout, 0xdcd1ba); + style::Color::createSimple (layout, prefs.bg_color); widgetStyle = style::Style::create (layout, &styleAttrs); dw->setStyle (widgetStyle); widgetStyle->unref (); |