]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/gtkutil/filechooser.cpp
allow different file type selections for open/import/save
[xonotic/netradiant.git] / libs / gtkutil / filechooser.cpp
index f164d220d8f3cdcd1a2099b9e042b7e9155f953e..2246b57bd60608f5651c3a4c66ae5769cb21c820 100644 (file)
@@ -137,7 +137,7 @@ public:
 
 static char g_file_dialog_file[1024];
 
-const char* file_dialog_show(GtkWidget* parent, bool open, const char* title, const char* path, const char* pattern)
+const char* file_dialog_show(GtkWidget* parent, bool open, const char* title, const char* path, const char* pattern, bool want_load, bool want_import, bool want_save)
 {
   filetype_t type;
 
@@ -147,7 +147,7 @@ const char* file_dialog_show(GtkWidget* parent, bool open, const char* title, co
   }
 
   FileTypeList typelist;
-  GlobalFiletypes().getTypeList(pattern, &typelist);
+  GlobalFiletypes().getTypeList(pattern, &typelist, want_load, want_import, want_save);
 
   GTKMasks masks(typelist);
 
@@ -288,11 +288,11 @@ 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)
+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)
 {
   for(;;)
   {
-    const char* file = file_dialog_show(parent, open, title, path, pattern);
+    const char* file = file_dialog_show(parent, open, title, path, pattern, want_load, want_import, want_save);
 
     if(open
       || file == 0