in the UI replace 'POP3' with 'POP' and 'IMAP4' with 'IMAP'
[claws.git] / src / account.c
index 71149791dd6db027b0958afc520ee8c8612a47ae..9c34f971cdb7aaec4cd59807bec978d5a4abade0 100644 (file)
@@ -54,6 +54,7 @@
 #include "filtering.h"
 #include "prefs_actions.h"
 #include "hooks.h"
+#include "passwordstore.h"
 
 enum {
        ACCOUNT_IS_DEFAULT,
@@ -375,6 +376,9 @@ GList *account_get_list(void)
 
 void account_edit_focus(void)
 {
+       if (edit_account.window == NULL) {
+               return;
+       }
        manage_window_set_transient(GTK_WINDOW(edit_account.window));
        gtk_widget_grab_focus(edit_account.close_btn);
        gtk_widget_show(edit_account.window);
@@ -1100,6 +1104,10 @@ static void account_delete(GtkWidget *widget, gpointer data)
                                GINT_TO_POINTER(ac_prefs->account_id));
        }
 
+       gchar *uid = g_strdup_printf("%d", ac_prefs->account_id);
+       passwd_store_delete_block(PWS_ACCOUNT, uid);
+       g_free(uid);
+
        debug_print("Removing filter rules relative to this account...\n");
        for(cur = filtering_rules ; cur != NULL ;) {
                FilteringProp * prop = (FilteringProp *) cur->data;
@@ -1280,22 +1288,22 @@ static void account_list_view_add(PrefsAccount *ac_prefs)
 #ifdef USE_GNUTLS
        protocol = ac_prefs->protocol == A_POP3 ?
                  (ac_prefs->ssl_pop == SSL_TUNNEL ?
-                  "POP3 (SSL)" :
+                  "POP (SSL/TLS)" :
                   ac_prefs->ssl_pop == SSL_STARTTLS ?
-                  "POP3 (TLS)" : "POP3") :
+                  "POP (STARTTLS)" : "POP") :
                   ac_prefs->protocol == A_IMAP4 ?
                  (ac_prefs->ssl_imap == SSL_TUNNEL ?
-                  "IMAP4 (SSL)" :
+                  "IMAP (SSL/TLS)" :
                   ac_prefs->ssl_imap == SSL_STARTTLS ?
-                  "IMAP4 (TLS)" : "IMAP4") :
+                  "IMAP (STARTTLS)" : "IMAP") :
                   ac_prefs->protocol == A_NNTP ?
                  (ac_prefs->ssl_nntp == SSL_TUNNEL ?
-                  "NNTP (SSL)" : "NNTP") :
+                  "NNTP (SSL/TLS)" : "NNTP") :
                   ac_prefs->protocol == A_LOCAL ? "Local" :
                   ac_prefs->protocol == A_NONE ?  "SMTP" : "-";
 #else
-       protocol = ac_prefs->protocol == A_POP3  ? "POP3" :
-                  ac_prefs->protocol == A_IMAP4 ? "IMAP4" :
+       protocol = ac_prefs->protocol == A_POP3  ? "POP" :
+                  ac_prefs->protocol == A_IMAP4 ? "IMAP" :
                   ac_prefs->protocol == A_LOCAL ? "Local" :
                   ac_prefs->protocol == A_NNTP  ? "NNTP" :
                   ac_prefs->protocol == A_NONE ?  "SMTP" : "-";
@@ -1364,7 +1372,7 @@ static void account_list_set(void)
                GtkTreeIter iter;
 
                if (!gtk_tree_model_iter_nth_child(model, &iter, NULL, row)) {
-                       g_warning("%s(%d) - no iter found???\n", __FILE__, __LINE__);                                         
+                       g_warning("%s(%d) - no iter found???", __FILE__, __LINE__);
                        continue;
                }
        
@@ -1825,7 +1833,7 @@ gchar *account_get_signature_str(PrefsAccount *account)
 
        if (account->sig_type == SIG_FILE) {
                if (!is_file_or_fifo_exist(account->sig_path)) {
-                       g_warning("can't open signature file: %s\n",
+                       g_warning("can't open signature file: '%s'",
                                  account->sig_path);
                        return NULL;
                }