2005-08-30 [colin] 1.9.13cvs72
[claws.git] / src / gtk / filesel.c
index 67b7c7d9ef5a7aefb7c1ef51f1292d73a6bf9500..2914ee822285ac98213220ab7c14186422177a25 100644 (file)
@@ -53,12 +53,13 @@ static GList *filesel_create(const gchar *title, const gchar *path,
        gint action = (open == TRUE) ? 
                        (folder_mode == TRUE ? GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER:
                                               GTK_FILE_CHOOSER_ACTION_OPEN):
-                       GTK_FILE_CHOOSER_ACTION_SAVE;
+                       (folder_mode == TRUE ? GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER:
+                                              GTK_FILE_CHOOSER_ACTION_SAVE);
                        
        gchar * action_btn = (open == TRUE) ? GTK_STOCK_OPEN:GTK_STOCK_SAVE;
        GtkWidget *chooser = gtk_file_chooser_dialog_new (title, NULL, action, 
                                GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                               action_btn, GTK_RESPONSE_OK
+                               action_btn, GTK_RESPONSE_ACCEPT
                                NULL);
        if (filter != NULL) {
                GtkFileFilter *file_filter = gtk_file_filter_new();
@@ -96,7 +97,7 @@ static GList *filesel_create(const gchar *title, const gchar *path,
                gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser), last_selected_dir);
        }
 
-       if (gtk_dialog_run (GTK_DIALOG (chooser)) == GTK_RESPONSE_OK
+       if (gtk_dialog_run (GTK_DIALOG (chooser)) == GTK_RESPONSE_ACCEPT
                slist = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (chooser));
        
        manage_window_focus_out(chooser, NULL, NULL);
@@ -176,3 +177,8 @@ gchar *filesel_select_file_open_folder(const gchar *title, const gchar *path)
        return filesel_select_file (title, path, TRUE, TRUE, NULL);
 }
 
+gchar *filesel_select_file_save_folder(const gchar *title, const gchar *path)
+{
+       return filesel_select_file (title, path, FALSE, TRUE, NULL);
+}
+