diff -r ed74408cbeb1 -r 5c22d0ab003e pidgin/plugins/timestamp_format.c --- a/pidgin/plugins/timestamp_format.c Thu May 03 08:34:53 2007 +0000 +++ b/pidgin/plugins/timestamp_format.c Thu May 03 13:12:16 2007 +0000 @@ -58,7 +58,8 @@ time_t t, gboolean show_date, gboolean force, - const char *dates) + const char *dates, + gboolean parens) { g_return_val_if_fail(dates != NULL, NULL); @@ -68,15 +69,15 @@ { struct tm *tm = localtime(&t); if (force) - return g_strdup(purple_utf8_strftime("%Y-%m-%d %H:%M:%S", tm)); + return g_strdup_printf("%s%s%s", parens ? "(" : "", purple_utf8_strftime("%Y-%m-%d %H:%M:%S", tm), parens ? ")" : ""); else - return g_strdup(purple_date_format_long(tm)); + return g_strdup_printf("%s%s%s", parens ? "(" : "", purple_date_format_long(tm), parens ? ")" : ""); } if (force) { struct tm *tm = localtime(&t); - return g_strdup(purple_utf8_strftime("%H:%M:%S", tm)); + return g_strdup_printf("%s%s%s", parens ? "(" : "", purple_utf8_strftime("%H:%M:%S", tm), parens ? ")" : ""); } return NULL; @@ -92,7 +93,7 @@ g_return_val_if_fail(conv != NULL, NULL); - return timestamp_cb_common(conv, t, show_date, force, dates); + return timestamp_cb_common(conv, t, show_date, force, dates, TRUE); } static char *log_timestamp_cb(PurpleLog *log, time_t t, gboolean show_date, gpointer data) @@ -104,7 +105,7 @@ g_return_val_if_fail(log != NULL, NULL); - return timestamp_cb_common(log->conv, t, show_date, force, dates); + return timestamp_cb_common(log->conv, t, show_date, force, dates, FALSE); } static gboolean