sync with sylpheed 0.4.66cvs6
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Mon, 7 May 2001 22:13:03 +0000 (22:13 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Mon, 7 May 2001 22:13:03 +0000 (22:13 +0000)
18 files changed:
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/account.c
src/alertpanel.c
src/export.c
src/filesel.c
src/foldersel.c
src/import.c
src/inputdialog.c
src/passphrase.c
src/prefs_account.c
src/prefs_common.c
src/prefs_filter.c
src/recv.c
src/select-keys.c
src/sigstatus.c

index 40a0086..1bd6af7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2001-05-08
+
+       * src/select-keys.c: delete_event_cb(): removed `;' from its end.
+
+2001-05-07
+
+       * src/prefs_common.c
+         src/prefs_account.c
+         src/prefs_filter.c
+         src/account.c
+         src/alertpanel.c
+         src/filesel.c
+         src/foldersel.c
+         src/export.c
+         src/import.c
+         src/inputdialog.c
+         src/passphrase.c
+         src/select-keys.c
+         src/sigstatus.c: fixed a bug that accidentally destroyed dialogs
+         when closed them with delete_event (thanks to DINH).
+         Added *_deleted() and *delete_event() which handle delete_event
+         signal correctly.
+
 2001-05-06
 
        * src/prefs_display_header.c: merged some changes from claws branch:
index 7959acf..39c6582 100644 (file)
@@ -1,3 +1,9 @@
+2001-05-07 [alfons]
+
+       0.4.66claws4
+       
+       * sync with sylpheed 0.4.66cvs6
+
 2001-05-07 [darko]
 
        * src/prefs_common.[ch]: added option to enable/disable
index b9bda37..5a805d5 100644 (file)
@@ -1,3 +1,26 @@
+2001-05-08
+
+       * src/select-keys.c: delete_event_cb(): ½ªÃ¼¤«¤é `;' ¤ò¼è¤ê½ü¤¤¤¿¡£
+
+2001-05-07
+
+       * src/prefs_common.c
+         src/prefs_account.c
+         src/prefs_filter.c
+         src/account.c
+         src/alertpanel.c
+         src/filesel.c
+         src/foldersel.c
+         src/export.c
+         src/import.c
+         src/inputdialog.c
+         src/passphrase.c
+         src/select-keys.c
+         src/sigstatus.c: delete_event ¤Ç¥À¥¤¥¢¥í¥°¤òÊĤ¸¤¿¤È¤­¤Ë¤½¤ì¤ò
+         ¸í¤Ã¤ÆÇ˲õ¤·¤Æ¤¤¤¿¥Ð¥°¤ò½¤Àµ(DINH ¤µ¤ó thanks)¡£
+         delete_event ¥·¥°¥Ê¥ë¤òÀµ¤·¤¯°·¤¦ *_deleted() ¤È *delete_event()
+         ¤òÄɲá£
+
 2001-05-06
 
        * src/prefs_display_header.c: claws ¥Ö¥é¥ó¥Á¤«¤é¤¤¤¯¤Ä¤«¤ÎÊѹ¹¤ò
index 288f5f5..5237ccc 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=4
 MICRO_VERSION=66
 INTERFACE_AGE=66
 BINARY_AGE=66
-EXTRA_VERSION=claws3
+EXTRA_VERSION=claws4
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index 79d5705..b5cd18f 100644 (file)
@@ -77,6 +77,9 @@ static void account_down              (void);
 static void account_set_default                (void);
 
 static void account_edit_close         (void);
+static gint account_delete_event       (GtkWidget      *widget,
+                                        GdkEventAny    *event,
+                                        gpointer        data);
 static void account_key_pressed                (GtkWidget      *widget,
                                         GdkEventKey    *event,
                                         gpointer        data);
@@ -357,7 +360,7 @@ static void account_edit_create(void)
        gtk_window_set_title (GTK_WINDOW (window), _("Edit accounts"));
        gtk_window_set_modal (GTK_WINDOW (window), TRUE);
        gtk_signal_connect (GTK_OBJECT (window), "delete_event",
-                           GTK_SIGNAL_FUNC (account_edit_close), NULL);
+                           GTK_SIGNAL_FUNC (account_delete_event), NULL);
        gtk_signal_connect (GTK_OBJECT (window), "key_press_event",
                            GTK_SIGNAL_FUNC (account_key_pressed), NULL);
        gtk_signal_connect (GTK_OBJECT (window), "focus_in_event",
@@ -581,6 +584,13 @@ static void account_edit_close(void)
        inc_autocheck_timer_set();
 }
 
