From 36ee4fbe0b2c475a5e55929266cc97272cde430a Mon Sep 17 00:00:00 2001 From: Mandrake Date: Fri, 3 Mar 2000 23:06:35 +0000 Subject: [PATCH] another patch from "Jerome De Greef" now save & quit works. SVN revision: 2178 --- viewer.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/viewer.c b/viewer.c index 4c9e8bc..7954dcf 100644 --- a/viewer.c +++ b/viewer.c @@ -521,6 +521,13 @@ on_exit_application(GtkWidget * widget, gpointer user_data) } +void +on_save_and_exit_application(GtkWidget * widget, gpointer user_data) +{ + on_save_data(widget, user_data); + on_exit_application(widget, user_data); +} + GtkWidget * create_list_window(void) { @@ -567,6 +574,8 @@ create_list_window(void) GTK_SIGNAL_FUNC(on_save_data),NULL); menuitem = CreateMenuItem(menu,"Save & Quit","", "Save Current Data & Quit Application",NULL, "save quit"); + gtk_signal_connect(GTK_OBJECT(menuitem),"activate", + GTK_SIGNAL_FUNC(on_save_and_exit_application),NULL); menuitem = CreateMenuItem(menu,"Quit","","Quit Without Saving",NULL, "quit program"); gtk_signal_connect(GTK_OBJECT(menuitem),"activate",