[gnome-todo/wip/lists] task-list, manager: use TASK_LIST extension, not CALENDAR



commit 4ee623e306fbeb59c63b8708fdc18971bc438538
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Jun 15 10:31:21 2015 -0300

    task-list, manager: use TASK_LIST extension, not CALENDAR

 src/gtd-manager.c   |    2 +-
 src/gtd-task-list.c |   13 +++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/src/gtd-manager.c b/src/gtd-manager.c
index 470f9a2..8dce9a9 100644
--- a/src/gtd-manager.c
+++ b/src/gtd-manager.c
@@ -713,7 +713,7 @@ gtd_manager__source_registry_finish_cb (GObject      *source_object,
       /* Mark for skip also currently disabled sources */
       e_credentials_prompter_set_auto_prompt_disabled_for (priv->credentials_prompter,
                                                            source,
-                                                           !e_source_has_extension (source, 
E_SOURCE_EXTENSION_CALENDAR));
+                                                           !e_source_has_extension (source, 
E_SOURCE_EXTENSION_TASK_LIST));
     }
 
   g_list_free_full (sources, g_object_unref);
diff --git a/src/gtd-task-list.c b/src/gtd-task-list.c
index 837472c..373cbe4 100644
--- a/src/gtd-task-list.c
+++ b/src/gtd-task-list.c
@@ -64,6 +64,8 @@ gtd_task_list_finalize (GObject *object)
 {
   GtdTaskList *self = (GtdTaskList*) object;
 
+  g_clear_pointer (&self->priv->origin, g_free);
+
   G_OBJECT_CLASS (gtd_task_list_parent_class)->finalize (object);
 }
 
@@ -290,7 +292,7 @@ gtd_task_list_get_color (GtdTaskList *list)
   g_return_val_if_fail (GTD_IS_TASK_LIST (list), NULL);
   g_return_val_if_fail (E_IS_SOURCE (list->priv->source), NULL);
 
-  selectable = E_SOURCE_SELECTABLE (e_source_get_extension (list->priv->source, 
E_SOURCE_EXTENSION_CALENDAR));
+  selectable = E_SOURCE_SELECTABLE (e_source_get_extension (list->priv->source, 
E_SOURCE_EXTENSION_TASK_LIST));
 
   if (!gdk_rgba_parse (&color, e_source_selectable_get_color (selectable)))
     gdk_rgba_parse (&color, "#ffffff"); /* calendar default colour */
@@ -298,6 +300,13 @@ gtd_task_list_get_color (GtdTaskList *list)
   return gdk_rgba_copy (&color);
 }
 
+/**
+ * gtd_task_list_set_color:
+ *
+ * sets the color of @list.
+ *
+ * Returns:
+ */
 void
 gtd_task_list_set_color (GtdTaskList   *list,
                          const GdkRGBA *color)
@@ -313,7 +322,7 @@ gtd_task_list_set_color (GtdTaskList   *list,
       ESourceSelectable *selectable;
       gchar *color_str;
 
-      selectable = E_SOURCE_SELECTABLE (e_source_get_extension (list->priv->source, 
E_SOURCE_EXTENSION_CALENDAR));
+      selectable = E_SOURCE_SELECTABLE (e_source_get_extension (list->priv->source, 
E_SOURCE_EXTENSION_TASK_LIST));
       color_str = gdk_rgba_to_string (color);
 
       e_source_selectable_set_color (selectable, color_str);


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