+static gint account_delete_event(GtkWidget *widget, GdkEventAny *event,
+                                gpointer data)
+{
+       account_edit_close();
+       return TRUE;
+}
+
 static void account_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                gpointer data)
 {
index 73d322a..757af10 100644 (file)
@@ -54,6 +54,9 @@ static void alertpanel_button_toggled (GtkToggleButton *button,
                                         gpointer        data);
 static void alertpanel_button_clicked  (GtkWidget      *widget,
                                         gpointer        data);
+static gint alertpanel_deleted         (GtkWidget      *widget,
+                                        GdkEventAny    *event,
+                                        gpointer        data);
 static void alertpanel_close           (GtkWidget      *widget,
                                         GdkEventAny    *event,
                                         gpointer        data);
@@ -186,7 +189,7 @@ static void alertpanel_create(const gchar *title,
                (GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 5);
        gtk_window_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
        gtk_signal_connect(GTK_OBJECT(dialog), "delete_event",
-                          GTK_SIGNAL_FUNC(alertpanel_close),
+                          GTK_SIGNAL_FUNC(alertpanel_deleted),
                           (gpointer)G_ALERTOTHER);
        gtk_signal_connect(GTK_OBJECT(dialog), "key_press_event",
                           GTK_SIGNAL_FUNC(alertpanel_close),
@@ -295,6 +298,13 @@ static void alertpanel_button_clicked(GtkWidget *widget, gpointer data)
        value = (value & ~G_ALERT_VALUE_MASK) | (AlertValue)data;
 }
 
+static gint alertpanel_deleted(GtkWidget *widget, GdkEventAny *event,
+                              gpointer data)
+{
+       value = (value & ~G_ALERT_VALUE_MASK) | (AlertValue)data;
+       return TRUE;
+}
+
 static void alertpanel_close(GtkWidget *widget, GdkEventAny *event,
                             gpointer data)
 {
index 7020806..37586f5 100644 (file)
@@ -62,6 +62,7 @@ static void export_ok_cb(GtkWidget *widget, gpointer data);
 static void export_cancel_cb(GtkWidget *widget, gpointer data);
 static void export_srcsel_cb(GtkWidget *widget, gpointer data);
 static void export_filesel_cb(GtkWidget *widget, gpointer data);
+static gint delete_event(GtkWidget *widget, GdkEventAny *event, gpointer data);
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data);
 
 gint export_mbox(FolderItem *default_src)
@@ -124,7 +125,7 @@ static void export_create(void)
        gtk_window_set_modal(GTK_WINDOW(window), TRUE);
        gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, FALSE);
        gtk_signal_connect(GTK_OBJECT(window), "delete_event",
-                          GTK_SIGNAL_FUNC(export_cancel_cb), NULL);
+                          GTK_SIGNAL_FUNC(delete_event), NULL);
        gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
                           GTK_SIGNAL_FUNC(key_pressed), NULL);
        gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
@@ -227,6 +228,12 @@ static void export_srcsel_cb(GtkWidget *widget, gpointer data)
                gtk_entry_set_text(GTK_ENTRY(src_entry), src->path);
 }
 
+static gint delete_event(GtkWidget *widget, GdkEventAny *event, gpointer data)
+{
+       export_cancel_cb(NULL, NULL);
+       return TRUE;
+}
+
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
        if (event && event->keyval == GDK_Escape)
