X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=libs%2Fgtkutil%2Ffilechooser.cpp;h=a06c4c93e76b30cc21c9e9efa3782918a600a376;hp=d65d310ca567dc3eac3d47da95ccb6b946f37b56;hb=9d606a0b3be053550486b8f1a00255e340ccf8a8;hpb=3c73487420fde8d4a3b5360d8b99e48132517900 diff --git a/libs/gtkutil/filechooser.cpp b/libs/gtkutil/filechooser.cpp index d65d310c..a06c4c93 100644 --- a/libs/gtkutil/filechooser.cpp +++ b/libs/gtkutil/filechooser.cpp @@ -25,11 +25,8 @@ #include #include -#include -#include -#include -#include -#include +#include +#include #include "string/string.h" #include "stream/stringstream.h" @@ -243,7 +240,7 @@ const char* file_dialog_show( GtkWidget* parent, bool open, const char* title, c return g_file_dialog_file; } -char* dir_dialog( GtkWidget* parent, const char* title, const char* path ){ +char* dir_dialog( ui::Widget parent, const char* title, const char* path ){ GtkWidget* dialog = gtk_file_chooser_dialog_new( title, GTK_WINDOW( parent ), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, @@ -268,7 +265,7 @@ char* dir_dialog( GtkWidget* parent, const char* title, const char* path ){ return filename; } -const char* file_dialog( GtkWidget* parent, bool open, const char* title, const char* path, const char* pattern, bool want_load, bool want_import, bool want_save ){ +const char* file_dialog( ui::Widget parent, bool open, const char* title, const char* path, const char* pattern, bool want_load, bool want_import, bool want_save ){ for (;; ) { const char* file = file_dialog_show( parent, open, title, path, pattern, want_load, want_import, want_save ); @@ -276,7 +273,7 @@ const char* file_dialog( GtkWidget* parent, bool open, const char* title, const if ( open || file == 0 || !file_exists( file ) - || gtk_MessageBox( parent, "The file specified already exists.\nDo you want to replace it?", title, eMB_NOYES, eMB_ICONQUESTION ) == eIDYES ) { + || parent.alert("The file specified already exists.\nDo you want to replace it?", title, ui::alert_type::NOYES, ui::alert_icon::Question ) == ui::alert_response::YES ) { return file; } }