Allow custom window title for the folder selection dialog.
[claws.git] / src / export.c
index 9063460b2841167a2861aa3928bb32e0318a4549..74e465ee22e3a040e1eb8eb4a3740b457e4b62ba 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2009 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
 
 #ifdef HAVE_CONFIG_H
 #  include "config.h"
+#include "claws-features.h"
 #endif
 
 #include "defs.h"
@@ -211,7 +212,7 @@ static void export_ok_cb(GtkWidget *widget, gpointer data)
 
        mbox = g_filename_from_utf8(utf8mbox, -1, NULL, NULL, NULL);
        if (!mbox) {
-               g_warning("export_ok_cb(): failed to convert character set.\n");
+               g_warning("export_ok_cb(): failed to convert character set.");
                mbox = g_strdup(utf8mbox);
        }
 
@@ -219,6 +220,7 @@ static void export_ok_cb(GtkWidget *widget, gpointer data)
        if (!src) {
                alertpanel_error(_("Couldn't find the source folder."));
                gtk_widget_grab_focus(src_entry);
+               g_free(mbox);
                return;
        } else {
                export_ok = export_to_mbox(src, mbox);
@@ -262,7 +264,8 @@ static void export_srcsel_cb(GtkWidget *widget, gpointer data)
 {
        FolderItem *src;
 
-       src = foldersel_folder_sel(NULL, FOLDER_SEL_ALL, NULL, FALSE);
+       src = foldersel_folder_sel(NULL, FOLDER_SEL_ALL, NULL, FALSE,
+                       _("Select folder which to export"));
        if (src && src->path)
                gtk_entry_set_text(GTK_ENTRY(src_entry), src->path);
 }
@@ -275,7 +278,7 @@ static gint delete_event(GtkWidget *widget, GdkEventAny *event, gpointer data)
 
 static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-       if (event && event->keyval == GDK_Escape)
+       if (event && event->keyval == GDK_KEY_Escape)
                export_cancel_cb(NULL, NULL);
        return FALSE;
 }