index 27093fc..1dd1500 100644 (file)
@@ -35,6 +35,7 @@ static gboolean filesel_ack;
 static void filesel_create(const gchar *title);
 static void filesel_ok_cb(GtkWidget *widget, gpointer data);
 static void filesel_cancel_cb(GtkWidget *widget, gpointer data);
+static gint delete_event(GtkWidget *widget, GdkEventAny *event, gpointer data);
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data);
 
 gchar *filesel_select_file(const gchar *title, const gchar *file)
@@ -98,7 +99,7 @@ static void filesel_create(const gchar *title)
                 "clicked", GTK_SIGNAL_FUNC(filesel_cancel_cb),
                 NULL);
        gtk_signal_connect(GTK_OBJECT(filesel), "delete_event",
-                          GTK_SIGNAL_FUNC(filesel_cancel_cb),
+                          GTK_SIGNAL_FUNC(delete_event),
                           NULL);
        gtk_signal_connect(GTK_OBJECT(filesel), "key_press_event",
                           GTK_SIGNAL_FUNC(key_pressed), NULL);
@@ -122,6 +123,12 @@ static void filesel_cancel_cb(GtkWidget *widget, gpointer data)
        gtk_main_quit();
 }
 
+static gint delete_event(GtkWidget *widget, GdkEventAny *event, gpointer data)
+{
+       filesel_cancel_cb(NULL, NULL);
+       return TRUE;
+}
+
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
        if (event && event->keyval == GDK_Escape)
index 22285e3..e3e79d4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999,2000 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2001 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -74,6 +74,7 @@ static void foldersel_selected(GtkCList *clist, gint row, gint column,
 static void foldersel_ok(GtkButton *button, gpointer data);
 static void foldersel_cancel(GtkButton *button, gpointer data);
 static void foldersel_activated(void);
+static gint delete_event(GtkWidget *widget, GdkEventAny *event, gpointer data);
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data);
 
 FolderItem *foldersel_folder_sel(const gchar *default_folder)
@@ -134,7 +135,7 @@ static void foldersel_create(void)
        gtk_window_set_modal(GTK_WINDOW(window), TRUE);
        gtk_window_set_policy(GTK_WINDOW(window), TRUE, TRUE, TRUE);
        gtk_signal_connect(GTK_OBJECT(window), "delete_event",
-                          GTK_SIGNAL_FUNC(foldersel_cancel), NULL);
+                          GTK_SIGNAL_FUNC(delete_event), NULL);
        gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
                           GTK_SIGNAL_FUNC(key_pressed), NULL);
        gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
@@ -283,6 +284,12 @@ static void foldersel_activated(void)
        gtk_button_clicked(GTK_BUTTON(ok_button));
 }
 
+static gint delete_event(GtkWidget *widget, GdkEventAny *event, gpointer data)
+{
+       foldersel_cancel(NULL, NULL);
+       return TRUE;
+}
+
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
        if (event && event->keyval == GDK_Escape)
index d518305..38c70c8 100644 (file)
@@ -62,6 +62,7 @@ static void import_ok_cb(GtkWidget *widget, gpointer data);
 static void import_cancel_cb(GtkWidget *widget, gpointer data);
 static void import_filesel_cb(GtkWidget *widget, gpointer data);
 static void import_destsel_cb(GtkWidget *widget, gpointer data);
+static gint delete_event(GtkWidget *widget, GdkEventAny *event, gpointer data);
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data);
 
 gint import_mbox(FolderItem *default_dest)
@@ -128,7 +129,7 @@ static void import_create(void)
        gtk_window_set_modal(GTK_WINDOW(window), TRUE);
        gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, FALSE);
        gtk_signal_connect(GTK_OBJECT(window), "delete_event",
-                          GTK_SIGNAL_FUNC(import_cancel_cb), NULL);
+                          GTK_SIGNAL_FUNC(delete_event), NULL);
        gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
                           GTK_SIGNAL_FUNC(key_pressed), NULL);
        gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
