comparison src/conversation.c @ 2447:6bdeb91abe4e

[gaim-migrate @ 2460] i hope this works committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 08 Oct 2001 01:12:02 +0000
parents 9e6c9461df3d
children dab1bf4a8392
comparison
equal deleted inserted replaced
2446:f9cad82d321b 2447:6bdeb91abe4e
1332 int gtk_font_options = 0; 1332 int gtk_font_options = 0;
1333 GString *logstr; 1333 GString *logstr;
1334 char buf2[BUF_LONG]; 1334 char buf2[BUF_LONG];
1335 char mdate[64]; 1335 char mdate[64];
1336 1336
1337 if (c->is_chat && (!c->gc || !g_slist_find(c->gc->buddy_chats, c)))
1338 return;
1339
1337 if (!c->is_chat && !g_list_find(conversations, c)) 1340 if (!c->is_chat && !g_list_find(conversations, c))
1338 return; 1341 return;
1339
1340 if (c->is_chat && (!c->gc || !g_slist_find(c->gc->buddy_chats, c)))
1341 return;
1342
1343 strftime(mdate, sizeof(mdate), "%H:%M:%S", localtime(&mtime));
1344
1345 gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_COMMENTS;
1346
1347 if (convo_options & OPT_CONVO_IGNORE_COLOUR)
1348 gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_COLOURS;
1349
1350 if (convo_options & OPT_CONVO_IGNORE_FONTS)
1351 gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_FONTS;
1352
1353 if (convo_options & OPT_CONVO_IGNORE_SIZES)
1354 gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_SIZES;
1355
1356 if (!(logging_options & OPT_LOG_STRIP_HTML))
1357 gtk_font_options = gtk_font_options ^ GTK_IMHTML_RETURN_LOG;
1358 1342
1359 if (!c->is_chat || !(c->gc->prpl->options & OPT_PROTO_UNIQUE_CHATNAME)) { 1343 if (!c->is_chat || !(c->gc->prpl->options & OPT_PROTO_UNIQUE_CHATNAME)) {
1360 if (!who) { 1344 if (!who) {
1361 if (flags & WFLAG_SEND) { 1345 if (flags & WFLAG_SEND) {
1362 b = find_buddy(c->gc, c->gc->username); 1346 b = find_buddy(c->gc, c->gc->username);
1378 if (b) 1362 if (b)
1379 who = b->show; 1363 who = b->show;
1380 } 1364 }
1381 } 1365 }
1382 1366
1367 /* XXX CUI: this is really bad and should be moved somewhere else later. */
1368 if (c->gc) {
1369 int index = g_slist_index(connections, c->gc);
1370 int sname = strlen(who);
1371 int swhat = strlen(what);
1372 UI_build_broadcast(CUI_TYPE_MESSAGE, CUI_MESSAGE_RECV,
1373 sizeof(index), &index,
1374 sizeof(sname), &sname,
1375 sname, who,
1376 sizeof(flags), &flags,
1377 sizeof(swhat), &swhat,
1378 swhat, what,
1379 sizeof(mtime), &mtime, -1);
1380 }
1381
1382 strftime(mdate, sizeof(mdate), "%H:%M:%S", localtime(&mtime));
1383
1384 gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_COMMENTS;
1385
1386 if (convo_options & OPT_CONVO_IGNORE_COLOUR)
1387 gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_COLOURS;
1388
1389 if (convo_options & OPT_CONVO_IGNORE_FONTS)
1390 gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_FONTS;
1391
1392 if (convo_options & OPT_CONVO_IGNORE_SIZES)
1393 gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_SIZES;
1394
1395 if (!(logging_options & OPT_LOG_STRIP_HTML))
1396 gtk_font_options = gtk_font_options ^ GTK_IMHTML_RETURN_LOG;
1383 1397
1384 if (flags & WFLAG_SYSTEM) { 1398 if (flags & WFLAG_SYSTEM) {
1385 if (convo_options & OPT_CONVO_SHOW_TIME) 1399 if (convo_options & OPT_CONVO_SHOW_TIME)
1386 g_snprintf(buf, BUF_LONG, "<FONT SIZE=\"2\">(%s) </FONT><B>%s</B>", mdate, what); 1400 g_snprintf(buf, BUF_LONG, "<FONT SIZE=\"2\">(%s) </FONT><B>%s</B>", mdate, what);
1387 else 1401 else