diff options
Diffstat (limited to 'calendar/gui/e-task-shell-view.c')
-rw-r--r-- | calendar/gui/e-task-shell-view.c | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/calendar/gui/e-task-shell-view.c b/calendar/gui/e-task-shell-view.c index 526769234f..798d868910 100644 --- a/calendar/gui/e-task-shell-view.c +++ b/calendar/gui/e-task-shell-view.c @@ -20,10 +20,32 @@ #include "e-task-shell-view-private.h" +enum { + PROP_0, + PROP_SOURCE_LIST +}; + GType e_task_shell_view_type = 0; static gpointer parent_class; static void +task_shell_view_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + switch (property_id) { + case PROP_SOURCE_LIST: + g_value_set_object ( + value, e_task_shell_view_get_source_list ( + E_TASK_SHELL_VIEW (object))); + return; + } + + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +} + +static void task_shell_view_dispose (GObject *object) { e_task_shell_view_private_dispose (E_TASK_SHELL_VIEW (object)); @@ -75,6 +97,7 @@ task_shell_view_class_init (ETaskShellView *class, g_type_class_add_private (class, sizeof (ETaskShellViewPrivate)); object_class = G_OBJECT_CLASS (class); + object_class->get_property = task_shell_view_get_property; object_class->dispose = task_shell_view_dispose; object_class->finalize = task_shell_view_finalize; object_class->constructed = task_shell_view_constructed; @@ -84,15 +107,26 @@ task_shell_view_class_init (ETaskShellView *class, shell_view_class->icon_name = "evolution-tasks"; shell_view_class->type_module = type_module; shell_view_class->changed = task_shell_view_changed; + + g_object_class_install_property ( + object_class, + PROP_SOURCE_LIST, + g_param_spec_object ( + "source-list", + _("Source List"), + _("The registry of task lists"), + E_TYPE_SOURCE_LIST, + G_PARAM_READABLE)); } static void -task_shell_view_init (ETaskShellView *task_shell_view) +task_shell_view_init (ETaskShellView *task_shell_view, + EShellViewClass *shell_view_class) { task_shell_view->priv = E_TASK_SHELL_VIEW_GET_PRIVATE (task_shell_view); - e_task_shell_view_private_init (task_shell_view); + e_task_shell_view_private_init (task_shell_view, shell_view_class); } GType @@ -120,3 +154,11 @@ e_task_shell_view_get_type (GTypeModule *type_module) return e_task_shell_view_type; } + +ESourceList * +e_task_shell_view_get_source_list (ETaskShellView *task_shell_view) +{ + g_return_val_if_fail (E_IS_TASK_SHELL_VIEW (task_shell_view), NULL); + + return task_shell_view->priv->source_list; +} |