diff options
author | Dan Vrátil <dvratil@redhat.com> | 2011-02-03 06:07:07 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:30 +0800 |
commit | d92cfbebd8d52cfeeb3133ab30f0e1c56ce41ed5 (patch) | |
tree | 7ef8397e347e3f17b63926856843d073da72a413 | |
parent | 9781dd4c876978b182cf007d7901765c3b9d8de8 (diff) | |
download | gsoc2013-evolution-d92cfbebd8d52cfeeb3133ab30f0e1c56ce41ed5.tar gsoc2013-evolution-d92cfbebd8d52cfeeb3133ab30f0e1c56ce41ed5.tar.gz gsoc2013-evolution-d92cfbebd8d52cfeeb3133ab30f0e1c56ce41ed5.tar.bz2 gsoc2013-evolution-d92cfbebd8d52cfeeb3133ab30f0e1c56ce41ed5.tar.lz gsoc2013-evolution-d92cfbebd8d52cfeeb3133ab30f0e1c56ce41ed5.tar.xz gsoc2013-evolution-d92cfbebd8d52cfeeb3133ab30f0e1c56ce41ed5.tar.zst gsoc2013-evolution-d92cfbebd8d52cfeeb3133ab30f0e1c56ce41ed5.zip |
Bug 222423 - Support Face headers
The configuration section for the Face plugin now has a preview image.
Also promoting this plugin out of "experimental" status so more distros
will pick it up.
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | plugins/face/face.c | 20 |
2 files changed, 11 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac index 0181d407b4..50130b7efa 100644 --- a/configure.ac +++ b/configure.ac @@ -1410,12 +1410,12 @@ plugins_base_always="calendar-file calendar-http itip-formatter default-source a plugins_base="$plugins_base_always $SA_JUNK_PLUGIN $BF_JUNK_PLUGIN" dist_plugins_base="$plugins_base_always calendar-weather sa-junk-plugin bogo-junk-plugin" -plugins_standard_always="bbdb save-calendar mail-to-task mailing-list-actions prefer-plain mail-notification attachment-reminder backup-restore email-custom-header templates vcard-inline dbx-import" +plugins_standard_always="bbdb save-calendar mail-to-task mailing-list-actions prefer-plain mail-notification attachment-reminder backup-restore email-custom-header face templates vcard-inline dbx-import" plugins_standard="$plugins_standard_always" dist_plugins_standard="$plugins_standard audio-inline image-inline pst-import" -plugins_experimental_always="face external-editor" +plugins_experimental_always="external-editor" plugins_experimental="$plugins_experimental_always $TNEF_ATTACHMENTS" dist_plugins_experimental="$plugins_experimental_always profiler tnef-attachments contacts-map" diff --git a/plugins/face/face.c b/plugins/face/face.c index 57e80832e6..576a5acfb8 100644 --- a/plugins/face/face.c +++ b/plugins/face/face.c @@ -27,7 +27,7 @@ #include "composer/e-msg-composer.h" #include <gtk/gtk.h> -#include <glib/gi18n.h> +#include <glib/gi18n-lib.h> #include <mail/em-event.h> #include <e-util/e-alert-dialog.h> #include <e-util/e-util.h> @@ -282,8 +282,8 @@ choose_new_face (void) GtkWidget *filesel, *preview; GtkFileFilter *filter; - filesel = gtk_file_chooser_dialog_new (_ - ("Select a png picture (the best 48*48 of size < 720 bytes)"), + filesel = gtk_file_chooser_dialog_new ( + _("Select a Face Picture"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, @@ -328,18 +328,15 @@ toggled_check_include_by_default_cb (GtkWidget *widget, gpointer data) } static void -click_load_face_cb (GtkButton *butt, gpointer data) +click_load_face_cb (GtkButton *butt, + GtkImage *image) { GdkPixbuf *face; - GtkWidget *img; - - img = gtk_button_get_image (butt); - g_return_if_fail (img != NULL); face = choose_new_face (); if (face) { - gtk_image_set_from_pixbuf (GTK_IMAGE (img), face); + gtk_image_set_from_pixbuf (image, face); g_object_unref (face); } } @@ -364,11 +361,12 @@ get_cfg_widget (void) g_object_unref (face); butt = gtk_button_new_with_mnemonic (_("Load new _Face picture")); - gtk_button_set_image (GTK_BUTTON (butt), img); - g_signal_connect (butt, "clicked", G_CALLBACK (click_load_face_cb), NULL); + g_signal_connect (butt, "clicked", G_CALLBACK (click_load_face_cb), img); gtk_box_pack_start (GTK_BOX (vbox), butt, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox), img, FALSE, FALSE, 0); + gtk_widget_show_all (vbox); return vbox; |