~ubuntu-branches/ubuntu/utopic/psi/utopic

« back to all changes in this revision

Viewing changes to src/psiiconset.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2009-09-25 17:49:51 UTC
  • mfrom: (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090925174951-lvm7kdap82o8xhn3
Tags: 0.13-1
* Updated to upstream version 0.13
* Set Standards-Version to 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
                PsiIcon *icon = (PsiIcon *)IconsetFactory::iconPtr(iconName);
138
138
 
139
139
                // second level -- transport icon
140
 
                if ( jid.user().isEmpty() || PsiOptions::instance()->getOption("options.ui.contactlist.use-transport-icons").toBool() ) {
 
140
                if ( jid.node().isEmpty() || PsiOptions::instance()->getOption("options.ui.contactlist.use-transport-icons").toBool() ) {
141
141
                        QMap<QString, QRegExp> services;
142
142
                        services["aim"]         = QRegExp("^aim");
143
143
                        services["gadugadu"]    = QRegExp("^gg");
152
152
                        foreach(QVariant serviceV, PsiOptions::instance()->mapKeyList("options.iconsets.service-status")) {
153
153
                                QString service = serviceV.toString();
154
154
                                if (services.contains(service)) {
155
 
                                        if (services[service].search(jid.host()) != -1 ) {
 
155
                                        if (services[service].search(jid.domain()) != -1 ) {
156
156
                                                Iconset *is = psi->roster.find(
157
157
                                                                PsiOptions::instance()->getOption(
158
158
                                                                PsiOptions::instance()->mapLookup("options.iconsets.service-status", service)+".iconset").toString());
170
170
                        
171
171
 
172
172
                        // let's try the default transport iconset then...
173
 
                        if ( !found && jid.user().isEmpty() ) {
 
173
                        if ( !found && jid.node().isEmpty() ) {
174
174
                                if (PsiOptions::instance()->mapKeyList("options.iconsets.service-status").contains("transport")) {
175
175
                                        Iconset *is = psi->roster.find(
176
176
                                                                PsiOptions::instance()->getOption(
189
189
                QStringList customicons = PsiOptions::instance()->getChildOptionNames("options.iconsets.custom-status", true, true);
190
190
                foreach(QString base, customicons) {
191
191
                        QRegExp rx = QRegExp(PsiOptions::instance()->getOption(base + ".regexp").toString());
192
 
                        if ( rx.search(jid.userHost()) != -1 ) {
 
192
                        if ( rx.search(jid.bare()) != -1 ) {
193
193
                                Iconset *is = psi->roster.find(PsiOptions::instance()->getOption(base + ".iconset").toString());
194
194
                                if ( is ) {
195
195
                                        PsiIcon *i = (PsiIcon *)is->icon(iconName);
491
491
        else if(e->type() == PsiEvent::File) {
492
492
                icon = "psi/file";
493
493
        }
 
494
        else if(e->type() == PsiEvent::AvCallType) {
 
495
                icon = "psi/call";
 
496
        }
494
497
        else {
495
498
                icon = "psi/system";
496
499
        }