[evolution/gnome-3-4] Bug #559815 - Empty Reminders editor when opened second time



commit c0d422b3eaac695c77a87f72769bb96e0d1bfb04
Author: Milan Crha <mcrha redhat com>
Date:   Wed Aug 8 12:01:46 2012 +0200

    Bug #559815 - Empty Reminders editor when opened second time

 calendar/gui/dialogs/event-page.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 41b894e..04d7f25 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -914,6 +914,11 @@ event_page_dispose (GObject *object)
 		priv->sod = NULL;
 	}
 
+	if (priv->alarm_dialog) {
+		gtk_widget_destroy (priv->alarm_dialog);
+		priv->alarm_dialog = NULL;
+	}
+
 	/* Chain up to parent's dispose() method. */
 	G_OBJECT_CLASS (event_page_parent_class)->dispose (object);
 }
@@ -3188,6 +3193,15 @@ alarm_custom_clicked_cb (GtkWidget *widget,
 }
 #endif
 
+static gboolean
+alarm_dialog_delete_event_cb (GtkWidget *alarm_dialog)
+{
+	gtk_widget_hide (alarm_dialog);
+
+	/* stop processing other handlers */
+	return TRUE;
+}
+
 /* Hooks the widget signals */
 static gboolean
 init_widgets (EventPage *epage)
@@ -3329,7 +3343,7 @@ init_widgets (EventPage *epage)
 		G_CALLBACK (gtk_widget_hide), priv->alarm_dialog);
 	g_signal_connect (
 		priv->alarm_dialog, "delete-event",
-		G_CALLBACK (gtk_widget_hide), priv->alarm_dialog);
+		G_CALLBACK (alarm_dialog_delete_event_cb), priv->alarm_dialog);
 	priv->alarm_list_dlg_widget = alarm_list_dialog_peek (client, priv->alarm_list_store);
 	gtk_widget_reparent (priv->alarm_list_dlg_widget, priv->alarm_box);
 	gtk_widget_show_all (priv->alarm_list_dlg_widget);



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