comparison src/gtkdebug.c @ 5430:908f3d9ee660

[gaim-migrate @ 5810] Fix fix. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 18 May 2003 09:38:55 +0000
parents 7d1a44cbd347
children 2c4c975620f0
comparison
equal deleted inserted replaced
5429:7d1a44cbd347 5430:908f3d9ee660
185 if ((misc_options & OPT_MISC_DEBUG) && 185 if ((misc_options & OPT_MISC_DEBUG) &&
186 debug_win != NULL && !debug_win->paused) { 186 debug_win != NULL && !debug_win->paused) {
187 187
188 gchar *esc_s, *cat_s, *ts_s, *s; 188 gchar *esc_s, *cat_s, *ts_s, *s;
189 189
190 if (category == NULL) 190 if (category == NULL) {
191 cat_s = g_strdup(""); 191 cat_s = g_strdup("");
192 else 192 ts_s = g_strdup("");
193 }
194 else {
193 cat_s = g_strdup_printf("<b>%s:</b> ", category); 195 cat_s = g_strdup_printf("<b>%s:</b> ", category);
194 196
195 if (debug_win->timestamps) { 197 /*
196 gchar mdate[64]; 198 * If the category is not NULL, then do timestamps.
197 time_t mtime = time(NULL); 199 * This IS right. :)
198 200 */
199 strftime(mdate, sizeof(mdate), "%H:%M:%S", localtime(&mtime)); 201 if (debug_win->timestamps) {
200 202 gchar mdate[64];
201 ts_s = g_strdup_printf("(%s) ", mdate); 203 time_t mtime = time(NULL);
204
205 strftime(mdate, sizeof(mdate), "%H:%M:%S", localtime(&mtime));
206
207 ts_s = g_strdup_printf("(%s) ", mdate);
208 }
209 else
210 ts_s = g_strdup("");
202 } 211 }
203 else
204 ts_s = g_strdup("");
205 212
206 esc_s = g_markup_escape_text(arg_s, -1); 213 esc_s = g_markup_escape_text(arg_s, -1);
207 214
208 s = g_strdup_printf("<font color=\"%s\">%s%s%s</font>", 215 s = g_strdup_printf("<font color=\"%s\">%s%s%s</font>",
209 debug_fg_colors[level], ts_s, cat_s, esc_s); 216 debug_fg_colors[level], ts_s, cat_s, esc_s);