aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/alarm-list-dialog.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2006-01-28 01:33:17 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2006-01-28 01:33:17 +0800
commitec5a2a17d6c2db4ea2381f8714c97734dd2afbd3 (patch)
treed500c582798f076efb330c4ab1dc037f0866bfb1 /calendar/gui/dialogs/alarm-list-dialog.c
parent45f799eb8632142a31d1dbf3572c2672bb36c747 (diff)
downloadgsoc2013-evolution-ec5a2a17d6c2db4ea2381f8714c97734dd2afbd3.tar
gsoc2013-evolution-ec5a2a17d6c2db4ea2381f8714c97734dd2afbd3.tar.gz
gsoc2013-evolution-ec5a2a17d6c2db4ea2381f8714c97734dd2afbd3.tar.bz2
gsoc2013-evolution-ec5a2a17d6c2db4ea2381f8714c97734dd2afbd3.tar.lz
gsoc2013-evolution-ec5a2a17d6c2db4ea2381f8714c97734dd2afbd3.tar.xz
gsoc2013-evolution-ec5a2a17d6c2db4ea2381f8714c97734dd2afbd3.tar.zst
gsoc2013-evolution-ec5a2a17d6c2db4ea2381f8714c97734dd2afbd3.zip
Changed the layout of the alarm dialog.
svn path=/trunk/; revision=31329
Diffstat (limited to 'calendar/gui/dialogs/alarm-list-dialog.c')
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.c44
1 files changed, 44 insertions, 0 deletions
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;
+}