[gnome-calendar/calendar-management] sources-dialog: add a hash table private field
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/calendar-management] sources-dialog: add a hash table private field
- Date: Thu, 15 Jan 2015 20:40:16 +0000 (UTC)
commit ea943b2a51d7a706dc1142410c879af7da461ac5
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Jan 15 06:45:11 2015 -0200
sources-dialog: add a hash table private field
src/gcal-source-manager-dialog.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-source-manager-dialog.c b/src/gcal-source-manager-dialog.c
index 7cf88cd..7a4fdcc 100644
--- a/src/gcal-source-manager-dialog.c
+++ b/src/gcal-source-manager-dialog.c
@@ -22,8 +22,17 @@
struct _GcalSourceManagerDialogPrivate
{
- GtkWidget *headerbar;
GtkWidget *add_button;
+ GtkWidget *headerbar;
+ GtkWidget *sources_listbox;
+
+ /*
+ * Hash of GtkListBoxRow : ESource
+ */
+ GHashTable *row_to_source;
+
+
+ /* properties */
GcalManager *manager; /* weak ref */
};
@@ -123,6 +132,7 @@ gcal_source_manager_dialog_class_init (GcalSourceManagerDialogClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GcalSourceManagerDialog, add_button);
gtk_widget_class_bind_template_child_private (widget_class, GcalSourceManagerDialog, headerbar);
+ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceManagerDialog, sources_listbox);
}
static void
@@ -153,5 +163,11 @@ gcal_source_manager_dialog_constructed (GObject *object)
static void
gcal_source_manager_dialog_init (GcalSourceManagerDialog *self)
{
+ GcalSourceManagerDialogPrivate *priv;
+
+ priv = gcal_source_manager_dialog_get_instance_private (self);
+
+ priv->row_to_source = g_hash_table_new_full (g_direct_hash, g_direct_equal, gtk_widget_destroy, NULL);
+
gtk_widget_init_template (GTK_WIDGET (self));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]