From 4360905000fe21a2339967ff012f2d76399c6f90 Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Sat, 1 Dec 2012 13:13:04 +0100 Subject: Removed image toolbar stuff This is not related to windom, but makes the code less complex, too. --- atari/options.h | 9 -------- atari/toolbar.c | 64 ++++----------------------------------------------------- 2 files changed, 4 insertions(+), 69 deletions(-) (limited to 'atari') diff --git a/atari/options.h b/atari/options.h index f48a0e871..f9bb3b4c5 100755 --- a/atari/options.h +++ b/atari/options.h @@ -29,9 +29,6 @@ int atari_font_monochrom; \ int atari_dither; \ int atari_transparency; \ - int atari_image_toolbar; \ - colour atari_toolbar_bg; \ - char *atari_image_toolbar_folder; \ char *atari_face_sans_serif; /* default sans face */ \ char *atari_face_sans_serif_bold; /* bold sans face */ \ char *atari_face_sans_serif_italic; /* bold sans face */ \ @@ -53,9 +50,6 @@ .atari_font_monochrom = 0, \ .atari_dither = 1, \ .atari_transparency = 1, \ - .atari_image_toolbar_folder = (char*)"default", \ - .atari_image_toolbar = 1, \ - .atari_toolbar_bg = 0xbbbbbb, \ .atari_face_sans_serif = NULL, \ .atari_face_sans_serif_bold = NULL, \ .atari_face_sans_serif_italic = NULL, \ @@ -75,12 +69,9 @@ #define NSOPTION_EXTRA_TABLE \ { "atari_font_driver", OPTION_STRING, &nsoptions.atari_font_driver },\ { "atari_font_monochrom", OPTION_INTEGER, &nsoptions.atari_font_monochrom },\ - { "atari_image_toolbar", OPTION_INTEGER, &nsoptions.atari_image_toolbar },\ - { "atari_toolbar_bg", OPTION_COLOUR, &nsoptions.atari_toolbar_bg },\ { "atari_transparency", OPTION_INTEGER, &nsoptions.atari_transparency },\ { "atari_dither", OPTION_INTEGER, &nsoptions.atari_dither },\ { "atari_editor", OPTION_STRING, &nsoptions.atari_editor },\ - { "atari_image_toolbar_folder", OPTION_STRING, &nsoptions.atari_image_toolbar_folder },\ { "font_face_sans_serif", OPTION_STRING, &nsoptions.atari_face_sans_serif },\ { "font_face_sans_serif_bold", OPTION_STRING, &nsoptions.atari_face_sans_serif_bold },\ { "font_face_sans_serif_italic", OPTION_STRING, &nsoptions.atari_face_sans_serif_italic },\ diff --git a/atari/toolbar.c b/atari/toolbar.c index a6cb548f1..4b049117f 100644 --- a/atari/toolbar.c +++ b/atari/toolbar.c @@ -96,7 +96,6 @@ extern EVMULT_OUT aes_event_out; static OBJECT * aes_toolbar = NULL; static OBJECT * throbber_form = NULL; -static bool img_toolbar = false; static char * toolbar_image_folder = (char *)"default"; static uint32_t toolbar_bg_color = 0xFFFFFF; static hlcache_handle * toolbar_image; @@ -224,28 +223,6 @@ static void tb_txt_request_redraw(void *data, int x, int y, int w, int h) return; } -/** - * Callback for load_icon(). Should be removed once bitmaps get loaded directly - * from disc - */ -static nserror toolbar_icon_callback(hlcache_handle *handle, - const hlcache_event *event, void *pw) -{ - if( event->type == CONTENT_MSG_READY ){ - if( handle == toolbar_image ){ - toolbar_image_ready = true; - if(input_window != NULL ) - toolbar_update_buttons(input_window->root->toolbar, - input_window->browser->bw, 0); - } - else if(handle == throbber_image ){ - throbber_image_ready = true; - } - } - - return NSERROR_OK; -} - static struct s_tb_button *button_init(struct s_toolbar *tb, OBJECT * tree, int index, struct s_tb_button * instance) { @@ -265,35 +242,8 @@ void toolbar_init( void ) short vdicolor[3]; uint32_t rgbcolor; - toolbar_image_folder = nsoption_charp(atari_image_toolbar_folder); - toolbar_bg_color = (nsoption_colour(atari_toolbar_bg)); - img_toolbar = (nsoption_int(atari_image_toolbar) > 0 ) ? true : false; - if( img_toolbar ){ - - char imgfile[PATH_MAX]; - const char * imgfiletmpl = "toolbar/%s/%s"; - - while( tb_buttons[i].rsc_id != 0){ - tb_buttons[i].index = i; - i++; - } - snprintf( imgfile, PATH_MAX-1, imgfiletmpl, toolbar_image_folder, - "main.png" ); - toolbar_image = load_icon( imgfile, - toolbar_icon_callback, NULL ); - snprintf( imgfile, PATH_MAX-1, imgfiletmpl, toolbar_image_folder, - "throbber.png" ); - throbber_image = load_icon( imgfile, - toolbar_icon_callback, NULL ); - - } else { - aes_toolbar = get_tree(TOOLBAR); - throbber_form = get_tree(THROBBER); - } - n = (sizeof( toolbar_styles ) / sizeof( struct s_toolbar_style )); - for (i=0; ithrobber.area.g_h = toolbar_styles[t->style].height; t->throbber.area.g_w = toolbar_styles[t->style].icon_width + \ (2*toolbar_styles[t->style].button_vmargin ); - if( img_toolbar == true ){ - t->throbber.index = 0; - t->throbber.max_index = 8; - } else { - t->throbber.running = false; - t->throbber.index = THROBBER_INACTIVE_INDEX; - t->throbber.max_index = THROBBER_MAX_INDEX; - } + t->throbber.index = THROBBER_INACTIVE_INDEX; + t->throbber.max_index = THROBBER_MAX_INDEX; t->throbber.running = false; LOG(("created toolbar: %p, root: %p, textarea: %p, throbber: %p", t, -- cgit v1.2.3