@@ -231,6 +232,12 @@ static void import_destsel_cb(GtkWidget *widget, gpointer data)
                gtk_entry_set_text(GTK_ENTRY(dest_entry), dest->path);
 }
 
+static gint delete_event(GtkWidget *widget, GdkEventAny *event, gpointer data)
+{
+       import_cancel_cb(NULL, NULL);
+       return TRUE;
+}
+
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
        if (event && event->keyval == GDK_Escape)
index b78e112..fd003ef 100644 (file)
@@ -59,6 +59,9 @@ static void ok_clicked                (GtkWidget      *widget,
                                 gpointer        data);
 static void cancel_clicked     (GtkWidget      *widget,
                                 gpointer        data);
+static gint delete_event       (GtkWidget      *widget,
+                                GdkEventAny    *event,
+                                gpointer        data);
 static void key_pressed                (GtkWidget      *widget,
                                 GdkEventKey    *event,
                                 gpointer        data);
@@ -125,7 +128,7 @@ static void input_dialog_create(void)
                (GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 5);
        gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
        gtk_signal_connect(GTK_OBJECT(dialog), "delete_event",
-                          GTK_SIGNAL_FUNC(cancel_clicked), NULL);
+                          GTK_SIGNAL_FUNC(delete_event), NULL);
        gtk_signal_connect(GTK_OBJECT(dialog), "key_press_event",
                           GTK_SIGNAL_FUNC(key_pressed), NULL);
        gtk_signal_connect(GTK_OBJECT(dialog), "focus_in_event",
@@ -196,6 +199,14 @@ static void cancel_clicked(GtkWidget *widget, gpointer data)
        gtk_main_quit();
 }
 
+static gint delete_event(GtkWidget *widget, GdkEventAny *event, gpointer data)
+{
+       ack = FALSE;
+       gtk_main_quit();
+
+       return TRUE;
+}
+
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
        if (event && event->keyval == GDK_Escape) {
index 40aea63..5b70cf5 100644 (file)
@@ -46,6 +46,8 @@ static gboolean pass_ack;
 
 static void passphrase_ok_cb(GtkWidget *widget, gpointer data);
 static void passphrase_cancel_cb(GtkWidget *widget, gpointer data);
+static gint passphrase_deleted(GtkWidget *widget, GdkEventAny *event,
+                              gpointer data);
 static void passphrase_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                   gpointer data);
 static GtkWidget *create_description (const gchar *desc);
@@ -77,7 +79,7 @@ gpgmegtk_passphrase_mbox (const gchar *desc)
     gtk_window_set_modal(GTK_WINDOW(window), TRUE);
     gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, FALSE);
     gtk_signal_connect(GTK_OBJECT(window), "delete_event",
-                       GTK_SIGNAL_FUNC(passphrase_cancel_cb), NULL);
+                       GTK_SIGNAL_FUNC(passphrase_deleted), NULL);
     gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
                        GTK_SIGNAL_FUNC(passphrase_key_pressed), NULL);
 
@@ -191,6 +193,14 @@ passphrase_cancel_cb(GtkWidget *widget, gpointer data)
 }
 
 
+static gint
+passphrase_deleted(GtkWidget *widget, GdkEventAny *event, gpointer data)
+{
+    passphrase_cancel_cb(NULL, NULL);
+    return TRUE;
+}
+
+
 static void 
 passphrase_key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
index f835032..fc7ef41 100644 (file)
@@ -314,6 +314,9 @@ static void prefs_account_privacy_create    (void);
 #endif /* USE_GPGME */
 static void prefs_account_advanced_create      (void);
 
+static gint prefs_account_deleted              (GtkWidget      *widget,
+                                                GdkEventAny    *event,
+                                                gpointer        data);
 static void prefs_account_key_pressed          (GtkWidget      *widget,
                                                 GdkEventKey    *event,
                                                 gpointer        data);
