[gnome-calendar] source-dialog: lazy set the GcalManager instance



commit 059b783b0dc8887844b52226a714f02eebea4bbf
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Feb 9 11:39:04 2015 -0200

    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 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index e8bbf6f..036f326 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 8b074f3..4c8d58b 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
 


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