[gnome-calendar] edit-dialog: update source color on selection



commit 20575b928f9395f8fceb3890d1ccc92918811227
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Dec 5 17:22:03 2014 -0200

    edit-dialog: update source color on selection

 src/gcal-edit-dialog.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c
index 0969c1b..3903786 100644
--- a/src/gcal-edit-dialog.c
+++ b/src/gcal-edit-dialog.c
@@ -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));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]