@@ -501,7 +504,7 @@ static void prefs_account_create(void)
        /* create dialog */
        prefs_dialog_create(&dialog);
        gtk_signal_connect(GTK_OBJECT(dialog.window), "delete_event",
-                          GTK_SIGNAL_FUNC(prefs_account_cancel), NULL);
+                          GTK_SIGNAL_FUNC(prefs_account_deleted), NULL);
        gtk_signal_connect(GTK_OBJECT(dialog.window), "key_press_event",
                           GTK_SIGNAL_FUNC(prefs_account_key_pressed), NULL);
        gtk_signal_connect(GTK_OBJECT(dialog.window), "focus_in_event",
@@ -1204,6 +1207,13 @@ static void prefs_account_advanced_create(void)
        advanced.domain_entry           = entry_domain;
 }
 
+static gint prefs_account_deleted(GtkWidget *widget, GdkEventAny *event,
+                                 gpointer data)
+{
+       prefs_account_cancel();
+       return TRUE;
+}
+
 static void prefs_account_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                      gpointer data)
 {
index 44ea1af..332bfd9 100644 (file)
@@ -570,6 +570,9 @@ static void prefs_font_selection_key_pressed        (GtkWidget      *widget,
                                                 gpointer        data);
 static void prefs_font_selection_ok            (GtkButton      *button);
 
+static gint prefs_common_deleted       (GtkWidget      *widget,
+                                        GdkEventAny    *event,
+                                        gpointer        data);
 static void prefs_common_key_pressed   (GtkWidget      *widget,
                                         GdkEventKey    *event,
                                         gpointer        data);
@@ -614,7 +617,7 @@ static void prefs_common_create(void)
        gtk_window_set_title (GTK_WINDOW(dialog.window),
                              _("Common Preferences"));
        gtk_signal_connect (GTK_OBJECT(dialog.window), "delete_event",
-                           GTK_SIGNAL_FUNC(prefs_common_cancel), NULL);
+                           GTK_SIGNAL_FUNC(prefs_common_deleted), NULL);
        gtk_signal_connect (GTK_OBJECT(dialog.window), "key_press_event",
                            GTK_SIGNAL_FUNC(prefs_common_key_pressed), NULL);
        gtk_signal_connect (GTK_OBJECT(dialog.window), "focus_in_event",
@@ -2478,6 +2481,13 @@ static void prefs_common_charset_set_optmenu(PrefParam *pparam)
        prefs_common_charset_set_data_from_optmenu(pparam);
 }
 
