2012-07-06 [wwp] 3.8.1cvs6
authorTristan Chabredier <wwp@claws-mail.org>
Fri, 6 Jul 2012 09:19:45 +0000 (09:19 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Fri, 6 Jul 2012 09:19:45 +0000 (09:19 +0000)
* src/main.c
* src/gtk/about.c
Session statistics: format date following global prefs,
and fix stats output a little bit.

ChangeLog
PATCHSETS
configure.ac
src/gtk/about.c
src/main.c

index d4997ac..c4943fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
 2012-07-03 [mir]       3.8.1cvs5
 
        * src/procmime.c
index d0dacde..7012787 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.49.2.143 -r 1.49.2.144 src/procmime.c;  cvs diff -u -r 1.9.2.54 -r 1.9.2.55 src/common/defs.h;  ) > 3.8.1cvs3.patchset
 ( cvs diff -u -r 1.49.2.143 -r 1.49.2.144 src/procmime.c;  cvs diff -u -r 1.9.2.54 -r 1.9.2.55 src/common/defs.h;  ) > 3.8.1cvs4.patchset
 ( cvs diff -u -r 1.49.2.144 -r 1.49.2.145 src/procmime.c;  ) > 3.8.1cvs5.patchset
+( cvs diff -u -r 1.115.2.250 -r 1.115.2.251 src/main.c;  cvs diff -u -r 1.4.2.84 -r 1.4.2.85 src/gtk/about.c;  ) > 3.8.1cvs6.patchset
index 2ed0981..87688c3 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=8
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=5
+EXTRA_VERSION=6
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index d95f50a..0801baa 100644 (file)
@@ -693,11 +693,22 @@ static void about_update_stats(void)
                                (_("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);
index df8a6d4..21a2bc7 100644 (file)
@@ -2573,10 +2573,22 @@ static void lock_socket_input_cb(gpointer data,
                g_snprintf(tmp, sizeof(tmp), _("Session statistics\n"));
                fd_write_all(sock, tmp, strlen(tmp));
 
-               g_snprintf(tmp, sizeof(tmp), _("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(tmp, sizeof(tmp), _("Started: %s\n"),
+                                       lt ? date : ctime(&session_stats.time_started));
+               } else
+                       g_snprintf(tmp, sizeof(tmp), _("Started: %s\n"),
+                                       ctime(&session_stats.time_started));
                fd_write_all(sock, tmp, strlen(tmp));
 
+               fd_write_all(sock, "\n", 1);
+
                g_snprintf(tmp, sizeof(tmp), _("Incoming traffic\n"));
                fd_write_all(sock, tmp, strlen(tmp));