From ec5a2a17d6c2db4ea2381f8714c97734dd2afbd3 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Fri, 27 Jan 2006 17:33:17 +0000 Subject: Changed the layout of the alarm dialog. svn path=/trunk/; revision=31329 --- calendar/gui/dialogs/alarm-list-dialog.c | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'calendar/gui/dialogs/alarm-list-dialog.c') diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c index 01ef06abfe..f1cacfa159 100644 --- a/calendar/gui/dialogs/alarm-list-dialog.c +++ b/calendar/gui/dialogs/alarm-list-dialog.c @@ -66,6 +66,8 @@ typedef struct { GtkWidget *list; GtkWidget *add; GtkWidget *delete; + GtkWidget *box; + } Dialog; /* Gets the widgets from the XML file and returns TRUE if they are all available. */ @@ -78,6 +80,7 @@ get_widgets (Dialog *dialog) if (!dialog->toplevel) return FALSE; + dialog->box = GW ("vbox53"); dialog->list = GW ("list"); dialog->add = GW ("add"); dialog->delete = GW ("delete"); @@ -266,3 +269,44 @@ alarm_list_dialog_run (GtkWidget *parent, ECal *ecal, EAlarmList *list_store) return response_id == GTK_RESPONSE_OK ? TRUE : FALSE; } + +GtkWidget * +alarm_list_dialog_peek (ECal *ecal, EAlarmList *list_store) +{ + Dialog *dialog; + int response_id; + GList *icon_list; + char *gladefile; + + dialog = (Dialog *)g_new (Dialog, 1); + dialog->ecal = ecal; + dialog->list_store = list_store; + + gladefile = g_build_filename (EVOLUTION_GLADEDIR, + "alarm-list-dialog.glade", + NULL); + dialog->xml = glade_xml_new (gladefile, NULL, NULL); + g_free (gladefile); + + if (!dialog->xml) { + g_message (G_STRLOC ": Could not load the Glade XML file!"); + return FALSE; + } + + if (!get_widgets (dialog)) { + g_object_unref(dialog->xml); + return FALSE; + } + + init_widgets (dialog); + + sensitize_buttons (dialog); + + g_object_unref (dialog->xml); + + /* Free the other stuff when the parent really gets destroyed. */ + g_object_set_data_full (dialog->box, "toplevel", dialog->toplevel, gtk_widget_destroy); + g_object_set_data_full (dialog->box, "dialog", dialog, g_free); + + return dialog->box; +} -- cgit v1.2.3