head 1.1; access; symbols; locks; strict; comment @# @; 1.1 date 2003.06.19.19.21.32; author swiergot; state Exp; branches; next ; desc @@ 1.1 log @- Added prtgrp patch (group headers looks much nicer). - Added fixcolor patch so prtgrp can work with colors patch. - Added status_indicator patch that makes it possible to display little (i) icons next to contact that have status message set. - Added indicator.png icon for status_indicator patch. - prtgrp and status_indicator patches has been made by Tomasz Sterna. @ text @diff -ru psi-0.9/src/common.h psi-0.9-smk/src/common.h --- psi-0.9/src/common.h 2003-06-16 20:58:47.000000000 +0200 +++ psi-0.9-smk/src/common.h 2003-06-18 20:37:57.000000000 +0200 @@@@ -121,6 +121,8 @@@@ //groupchat highlighting/nick colouring bool gcHighlighting, gcNickColoring; QStringList gcHighlights, gcNickColors; + + bool clStIndicator; struct { bool roster, options, profiles, services, accounts; diff -ru psi-0.9/src/contactview.cpp psi-0.9-smk/src/contactview.cpp --- psi-0.9/src/contactview.cpp 2003-06-01 05:03:46.000000000 +0200 +++ psi-0.9-smk/src/contactview.cpp 2003-06-18 20:35:41.000000000 +0200 @@@@ -2181,6 +2181,22 @@@@ x += 24; } } + + if(!d->u->userResourceList().isEmpty() && option.clStIndicator) { + UserResourceList srl = d->u->userResourceList(); + + for(UserResourceList::ConstIterator rit = srl.begin(); rit != srl.end(); ++rit) { + const UserResource &r = *rit; + + if(!r.status().status().isEmpty()) { + const QPixmap &pix = is.stat_ind; + int y = (height() - pix.height()) / 2; + p->drawPixmap(x, y, pix); + x += 24; + break; + } + } + } } else if(d->type == Group || d->type == Profile) { QColorGroup xcg = cg; diff -ru psi-0.9/src/iconset.cpp psi-0.9-smk/src/iconset.cpp --- psi-0.9/src/iconset.cpp 2003-05-22 18:23:29.000000000 +0200 +++ psi-0.9-smk/src/iconset.cpp 2003-06-18 20:35:41.000000000 +0200 @@@@ -434,6 +434,7 @@@@ if(!arrow[0].load("groupclose", dirs)) return false; if(!arrow[1].load("groupopen", dirs)) return false; if(!arrow[2].load("groupempty", dirs)) return false; + if(!stat_ind.load("indicator", dirs)) return false; if(!add.load("add", dirs)) return false; if(!remove.load("remove", dirs)) return false; if(!send.load("send", dirs)) return false; @@@@ -539,6 +540,7 @@@@ arrow[0].unload(); arrow[1].unload(); arrow[2].unload(); + stat_ind.unload(); add.unload(); remove.unload(); send.unload(); diff -ru psi-0.9/src/iconset.h psi-0.9-smk/src/iconset.h --- psi-0.9/src/iconset.h 2003-05-22 18:23:29.000000000 +0200 +++ psi-0.9-smk/src/iconset.h 2003-06-18 20:35:41.000000000 +0200 @@@@ -124,7 +124,7 @@@@ static void getIconSetsList(QStringList &names, QStringList &descriptions); Anim message, system, chat, headline, conn, needkey; - Impix online, offline, away, xa, dnd, invisible, noauth, perr, arrow[3], add, remove, send, history, info, url, profile, groupchat, ask; + Impix online, offline, away, xa, dnd, invisible, noauth, perr, arrow[3], stat_ind, add, remove, send, history, info, url, profile, groupchat, ask; Impix psimain, ssl_yes, ssl_no, chatclear, account; Impix options, play_sounds, quit, help, xml; Impix arrow_left, arrow_right, arrow_up, arrow_down; diff -ru psi-0.9/src/optionsdlg.cpp psi-0.9-smk/src/optionsdlg.cpp --- psi-0.9/src/optionsdlg.cpp 2003-06-07 16:24:32.000000000 +0200 +++ psi-0.9-smk/src/optionsdlg.cpp 2003-06-18 20:42:51.000000000 +0200 @@@@ -169,6 +169,9 @@@@ n = qstringlistmatch(iconsets, opt.iconset); cb_iconset->setCurrentItem(n); connect(cb_iconset, SIGNAL(activated(int)), this, SLOT(selectIconSet(int))); + + // Look and Feel : Misc + ck_statusIndicator->setChecked(opt.clStIndicator); // Security : OpenPGP //QTimer::singleShot(0, this, SLOT(buildPGPList())); @@@@ -383,6 +386,8 @@@@ tr("Selects a set of icons to use in the main window." " Icons are usually used for visual identification of users'" " status, such as \"online\", \"offline\", \"away\", etc.")); + QWhatsThis::add(ck_statusIndicator, + tr("Displays an indicator by the contact name if the contact entered a descriptive text status line.")); QWhatsThis::add(ck_popupMsgs, tr("Makes new incoming message windows pop up automatically when received.")); QWhatsThis::add(ck_popupChats, @@@@ -554,6 +559,8 @@@@ opt.gcNickColoring=ck_gcNickColoring->isChecked(); lb_highlightWords->clear(); lb_highlightWords->insertStringList(opt.gcHighlights); + + opt.clStIndicator=ck_statusIndicator->isChecked(); applyOptions(opt); } diff -ru psi-0.9/src/profiles.cpp psi-0.9-smk/src/profiles.cpp --- psi-0.9/src/profiles.cpp 2003-05-26 02:40:13.000000000 +0200 +++ psi-0.9-smk/src/profiles.cpp 2003-06-18 20:43:16.000000000 +0200 @@@@ -517,6 +517,8 @@@@ prefs.font[fRoster] = QApplication::font().toString(); prefs.font[fMessage] = QApplication::font().toString(); prefs.font[fChat] = QApplication::font().toString(); + + prefs.clStIndicator = FALSE; prefs.player = "play"; prefs.noAwaySound = FALSE; @@@@ -765,6 +767,8 @@@@ tag.appendChild(textTag(doc, "message", prefs.font[fMessage] )); tag.appendChild(textTag(doc, "chat", prefs.font[fChat] )); } + + p_lnf.appendChild(textTag(doc, "statusIndicator", prefs.clStIndicator)); } { @@@@ -1080,6 +1084,7 @@@@ bool found; readEntry(p_lnf, "iconset", &prefs.iconset); + readBoolEntry(p_lnf, "statusIndicator", &prefs.clStIndicator); QDomElement tag = findSubTag(p_lnf, "colors", &found); if(found) { diff -ru psi-0.9/src/ui_options.ui psi-0.9-smk/src/ui_options.ui --- psi-0.9/src/ui_options.ui 2003-05-28 01:15:21.000000000 +0200 +++ psi-0.9-smk/src/ui_options.ui 2003-06-18 21:35:20.000000000 +0200 @@@@ -8,8 +8,8 @@@@ 0 0 - 762 - 527 + 809 + 563 @@@@ -1522,23 +1522,33 @@@@ - + - Spacer7 - - - Vertical + GroupBox10_1 - - Expanding - - - - 0 - 20 - + + Misc - + + + unnamed + + + 11 + + + 6 + + + + ck_statusIndicator + + + Show indicator for text statuses + + + + @@@@ -2654,6 +2664,12 @@@@ ncGroupBox setEnabled(bool) + + ck_statusIndicator + toggled(bool) + OptionsUI + dataChanged() + tabwidget @ .