From 9559d8397d9c0ce7105430c4982f58993c35ee4e Mon Sep 17 00:00:00 2001 From: hiro Date: Thu, 17 Nov 2005 08:15:04 +0000 Subject: fixed crash when quote colors dialog was closed by the window close button. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@757 ee746299-78ed-0310-b773-934348b2243d --- ChangeLog | 5 +++++ ChangeLog.ja | 5 +++++ src/prefs_common_dialog.c | 14 ++++++++++++-- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6916bcdc..40142180 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-17 + + * src/prefs_common_dialog.c: fixed crash when quote colors dialog was + closed by the window close button. + 2005-11-17 * src/about.c: show GtkSpell in compiled-in features. diff --git a/ChangeLog.ja b/ChangeLog.ja index 09165136..67d118da 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,8 @@ +2005-11-17 + + * src/prefs_common_dialog.c: 引用色ダイアログをウィンドウのクローズ + ボタンで閉じたときにクラッシュするバグを修正。 + 2005-11-17 * src/about.c: compiled-in features に GtkSpell を表示。 diff --git a/src/prefs_common_dialog.c b/src/prefs_common_dialog.c index 2918ef07..c0b44fe6 100644 --- a/src/prefs_common_dialog.c +++ b/src/prefs_common_dialog.c @@ -550,6 +550,9 @@ static gboolean prefs_quote_description_key_pressed static void prefs_quote_colors_dialog (void); static void prefs_quote_colors_dialog_create (void); +static gint prefs_quote_colors_deleted (GtkWidget *widget, + GdkEventAny *event, + gpointer data); static gboolean prefs_quote_colors_key_pressed (GtkWidget *widget, GdkEventKey *event, gpointer data); @@ -2830,8 +2833,8 @@ static void prefs_quote_colors_dialog_create(void) gtk_widget_grab_default(ok_btn); MANAGE_WINDOW_SIGNALS_CONNECT(window); - g_signal_connect(G_OBJECT(window), "delete_event", - G_CALLBACK(gtk_main_quit), NULL); + g_signal_connect (G_OBJECT (window), "delete_event", + G_CALLBACK (prefs_quote_colors_deleted), NULL); g_signal_connect(G_OBJECT(window), "key_press_event", G_CALLBACK(prefs_quote_colors_key_pressed), NULL); @@ -2864,6 +2867,13 @@ static void prefs_quote_colors_dialog_create(void) quote_color_win = window; } +static gint prefs_quote_colors_deleted(GtkWidget *widet, GdkEventAny *event, + gpointer data) +{ + gtk_main_quit(); + return TRUE; +} + static gboolean prefs_quote_colors_key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data) -- cgit v1.2.3