diff options
Diffstat (limited to 'calendar/gui/e-memo-shell-view.c')
-rw-r--r-- | calendar/gui/e-memo-shell-view.c | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/calendar/gui/e-memo-shell-view.c b/calendar/gui/e-memo-shell-view.c index c6ece950f0..6b9032bb17 100644 --- a/calendar/gui/e-memo-shell-view.c +++ b/calendar/gui/e-memo-shell-view.c @@ -20,10 +20,32 @@ #include "e-memo-shell-view-private.h" +enum { + PROP_0, + PROP_SOURCE_LIST +}; + GType e_memo_shell_view_type = 0; static gpointer parent_class; static void +memo_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_memo_shell_view_get_source_list ( + E_MEMO_SHELL_VIEW (object))); + return; + } + + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +} + +static void memo_shell_view_dispose (GObject *object) { e_memo_shell_view_private_dispose (E_MEMO_SHELL_VIEW (object)); @@ -75,6 +97,7 @@ memo_shell_view_class_init (EMemoShellView *class, g_type_class_add_private (class, sizeof (EMemoShellViewPrivate)); object_class = G_OBJECT_CLASS (class); + object_class->get_property = memo_shell_view_get_property; object_class->dispose = memo_shell_view_dispose; object_class->finalize = memo_shell_view_finalize; object_class->constructed = memo_shell_view_constructed; @@ -84,15 +107,26 @@ memo_shell_view_class_init (EMemoShellView *class, shell_view_class->icon_name = "evolution-memos"; shell_view_class->type_module = type_module; shell_view_class->changed = memo_shell_view_changed; + + g_object_class_install_property ( + object_class, + PROP_SOURCE_LIST, + g_param_spec_object ( + "source-list", + _("Source List"), + _("The registry of memo lists"), + E_TYPE_SOURCE_LIST, + G_PARAM_READABLE)); } static void -memo_shell_view_init (EMemoShellView *memo_shell_view) +memo_shell_view_init (EMemoShellView *memo_shell_view, + EShellViewClass *shell_view_class) { memo_shell_view->priv = E_MEMO_SHELL_VIEW_GET_PRIVATE (memo_shell_view); - e_memo_shell_view_private_init (memo_shell_view); + e_memo_shell_view_private_init (memo_shell_view, shell_view_class); } GType @@ -120,3 +154,11 @@ e_memo_shell_view_get_type (GTypeModule *type_module) return e_memo_shell_view_type; } + +ESourceList * +e_memo_shell_view_get_source_list (EMemoShellView *memo_shell_view) +{ + g_return_val_if_fail (E_IS_MEMO_SHELL_VIEW (memo_shell_view), NULL); + + return memo_shell_view->priv->source_list; +} |