comparison src/log.c @ 7108:6faeeecab0dc

[gaim-migrate @ 7673] Put the rest of util.[ch] into namespaces and sectioned off the functions. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 01 Oct 2003 07:15:53 +0000
parents 9220c7490cd1
children 1930e3d00ecd
comparison
equal deleted inserted replaced
7107:9220c7490cd1 7108:6faeeecab0dc
266 266
267 if (why & OPT_LOG_MY_SIGNON) { 267 if (why & OPT_LOG_MY_SIGNON) {
268 switch (what) { 268 switch (what) {
269 case log_signon: 269 case log_signon:
270 g_snprintf(text, sizeof(text), _("+++ %s (%s) signed on @ %s"), 270 g_snprintf(text, sizeof(text), _("+++ %s (%s) signed on @ %s"),
271 gaim_account_get_username(account), gc->prpl->info->name, full_date()); 271 gaim_account_get_username(account), gc->prpl->info->name, gaim_date_full());
272 g_snprintf(html, sizeof(html), "<B>%s</B>", text); 272 g_snprintf(html, sizeof(html), "<B>%s</B>", text);
273 break; 273 break;
274 case log_signoff: 274 case log_signoff:
275 g_snprintf(text, sizeof(text), _("+++ %s (%s) signed off @ %s"), 275 g_snprintf(text, sizeof(text), _("+++ %s (%s) signed off @ %s"),
276 gaim_account_get_username(account), gc->prpl->info->name, full_date()); 276 gaim_account_get_username(account), gc->prpl->info->name, gaim_date_full());
277 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 277 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
278 break; 278 break;
279 case log_away: 279 case log_away:
280 g_snprintf(text, sizeof(text), _("+++ %s (%s) changed away state @ %s"), 280 g_snprintf(text, sizeof(text), _("+++ %s (%s) changed away state @ %s"),
281 gaim_account_get_username(account), gc->prpl->info->name, full_date()); 281 gaim_account_get_username(account), gc->prpl->info->name, gaim_date_full());
282 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text); 282 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text);
283 break; 283 break;
284 case log_back: 284 case log_back:
285 g_snprintf(text, sizeof(text), _("+++ %s (%s) came back @ %s"), 285 g_snprintf(text, sizeof(text), _("+++ %s (%s) came back @ %s"),
286 gaim_account_get_username(account), gc->prpl->info->name, full_date()); 286 gaim_account_get_username(account), gc->prpl->info->name, gaim_date_full());
287 g_snprintf(html, sizeof(html), "%s", text); 287 g_snprintf(html, sizeof(html), "%s", text);
288 break; 288 break;
289 case log_idle: 289 case log_idle:
290 g_snprintf(text, sizeof(text), _("+++ %s (%s) became idle @ %s"), 290 g_snprintf(text, sizeof(text), _("+++ %s (%s) became idle @ %s"),
291 gaim_account_get_username(account), gc->prpl->info->name, full_date()); 291 gaim_account_get_username(account), gc->prpl->info->name, gaim_date_full());
292 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text); 292 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text);
293 break; 293 break;
294 case log_unidle: 294 case log_unidle:
295 g_snprintf(text, sizeof(text), _("+++ %s (%s) returned from idle @ %s"), 295 g_snprintf(text, sizeof(text), _("+++ %s (%s) returned from idle @ %s"),
296 gaim_account_get_username(account), gc->prpl->info->name, full_date()); 296 gaim_account_get_username(account), gc->prpl->info->name, gaim_date_full());
297 g_snprintf(html, sizeof(html), "%s", text); 297 g_snprintf(html, sizeof(html), "%s", text);
298 break; 298 break;
299 case log_quit: 299 case log_quit:
300 g_snprintf(text, sizeof(text), _("+++ Program exit @ %s"), full_date()); 300 g_snprintf(text, sizeof(text), _("+++ Program exit @ %s"), gaim_date_full());
301 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 301 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
302 break; 302 break;
303 } 303 }
304 } else if (gaim_get_buddy_alias_only(who)) { 304 } else if (gaim_get_buddy_alias_only(who)) {
305 switch (what) { 305 switch (what) {
306 case log_signon: 306 case log_signon:
307 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) signed on @ %s"), 307 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) signed on @ %s"),
308 gaim_account_get_username(account), gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, full_date()); 308 gaim_account_get_username(account), gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, gaim_date_full());
309 g_snprintf(html, sizeof(html), "<B>%s</B>", text); 309 g_snprintf(html, sizeof(html), "<B>%s</B>", text);
310 break; 310 break;
311 case log_signoff: 311 case log_signoff:
312 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) signed off @ %s"), 312 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) signed off @ %s"),
313 gaim_account_get_username(account), gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, full_date()); 313 gaim_account_get_username(account), gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, gaim_date_full());
314 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 314 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
315 break; 315 break;
316 case log_away: 316 case log_away:
317 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) went away @ %s"), 317 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) went away @ %s"),
318 gaim_account_get_username(account), gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, full_date()); 318 gaim_account_get_username(account), gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, gaim_date_full());
319 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text); 319 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text);
320 break; 320 break;
321 case log_back: 321 case log_back:
322 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) came back @ %s"), 322 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) came back @ %s"),
323 gaim_account_get_username(account), gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, full_date()); 323 gaim_account_get_username(account), gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, gaim_date_full());
324 g_snprintf(html, sizeof(html), "%s", text); 324 g_snprintf(html, sizeof(html), "%s", text);
325 break; 325 break;
326 case log_idle: 326 case log_idle:
327 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) became idle @ %s"), 327 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) became idle @ %s"),
328 gaim_account_get_username(account), gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, full_date()); 328 gaim_account_get_username(account), gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, gaim_date_full());
329 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text); 329 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text);
330 break; 330 break;
331 case log_unidle: 331 case log_unidle:
332 g_snprintf(text, sizeof(text), 332 g_snprintf(text, sizeof(text),
333 _("%s (%s) reported that %s (%s) returned from idle @ %s"), gaim_account_get_username(account), 333 _("%s (%s) reported that %s (%s) returned from idle @ %s"), gaim_account_get_username(account),
334 gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, full_date()); 334 gc->prpl->info->name, gaim_get_buddy_alias(who), who->name, gaim_date_full());
335 g_snprintf(html, sizeof(html), "%s", text); 335 g_snprintf(html, sizeof(html), "%s", text);
336 break; 336 break;
337 default: 337 default:
338 fclose(fd); 338 fclose(fd);
339 return; 339 return;
341 } 341 }
342 } else { 342 } else {
343 switch (what) { 343 switch (what) {
344 case log_signon: 344 case log_signon:
345 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s signed on @ %s"), 345 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s signed on @ %s"),
346 gaim_account_get_username(account), gc->prpl->info->name, who->name, full_date()); 346 gaim_account_get_username(account), gc->prpl->info->name, who->name, gaim_date_full());
347 g_snprintf(html, sizeof(html), "<B>%s</B>", text); 347 g_snprintf(html, sizeof(html), "<B>%s</B>", text);
348 break; 348 break;
349 case log_signoff: 349 case log_signoff:
350 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s signed off @ %s"), 350 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s signed off @ %s"),
351 gaim_account_get_username(account), gc->prpl->info->name, who->name, full_date()); 351 gaim_account_get_username(account), gc->prpl->info->name, who->name, gaim_date_full());
352 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 352 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
353 break; 353 break;
354 case log_away: 354 case log_away:
355 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s went away @ %s"), 355 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s went away @ %s"),
356 gaim_account_get_username(account), gc->prpl->info->name, who->name, full_date()); 356 gaim_account_get_username(account), gc->prpl->info->name, who->name, gaim_date_full());
357 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text); 357 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text);
358 break; 358 break;
359 case log_back: 359 case log_back:
360 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s came back @ %s"), 360 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s came back @ %s"),
361 gaim_account_get_username(account), gc->prpl->info->name, who->name, full_date()); 361 gaim_account_get_username(account), gc->prpl->info->name, who->name, gaim_date_full());
362 g_snprintf(html, sizeof(html), "%s", text); 362 g_snprintf(html, sizeof(html), "%s", text);
363 break; 363 break;
364 case log_idle: 364 case log_idle:
365 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s became idle @ %s"), 365 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s became idle @ %s"),
366 gaim_account_get_username(account), gc->prpl->info->name, who->name, full_date()); 366 gaim_account_get_username(account), gc->prpl->info->name, who->name, gaim_date_full());
367 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text); 367 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text);
368 break; 368 break;
369 case log_unidle: 369 case log_unidle:
370 g_snprintf(text, sizeof(text), 370 g_snprintf(text, sizeof(text),
371 _("%s (%s) reported that %s returned from idle @ %s"), gaim_account_get_username(account), 371 _("%s (%s) reported that %s returned from idle @ %s"), gaim_account_get_username(account),
372 gc->prpl->info->name, who->name, full_date()); 372 gc->prpl->info->name, who->name, gaim_date_full());
373 g_snprintf(html, sizeof(html), "%s", text); 373 g_snprintf(html, sizeof(html), "%s", text);
374 break; 374 break;
375 default: 375 default:
376 fclose(fd); 376 fclose(fd);
377 return; 377 return;