Add new RSSyl feed: use any URI found in the clipboard.
[claws.git] / src / plugins / address_keeper / address_keeper_prefs.c
index 80ced56ea5525f6e9137d46bf5669300e836bc28..c4d4666e31e24ece736567eaa49a6791aca16960 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2009-2015 Ricardo Mones and the Claws Mail Team
+ * Copyright (C) 2009-2018 Ricardo Mones 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
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -64,7 +64,7 @@ static PrefParam param[] = {
        {NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
 };
 
-#ifndef USE_NEW_ADDRBOOK
+#ifndef USE_ALT_ADDRBOOK
 static void select_addressbook_clicked_cb(GtkWidget *widget, gpointer data) {
        const gchar *folderpath = NULL;
        gchar *new_path = NULL;
@@ -99,6 +99,8 @@ static void addkeeper_prefs_create_widget_func(PrefsPage * _page,
        GtkWidget *blocked_scrolledwin;
        GtkWidget *vbox;
        GtkTextBuffer *buffer;
+       gchar *text;
+       gchar *tr;
 
        vbox = gtk_vbox_new(FALSE, 6);
 
@@ -120,7 +122,7 @@ static void addkeeper_prefs_create_widget_func(PrefsPage * _page,
 
        path_button = gtk_button_new_with_label(_("Select..."));
        gtk_box_pack_start(GTK_BOX(path_hbox), path_button, FALSE, FALSE, 0);
-#ifndef USE_NEW_ADDRBOOK
+#ifndef USE_ALT_ADDRBOOK
        g_signal_connect(G_OBJECT (path_button), "clicked",
                         G_CALLBACK (select_addressbook_clicked_cb),
                         path_entry);
@@ -137,29 +139,44 @@ static void addkeeper_prefs_create_widget_func(PrefsPage * _page,
                _("Fields to keep addresses from"));
        gtk_container_set_border_width(GTK_CONTAINER(keep_frame), 6);
 
-       keep_to_checkbox = gtk_check_button_new_with_label(_("To"));
+       keep_to_checkbox = gtk_check_button_new_with_label(prefs_common_translated_header_name("To"));
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(keep_to_checkbox), addkeeperprefs.keep_to_addrs);
        gtk_box_pack_start(GTK_BOX(keep_hbox), keep_to_checkbox, FALSE, FALSE, 0);
        gtk_widget_show(keep_to_checkbox);
-       CLAWS_SET_TIP(keep_to_checkbox, _("Keep addresses which appear in 'To' headers"));
+       tr = g_strdup(C_("address keeper: %s stands for a header name",
+                       "Keep addresses which appear in '%s' headers"));
+       text = g_strdup_printf(tr, prefs_common_translated_header_name("To"));
+       CLAWS_SET_TIP(keep_to_checkbox, text);
+       g_free(tr);
+       g_free(text);
        gtk_widget_show(keep_to_checkbox);
 
        page->keep_to_addrs_check = keep_to_checkbox;
 
-       keep_cc_checkbox = gtk_check_button_new_with_label(_("Cc"));
+       keep_cc_checkbox = gtk_check_button_new_with_label(prefs_common_translated_header_name("Cc"));
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(keep_cc_checkbox), addkeeperprefs.keep_cc_addrs);
        gtk_box_pack_start(GTK_BOX(keep_hbox), keep_cc_checkbox, FALSE, FALSE, 0);
        gtk_widget_show(keep_cc_checkbox);
-       CLAWS_SET_TIP(keep_cc_checkbox, _("Keep addresses which appear in 'Cc' headers"));
+       tr = g_strdup(C_("address keeper: %s stands for a header name",
+                       "Keep addresses which appear in '%s' headers"));
+       text = g_strdup_printf(tr, prefs_common_translated_header_name("Cc"));
+       CLAWS_SET_TIP(keep_cc_checkbox, text);
+       g_free(text);
+       g_free(tr);
        gtk_widget_show(keep_cc_checkbox);
 
        page->keep_cc_addrs_check = keep_cc_checkbox;
 
-       keep_bcc_checkbox = gtk_check_button_new_with_label(_("Bcc"));
+       keep_bcc_checkbox = gtk_check_button_new_with_label(prefs_common_translated_header_name("Bcc"));
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(keep_bcc_checkbox), addkeeperprefs.keep_bcc_addrs);
        gtk_box_pack_start(GTK_BOX(keep_hbox), keep_bcc_checkbox, FALSE, FALSE, 0);
        gtk_widget_show(keep_bcc_checkbox);
-       CLAWS_SET_TIP(keep_bcc_checkbox, _("Keep addresses which appear in 'Bcc' headers"));
+       tr = g_strdup(C_("address keeper: %s stands for a header name",
+                       "Keep addresses which appear in '%s' headers"));
+       text = g_strdup_printf(tr, prefs_common_translated_header_name("Bcc"));
+       CLAWS_SET_TIP(keep_bcc_checkbox, text);
+       g_free(text);
+       g_free(tr);
        gtk_widget_show(keep_bcc_checkbox);
 
        page->keep_bcc_addrs_check = keep_bcc_checkbox;
@@ -206,7 +223,7 @@ static void addkeeper_save_config(void)
                return;
 
        if (prefs_write_param(param, pfile->fp) < 0) {
-               g_warning("failed to write AddressKeeper configuration to file");
+               g_warning("failed to write Address Keeper configuration to file");
                prefs_file_close_revert(pfile);
                return;
        }