[evolution-patches] composer/ change discard message when closing unsaved messaged to include untitled message



Hi,

this small patch addresses the following issues

 * Changes the discard dialogs (if your closing an unsaved message in
 * composer) to say "Untitled Message" rather than "" for messages
 * without a subject.

I think this is a bit nicer than just having "" there.

Cheers,
Trent
Sixlabs

-- 
[ Trent "Lathiat" Lloyd  lathi sixlabs org ]/ "You sure as hell shouldn't be   \
[ tlhIngan Hol Dajatlh'e   www.sixlabs.org ]| fingering my toaster" -Linus     |
[ GPG Key Id: 0x04AB3C5D        www.bur.st ]| Torvalds, LCA2003 Speakers dinner|
[ IPv6 Conference  http://conf.sixlabs.org ]\ talking about ipv6 with me       /
--- e-msg-composer.c.orig	2004-03-07 22:11:16.000000000 +0800
+++ e-msg-composer.c	2004-03-07 22:12:03.000000000 +0800
@@ -1550,8 +1550,11 @@
 	
 	gdk_window_raise (GTK_WIDGET (composer)->window);
 	
-	subject = e_msg_composer_hdrs_get_subject (E_MSG_COMPOSER_HDRS (composer->hdrs));
-	
+	subject = strdup(e_msg_composer_hdrs_get_subject (E_MSG_COMPOSER_HDRS (composer->hdrs)));
+	if (!strcmp(subject, "")) {
+		subject = strdup("Untitled Message");
+	}
+
 	dialog = gtk_message_dialog_new (GTK_WINDOW (composer),
 					 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
 					 GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE,
@@ -1569,6 +1572,8 @@
 	button = gtk_dialog_run (GTK_DIALOG (dialog));
 	gtk_widget_destroy (dialog);
 	
+	free(subject);
+	
 	switch (button) {
 	case GTK_RESPONSE_YES:
 		/* Save */


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