[evolution-patches] Please review my patch for bug #47950



Hello All,

Could you review my patch for bug #47950?
I change the signal handler of attachmnet properties dialog to avoid crash problem.

Bug Summary: Crash when working with mail attachments
Bug URL:http://bugzilla.ximian.com/show_bug.cgi?id=47950

Thanks
Antonio Xu









Index: composer/e-msg-composer-attachment.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer-attachment.c,v
retrieving revision 1.46
diff -p -u -r1.46 e-msg-composer-attachment.c
--- composer/e-msg-composer-attachment.c	16 May 2003 16:55:07 -0000	1.46
+++ composer/e-msg-composer-attachment.c	27 Aug 2003 04:08:56 -0000
@@ -378,7 +378,15 @@ ok_cb (GtkWidget *widget, gpointer data)
 	close_cb (widget, data);
 }
 
-
+static void
+response_cb (GtkWidget *widget, gint response, gpointer data)
+{
+	if (response == GTK_RESPONSE_OK)
+		ok_cb (widget, data);
+	else
+		close_cb (widget, data);
+}
+
 void
 e_msg_composer_attachment_edit (EMsgComposerAttachment *attachment, GtkWidget *parent)
 {
@@ -439,9 +447,7 @@ e_msg_composer_attachment_edit (EMsgComp
 	gtk_toggle_button_set_active (dialog_data->disposition_checkbox,
 				      disposition && !g_ascii_strcasecmp (disposition, "inline"));
 	
-	connect_widget (editor_gui, "ok_button", "clicked", (GCallback)ok_cb, dialog_data);
-	connect_widget (editor_gui, "close_button", "clicked", (GCallback)close_cb, dialog_data);
-	
+	connect_widget (editor_gui, "dialog", "response", (GCallback)response_cb, dialog_data);
 #warning "signal connect while alive"	
 	/* make sure that when the composer gets hidden/closed that our windows also close */
 	parent = gtk_widget_get_toplevel (parent);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]