Fix incorrect labels in folder selection dialog
authorAndrej Kacian <ticho@claws-mail.org>
Fri, 12 May 2017 16:20:14 +0000 (18:20 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Fri, 12 May 2017 16:23:19 +0000 (18:23 +0200)
When custom label for folder selection were introduced (in bd8213fe) a
few ones were wrongly set, specifically ones when copying/moving folders
were talking about copying/moving message(s) instead.

Patch by Olivier Brunel.

AUTHORS
src/gtk/authors.h
src/imap_gtk.c
src/mh_gtk.c
src/plugins/mailmbox/plugin_gtk.c

diff --git a/AUTHORS b/AUTHORS
index 494802b..f84b2cc 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -311,3 +311,4 @@ contributors (in addition to the above; based on Changelog)
        Ralf Bormann
        Darac Marjal
        Ashish Gupta
+       Olivier Brunel
index a79fad1..f5d958c 100644 (file)
@@ -102,6 +102,7 @@ static char *CONTRIBS_LIST[] = {
 "Ralf Bormann",
 "H. Merijn Brand",
 "Eugene Brevdo",
+"Olivier Brunel",
 "Sean Buckheister",
 "Anton Butanaev",
 "Henrik Carlqvist",
index 26e3663..6e41b40 100644 (file)
@@ -308,17 +308,16 @@ static void move_folder_cb(GtkAction *action, gpointer data)
 {
        FolderView *folderview = (FolderView *)data;
        FolderItem *from_folder = NULL, *to_folder = NULL;
+       gchar *msg;
 
        from_folder = folderview_get_selected_item(folderview);
        if (!from_folder || from_folder->folder->klass != imap_get_class())
                return;
 
-       to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_MOVE, NULL, TRUE,
-                       ngettext(
-                               "Select folder to move selected message to",
-                               "Select folder to move selected messages to",
-                               summary_get_selection_count(folderview->summaryview))
-       );
+       msg = g_strdup_printf(_("Select folder to move folder '%s' to"),
+               from_folder->name);
+       to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_MOVE, NULL, TRUE, msg);
+       g_free(msg);
        if (!to_folder)
                return;
        
@@ -329,17 +328,16 @@ static void copy_folder_cb(GtkAction *action, gpointer data)
 {
        FolderView *folderview = (FolderView *)data;
        FolderItem *from_folder = NULL, *to_folder = NULL;
+       gchar *msg;
 
        from_folder = folderview_get_selected_item(folderview);
        if (!from_folder || from_folder->folder->klass != imap_get_class())
                return;
 
-       to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_MOVE, NULL, TRUE,
-                       ngettext(
-                               "Select folder to copy selected message to",
-                               "Select folder to copy selected messages to",
-                               summary_get_selection_count(folderview->summaryview))
-       );
+       msg = g_strdup_printf(_("Select folder to copy folder '%s' to"),
+               from_folder->name);
+       to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_MOVE, NULL, TRUE, msg);
+       g_free(msg);
        if (!to_folder)
                return;
        
index 605ef13..f4525be 100644 (file)
@@ -298,17 +298,16 @@ static void move_folder_cb(GtkAction *action, gpointer data)
 {
        FolderView *folderview = (FolderView *)data;
        FolderItem *from_folder = NULL, *to_folder = NULL;
+       gchar *msg;
 
        from_folder = folderview_get_selected_item(folderview);
        if (!from_folder || from_folder->folder->klass != mh_get_class())
                return;
 
-       to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_MOVE, NULL, TRUE,
-                       ngettext(
-                               "Select folder to move selected message to",
-                               "Select folder to move selected messages to",
-                               summary_get_selection_count(folderview->summaryview))
-       );
+       msg = g_strdup_printf(_("Select folder to move folder '%s' to"),
+               from_folder->name);
+       to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_MOVE, NULL, TRUE, msg);
+       g_free(msg);
        if (!to_folder)
                return;
        
@@ -319,17 +318,16 @@ static void copy_folder_cb(GtkAction *action, gpointer data)
 {
        FolderView *folderview = (FolderView *)data;
        FolderItem *from_folder = NULL, *to_folder = NULL;
+       gchar *msg;
 
        from_folder = folderview_get_selected_item(folderview);
        if (!from_folder || from_folder->folder->klass != mh_get_class())
                return;
 
-       to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_MOVE, NULL, TRUE,
-                       ngettext(
-                               "Select folder to copy selected message to",
-                               "Select folder to copy selected messages to",
-                               summary_get_selection_count(folderview->summaryview))
-       );
+       msg = g_strdup_printf(_("Select folder to copy folder '%s' to"),
+               from_folder->name);
+       to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_MOVE, NULL, TRUE, msg);
+       g_free(msg);
        if (!to_folder)
                return;
        
index 47b7684..d567ec8 100644 (file)
@@ -363,17 +363,16 @@ static void move_folder_cb(GtkAction *action, gpointer data)
 {
        FolderView *folderview = (FolderView *)data;
        FolderItem *from_folder = NULL, *to_folder = NULL;
+       gchar *msg;
 
        from_folder = folderview_get_selected_item(folderview);
        if (!from_folder || from_folder->folder->klass != claws_mailmbox_get_class())
                return;
 
-       to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_MOVE, NULL, FALSE,
-                       ngettext(
-                               "Select folder to move selected message to",
-                               "Select folder to move selected messages to",
-                               summary_get_selection_count(folderview->summaryview))
-       );
+       msg = g_strdup_printf(_("Select folder to move folder '%s' to"),
+               from_folder->name);
+       to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_MOVE, NULL, FALSE, msg);
+       g_free(msg);
        if (!to_folder)
                return;
 
@@ -384,17 +383,16 @@ static void copy_folder_cb(GtkAction *action, gpointer data)
 {
        FolderView *folderview = (FolderView *)data;
        FolderItem *from_folder = NULL, *to_folder = NULL;
+       gchar *msg;
 
        from_folder = folderview_get_selected_item(folderview);
        if (!from_folder || from_folder->folder->klass != claws_mailmbox_get_class())
                return;
 
-       to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_MOVE, NULL, FALSE,
-                       ngettext(
-                               "Select folder to copy selected message to",
-                               "Select folder to copy selected messages to",
-                               summary_get_selection_count(folderview->summaryview))
-       );
+       msg = g_strdup_printf(_("Select folder to copy folder '%s' to"),
+               from_folder->name);
+       to_folder = foldersel_folder_sel(NULL, FOLDER_SEL_MOVE, NULL, FALSE, msg);
+       g_free(msg);
        if (!to_folder)
                return;