From 059b783b0dc8887844b52226a714f02eebea4bbf Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Mon, 9 Feb 2015 11:39:04 -0200 Subject: [PATCH] source-dialog: lazy set the GcalManager instance No signals are connected. --- src/gcal-source-dialog.c | 19 +++++++++++++++++++ src/gcal-source-dialog.h | 5 ++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c index e8bbf6fa..036f3265 100644 --- a/src/gcal-source-dialog.c +++ b/src/gcal-source-dialog.c @@ -110,3 +110,22 @@ gcal_source_dialog_init (GcalSourceDialog *self) gtk_widget_init_template (GTK_WIDGET (self)); } + +/** + * gcal_source_dialog_set_manager: + * + * Setup the {@link GcalManager} singleton + * instance of the application. + * + * Returns: + */ +void +gcal_source_dialog_set_manager (GcalSourceDialog *dialog, + GcalManager *manager) +{ + GcalSourceDialogPrivate *priv = dialog->priv; + + priv->manager = manager; + + /* TODO: connect ::source-added & ::source-removed signals */ +} diff --git a/src/gcal-source-dialog.h b/src/gcal-source-dialog.h index 8b074f3e..4c8d58b0 100644 --- a/src/gcal-source-dialog.h +++ b/src/gcal-source-dialog.h @@ -36,7 +36,10 @@ struct _GcalSourceDialogClass GtkDialogClass parent; }; -GcalSourceDialog* gcal_source_dialog_new (void); +GcalSourceDialog* gcal_source_dialog_new (void); + +void gcal_source_dialog_set_manager (GcalSourceDialog *dialog, + GcalManager *manager); G_END_DECLS