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



A couple things:

- use g_strdup/g_free rather than strdup/free
- i18n'ise your strings ->  _("Untitled Message")
- follow the coding style/formatting:

If there is only one statement in the if-resolution, then don't use brackets

if (foo)
   bar;

since the rest of the code in that function puts a space between the function name and the (, you should too.

As it turns out, you also had no need to strdup the subject. It could just as easily be done with the attached patch.

FWIW, I've committed my version of th patch to CVS.

Thanks for the patch,

Jeff

On Sun, 2004-03-07 at 09:35, Trent Lloyd wrote:
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
-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj ximian com  - www.ximian.com
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
retrieving revision 1.609
diff -u -r1.609 ChangeLog
--- ChangeLog	5 Mar 2004 18:18:52 -0000	1.609
+++ ChangeLog	7 Mar 2004 15:00:02 -0000
@@ -1,3 +1,8 @@
+2004-03-07  Jeffrey Stedfast  <fejj ximian com>
+
+	* e-msg-composer.c (do_exit): If the subject is empty, use
+	_("Untitled Message") as the subject instead.
+
 2004-03-05  Jeffrey Stedfast  <fejj ximian com>
 
 	Fixes bug #55202
Index: e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.441
diff -u -r1.441 e-msg-composer.c
--- e-msg-composer.c	5 Mar 2004 18:18:52 -0000	1.441
+++ e-msg-composer.c	7 Mar 2004 15:00:08 -0000
@@ -1557,7 +1557,7 @@
 					 GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE,
 					 _("The message \"%s\" has not been sent.\n\n"
 					   "Do you wish to save your changes?"),
-					 subject);
+					 subject && *subject ? subject : _("Untitled Message"));
 	
 	gtk_dialog_add_buttons (GTK_DIALOG (dialog),
 				_("_Discard Changes"), GTK_RESPONSE_NO,


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