diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index ab2a737605b08dab68064d91c3e0154cbf78be1d..6b6758751be810399a634b8937b5222d5a6c29a3 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.349 2005-03-21 00:42:02 geuzaine Exp $ +// $Id: Callbacks.cpp,v 1.350 2005-04-01 15:48:14 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -501,7 +501,8 @@ void file_new_cb(CALLBACK_ARGS) char *name = file_chooser_get_name(1); struct stat buf; if(!stat(name, &buf)){ - if(fl_ask("File '%s' already exists.\n\nDo you want to erase it?", name)) + if(fl_choice("File '%s' already exists.\n\nDo you want to erase it?", + "Cancel", "Erase", NULL, name)) unlink(name); else goto test; @@ -740,7 +741,8 @@ void file_save_as_cb(CALLBACK_ARGS) if(CTX.confirm_overwrite) { struct stat buf; if(!stat(name, &buf)) - if(!fl_ask("File '%s' already exists.\n\nDo you want to replace it?", name)) + if(!fl_choice("File '%s' already exists.\n\nDo you want to replace it?", + "Cancel", "Replace", NULL, name)) goto test; } i = file_chooser_get_filter(); @@ -761,7 +763,8 @@ void file_rename_cb(CALLBACK_ARGS) if(CTX.confirm_overwrite) { struct stat buf; if(!stat(name, &buf)) - if(!fl_ask("File '%s' already exists.\n\nDo you want to replace it?", name)) + if(!fl_choice("File '%s' already exists.\n\nDo you want to replace it?", + "Cancel", "Replace", NULL, name)) goto test; } rename(CTX.filename, name); @@ -1216,7 +1219,8 @@ void message_save_cb(CALLBACK_ARGS) if(CTX.confirm_overwrite) { struct stat buf; if(!stat(name, &buf)) - if(!fl_ask("File '%s' already exists.\n\nDo you want to replace it?", name)) + if(!fl_choice("File '%s' already exists.\n\nDo you want to replace it?", + "Cancel", "Replace", NULL, name)) goto test; } WID->save_message(name); @@ -3246,7 +3250,8 @@ static void _view_save_as(int view_num, char *title, int type) if(CTX.confirm_overwrite) { struct stat buf; if(!stat(name, &buf)) - if(!fl_ask("File '%s' already exists.\n\nDo you want to replace it?", name)) + if(!fl_choice("File '%s' already exists.\n\nDo you want to replace it?", + "Cancel", "Replace", NULL, name)) goto test; } WriteView(v, name, type, 0); diff --git a/Parser/OpenFile.cpp b/Parser/OpenFile.cpp index 41f79e70f40886227c658e335bcc9a2e575b2572..b1be2e9bd38064ca05af5cef51bafdcc93f5f202 100644 --- a/Parser/OpenFile.cpp +++ b/Parser/OpenFile.cpp @@ -1,4 +1,4 @@ -// $Id: OpenFile.cpp,v 1.73 2005-03-13 17:58:38 geuzaine Exp $ +// $Id: OpenFile.cpp,v 1.74 2005-04-01 15:48:14 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -311,7 +311,8 @@ int MergeProblem(char *name, int warn_if_missing) if(!strcmp(ext, ".gz")) { // the real solution would be to rewrite all our I/O functions in // terms of gzFile, but until then, this is better than nothing - if(fl_ask("File '%s' is in gzip format.\n\nDo you want to uncompress it?", name)){ + if(fl_choice("File '%s' is in gzip format.\n\nDo you want to uncompress it?", + "Cancel", "Uncompress", NULL, name)){ fclose(fp); sprintf(tmp, "gunzip -c %s > %s", name, base); SystemCall(tmp);