From aec502af1a5c0bdb487b97974be3616d4eee1986 Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Mon, 2 Jan 2012 00:02:40 +0000 Subject: Open fulled window when running under Single-Task OS. svn path=/trunk/netsurf/; revision=13361 --- atari/gui.c | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/atari/gui.c b/atari/gui.c index f049d7f03..8af3e9af5 100755 --- a/atari/gui.c +++ b/atari/gui.c @@ -82,7 +82,7 @@ char *tmp_clipboard; struct gui_window *input_window = NULL; struct gui_window *window_list = NULL; void * h_gem_rsrc; -OBJECT * h_gem_menu; +OBJECT * h_gem_menu; OBJECT **rsc_trindex; short vdih; short rsc_ntree; @@ -93,7 +93,8 @@ bool rendering = false; /* Comandline / Options: */ int cfg_width; int cfg_height; - + +/* Defaults to option_homepage_url, commandline options overwrites that value */ const char * cfg_homepage_url; /* path to choices file: */ @@ -172,7 +173,7 @@ gui_create_browser_window(struct browser_window *bw, window_create(gw, bw, WIDGET_STATUSBAR|WIDGET_TOOLBAR|WIDGET_RESIZE|WIDGET_SCROLL ); if( gw->root->handle ) { GRECT pos = { - app.w/2-(cfg_width/2), app.h/2-(cfg_height/2), + app.w/2-(cfg_width/2), (app.h/2)-(cfg_height/2)+16, cfg_width, cfg_height }; window_open( gw , pos ); @@ -271,19 +272,31 @@ void gui_window_set_title(struct gui_window *gw, const char *title) */ void gui_window_set_status(struct gui_window *w, const char *text) { + + static char * msg_done = NULL; + static char * msg_loading = NULL; + static char * msg_fetch = NULL; + + if( msg_done == NULL ){ + msg_done = messages_get("Done"); + msg_loading = messages_get("Loading"); + msg_fetch = messages_get("Fetch"); + } - if (w == NULL || text == NULL ) - return; - window_set_stauts( w , (char*)text ); - if( strncmp("Done", text, 4) == 0 ){ + if( strncmp(msg_done, text, 4) == 0 ){ rendering = false; } else { if( !rendering && - ( strncmp("Load", text, 4) == 0 || strncmp("Fetch", text, 5) == 0)){ + ( + strncmp(msg_loading, text, 4) == 0 || + strncmp(msg_fetch, text, 4) == 0)) { rendering = true; } } + if (w == NULL || text == NULL ) + return; + window_set_stauts( w , (char*)text ); } void gui_window_redraw_window(struct gui_window *gw) @@ -848,9 +861,15 @@ process_cmdline(int argc, char** argv) if ((option_window_width != 0) && (option_window_height != 0)) { cfg_width = option_window_width; cfg_height = option_window_height; - } else { - cfg_width = 600; - cfg_height = 360; + } else { + if( sys_type() == SYS_TOS ){ + /* on single tasking OS, start as fulled window: */ + cfg_width = app.w; + cfg_height = app.h; + } else { + cfg_width = 600; + cfg_height = 360; + } } if (option_homepage_url != NULL && option_homepage_url[0] != '\0') -- cgit v1.2.3