edit-dialog: update source color on selection

This commit is contained in:
Georges Basile Stavracas Neto
2014-12-05 17:22:03 -02:00
parent dd17c45167
commit 20575b928f
+10
View File
@@ -185,6 +185,16 @@ on_calendar_selected (GtkWidget *menu_item,
if (g_strcmp0 (e_source_get_uid (source), uid) == 0)
{
GdkRGBA color;
ESourceSelectable *extension;
/* retrieve color */
extension = E_SOURCE_SELECTABLE (e_source_get_extension (source, E_SOURCE_EXTENSION_CALENDAR));
gdk_rgba_parse (&color, e_source_selectable_get_color (E_SOURCE_SELECTABLE (extension)));
gtk_image_set_from_pixbuf (GTK_IMAGE (priv->source_image),
gcal_get_pixbuf_from_color (&color, 16));
priv->source = source;
gtk_header_bar_set_subtitle (GTK_HEADER_BAR (priv->titlebar),
e_source_get_display_name (priv->source));