2007-12-06 [colin] 3.1.0cvs62
[claws.git] / src / account.c
index 5cded2c3701dd3060bd2216d769c52b750d013de..d38970a588e044e969025bb08f01219d14570f88 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws team
+ * Copyright (C) 1999-2007 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
- * 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,
@@ -13,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 
  */
 
 #ifdef HAVE_CONFIG_H
@@ -53,7 +53,7 @@
 #include "filtering.h"
 
 enum {
-       ACCOUNT_IS_DEFAULT,             /* GDK_TYPE_PIXMAP! */
+       ACCOUNT_IS_DEFAULT,
        ACCOUNT_ENABLE_GET_ALL, 
        ACCOUNT_NAME,
        ACCOUNT_PROTOCOL,
@@ -79,6 +79,7 @@ typedef enum
 PrefsAccount *cur_account;
 
 static GList *account_list = NULL;
+static gboolean account_list_dirty = FALSE;
 
 static struct EditAccount {
        GtkWidget *window;
@@ -86,9 +87,10 @@ static struct EditAccount {
        GtkWidget *close_btn;
 } edit_account;
 
-static GdkPixbuf *mark_pixbuf;
-
 static void account_edit_create                (void);
+static void          account_destroy           (PrefsAccount   *ac_prefs);
+static void          account_set_as_default    (PrefsAccount   *ac_prefs);
+static void          account_set_menu          (void);
 
 static void account_edit_prefs         (GtkWidget *widget, gpointer data);
 static void account_delete             (GtkWidget *widget, gpointer data);
@@ -106,10 +108,11 @@ static gint account_delete_event  (GtkWidget      *widget,
                                         gpointer        data);
 static void account_size_allocate_cb(GtkWidget *widget,
                                         GtkAllocation *allocation);
+#ifndef MAEMO
 static gboolean account_key_pressed    (GtkWidget      *widget,
                                         GdkEventKey    *event,
                                         gpointer        data);
-
+#endif
 static void account_list_view_add      (PrefsAccount   *ac_prefs);
 static void account_list_view_set      (void);
 
@@ -132,13 +135,12 @@ static void account_list_view_insert_account_item (GtkListStore   *list_store,
                                                   PrefsAccount *account_data);
 
 static GtkWidget *account_list_view_create     (void);
-static void account_create_list_view_images    (GtkWidget *list_view);
 static void account_create_list_view_columns   (GtkWidget *list_view);
 
 static gint account_list_view_get_selected_account_id          (GtkWidget *list_view);
-GtkTreePath *account_list_view_get_selected_account_path       (GtkWidget *list_view);
-PrefsAccount *account_list_view_get_selected_account           (GtkWidget *list_view);
-gboolean account_list_view_select_account                      (GtkWidget *list_view, 
+static GtkTreePath *account_list_view_get_selected_account_path        (GtkWidget *list_view);
+static PrefsAccount *account_list_view_get_selected_account            (GtkWidget *list_view);
+static gboolean account_list_view_select_account                       (GtkWidget *list_view, 
                                                                 gint       account_id);
 
 static void account_list_view_set_default_by_id(GtkWidget *list_view,
@@ -177,6 +179,14 @@ static void account_row_changed_while_drag_drop    (GtkTreeModel *model,
                                                 gpointer      arg3,
                                                 GtkTreeView  *list_view);
 
+static void account_flush_state(void)
+{
+       account_set_menu();
+       main_window_reflect_prefs_all();
+
+       account_list_dirty = FALSE;
+}
+
 void account_read_config_all(void)
 {
        GSList *ac_label_list = NULL, *cur;
@@ -346,7 +356,7 @@ PrefsAccount *account_find_from_item(FolderItem *item)
        return ac;
 }
 
-void account_set_menu(void)
+static void account_set_menu(void)
 {
        main_window_set_account_menu(account_list);
 }
@@ -356,15 +366,6 @@ void account_set_menu_only_toolbar(void)
        main_window_set_account_menu_only_toolbar(account_list);
 }
 
-void account_foreach(AccountFunc func, gpointer user_data)
-{
-       GList *cur;
-
-       for (cur = account_list; cur != NULL; cur = cur->next)
-               if (func((PrefsAccount *)cur->data, user_data) != 0)
-                       return;
-}
-
 GList *account_get_list(void)
 {
        return account_list;
@@ -374,6 +375,8 @@ void account_edit_open(void)
 {
        inc_lock();
 
+       account_list_dirty = FALSE;
+
        if (compose_get_compose_list()) {
                alertpanel_error(_("Some composing windows are open.\n"
                                   "Please close all the composing "
@@ -400,7 +403,7 @@ void account_add(void)
 {
        PrefsAccount *ac_prefs;
 
-       ac_prefs = prefs_account_open(NULL);
+       ac_prefs = prefs_account_open(NULL, &account_list_dirty);
 
        if (!ac_prefs) return;
 
@@ -431,6 +434,7 @@ void account_add(void)
                if (ac_prefs->protocol == A_IMAP4)
                        folder->klass->create_tree(folder);
                folderview_set_all();
+               folder_write_list();
        }
 }
 
@@ -438,6 +442,7 @@ void account_open(PrefsAccount *ac_prefs)
 {
        gboolean prev_default;
        gchar *ac_name;
+       gboolean account_dirty = FALSE;
 
        g_return_if_fail(ac_prefs != NULL);
 
@@ -445,23 +450,25 @@ void account_open(PrefsAccount *ac_prefs)
        Xstrdup_a(ac_name, ac_prefs->account_name ? ac_prefs->account_name : "",
                  return);
 
-       prefs_account_open(ac_prefs);
+       prefs_account_open(ac_prefs, &account_dirty);
 
-       if (!prev_default && ac_prefs->is_default)
-               account_set_as_default(ac_prefs);
+       if (account_dirty) {
+               if (!prev_default && ac_prefs->is_default)
+                       account_set_as_default(ac_prefs);
 
-       if (ac_prefs->folder && strcmp2(ac_name, ac_prefs->account_name) != 0) {
-               folder_set_name(FOLDER(ac_prefs->folder),
-                               ac_prefs->account_name);
-               folderview_set_all();
-       }
+               if (ac_prefs->folder && strcmp2(ac_name, ac_prefs->account_name) != 0) {
+                       folder_set_name(FOLDER(ac_prefs->folder),
+                                       ac_prefs->account_name);
+                       folderview_set_all();
+               }
 
-       account_write_config_all();
-       account_set_menu();
-       main_window_reflect_prefs_all();
+               account_write_config_all();
+
+               account_flush_state();
+       }
 }
 
-void account_set_as_default(PrefsAccount *ac_prefs)
+static void account_set_as_default(PrefsAccount *ac_prefs)
 {
        PrefsAccount *ap;
        GList *cur;
@@ -514,6 +521,8 @@ void account_set_missing_folder(void)
                        folder_add(folder);
                        if (ap->protocol == A_IMAP4)
                                folder->klass->create_tree(folder);
+                       folder_write_list();
+
                }
        }
 }
@@ -571,6 +580,8 @@ FolderItem *account_get_special_folder(PrefsAccount *ac_prefs,
                if (!item) {
                        if (ac_prefs->folder)
                                item = FOLDER(ac_prefs->folder)->outbox;
+                       if (!item)
+                               item = folder_get_default_outbox_for_class(F_MH);
                        if (!item)
                                item = folder_get_default_outbox();
                }
@@ -583,6 +594,8 @@ FolderItem *account_get_special_folder(PrefsAccount *ac_prefs,
                if (!item) {
                        if (ac_prefs->folder)
                                item = FOLDER(ac_prefs->folder)->draft;
+                       if (!item)
+                               item = folder_get_default_draft_for_class(F_MH);
                        if (!item)
                                item = folder_get_default_draft();
                }
@@ -595,6 +608,8 @@ FolderItem *account_get_special_folder(PrefsAccount *ac_prefs,
                if (!item) {
                        if (ac_prefs->folder)
                                item = FOLDER(ac_prefs->folder)->queue;
+                       if (!item)
+                               item = folder_get_default_queue_for_class(F_MH);
                        if (!item)
                                item = folder_get_default_queue();
                }
@@ -607,6 +622,8 @@ FolderItem *account_get_special_folder(PrefsAccount *ac_prefs,
                if (!item) {
                        if (ac_prefs->folder)
                                item = FOLDER(ac_prefs->folder)->trash;
+                       if (!item)
+                               item = folder_get_default_trash_for_class(F_MH);
                        if (!item)
                                item = folder_get_default_trash();
                }
@@ -669,7 +686,7 @@ static void account_edit_create(void)
 
        GtkWidget *default_btn;
 
-       GtkWidget *hbbox;
+       GtkWidget *confirm_area;
        GtkWidget *help_btn;
        GtkWidget *close_btn;
 
@@ -677,14 +694,18 @@ static void account_edit_create(void)
 
        debug_print("Creating account edit window...\n");
 
-       window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+       window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "account");
        gtk_container_set_border_width (GTK_CONTAINER (window), 8);
        gtk_window_set_title (GTK_WINDOW (window), _("Edit accounts"));
        gtk_window_set_modal (GTK_WINDOW (window), TRUE);
        g_signal_connect (G_OBJECT (window), "delete_event",
                          G_CALLBACK (account_delete_event), NULL);
+#ifdef MAEMO
+       maemo_connect_key_press_to_mainwindow(GTK_WINDOW(window));
+#else
        g_signal_connect (G_OBJECT (window), "key_press_event",
                          G_CALLBACK (account_key_pressed), NULL);
+#endif                   
        MANAGE_WINDOW_SIGNALS_CONNECT (window);
        gtk_widget_realize(window);
 
@@ -697,11 +718,15 @@ static void account_edit_create(void)
        gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
        label = gtk_label_new
-               (_("New messages will be checked in this order. Check the boxes\n"
-                  "on the 'G' column to enable message retrieval by 'Get Mail'."));
+               (_("Using 'Get Mail' will retrieve messages from your Accounts "
+                  "in the order given, the checkbox indicates which accounts "
+                  "will be included. Bold text indicates the default account."));
        gtk_widget_show (label);
+       gtk_widget_set_size_request(GTK_WIDGET(label), 
+                                   prefs_common.accountswin_width-8, -1);
        gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 4);
        gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
+       gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
 
        hbox = gtk_hbox_new (FALSE, 8);
        gtk_widget_show (hbox);
@@ -763,27 +788,19 @@ static void account_edit_create(void)
        gtk_widget_show (hbox);
        gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
-       vbox2 = gtk_vbox_new(FALSE, 0);
-       gtk_widget_show (vbox2);
-       gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE, FALSE, 0);
-
        default_btn = gtk_button_new_with_mnemonic
                (_(" _Set as default account "));
        gtk_widget_show (default_btn);
-       gtk_box_pack_start (GTK_BOX (vbox2), default_btn, TRUE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX (hbox), default_btn, FALSE, FALSE, 0);
        g_signal_connect (G_OBJECT(default_btn), "clicked",
                          G_CALLBACK (account_set_default), NULL);
 
-       hbbox = gtk_hbutton_box_new();
-       gtk_button_box_set_layout(GTK_BUTTON_BOX(hbbox), GTK_BUTTONBOX_END);
-       gtk_box_set_spacing(GTK_BOX(hbbox), 5);
-
-       gtkut_stock_button_set_create_with_help(&hbbox, &help_btn,
+       gtkut_stock_button_set_create_with_help(&confirm_area, &help_btn,
                        &close_btn, GTK_STOCK_CLOSE,
                        NULL, NULL, NULL, NULL);
-       gtk_widget_show(hbbox);
+       gtk_widget_show(confirm_area);
 
-       gtk_box_pack_end (GTK_BOX (hbox), hbbox, FALSE, FALSE, 0);
+       gtk_box_pack_end (GTK_BOX (hbox), confirm_area, FALSE, FALSE, 0);
        gtk_widget_grab_default (close_btn);
 
        g_signal_connect (G_OBJECT (close_btn), "clicked",
@@ -793,14 +810,13 @@ static void account_edit_create(void)
                        G_CALLBACK(manual_open_with_anchor_cb),
                        MANUAL_ANCHOR_ACCOUNTPREFS);
 
-       account_create_list_view_images(list_view);
 
        g_signal_connect(G_OBJECT(window), "size_allocate",
                         G_CALLBACK(account_size_allocate_cb), NULL);
 
        if (!geometry.min_height) {
                geometry.min_width = 500;
-               geometry.min_height = 350;
+               geometry.min_height = 380;
        }
 
        gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
@@ -811,6 +827,9 @@ static void account_edit_create(void)
        edit_account.window    = window;
        edit_account.list_view = list_view;
        edit_account.close_btn = close_btn;
+#ifdef MAEMO
+       maemo_window_full_screen_if_needed(GTK_WINDOW(edit_account.window));
+#endif
 }
 
 static void account_edit_prefs(GtkWidget *widget, gpointer data)
@@ -865,6 +884,7 @@ static void account_clone(GtkWidget *widget, gpointer data)
                alertpanel_error(_("Accounts with remote folders cannot be copied."));
                return;
        }
+       account_list_dirty = TRUE;
        
        ac_clon = prefs_account_new();
        /* copy fields */
@@ -889,27 +909,26 @@ static void account_clone(GtkWidget *widget, gpointer data)
        ACP_FASSIGN(use_mail_command);
        ACP_FDUP(mail_command);
        
-#if USE_OPENSSL
        ACP_FASSIGN(ssl_pop);
        ACP_FASSIGN(ssl_imap);
        ACP_FASSIGN(ssl_nntp);
        ACP_FASSIGN(ssl_smtp);
        ACP_FASSIGN(use_nonblocking_ssl);
-#endif /* USE_OPENSSL */
        
        ac_clon->tmp_pass = NULL;
 
        /* receive */
+       ACP_FASSIGN(use_apop_auth);
        ACP_FASSIGN(rmmail);
        ACP_FASSIGN(msg_leave_time);
-       ACP_FASSIGN(getall);
        ACP_FASSIGN(recv_at_getall);
        ACP_FASSIGN(sd_rmmail_on_download);
-       ACP_FASSIGN(sd_filter_on_recv);
        ACP_FASSIGN(enable_size_limit);
        ACP_FASSIGN(size_limit);
        ACP_FASSIGN(filter_on_recv);
+       ACP_FASSIGN(filterhook_on_recv);
        ACP_FDUP(inbox);
+       ACP_FDUP(local_inbox);
        ACP_FASSIGN(max_articles);
 
        ACP_FASSIGN(imap_auth_type);
@@ -954,10 +973,27 @@ static void account_clone(GtkWidget *widget, gpointer data)
         ACP_FDUP(auto_bcc);
         ACP_FASSIGN(set_autoreplyto);
         ACP_FDUP(auto_replyto);
+       ACP_FASSIGN(enable_default_dictionary);
+       ACP_FDUP(default_dictionary);
+       ACP_FASSIGN(enable_default_alt_dictionary);
+       ACP_FDUP(default_alt_dictionary);
+       ACP_FASSIGN(compose_with_format);
+       ACP_FDUP(compose_subject_format);
+       ACP_FDUP(compose_body_format);
+       ACP_FASSIGN(reply_with_format);
+       ACP_FDUP(reply_quotemark);
+       ACP_FDUP(reply_body_format);
+       ACP_FASSIGN(forward_with_format);
+       ACP_FDUP(forward_quotemark);
+       ACP_FDUP(forward_body_format);
 
         /* privacy */
+       ACP_FDUP(default_privacy_system);
         ACP_FASSIGN(default_encrypt);
+       ACP_FASSIGN(default_encrypt_reply);
         ACP_FASSIGN(default_sign);
+       ACP_FASSIGN(save_encrypted_as_clear_text);
+       ACP_FASSIGN(encrypt_to_self);
        
         /* advanced */
         ACP_FASSIGN(set_smtpport);
@@ -973,13 +1009,19 @@ static void account_clone(GtkWidget *widget, gpointer data)
         ACP_FASSIGN(mark_crosspost_read);
         ACP_FASSIGN(crosspost_col);
 
+#ifndef G_OS_WIN32
         ACP_FASSIGN(set_tunnelcmd);
         ACP_FDUP(tunnelcmd);
+#endif
 
         ACP_FDUP(imap_dir);
+       ACP_FASSIGN(imap_subsonly);
+       ACP_FASSIGN(low_bandwidth);
 
         ACP_FASSIGN(set_sent_folder);
         ACP_FDUP(sent_folder);
+       ACP_FASSIGN(set_queue_folder);
+       ACP_FDUP(queue_folder);
         ACP_FASSIGN(set_draft_folder);
         ACP_FDUP(draft_folder);
         ACP_FASSIGN(set_trash_folder);
@@ -1014,6 +1056,7 @@ static void account_delete(GtkWidget *widget, gpointer data)
                            GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, FALSE,
                            NULL, ALERT_WARNING, G_ALERTDEFAULT) != G_ALERTALTERNATE)
                return;
+       account_list_dirty = TRUE;
 
        if (ac_prefs->folder) {
                FolderItem *item;
@@ -1053,6 +1096,7 @@ static void account_delete(GtkWidget *widget, gpointer data)
                        cur = g_slist_next(cur);
                }
        }
+       folder_write_list();
 }
 
 static void account_up(GtkWidget *widget, gpointer data)
@@ -1066,6 +1110,7 @@ static void account_up(GtkWidget *widget, gpointer data)
        
        if (!sel) 
                return;
+       account_list_dirty = TRUE;
 
        up = gtk_tree_path_copy(sel);
        if (!up) {
@@ -1105,6 +1150,7 @@ static void account_down(GtkWidget *widget, gpointer data)
        
        if (!sel) 
                return;
+       account_list_dirty = TRUE;
 
        dn = gtk_tree_path_copy(sel);
        if (!dn) {
@@ -1149,8 +1195,7 @@ static void account_set_default(GtkWidget *widget, gpointer data)
        account_list_view_set();
        
        cur_account = ac_prefs;
-       account_set_menu();
-       main_window_reflect_prefs_all();
+       account_flush_state();
 }
 
 static void account_edit_close(GtkWidget *widget, gpointer data)
@@ -1164,8 +1209,8 @@ static void account_edit_close(GtkWidget *widget, gpointer data)
                cur_account = ac_prefs;
        }
 
-       account_set_menu();
-       main_window_reflect_prefs_all();
+       if (account_list_dirty)
+               account_flush_state();
 
        gtk_widget_hide(edit_account.window);
 
@@ -1178,7 +1223,7 @@ static gint account_delete_event(GtkWidget *widget, GdkEventAny *event,
        account_edit_close(NULL, NULL);
        return TRUE;
 }
-
+#ifndef MAEMO
 static gboolean account_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                    gpointer data)
 {
@@ -1186,7 +1231,7 @@ static gboolean account_key_pressed(GtkWidget *widget, GdkEventKey *event,
                account_edit_close(NULL, NULL);
        return FALSE;
 }
-
+#endif
 static void account_list_view_add(PrefsAccount *ac_prefs)
 {
        GtkTreeView *list_view = GTK_TREE_VIEW(edit_account.list_view);
@@ -1196,7 +1241,7 @@ static void account_list_view_add(PrefsAccount *ac_prefs)
        gboolean getall;
 
        name = ac_prefs->account_name;
-#if USE_OPENSSL
+#if (defined(USE_OPENSSL) || defined (USE_GNUTLS))
        protocol = ac_prefs->protocol == A_POP3 ?
                  (ac_prefs->ssl_pop == SSL_TUNNEL ?
                   "POP3 (SSL)" :
@@ -1210,15 +1255,19 @@ static void account_list_view_add(PrefsAccount *ac_prefs)
                   ac_prefs->protocol == A_NNTP ?
                  (ac_prefs->ssl_nntp == SSL_TUNNEL ?
                   "NNTP (SSL)" : "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" :
                   ac_prefs->protocol == A_LOCAL ? "Local" :
-                  ac_prefs->protocol == A_NNTP  ? "NNTP" : "";
+                  ac_prefs->protocol == A_NNTP  ? "NNTP" :
+                  ac_prefs->protocol == A_NONE ?  "SMTP" : "-";
 #endif
-       server= ac_prefs->protocol == A_NNTP
-               ? ac_prefs->nntp_server : ac_prefs->recv_server;
+       server= ac_prefs->protocol == A_NNTP ? ac_prefs->nntp_server :
+                  ac_prefs->protocol == A_LOCAL ?  "-" :
+                  ac_prefs->protocol == A_NONE ? ac_prefs->smtp_server :
+                  ac_prefs->recv_server;
 
        has_getallbox = (ac_prefs->protocol == A_POP3  ||
                         ac_prefs->protocol == A_IMAP4 ||
@@ -1333,6 +1382,15 @@ PrefsAccount *account_get_reply_account(MsgInfo *msginfo, gboolean reply_autosel
                                }
                        }
                }
+               if (!account) {
+                       gchar deliveredto[BUFFSIZE];
+                       if (!procheader_get_header_from_msginfo
+                               (msginfo, deliveredto,sizeof deliveredto , "Delivered-To:")) { 
+                               gchar *buf = deliveredto + strlen("Delivered-To:");
+                               extract_address(buf);
+                               account = account_find_from_address(buf);
+                       }
+               }
        }
 
        /* select the account for the whole folder (IMAP / NNTP) */
@@ -1354,7 +1412,7 @@ PrefsAccount *account_get_reply_account(MsgInfo *msginfo, gboolean reply_autosel
 static GtkListStore* account_create_data_store(void)
 {
        return gtk_list_store_new(N_ACCOUNT_COLUMNS,
-                                GDK_TYPE_PIXBUF,       /* ACCOUNT_IS_DEFAULT */
+                                G_TYPE_INT,            /* ACCOUNT_IS_DEFAULT */
                                 G_TYPE_BOOLEAN,        /* ACCOUNT_ENABLE_GET_ALL */
                                 G_TYPE_STRING,         /* ACCOUNT_NAME */
                                 G_TYPE_STRING,         /* ACCOUNT_PROTOCOL */
@@ -1381,7 +1439,7 @@ static void account_list_view_insert_account_item(GtkListStore *list_store,
        
        gtk_list_store_append(list_store, &iter);
        gtk_list_store_set(list_store, &iter, 
-                          ACCOUNT_IS_DEFAULT,     is_default ? mark_pixbuf : NULL,
+                          ACCOUNT_IS_DEFAULT,     is_default ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL,
                           ACCOUNT_ENABLE_GET_ALL, is_get_all,
                           ACCOUNT_NAME,           account_name,
                           ACCOUNT_PROTOCOL,       protocol,
@@ -1393,7 +1451,6 @@ static void account_list_view_insert_account_item(GtkListStore *list_store,
 /*!
  *\brief       Create and set up account list view, including tasks like
  *             creating the data store (\ref account_create_data_store()),
- *             creating images for the list view (\ref account_create_list_view_images()),
  *             and setting up the account list's individual columns (\ref 
  *             account_create_list_view_columns()).
  *
@@ -1407,7 +1464,9 @@ static GtkWidget *account_list_view_create(void)
 
        list_view = GTK_TREE_VIEW(gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)));
        g_object_unref(G_OBJECT(store));
-
+#ifdef MAEMO
+       g_object_set(list_view, "allow-checkbox-mode", FALSE, NULL);
+#endif
        gtk_tree_view_set_rules_hint(list_view, prefs_common.use_stripes_everywhere);
        gtk_tree_view_set_reorderable(list_view, TRUE);
        
@@ -1434,22 +1493,11 @@ static GtkWidget *account_list_view_create(void)
        return GTK_WIDGET(list_view);
 }
 
-static void account_create_list_view_images(GtkWidget *list_view)
-{
-       stock_pixbuf_gdk(list_view, STOCK_PIXMAP_MARK, &mark_pixbuf);
-}
-
 static void account_create_list_view_columns(GtkWidget *list_view)
 {
        GtkTreeViewColumn *column;
        GtkCellRenderer *renderer;
-
-       renderer = gtk_cell_renderer_pixbuf_new();
-       column = gtk_tree_view_column_new_with_attributes
-               ("D", renderer,
-                "pixbuf", ACCOUNT_IS_DEFAULT,
-                NULL);
-       gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column);           
+       GtkTooltips *tooltips = gtk_tooltips_new();
 
        renderer = gtk_cell_renderer_toggle_new();
        g_object_set(renderer, 
@@ -1457,18 +1505,22 @@ static void account_create_list_view_columns(GtkWidget *list_view)
                     "activatable", TRUE,
                      NULL);
        column = gtk_tree_view_column_new_with_attributes
-               ("G", renderer,
+               (Q_("Accounts List Get Column Name|G"), renderer,
                 "active", ACCOUNT_ENABLE_GET_ALL,
                 NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column);          
+       gtk_tree_view_column_set_alignment (column, 0.5);
+       gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), column->button,
+                       _("'Get Mail' retrieves mail from the checked accounts"), NULL);
        g_signal_connect(G_OBJECT(renderer), "toggled",                      
                         G_CALLBACK(account_get_all_toggled),
                         list_view);
-       
+
        renderer = gtk_cell_renderer_text_new();
        column = gtk_tree_view_column_new_with_attributes
                (_("Name"), renderer,
                 "text", ACCOUNT_NAME,
+                "weight", ACCOUNT_IS_DEFAULT,
                 NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column);          
        
@@ -1476,6 +1528,7 @@ static void account_create_list_view_columns(GtkWidget *list_view)
        column = gtk_tree_view_column_new_with_attributes
                (_("Protocol"), renderer,
                 "text", ACCOUNT_PROTOCOL,
+                "weight", ACCOUNT_IS_DEFAULT,
                 NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column);           
        
@@ -1483,6 +1536,7 @@ static void account_create_list_view_columns(GtkWidget *list_view)
        column = gtk_tree_view_column_new_with_attributes
                (_("Server"), renderer,
                 "text", ACCOUNT_SERVER,
+                "weight", ACCOUNT_IS_DEFAULT,
                 NULL);
        gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column);           
 }
@@ -1510,7 +1564,7 @@ static gint account_list_view_get_selected_account_id(GtkWidget *list_view)
 /*!
  *\brief       Get the tree path of the currently selected account
  */
-GtkTreePath *account_list_view_get_selected_account_path(GtkWidget *list_view)
+static GtkTreePath *account_list_view_get_selected_account_path(GtkWidget *list_view)
 {
        GtkTreeSelection *selector;
        GtkTreeModel *model;
@@ -1528,7 +1582,7 @@ GtkTreePath *account_list_view_get_selected_account_path(GtkWidget *list_view)
 /*!
  *\brief       Get the account data of the currently selected account
  */
-PrefsAccount *account_list_view_get_selected_account(GtkWidget *list_view)
+static PrefsAccount *account_list_view_get_selected_account(GtkWidget *list_view)
 {
        GtkTreeSelection *selector;
        GtkTreeModel *model;
@@ -1550,7 +1604,7 @@ PrefsAccount *account_list_view_get_selected_account(GtkWidget *list_view)
  *
  *\return      gboolean TRUE if found and selected, FALSE if not.
  */
-gboolean account_list_view_select_account(GtkWidget *list_view, gint account_id)
+static gboolean account_list_view_select_account(GtkWidget *list_view, gint account_id)
 {
        FindAccountInStore fis;
        GtkTreeModel *model;
@@ -1598,20 +1652,19 @@ static gboolean set_new_default_account(GtkTreeModel *model,
                                        gint         *account_id)
 {
        PrefsAccount *account = NULL;
-       GdkPixbuf *pixbuf;
+       PangoWeight weight;
        
        gtk_tree_model_get(model, iter, 
                           ACCOUNT_DATA, &account, 
                           -1);
 
        if (*account_id == account->account_id)
-               pixbuf = NULL;
+               weight = PANGO_WEIGHT_NORMAL;
        else
-               pixbuf = mark_pixbuf;
-       
+               weight = PANGO_WEIGHT_BOLD;
+
        gtk_list_store_set(GTK_LIST_STORE(model), iter, 
-                          ACCOUNT_IS_DEFAULT, pixbuf,
-                          -1);
+                          ACCOUNT_IS_DEFAULT, weight, -1);
 
        return FALSE;
 }