[Commits] about.c 1.4.2.84 1.4.2.85

wwp at claws-mail.org wwp at claws-mail.org
Fri Jul 6 11:19:46 CEST 2012


Update of /home/claws-mail/claws/src/gtk
In directory srv:/tmp/cvs-serv30800/src/gtk

Modified Files:
      Tag: gtk2
	about.c 
Log Message:
2012-07-06 [wwp]	3.8.1cvs6

	* src/main.c
	* src/gtk/about.c
		Session statistics: format date following global prefs,
		and fix stats output a little bit.

Index: about.c
===================================================================
RCS file: /home/claws-mail/claws/src/gtk/about.c,v
retrieving revision 1.4.2.84
retrieving revision 1.4.2.85
diff -u -d -r1.4.2.84 -r1.4.2.85
--- about.c	2 Jun 2012 09:06:27 -0000	1.4.2.84
+++ about.c	6 Jul 2012 09:19:44 -0000	1.4.2.85
@@ -693,11 +693,22 @@
 				(_("Session statistics\n")), -1,
 				"underlined-list-title", NULL);
 
-		g_snprintf(buf, sizeof(buf), _("Started: %s\n"),
-					ctime(&session_stats.time_started));
+		if (prefs_common.date_format) {
+			struct tm *lt;
+			gint len = 100;
+			gchar date[len];
+
+			lt = localtime(&session_stats.time_started);
+			fast_strftime(date, len, prefs_common.date_format, lt);
+			g_snprintf(buf, sizeof(buf), _("Started: %s\n"),
+						lt ? date : ctime(&session_stats.time_started));
+		} else
+			g_snprintf(buf, sizeof(buf), _("Started: %s\n"),
+						ctime(&session_stats.time_started));
 		gtk_text_buffer_insert_with_tags_by_name(stats_text_buffer, &iter, buf, -1,
 				"indented-list-item", NULL);
 
+		gtk_text_buffer_insert(stats_text_buffer, &iter, "\n", 1);
 		gtk_text_buffer_insert_with_tags_by_name(stats_text_buffer, &iter,
 				(_("Incoming traffic\n")), -1,
 				"underlined-list-title", NULL);



More information about the Commits mailing list