#include <list>
#include <vector>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtkfilechooser.h>
-#include <gtk/gtkfilechooserdialog.h>
-#include <gtk/gtkstock.h>
+#include <gtk/gtk.h>
+#include <uilib/uilib.h>
#include "string/string.h"
#include "stream/stringstream.h"
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,
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 );
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;
}
}