aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-02-01 06:26:24 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-02-01 06:39:05 +0800
commite6a149efcee2aa45a4956d1e1da0e8f0b35b4cc7 (patch)
tree938fc2a956f5486e656b3500c505f73dd5beb509 /mail
parentfd43cd692ad12e7f9c70386c1b0867b16f9ec15d (diff)
downloadgsoc2013-evolution-e6a149efcee2aa45a4956d1e1da0e8f0b35b4cc7.tar.gz
gsoc2013-evolution-e6a149efcee2aa45a4956d1e1da0e8f0b35b4cc7.tar.zst
gsoc2013-evolution-e6a149efcee2aa45a4956d1e1da0e8f0b35b4cc7.zip
EMailAccountStore: Use an appropriate icon for online accounts.
Use "goa-panel" for GOA, "credentials-preferences" for UOA. Also move the icon before the account name. Looks better.
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-account-store.c9
-rw-r--r--mail/e-mail-account-store.h1
-rw-r--r--mail/e-mail-account-tree-view.c22
3 files changed, 22 insertions, 10 deletions
diff --git a/mail/e-mail-account-store.c b/mail/e-mail-account-store.c
index cb1f4e000d..ed635f9b61 100644
--- a/mail/e-mail-account-store.c
+++ b/mail/e-mail-account-store.c
@@ -978,6 +978,7 @@ e_mail_account_store_init (EMailAccountStore *store)
types[ii++] = G_TYPE_BOOLEAN; /* COLUMN_DEFAULT */
types[ii++] = G_TYPE_STRING; /* COLUMN_BACKEND_NAME */
types[ii++] = G_TYPE_STRING; /* COLUMN_DISPLAY_NAME */
+ types[ii++] = G_TYPE_STRING; /* COLUMN_ICON_NAME */
types[ii++] = G_TYPE_BOOLEAN; /* COLUMN_ONLINE_ACCOUNT */
types[ii++] = G_TYPE_BOOLEAN; /* COLUMN_ENABLED_VISIBLE */
@@ -1110,6 +1111,7 @@ e_mail_account_store_add_service (EMailAccountStore *store,
ESource *source;
GtkTreeIter iter;
const gchar *filename;
+ const gchar *icon_name = NULL;
const gchar *uid;
gboolean builtin;
gboolean enabled;
@@ -1151,6 +1153,9 @@ e_mail_account_store_add_service (EMailAccountStore *store,
if (e_source_has_extension (collection, extension_name)) {
online_account = TRUE;
enabled_visible = FALSE;
+
+ /* Provided by gnome-control-center-data. */
+ icon_name = "goa-panel";
}
/* Check for Ubuntu Online Accounts linkage. */
@@ -1158,6 +1163,9 @@ e_mail_account_store_add_service (EMailAccountStore *store,
if (e_source_has_extension (collection, extension_name)) {
online_account = TRUE;
enabled_visible = FALSE;
+
+ /* Provided by gnome-control-center-signon. */
+ icon_name = "credentials-preferences";
}
g_object_unref (collection);
@@ -1186,6 +1194,7 @@ e_mail_account_store_add_service (EMailAccountStore *store,
E_MAIL_ACCOUNT_STORE_COLUMN_SERVICE, service,
E_MAIL_ACCOUNT_STORE_COLUMN_BUILTIN, builtin,
E_MAIL_ACCOUNT_STORE_COLUMN_ENABLED, enabled,
+ E_MAIL_ACCOUNT_STORE_COLUMN_ICON_NAME, icon_name,
E_MAIL_ACCOUNT_STORE_COLUMN_ONLINE_ACCOUNT, online_account,
E_MAIL_ACCOUNT_STORE_COLUMN_ENABLED_VISIBLE, enabled_visible,
-1);
diff --git a/mail/e-mail-account-store.h b/mail/e-mail-account-store.h
index 5bd696e051..59fa54ba19 100644
--- a/mail/e-mail-account-store.h
+++ b/mail/e-mail-account-store.h
@@ -53,6 +53,7 @@ typedef enum {
E_MAIL_ACCOUNT_STORE_COLUMN_DEFAULT,
E_MAIL_ACCOUNT_STORE_COLUMN_BACKEND_NAME,
E_MAIL_ACCOUNT_STORE_COLUMN_DISPLAY_NAME,
+ E_MAIL_ACCOUNT_STORE_COLUMN_ICON_NAME,
E_MAIL_ACCOUNT_STORE_COLUMN_ONLINE_ACCOUNT,
E_MAIL_ACCOUNT_STORE_COLUMN_ENABLED_VISIBLE,
E_MAIL_ACCOUNT_STORE_NUM_COLUMNS
diff --git a/mail/e-mail-account-tree-view.c b/mail/e-mail-account-tree-view.c
index 424294bf86..8e36a899ec 100644
--- a/mail/e-mail-account-tree-view.c
+++ b/mail/e-mail-account-tree-view.c
@@ -108,24 +108,26 @@ mail_account_tree_view_constructed (GObject *object)
gtk_tree_view_column_set_expand (column, TRUE);
gtk_tree_view_column_set_title (column, _("Account Name"));
- cell_renderer = gtk_cell_renderer_text_new ();
- g_object_set (cell_renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
+ cell_renderer = gtk_cell_renderer_pixbuf_new ();
+ g_object_set (cell_renderer, "stock-size", GTK_ICON_SIZE_MENU, NULL);
gtk_tree_view_column_pack_start (column, cell_renderer, FALSE);
gtk_tree_view_column_add_attribute (
- column, cell_renderer, "text",
- E_MAIL_ACCOUNT_STORE_COLUMN_DISPLAY_NAME);
-
- cell_renderer = gtk_cell_renderer_pixbuf_new ();
- g_object_set (
- cell_renderer, "icon-name", "goa-panel",
- "stock-size", GTK_ICON_SIZE_MENU, NULL);
- gtk_tree_view_column_pack_start (column, cell_renderer, FALSE);
+ column, cell_renderer, "icon-name",
+ E_MAIL_ACCOUNT_STORE_COLUMN_ICON_NAME);
gtk_tree_view_column_add_attribute (
column, cell_renderer, "visible",
E_MAIL_ACCOUNT_STORE_COLUMN_ONLINE_ACCOUNT);
+ cell_renderer = gtk_cell_renderer_text_new ();
+ g_object_set (cell_renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
+ gtk_tree_view_column_pack_start (column, cell_renderer, FALSE);
+
+ gtk_tree_view_column_add_attribute (
+ column, cell_renderer, "text",
+ E_MAIL_ACCOUNT_STORE_COLUMN_DISPLAY_NAME);
+
/* This renderer is just an empty space filler. */
cell_renderer = gtk_cell_renderer_pixbuf_new ();
gtk_tree_view_column_pack_start (column, cell_renderer, TRUE);