summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2007-10-11 20:55:12 +0200
committerjcid <devnull@localhost>2007-10-11 20:55:12 +0200
commitfecc92e0ea7103f14aa843ac7236feff8a4c093c (patch)
treeb670182454106625aded0ce3d2e3264672fa83d9 /src
parent9306f65b8de5aad7bc61e39e94bd9d190c3573e8 (diff)
+- Connected signals to <li> elements (fixes links within lists).
- Enabled text and background color-choice in preferences. - Enabled clicking over image links. Patches: place +- Fixed a va_list-related SEGFAULT on 64bit-arch in dStr_vsprintfa(). Patch: Vincent Thomasset +- Fixed void to int conversions for 64bit-arch. Patch: Jorge Arellano, higuita +- Added a strndup() replacement in dw2 Patch: Alexander Becher, Johannes Hofmann, Jorge Arellano +- Fixed calcHashValue() to only return non-negative numbers (was SEGFAULT). - Improved scrolling performance on large pages by copying screen data instead of rendering. Patches: Johannes Hofmann
Diffstat (limited to 'src')
-rw-r--r--src/IO/IO.c4
-rw-r--r--src/dns.c2
-rw-r--r--src/html.cc5
-rw-r--r--src/menu.cc6
-rw-r--r--src/plain.cc4
-rw-r--r--src/ui.cc2
-rw-r--r--src/web.cc2
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) {
diff --git a/src/dns.c b/src/dns.c
index 2813f54f..f6bffff7 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -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 */
diff --git a/src/ui.cc b/src/ui.cc
index 54523b88..60332871 100644
--- a/src/ui.cc
+++ b/src/ui.cc
@@ -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);
diff --git a/src/web.cc b/src/web.cc
index 345a3263..1c70371d 100644
--- a/src/web.cc
+++ b/src/web.cc
@@ -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 ();