summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2005-03-20 20:39:43 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2005-03-20 20:39:43 +0000
commit412c668af36de260cad0834f19a6f6acac2c62b7 (patch)
tree903aa56ead96897c624e46cdb86ff46eba41c657
parent062e6a5bae5a7dc0d853a2b99c59cfe3c5b087f1 (diff)
downloadnetsurf-412c668af36de260cad0834f19a6f6acac2c62b7.tar.gz
netsurf-412c668af36de260cad0834f19a6f6acac2c62b7.tar.bz2
[project @ 2005-03-20 20:39:43 by rjw]
Allow theme changing during toolbar edit sessions. Stop pointer changing to ptr_lr when updating toolbar windows. svn path=/import/netsurf/; revision=1558
-rw-r--r--riscos/theme.c4
-rw-r--r--riscos/window.c13
2 files changed, 15 insertions, 2 deletions
diff --git a/riscos/theme.c b/riscos/theme.c
index e6105721e..6e9c49c5c 100644
--- a/riscos/theme.c
+++ b/riscos/theme.c
@@ -58,7 +58,7 @@ static struct toolbar_icon *ro_gui_theme_toolbar_get_insert_icon(struct toolbar
/* A basic window for the toolbar and status
*/
static wimp_window theme_toolbar_window = {
- {0, 0, 16384, 16384},
+ {0, 0, 1, 1},
0,
0,
wimp_TOP,
@@ -72,7 +72,7 @@ static wimp_window theme_toolbar_window = {
wimp_COLOUR_MID_LIGHT_GREY,
wimp_COLOUR_CREAM,
wimp_WINDOW_NEVER3D | 0x16u /* RISC OS 5.03+ - greyed icons detected for interactive help */,
- {0, 0, 16384, 16384},
+ {0, 0, 1, 1},
0,
0,
wimpspriteop_AREA,
diff --git a/riscos/window.c b/riscos/window.c
index fd7c4aaa2..cbfdcd326 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -883,6 +883,9 @@ void ro_gui_window_update_theme(void) {
for (g = window_list; g; g = g->next) {
if (g->toolbar) {
height = ro_gui_theme_toolbar_height(g->toolbar);
+ if (g->toolbar->editor)
+ if (!ro_gui_theme_update_toolbar(NULL, g->toolbar->editor))
+ g->toolbar->editor = NULL;
if (!ro_gui_theme_update_toolbar(NULL, g->toolbar)) {
ro_gui_theme_destroy_toolbar(g->toolbar);
g->toolbar = NULL;
@@ -893,23 +896,33 @@ void ro_gui_window_update_theme(void) {
ro_gui_window_update_dimensions(g, height -
ro_gui_theme_toolbar_height(g->toolbar));
}
+ ro_gui_theme_toolbar_editor_sync(g->toolbar);
}
}
if ((hotlist_tree) && (hotlist_tree->toolbar)) {
+ if (hotlist_tree->toolbar->editor)
+ if (!ro_gui_theme_update_toolbar(NULL, hotlist_tree->toolbar->editor))
+ hotlist_tree->toolbar->editor = NULL;
if (!ro_gui_theme_update_toolbar(NULL, hotlist_tree->toolbar)) {
ro_gui_theme_destroy_toolbar(hotlist_tree->toolbar);
hotlist_tree->toolbar = NULL;
}
+ ro_gui_theme_toolbar_editor_sync(hotlist_tree->toolbar);
ro_gui_theme_attach_toolbar(hotlist_tree->toolbar,
(wimp_w)hotlist_tree->handle);
xwimp_force_redraw((wimp_w)hotlist_tree->handle,
0, -16384, 16384, 16384);
}
if ((global_history_tree) && (global_history_tree->toolbar)) {
+ if (global_history_tree->toolbar->editor)
+ if (!ro_gui_theme_update_toolbar(NULL,
+ global_history_tree->toolbar->editor))
+ global_history_tree->toolbar->editor = NULL;
if (!ro_gui_theme_update_toolbar(NULL, global_history_tree->toolbar)) {
ro_gui_theme_destroy_toolbar(global_history_tree->toolbar);
global_history_tree->toolbar = NULL;
}
+ ro_gui_theme_toolbar_editor_sync(global_history_tree->toolbar);
ro_gui_theme_attach_toolbar(global_history_tree->toolbar,
(wimp_w)global_history_tree->handle);
xwimp_force_redraw((wimp_w)global_history_tree->handle,