[gnome-calendar/time-selector] time-selector: ref builder objects before destroying it
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/time-selector] time-selector: ref builder objects before destroying it
- Date: Wed, 17 Dec 2014 15:37:37 +0000 (UTC)
commit b521bdf87a59535abffdf47974cffbb3bc4c4c9f
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Dec 17 13:37:23 2014 -0200
time-selector: ref builder objects before destroying it
Fixes the annoying bug
src/gcal-time-selector.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-time-selector.c b/src/gcal-time-selector.c
index 43dde63..d1070c9 100644
--- a/src/gcal-time-selector.c
+++ b/src/gcal-time-selector.c
@@ -29,6 +29,7 @@ struct _GcalTimeSelectorPrivate
GtkWidget *hour_spin;
GtkWidget *minute_spin;
GtkWidget *period_check;
+ GtkWidget *period_combo;
gboolean format_24h;
};
@@ -133,10 +134,19 @@ gcal_time_selector_constructed (GObject *object)
builder = gtk_builder_new ();
gtk_builder_add_from_resource (builder, "/org/gnome/calendar/time-selector.ui", NULL);
- grid = (GtkWidget*) gtk_builder_get_object (builder, "grid");
priv->popover = gtk_popover_new (GTK_WIDGET (object));
+
+ grid = (GtkWidget*) gtk_builder_get_object (builder, "grid");
+ g_object_ref (grid);
+
priv->hour_spin = (GtkWidget*) gtk_builder_get_object (builder, "hour_spin");
+ g_object_ref (priv->hour_spin);
+
priv->minute_spin = (GtkWidget*) gtk_builder_get_object (builder, "minute_spin");
+ g_object_ref (priv->minute_spin);
+
+ priv->period_combo = (GtkWidget*) gtk_builder_get_object (builder, "period_combo");
+ g_object_ref (priv->period_combo);
g_object_unref (builder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]