From 0bbccaa9359b3cedf9f37cd8e322edc90240a7bc Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Mon, 7 Jan 2013 20:04:44 +0100 Subject: Finally it compiles without WinDom - still some things to bring back: - Serch window - Pop Menus in the settings dialog --- atari/download.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'atari/download.c') diff --git a/atari/download.c b/atari/download.c index c01ac805f..4dcc5cb1e 100755 --- a/atari/download.c +++ b/atari/download.c @@ -23,8 +23,7 @@ #include #include #include -#include -#include +#include #include "content/urldb.h" #include "content/fetch.h" @@ -142,11 +141,11 @@ static void on_redraw(struct gui_download_window *dw, GRECT *clip) tree[DOWNLOAD_PROGRESS_DONE].ob_width = MAX( MIN( p*(DOWNLOAD_BAR_MAX/100), DOWNLOAD_BAR_MAX ), 1); if (dw->close_on_finish) { - tree[DOWNLOAD_CB_CLOSE_RDY].ob_state |= (SELECTED | CROSSED); + tree[DOWNLOAD_CB_CLOSE_RDY].ob_state |= (OS_SELECTED | OS_CROSSED); } else { - tree[DOWNLOAD_CB_CLOSE_RDY].ob_state &= ~(SELECTED | CROSSED); + tree[DOWNLOAD_CB_CLOSE_RDY].ob_state &= ~(OS_SELECTED | OS_CROSSED); } - tree[DOWNLOAD_BT_ABORT].ob_state &= ~SELECTED; + tree[DOWNLOAD_BT_ABORT].ob_state &= ~OS_SELECTED; /*Walk the AES rectangle list and redraw the visible areas of the window: */ wind_get_grect(dw->aes_handle, WF_FIRSTXYWH, &visible); @@ -218,19 +217,20 @@ static char * select_filepath( const char * path, const char * filename ) char res_file[PATH_MAX]; char * ret = NULL; - - strncpy( res_path, path, PATH_MAX ); - strncpy( res_file, filename, PATH_MAX ); + strncpy(res_path, path, PATH_MAX); + strncpy(res_file, filename, PATH_MAX); res_file[PATH_MAX-1] = 0; res_path[PATH_MAX-1] = 0; - if( mt_FselInput( &app, res_path, res_file, (char*)"*", - (char*)messages_get("SaveAsNS"), res_path, NULL ) ) { - assert( (strlen( res_path ) + strlen( res_file ) + 2) < PATH_MAX ); - snprintf(tmp, PATH_MAX, "%s%s", res_path, res_file ); - ret = malloc( strlen(tmp)+1 ); - strcpy( ret, tmp ); + + if(select_file(res_path, res_file, (char*)"*", + (char*)messages_get("SaveAsNS"), NULL)) { + snprintf(tmp, PATH_MAX, "%s%s", res_path, res_file); + ret = malloc(strlen(tmp)+1); + strcpy(ret, tmp); } - return( ret ); + + printf("download file: %s\n", ret); + return(ret); } struct gui_download_window * gui_download_window_create(download_context *ctx, -- cgit v1.2.3