2007-10-04 [paul] 3.0.2cvs7
authorPaul Mangan <paul@claws-mail.org>
Thu, 4 Oct 2007 09:54:19 +0000 (09:54 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 4 Oct 2007 09:54:19 +0000 (09:54 +0000)
* src/account.c
remove the D column, instead indicate the
default account by use of bold text

ChangeLog
PATCHSETS
configure.ac
src/account.c

index c3a1416826e2cb73c05ce3e13b446558a72fa25c..cb194750779a27339d40527635dde08f3d8be9c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-10-04 [paul]      3.0.2cvs7
+
+       * src/account.c
+               remove the D column, instead indicate the
+               default account by use of bold text
+
 2007-10-03 [colin]     3.0.2cvs6
 
        * src/common/template.c
index 3c6cb4b2bd4c5ace2f52b782fb4b8d32cc8d2ea2..ca04d613efc707caacf9ea40b368db1444e70459 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.75.2.48 -r 1.75.2.49 src/matcher.c;  cvs diff -u -r 1.1.2.78 -r 1.1.2.79 src/gtk/quicksearch.c;  ) > 3.0.2cvs4.patchset
 ( cvs diff -u -r 1.155.2.75 -r 1.155.2.76 src/Makefile.am;  diff -u /dev/null src/addrduplicates.c;  diff -u /dev/null src/addrduplicates.h;  cvs diff -u -r 1.60.2.98 -r 1.60.2.99 src/addressbook.c;  ) > 3.0.2cvs5.patchset
 ( cvs diff -u -r 1.2.4.20 -r 1.2.4.21 src/common/template.c;  ) > 3.0.2cvs6.patchset
+( cvs diff -u -r 1.61.2.70 -r 1.61.2.71 src/account.c;  ) > 3.0.2cvs7.patchset
index 81e2f113ff383f0445751d2ae0af55ec31dcbeb0..0fe47e924b70906973ae64b9fdfa13357ffb5487 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=6
+EXTRA_VERSION=7
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 757f931b7090e614f2e5d04cb38476f23a3b9e2e..032f02e30fa238d76ede84c2ce238d28916ea1f8 100644 (file)
@@ -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,
@@ -87,8 +87,6 @@ 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);
@@ -136,7 +134,6 @@ 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);
@@ -721,8 +718,8 @@ static void account_edit_create(void)
 
        label = gtk_label_new
                (_("Using 'Get Mail' will retrieve messages from your Accounts "
-                  "in the order given, the checkbox in the 'G' column indicates "
-                  "which accounts will be included."));
+                  "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);
@@ -812,7 +809,6 @@ 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);
@@ -1412,7 +1408,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 */
@@ -1439,7 +1435,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,
@@ -1451,7 +1447,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()).
  *
@@ -1492,27 +1487,12 @@ 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;
        GtkTooltips *tooltips = gtk_tooltips_new();
 
-       renderer = gtk_cell_renderer_pixbuf_new();
-       column = gtk_tree_view_column_new_with_attributes
-               (Q_("Accounts List Default Column Name|D"), renderer,
-                "pixbuf", ACCOUNT_IS_DEFAULT,
-                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,
-                       _("Default account"), NULL);
-
        renderer = gtk_cell_renderer_toggle_new();
        g_object_set(renderer, 
                     "radio", FALSE, 
@@ -1534,6 +1514,7 @@ static void account_create_list_view_columns(GtkWidget *list_view)
        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);          
        
@@ -1541,6 +1522,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);           
        
@@ -1548,6 +1530,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);           
 }
@@ -1663,20 +1646,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;
 }