+static gint prefs_common_deleted(GtkWidget *widget, GdkEventAny *event,
+                                gpointer data)
+{
+       prefs_common_cancel();
+       return TRUE;
+}
+
 static void prefs_common_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                     gpointer data)
 {
index fbd2c5e..310c67a 100644 (file)
@@ -108,10 +108,13 @@ static void prefs_filter_select           (GtkCList       *clist,
 static void prefs_filter_dest_radio_button_toggled     (void);
 static void prefs_filter_notrecv_radio_button_toggled  (void);
 
+static gint prefs_filter_deleted       (GtkWidget      *widget,
+                                        GdkEventAny    *event,
+                                        gpointer        data);
 static void prefs_filter_key_pressed   (GtkWidget      *widget,
                                         GdkEventKey    *event,
                                         gpointer        data);
-static void prefs_filter_close         ();
+static void prefs_filter_close         (void);
 
 void prefs_filter_open(void)
 {
@@ -201,7 +204,7 @@ static void prefs_filter_create(void)
        gtk_window_set_title (GTK_WINDOW(window),
                              _("Filter setting"));
        gtk_signal_connect (GTK_OBJECT(window), "delete_event",
-                           GTK_SIGNAL_FUNC(prefs_filter_close), NULL);
+                           GTK_SIGNAL_FUNC(prefs_filter_deleted), NULL);
        gtk_signal_connect (GTK_OBJECT(window), "key_press_event",
                            GTK_SIGNAL_FUNC(prefs_filter_key_pressed), NULL);
        gtk_signal_connect (GTK_OBJECT(window), "focus_in_event",
@@ -803,6 +806,13 @@ static void prefs_filter_notrecv_radio_button_toggled(void)
        gtk_widget_set_sensitive(filter.destsel_btn, FALSE);
 }
 
+static gint prefs_filter_deleted(GtkWidget *widget, GdkEventAny *event,
+                                gpointer data)
+{
+       prefs_filter_close();
+       return TRUE;
+}
+
 static void prefs_filter_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                     gpointer data)
 {
index 9497bb7..1a0e6b4 100644 (file)
@@ -125,7 +125,7 @@ gint recv_write(SockInfo *sock, FILE *fp)
                        /* if elapsed time from previous update is greater
                           than 300 usec, update UI */
                        if (tv_cur.tv_sec - tv_prev.tv_sec > 0 ||
-                           tv_cur.tv_usec - tv_prev.tv_usec > 300) {
+                           tv_cur.tv_usec - tv_prev.tv_usec > 500) {
                                recv_ui_func(sock, bytes, recv_ui_func_data);
                                gettimeofday(&tv_prev, NULL);
                        }
index 6b8820d..638c8ae 100644 (file)
@@ -79,6 +79,8 @@ static void fill_clist (struct select_keys_s *sk, const char *pattern);
 static void create_dialog (struct select_keys_s *sk);
 static void open_dialog (struct select_keys_s *sk);
 static void close_dialog (struct select_keys_s *sk);
+static gint delete_event_cb (GtkWidget *widget,
+                             GdkEventAny *event, gpointer data);
 static void key_pressed_cb (GtkWidget *widget,
                             GdkEventKey *event, gpointer data);
 static void select_btn_cb (GtkWidget *widget, gpointer data);
@@ -270,7 +272,7 @@ create_dialog (struct select_keys_s *sk)
     gtk_window_set_title (GTK_WINDOW (window), _("Select Keys"));
     gtk_window_set_modal (GTK_WINDOW (window), TRUE);
     gtk_signal_connect (GTK_OBJECT (window), "delete_event",
-                        GTK_SIGNAL_FUNC (close_dialog), sk);
+                        GTK_SIGNAL_FUNC (delete_event_cb), sk);
     gtk_signal_connect (GTK_OBJECT (window), "key_press_event",
                         GTK_SIGNAL_FUNC (key_pressed_cb), sk);
 
@@ -364,6 +366,18 @@ close_dialog (struct select_keys_s *sk)
 }
 
 
+static gint
+delete_event_cb (GtkWidget *widget, GdkEventAny *event, gpointer data)
+{
+    struct select_keys_s *sk = data;
+
+    sk->okay = 0;
+    gtk_main_quit ();
+
+    return TRUE;
+}
+
+
 static void 
 key_pressed_cb (GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
index fe0f2dc..5a284d8 100644 (file)
@@ -77,6 +77,17 @@ static void okay_cb(GtkWidget *widget, gpointer data)
 }
 
 
+static gint delete_event(GtkWidget *widget, GdkEventAny *event, gpointer data)
+{
+        GpgmegtkSigStatus hd = data;
+
+        hd->running = 0;
+        do_destroy(hd);
+
+       return TRUE;
+}
+
+
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
         GpgmegtkSigStatus hd = data;
@@ -108,7 +119,7 @@ GpgmegtkSigStatus gpgmegtk_sig_status_create()
        gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
        gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, FALSE);
         gtk_signal_connect(GTK_OBJECT(window), "delete_event",
-                           GTK_SIGNAL_FUNC(okay_cb), hd);
+                           GTK_SIGNAL_FUNC(delete_event), hd);
         gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
                            GTK_SIGNAL_FUNC(key_pressed), hd);