diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 1998-04-18 12:22:57 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1998-04-18 12:22:57 +0800 |
commit | d4f4dc26fcc04d8020812444763a38049a04beff (patch) | |
tree | 0b2f43ed018b15e32abb9fe53b87a68c36e070ae /calendar/gui/main.c | |
parent | f1b08663ddff6432289ca4780bc823c96d471657 (diff) | |
download | gsoc2013-evolution-d4f4dc26fcc04d8020812444763a38049a04beff.tar.gz gsoc2013-evolution-d4f4dc26fcc04d8020812444763a38049a04beff.tar.zst gsoc2013-evolution-d4f4dc26fcc04d8020812444763a38049a04beff.zip |
Usability fixes -mig
svn path=/trunk/; revision=156
Diffstat (limited to 'calendar/gui/main.c')
-rw-r--r-- | calendar/gui/main.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/calendar/gui/main.c b/calendar/gui/main.c index ff4fc370a9..e4dfdf77b9 100644 --- a/calendar/gui/main.c +++ b/calendar/gui/main.c @@ -130,6 +130,7 @@ display_objedit (GtkWidget *widget, GnomeCalendar *gcal) void close_cmd (GtkWidget *widget, GnomeCalendar *gcal) { + all_calendars = g_list_remove (all_calendars, gcal); if (gcal->cal->modified){ if (!gcal->cal->filename) save_calendar_cmd (widget, gcal); @@ -137,9 +138,8 @@ close_cmd (GtkWidget *widget, GnomeCalendar *gcal) calendar_save (gcal->cal, gcal->cal->filename); } - gtk_widget_destroy (GTK_WIDGET (gcal)); +/* gtk_widget_destroy (GTK_WIDGET (gcal)); */ active_calendars--; - all_calendars = g_list_remove (all_calendars, gcal); if (active_calendars == 0) gtk_main_quit (); @@ -218,7 +218,14 @@ save_ok (GtkWidget *widget, GtkFileSelection *fs) gcal->cal->filename = g_strdup (gtk_file_selection_get_filename (fs)); calendar_save (gcal->cal, gcal->cal->filename); - gtk_widget_destroy (GTK_WIDGET (fs)); + gtk_main_quit (); +} + +static gint +close_save (GtkWidget *w) +{ + gtk_main_quit (); + return TRUE; } void @@ -233,11 +240,15 @@ save_calendar_cmd (GtkWidget *widget, void *data) (GtkSignalFunc) save_ok, fs); gtk_signal_connect_object (GTK_OBJECT (fs->cancel_button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, + (GtkSignalFunc) close_save, + GTK_OBJECT (fs)); + gtk_signal_connect_object (GTK_OBJECT (fs), "delete_event", + GTK_SIGNAL_FUNC (close_save), GTK_OBJECT (fs)); - gtk_widget_show (GTK_WIDGET (fs)); gtk_grab_add (GTK_WIDGET (fs)); /* Yes, it is modal, so sue me even more */ + gtk_main (); + gtk_widget_destroy (GTK_WIDGET (fs)); } GnomeUIInfo gnome_cal_file_menu [] = { |