diff options
author | Peter Williams <peterw@ximian.com> | 2001-08-15 00:35:14 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2001-08-15 00:35:14 +0800 |
commit | f604364042e94ed58b2cbce5746791d88e7c0776 (patch) | |
tree | 028442ae8d7c5efb9caf1cc0e809612f179d8010 /mail/mail-accounts.c | |
parent | ab1d2c34e6788db08755e68a9ae5c727668a0c06 (diff) | |
download | gsoc2013-evolution-f604364042e94ed58b2cbce5746791d88e7c0776.tar.gz gsoc2013-evolution-f604364042e94ed58b2cbce5746791d88e7c0776.tar.zst gsoc2013-evolution-f604364042e94ed58b2cbce5746791d88e7c0776.zip |
If the account is enabled, set a checkmark pixmap instead of a strange
2001-08-14 Peter Williams <peterw@ximian.com>
* mail-accounts.c (load_accounts): If the account is enabled,
set a checkmark pixmap instead of a strange plus sign.
(mail_accounts_dialog_init): Load the pixmap here.
(mail_accounts_dialog_finalise): Free it here.
* mail-accounts.h: Prototype it here.
svn path=/trunk/; revision=12017
Diffstat (limited to 'mail/mail-accounts.c')
-rw-r--r-- | mail/mail-accounts.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c index e8e692d8ef..f7b371a498 100644 --- a/mail/mail-accounts.c +++ b/mail/mail-accounts.c @@ -45,6 +45,8 @@ #include "mail-send-recv.h" #include "mail-session.h" +#include "art/mark.xpm" + static void mail_accounts_dialog_class_init (MailAccountsDialogClass *class); static void mail_accounts_dialog_init (MailAccountsDialog *dialog); static void mail_accounts_dialog_finalise (GtkObject *obj); @@ -91,7 +93,11 @@ mail_accounts_dialog_class_init (MailAccountsDialogClass *class) static void mail_accounts_dialog_init (MailAccountsDialog *o) { - ; + GdkPixbuf *pixbuf; + + pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) mark_xpm); + gdk_pixbuf_render_pixmap_and_mask (pixbuf, &(o->mark_pixmap), &(o->mark_bitmap), 128); + gdk_pixbuf_unref (pixbuf); } static void @@ -100,7 +106,9 @@ mail_accounts_dialog_finalise (GtkObject *obj) MailAccountsDialog *dialog = (MailAccountsDialog *) obj; gtk_object_unref (GTK_OBJECT (dialog->gui)); - + gdk_pixmap_unref (dialog->mark_pixmap); + gdk_bitmap_unref (dialog->mark_bitmap); + ((GtkObjectClass *)(parent_class))->finalize (obj); } @@ -129,7 +137,7 @@ load_accounts (MailAccountsDialog *dialog) else url = NULL; - text[0] = (account->source && account->source->enabled) ? "+" : ""; + text[0] = ""; text[1] = account->name; text[2] = g_strdup_printf ("%s%s", url && url->protocol ? url->protocol : _("None"), (i == default_account) ? _(" (default)") : ""); @@ -140,6 +148,11 @@ load_accounts (MailAccountsDialog *dialog) gtk_clist_append (dialog->mail_accounts, text); g_free (text[2]); + if (account->source->enabled) + gtk_clist_set_pixmap (dialog->mail_accounts, i, 0, + dialog->mark_pixmap, + dialog->mark_bitmap); + /* set the account on the row */ gtk_clist_set_row_data (dialog->mail_accounts, i, (gpointer) account); |