commit 184ebced4509b93088b855140ed66fbb35956158
parent deb164157879263fa2c12607f5b538bb4256dd83
Author: Paul <paul@claws-mail.org>
Date: Mon, 13 May 2024 10:53:46 +0100
when importing mbox don't suggest 'Inbox' if destination missing; standardise label on export error
Diffstat:
2 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/src/export.c b/src/export.c
@@ -1,6 +1,6 @@
/*
* Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2022 the Claws Mail team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2024 the Claws Mail team and Hiroyuki Yamamoto
*
* 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
@@ -195,7 +195,7 @@ static void export_ok_cb(GtkWidget *widget, gpointer data)
utf8mbox = gtk_entry_get_text(GTK_ENTRY(file_entry));
if (!utf8mbox || !*utf8mbox) {
- alertpanel_error(_("Target mbox filename can't be left empty."));
+ alertpanel_error(_("Mbox file can't be left empty."));
gtk_widget_grab_focus(file_entry);
return;
}
diff --git a/src/import.c b/src/import.c
@@ -202,18 +202,14 @@ static void import_ok_cb(GtkWidget *widget, gpointer data)
cm_return_if_fail(destdir);
if (!*utf8mbox) {
- alertpanel_error(_("Source mbox filename can't be left empty."));
+ alertpanel_error(_("Mbox file can't be left empty."));
gtk_widget_grab_focus(file_entry);
return;
}
if (!*destdir) {
- if (alertpanel(_("Import mbox file"),
- _("Destination folder is not set.\nImport mbox file to the Inbox folder?"),
- NULL, _("_OK"), NULL, _("_Cancel"), NULL, NULL, ALERTFOCUS_FIRST)
- == G_ALERTALTERNATE) {
- gtk_widget_grab_focus(dest_entry);
- return;
- }
+ alertpanel_error(_("Destination folder can't be left empty."));
+ gtk_widget_grab_focus(dest_entry);
+ return;
}
mbox = g_filename_from_utf8(utf8mbox, -1, NULL, NULL, NULL);
@@ -222,11 +218,7 @@ static void import_ok_cb(GtkWidget *widget, gpointer data)
mbox = g_strdup(utf8mbox);
}
- if (!*destdir) {
- dest = folder_find_item_from_path(INBOX_DIR);
- } else {
- dest = folder_find_item_from_identifier(destdir);
- }
+ dest = folder_find_item_from_identifier(destdir);
if (!dest) {
alertpanel_error(_("Can't find the destination folder."));