diff options
author | jcid <devnull@localhost> | 2007-10-11 20:55:12 +0200 |
---|---|---|
committer | jcid <devnull@localhost> | 2007-10-11 20:55:12 +0200 |
commit | fecc92e0ea7103f14aa843ac7236feff8a4c093c (patch) | |
tree | b670182454106625aded0ce3d2e3264672fa83d9 | |
parent | 9306f65b8de5aad7bc61e39e94bd9d190c3573e8 (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
-rw-r--r-- | ChangeLog | 18 | ||||
-rw-r--r-- | dlib/dlib.c | 3 | ||||
-rw-r--r-- | dlib/dlib.h | 3 | ||||
-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 |
10 files changed, 34 insertions, 15 deletions
@@ -4,7 +4,7 @@ Dillo project dillo-fltk2 - - Ported Dillo from GTK1 to FLTK2. ++- Ported Dillo from GTK1 to FLTK2. - Ported a susbstantial part of the code from C to C++ (FLTK2 is in C++). - Wrote a new library: Dlib. With "Dlib" Dillo doesn't need glib anymore. - Ported all the code to Dlib. @@ -31,8 +31,20 @@ dillo-fltk2 - Rewrote the DNS API and the Dpid start code inside Dillo. - Implemented Stop button to not only stop rendering but also networking. Patches: Jorge Arellano - - Connected signals to <li> elements - Patch: place ++- 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 TODO: diff --git a/dlib/dlib.c b/dlib/dlib.c index bba1cc5e..9e831756 100644 --- a/dlib/dlib.c +++ b/dlib/dlib.c @@ -345,8 +345,11 @@ void dStr_vsprintfa (Dstr *ds, const char *format, va_list argp) int n, n_sz; if (ds && format) { + va_list argp2; /* Needed in case of looping on non-32bit arch */ while (1) { + va_copy(argp2, argp); n = vsnprintf(ds->str + ds->len, ds->sz - ds->len, format, argp); + va_end(argp2); if (n > -1 && n < ds->sz - ds->len) { ds->len += n; /* Success! */ break; diff --git a/dlib/dlib.h b/dlib/dlib.h index 6caf7c97..c54ab6ad 100644 --- a/dlib/dlib.h +++ b/dlib/dlib.h @@ -33,7 +33,8 @@ extern "C" { *-- Casts ------------------------------------------------------------------- */ /* TODO: include a void* size test in configure.in */ -#define VOIDP2INT(p) ((int)(p)) +/* (long) works for both 32bit and 64bit */ +#define VOIDP2INT(p) ((long)(p)) #define INT2VOIDP(i) ((void*)(i)) /* 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 (); |