diff options
author | jcid <devnull@localhost> | 2007-12-16 16:53:12 +0100 |
---|---|---|
committer | jcid <devnull@localhost> | 2007-12-16 16:53:12 +0100 |
commit | 89f33088e8435d2df77f967a17b6639b181bfce2 (patch) | |
tree | d16a90bccf59d0b1098a94ef06c5ccf354dbc2a5 | |
parent | c5432a8fcdab01dc1a28e903cf0f786cd60c8467 (diff) |
- Made "New browser window" inherit the panel style of its parent.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/dillo.cc | 2 | ||||
-rw-r--r-- | src/nav.c | 2 | ||||
-rw-r--r-- | src/ui.cc | 23 | ||||
-rw-r--r-- | src/ui.hh | 2 | ||||
-rw-r--r-- | src/uicmd.cc | 5 | ||||
-rw-r--r-- | src/uicmd.hh | 2 |
7 files changed, 29 insertions, 16 deletions
@@ -72,14 +72,14 @@ dillo-fltk2 - Implemented "Load Images" in the page menu and cleaned up html.hh. - Added shortcuts: PgDn=Spc PgUp=b Back=BackSpace|, Forw=Shift+Backspace|. - Made a cleanup in cache's parse header code. - Patch: place, Jorge Arellano + Patch: place, Jorge Arellano Cid +- Fixed a va_list-related SEGFAULT on 64bit-arch in dStr_vsprintfa(). Added const declarations in html parser. Patch: Vincent Thomasset +- Fixed void to int conversions for 64bit-arch. - Patch: Jorge Arellano, higuita + Patch: Jorge Arellano Cid, higuita +- Added a strndup() replacement in dw2 - Patch: Alexander Becher, Johannes Hofmann, Jorge Arellano + Patch: Alexander Becher, Johannes Hofmann, Jorge Arellano Cid +- Fixed calcHashValue() to only return non-negative numbers (was SEGFAULT). - Improved scrolling performance on large pages by copying screen data instead of rendering. @@ -87,6 +87,7 @@ dillo-fltk2 - Implemented drag-scrolling with the mouse's middle button. - Disabled double buffering (good for debugging redraws). - Switched dns.c from gethostbyname* to getaddrinfo (& removed libc5 code). + - Made "New browser window" inherit the panel style of its parent. Patches: Johannes Hofmann +- Improved FLTK library detection at configure time. Patch: Frank Gevaerts @@ -154,7 +155,7 @@ dillo-0.8.6 [Apr 26, 2006] * Made the parser aware of buggy pages with multiple BODY and HTML elements. * Fixed a bug in MIME content/type detection. * Check HTTP Content-Type against real data (a security procedure). - Patches: Jorge Arellano + Patches: Jorge Arellano Cid - * Added a datauri dpi to handle "data:" URIs (RFC-2397). Patch: Jorge Arellano, Ben Wiley Sittler - * Moved the cookies management into a dpi server: cookies.dpi. diff --git a/src/dillo.cc b/src/dillo.cc index 2a4d7a77..bc2c0410 100644 --- a/src/dillo.cc +++ b/src/dillo.cc @@ -93,7 +93,7 @@ int main(int argc, char **argv) a_Cookies_init(); // Create a new UI/bw pair - BrowserWindow *bw = a_UIcmd_browser_window_new(0, 0); + BrowserWindow *bw = a_UIcmd_browser_window_new(0, 0, NULL); if (argc == 2) { DilloUrl *url = Dillo_make_start_url(argv[1]); @@ -315,7 +315,7 @@ void a_Nav_push_nw(BrowserWindow *bw, const DilloUrl *url) BrowserWindow *newbw; a_UIcmd_get_wh(bw, &w, &h); - newbw = a_UIcmd_browser_window_new(w, h); + newbw = a_UIcmd_browser_window_new(w, h, bw->ui); a_Nav_push(newbw, url); } @@ -558,10 +558,21 @@ Group *UI::make_panel(int ww) /* * User Interface constructor */ -UI::UI(int win_w, int win_h, const char* label) : +UI::UI(int win_w, int win_h, const char* label, const UI *cur_ui) : Window(win_w, win_h, label) { int s_h = 20; + + if (cur_ui) { + PanelSize = cur_ui->PanelSize; + CuteColor = cur_ui->CuteColor; + Small_Icons = cur_ui->Small_Icons; + } else { + // Set some default values + //PanelSize = P_tiny, CuteColor = 26, Small_Icons = 0; + PanelSize = P_medium, CuteColor = 206, Small_Icons = 0; + } + resizable(this); clear_double_buffer(); begin(); @@ -571,10 +582,6 @@ UI::UI(int win_w, int win_h, const char* label) : // (the argument is set later via user_data()) TopGroup->callback(close_window_cb); - // Set some default values - //PanelSize = P_tiny, CuteColor = 26, Small_Icons = 0; - PanelSize = P_medium, CuteColor = 206, Small_Icons = 0; - // Control panel Panel = make_panel(win_w); @@ -643,6 +650,10 @@ UI::UI(int win_w, int win_h, const char* label) : customize(0); + if (cur_ui && cur_ui->Panel->w() == 0) { + fullscreen_cb_i(); + } + //show(); } @@ -669,7 +680,7 @@ int UI::handle(int event) a_UIcmd_open_url_dialog(user_data()); ret = 1; } else if (k == 'n') { - a_UIcmd_browser_window_new(w(), h()); + a_UIcmd_browser_window_new(w(), h(), this); ret = 1; } else if (k == 'o') { a_UIcmd_open_file(user_data()); @@ -62,7 +62,7 @@ class UI : public fltk::Window { public: - UI(int w, int h, const char* label = 0); + UI(int w, int h, const char* label = 0, const UI *cur_ui = NULL); ~UI() {} // TODO: implement destructor // To manage what events to catch and which to let pass diff --git a/src/uicmd.cc b/src/uicmd.cc index e6158ef9..27b44394 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -57,8 +57,9 @@ using namespace fltk; /* * Create a new UI and its associated BrowserWindow data structure. + * Use style from v_ui. If non-NULL it must be of type UI*. */ -BrowserWindow *a_UIcmd_browser_window_new(int ww, int wh) +BrowserWindow *a_UIcmd_browser_window_new(int ww, int wh, const void *v_ui) { if (ww <= 0 || wh <= 0) { // Set default geometry from dillorc. @@ -67,7 +68,7 @@ BrowserWindow *a_UIcmd_browser_window_new(int ww, int wh) } // Create and set the UI - UI *new_ui = new UI(ww, wh, "Dillo: UI"); + UI *new_ui = new UI(ww, wh, "Dillo: UI", (UI*) v_ui); new_ui->set_status("http://www.dillo.org/"); //new_ui->set_location("http://dillo.org/"); //new_ui->customize(12); diff --git a/src/uicmd.hh b/src/uicmd.hh index 85ed573f..70221615 100644 --- a/src/uicmd.hh +++ b/src/uicmd.hh @@ -8,7 +8,7 @@ extern "C" { #endif /* __cplusplus */ -BrowserWindow *a_UIcmd_browser_window_new(int ww, int wh); +BrowserWindow *a_UIcmd_browser_window_new(int ww, int wh, const void *v_ui); void a_UIcmd_open_urlstr(void *vbw, const char *urlstr); void a_UIcmd_open_url(BrowserWindow *bw, const DilloUrl *url); void a_UIcmd_open_url_nw(BrowserWindow *bw, const DilloUrl *url); |