aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/eventedit.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>1998-04-26 11:22:37 +0800
committerHavoc Pennington <hp@src.gnome.org>1998-04-26 11:22:37 +0800
commit5d80262bb53f00a69aacc16720034d403f6c6b5f (patch)
tree66982f745669ba13624d6cdd15094bbd8707c71f /calendar/gui/eventedit.c
parent95b6ff339e69befec13b7a5f3831d1b74db0d87e (diff)
downloadgsoc2013-evolution-5d80262bb53f00a69aacc16720034d403f6c6b5f.tar
gsoc2013-evolution-5d80262bb53f00a69aacc16720034d403f6c6b5f.tar.gz
gsoc2013-evolution-5d80262bb53f00a69aacc16720034d403f6c6b5f.tar.bz2
gsoc2013-evolution-5d80262bb53f00a69aacc16720034d403f6c6b5f.tar.lz
gsoc2013-evolution-5d80262bb53f00a69aacc16720034d403f6c6b5f.tar.xz
gsoc2013-evolution-5d80262bb53f00a69aacc16720034d403f6c6b5f.tar.zst
gsoc2013-evolution-5d80262bb53f00a69aacc16720034d403f6c6b5f.zip
Descend from GnomeDialog. Took vbox out of class structure; use
Sat Apr 25 22:20:45 1998 Havoc Pennington <hp@pobox.com> * eventedit.c, eventedit.h: Descend from GnomeDialog. Took vbox out of class structure; use GnomeDialog vbox instead. gnome_dialog_set_destroy instead of destroying in button callbacks. Don't create buttons, separator, or vbox manually. #include <libgnomeui/gnome-dialog.h>. svn path=/trunk/; revision=197
Diffstat (limited to 'calendar/gui/eventedit.c')
-rw-r--r--calendar/gui/eventedit.c43
1 files changed, 15 insertions, 28 deletions
diff --git a/calendar/gui/eventedit.c b/calendar/gui/eventedit.c
index e6e2ea6b55..30068867a3 100644
--- a/calendar/gui/eventedit.c
+++ b/calendar/gui/eventedit.c
@@ -21,7 +21,7 @@ static void event_editor_destroy (GtkObject *object);
/* Note: do not i18n these strings, they are part of the vCalendar protocol */
static char *class_names [] = { "PUBLIC", "PRIVATE", "CONFIDENTIAL" };
-static GtkWindowClass *parent_class;
+static GnomeDialogClass *parent_class;
struct numbered_item {
char *text;
@@ -44,7 +44,7 @@ event_editor_get_type (void)
(GtkArgSetFunc) NULL,
(GtkArgGetFunc) NULL,
};
- event_editor_type = gtk_type_unique (gtk_window_get_type (), &event_editor_info);
+ event_editor_type = gtk_type_unique (gnome_dialog_get_type (), &event_editor_info);
}
return event_editor_type;
}
@@ -54,7 +54,7 @@ event_editor_class_init (EventEditorClass *class)
{
GtkObjectClass *object_class;
- parent_class = gtk_type_class (gtk_window_get_type ());
+ parent_class = gtk_type_class (gnome_dialog_get_type ());
object_class = (GtkObjectClass*) class;
object_class->destroy = event_editor_destroy;
}
@@ -712,7 +712,6 @@ ee_ok (GtkWidget *widget, EventEditor *ee)
gnome_calendar_object_changed (ee->gnome_cal, ee->ical, CHANGE_ALL);
ee->ical->new = 0;
- gtk_widget_destroy (GTK_WIDGET (ee));
}
static void
@@ -723,25 +722,19 @@ ee_cancel (GtkWidget *widget, EventEditor *ee)
ee->ical = NULL;
}
- gtk_widget_destroy (GTK_WIDGET (ee));
}
-static GtkWidget *
+static void
ee_create_buttons (EventEditor *ee)
{
- GtkWidget *box = gtk_hbox_new (1, 5);
- GtkWidget *ok, *cancel;
-
- ok = gnome_stock_button (GNOME_STOCK_BUTTON_OK);
- cancel = gnome_stock_button (GNOME_STOCK_BUTTON_CANCEL);
-
- gtk_box_pack_start (GTK_BOX (box), ok, 0, 0, 5);
- gtk_box_pack_start (GTK_BOX (box), cancel, 0, 0, 5);
+ gnome_dialog_append_buttons(GNOME_DIALOG(ee),
+ GNOME_STOCK_BUTTON_OK,
+ GNOME_STOCK_BUTTON_CANCEL, NULL);
- gtk_signal_connect (GTK_OBJECT (ok), "clicked", GTK_SIGNAL_FUNC(ee_ok), ee);
- gtk_signal_connect (GTK_OBJECT (cancel), "clicked", GTK_SIGNAL_FUNC(ee_cancel), ee);
+ gnome_dialog_button_connect (GNOME_DIALOG (ee), 0, GTK_SIGNAL_FUNC(ee_ok), ee);
+ gnome_dialog_button_connect (GNOME_DIALOG (ee), 1, GTK_SIGNAL_FUNC(ee_cancel), ee);
- return box;
+ return;
}
/*
@@ -1424,24 +1417,17 @@ ee_init_recurrence_page (EventEditor *ee)
static void
event_editor_init_widgets (EventEditor *ee)
-{
- ee->vbox = gtk_vbox_new (0, 0);
- gtk_container_add (GTK_CONTAINER (ee), ee->vbox);
- gtk_container_border_width (GTK_CONTAINER (ee), 5);
-
+{
ee->notebook = gtk_notebook_new ();
- gtk_box_pack_start (GTK_BOX (ee->vbox), ee->notebook, 1, 1, 0);
+ gtk_box_pack_start (GTK_BOX (GNOME_DIALOG(ee)->vbox), ee->notebook, 1, 1, 0);
/* Init the various configuration pages */
ee_init_general_page (ee);
ee_init_summary_page (ee);
ee_init_recurrence_page (ee);
-
- /* Separator */
- gtk_box_pack_start (GTK_BOX (ee->vbox), gtk_hseparator_new (), 0, 0, 0);
-
+
/* Buttons */
- gtk_box_pack_start (GTK_BOX (ee->vbox), ee_create_buttons (ee), 0, 0, 5);
+ ee_create_buttons(ee);
/* We show all of the contained widgets */
gtk_widget_show_all (GTK_BIN (ee)->child);
@@ -1451,6 +1437,7 @@ static void
event_editor_init (EventEditor *ee)
{
ee->ical = 0;
+ gnome_dialog_set_destroy(GNOME_DIALOG(ee), TRUE);
}
static void