| 1 | // -*- c-basic-offset: 2 -*- |
|---|
| 2 | /* |
|---|
| 3 | * This file is part of Licq, an instant messaging client for UNIX. |
|---|
| 4 | * Copyright (C) 2007 Licq developers |
|---|
| 5 | * |
|---|
| 6 | * Licq is free software; you can redistribute it and/or modify |
|---|
| 7 | * it under the terms of the GNU General Public License as published by |
|---|
| 8 | * the Free Software Foundation; either version 2 of the License, or |
|---|
| 9 | * (at your option) any later version. |
|---|
| 10 | * |
|---|
| 11 | * Licq is distributed in the hope that it will be useful, |
|---|
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 14 | * GNU General Public License for more details. |
|---|
| 15 | * |
|---|
| 16 | * You should have received a copy of the GNU General Public License |
|---|
| 17 | * along with Licq; if not, write to the Free Software |
|---|
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|---|
| 19 | */ |
|---|
| 20 | |
|---|
| 21 | #include "iconmanager.h" |
|---|
| 22 | |
|---|
| 23 | #include "config.h" |
|---|
| 24 | |
|---|
| 25 | #include <licq_file.h> |
|---|
| 26 | #include <licq_log.h> |
|---|
| 27 | |
|---|
| 28 | #include "config/contactlist.h" |
|---|
| 29 | |
|---|
| 30 | #include "xpm/bar/beep.xpm" |
|---|
| 31 | #include "xpm/bar/bgcolor.xpm" |
|---|
| 32 | #include "xpm/bar/bold.xpm" |
|---|
| 33 | #include "xpm/bar/encoding.xpm" |
|---|
| 34 | #include "xpm/bar/history.xpm" |
|---|
| 35 | #include "xpm/bar/ignore.xpm" |
|---|
| 36 | #include "xpm/bar/info.xpm" |
|---|
| 37 | #include "xpm/bar/italic.xpm" |
|---|
| 38 | #include "xpm/bar/menu.xpm" |
|---|
| 39 | #include "xpm/bar/multiplerec.xpm" |
|---|
| 40 | #include "xpm/bar/secureoff.xpm" |
|---|
| 41 | #include "xpm/bar/secureon.xpm" |
|---|
| 42 | #include "xpm/bar/smile.xpm" |
|---|
| 43 | #include "xpm/bar/strikethrough.xpm" |
|---|
| 44 | #include "xpm/bar/textcolor.xpm" |
|---|
| 45 | #include "xpm/bar/throughserver.xpm" |
|---|
| 46 | #include "xpm/bar/underline.xpm" |
|---|
| 47 | #include "xpm/bar/urgent.xpm" |
|---|
| 48 | |
|---|
| 49 | #include "xpm/exticons/ICQphoneActive.xpm" |
|---|
| 50 | #include "xpm/exticons/ICQphoneBusy.xpm" |
|---|
| 51 | #include "xpm/exticons/PFMActive.xpm" |
|---|
| 52 | #include "xpm/exticons/PFMBusy.xpm" |
|---|
| 53 | #include "xpm/exticons/autoresponse.xpm" |
|---|
| 54 | #include "xpm/exticons/birthday.xpm" |
|---|
| 55 | #include "xpm/exticons/cellular.xpm" |
|---|
| 56 | #include "xpm/exticons/collapsed.xpm" |
|---|
| 57 | #include "xpm/exticons/expanded.xpm" |
|---|
| 58 | #ifdef HAVE_LIBGPGME |
|---|
| 59 | #include "xpm/exticons/gpgoff.xpm" |
|---|
| 60 | #include "xpm/exticons/gpgon.xpm" |
|---|
| 61 | #endif |
|---|
| 62 | #include "xpm/exticons/invisible.xpm" |
|---|
| 63 | #include "xpm/exticons/phone.xpm" |
|---|
| 64 | #include "xpm/exticons/sharedfiles.xpm" |
|---|
| 65 | #include "xpm/exticons/typing.xpm" |
|---|
| 66 | |
|---|
| 67 | #include "xpm/menu/remove.xpm" |
|---|
| 68 | #include "xpm/menu/search.xpm" |
|---|
| 69 | |
|---|
| 70 | #include "xpm/phonebook/fax.xpm" |
|---|
| 71 | #include "xpm/phonebook/mobile.xpm" |
|---|
| 72 | #include "xpm/phonebook/pager.xpm" |
|---|
| 73 | #include "xpm/phonebook/pstn.xpm" |
|---|
| 74 | #include "xpm/phonebook/sms.xpm" |
|---|
| 75 | |
|---|
| 76 | using namespace LicqQtGui; |
|---|
| 77 | /* TRANSLATOR LicqQtGui::IconManager */ |
|---|
| 78 | |
|---|
| 79 | IconManager* IconManager::myInstance = NULL; |
|---|
| 80 | |
|---|
| 81 | void IconManager::createInstance(QString iconSet, QString extendedIconSet, QObject* parent) |
|---|
| 82 | { |
|---|
| 83 | myInstance = new IconManager(iconSet, extendedIconSet, parent); |
|---|
| 84 | } |
|---|
| 85 | |
|---|
| 86 | IconManager::IconManager(QString iconSet, QString extendedIconSet, QObject* parent) |
|---|
| 87 | : QObject(parent) |
|---|
| 88 | { |
|---|
| 89 | if (!loadIcons(iconSet)) |
|---|
| 90 | gLog.Warn("%sUnable to load icons %s.\n", L_WARNxSTR, iconSet.toLocal8Bit().data()); |
|---|
| 91 | |
|---|
| 92 | if (!loadExtendedIcons(extendedIconSet)) |
|---|
| 93 | gLog.Warn("%sUnable to load extended icons %s.\n", L_WARNxSTR, extendedIconSet.toLocal8Bit().data()); |
|---|
| 94 | } |
|---|
| 95 | |
|---|
| 96 | bool IconManager::loadIcons(QString iconSet) |
|---|
| 97 | { |
|---|
| 98 | CIniFile fIconsConf; |
|---|
| 99 | |
|---|
| 100 | QString iconListName = iconSet + ".icons"; |
|---|
| 101 | QString subdir = QString(QTGUI_DIR) + ICONS_DIR + iconSet + "/"; |
|---|
| 102 | QString iconPath = QString::fromLocal8Bit(BASE_DIR) + subdir; |
|---|
| 103 | if (!fIconsConf.LoadFile((iconPath + iconListName).toLocal8Bit())) |
|---|
| 104 | { |
|---|
| 105 | iconPath = QString::fromLocal8Bit(SHARE_DIR) + subdir; |
|---|
| 106 | if (!fIconsConf.LoadFile((iconPath + iconListName).toLocal8Bit())) |
|---|
| 107 | return false; |
|---|
| 108 | } |
|---|
| 109 | |
|---|
| 110 | fIconsConf.SetSection("icons"); |
|---|
| 111 | |
|---|
| 112 | char filename[MAX_FILENAME_LEN]; |
|---|
| 113 | |
|---|
| 114 | QPixmap p; |
|---|
| 115 | |
|---|
| 116 | #define LOAD_ICON(name, icon) \ |
|---|
| 117 | if (fIconsConf.ReadStr(name, filename) && p.load(iconPath + QString::fromLocal8Bit(filename))) \ |
|---|
| 118 | myIconMap.insert(icon, p); \ |
|---|
| 119 | else \ |
|---|
| 120 | myIconMap.remove(icon); |
|---|
| 121 | |
|---|
| 122 | #define LOAD2_ICON(name, icon, deficon) \ |
|---|
| 123 | if (fIconsConf.ReadStr(name, filename) && p.load(iconPath + QString::fromLocal8Bit(filename))) \ |
|---|
| 124 | myIconMap.insert(icon, p); \ |
|---|
| 125 | else \ |
|---|
| 126 | myIconMap.insert(icon, deficon); |
|---|
| 127 | |
|---|
| 128 | #define LOAD_STATUSICON(name, protocol, icon) \ |
|---|
| 129 | if (fIconsConf.ReadStr(name, filename) && p.load(iconPath + QString::fromLocal8Bit(filename))) \ |
|---|
| 130 | myStatusIconMap.insert(QPair<ProtocolType, StatusIconType>(protocol, icon), p); \ |
|---|
| 131 | else \ |
|---|
| 132 | myStatusIconMap.remove(QPair<ProtocolType, StatusIconType>(protocol, icon)); |
|---|
| 133 | |
|---|
| 134 | // ICQ/Default status icons |
|---|
| 135 | LOAD_STATUSICON("Online", ProtocolIcq, OnlineStatusIcon) |
|---|
| 136 | LOAD_STATUSICON("FFC", ProtocolIcq, FreeForChatStatusIcon) |
|---|
| 137 | LOAD_STATUSICON("Offline", ProtocolIcq, OfflineStatusIcon) |
|---|
| 138 | LOAD_STATUSICON("Away", ProtocolIcq, AwayStatusIcon) |
|---|
| 139 | LOAD_STATUSICON("NA", ProtocolIcq, NotAvailableStatusIcon) |
|---|
| 140 | LOAD_STATUSICON("Occupied", ProtocolIcq, OccupiedStatusIcon) |
|---|
| 141 | LOAD_STATUSICON("DND", ProtocolIcq, DoNotDisturbStatusIcon) |
|---|
| 142 | LOAD_STATUSICON("Private", ProtocolIcq, PrivateStatusIcon) |
|---|
| 143 | |
|---|
| 144 | // AIM status icons |
|---|
| 145 | LOAD_STATUSICON("AIMOnline", ProtocolAim, OnlineStatusIcon) |
|---|
| 146 | LOAD_STATUSICON("AIMOffline", ProtocolAim, OfflineStatusIcon) |
|---|
| 147 | LOAD_STATUSICON("AIMAway", ProtocolAim, AwayStatusIcon) |
|---|
| 148 | |
|---|
| 149 | // MSN status icons |
|---|
| 150 | LOAD_STATUSICON("MSNOnline", ProtocolMsn, OnlineStatusIcon) |
|---|
| 151 | LOAD_STATUSICON("MSNOffline", ProtocolMsn, OfflineStatusIcon) |
|---|
| 152 | LOAD_STATUSICON("MSNAway", ProtocolMsn, AwayStatusIcon) |
|---|
| 153 | LOAD_STATUSICON("MSNOccupied",ProtocolMsn, OccupiedStatusIcon) |
|---|
| 154 | LOAD_STATUSICON("MSNPrivate", ProtocolMsn, PrivateStatusIcon) |
|---|
| 155 | |
|---|
| 156 | // Message icons |
|---|
| 157 | LOAD_ICON("Message", StandardMessageIcon); |
|---|
| 158 | LOAD2_ICON("Url", UrlMessageIcon, myIconMap.value(StandardMessageIcon)); |
|---|
| 159 | LOAD2_ICON("Chat", ChatMessageIcon, myIconMap.value(StandardMessageIcon)); |
|---|
| 160 | LOAD2_ICON("File", FileMessageIcon, myIconMap.value(StandardMessageIcon)); |
|---|
| 161 | LOAD2_ICON("Contact", ContactMessageIcon, myIconMap.value(StandardMessageIcon)); |
|---|
| 162 | LOAD2_ICON("Authorize", AuthorizeMessageIcon, myIconMap.value(StandardMessageIcon)); |
|---|
| 163 | LOAD2_ICON("ReqAuthorize", ReqAuthorizeMessageIcon, myIconMap.value(AuthorizeMessageIcon)); |
|---|
| 164 | LOAD2_ICON("SMS", SmsMessageIcon, myIconMap.value(StandardMessageIcon)); |
|---|
| 165 | |
|---|
| 166 | // Menu icons |
|---|
| 167 | LOAD2_ICON("Remove", RemoveIcon, remove_xpm); |
|---|
| 168 | LOAD2_ICON("Search", SearchIcon, search_xpm); |
|---|
| 169 | #ifdef HAVE_LIBGPGME |
|---|
| 170 | LOAD2_ICON("GPGKey", GpgKeyIcon, gpgon_xpm); |
|---|
| 171 | #endif |
|---|
| 172 | |
|---|
| 173 | // Toolbar icons |
|---|
| 174 | LOAD2_ICON("BackColor", BackColorIcon, bgcolor_xpm); |
|---|
| 175 | LOAD2_ICON("Beep", BeepIcon, beep_xpm); |
|---|
| 176 | LOAD2_ICON("Bold", BoldIcon, bold_xpm); |
|---|
| 177 | LOAD2_ICON("Encoding", EncodingIcon, encoding_xpm); |
|---|
| 178 | LOAD2_ICON("History", HistoryIcon, history_xpm); |
|---|
| 179 | LOAD2_ICON("Ignore", IgnoreIcon, ignore_xpm); |
|---|
| 180 | LOAD2_ICON("Info", InfoIcon, info_xpm); |
|---|
| 181 | LOAD2_ICON("Italic", ItalicIcon, italic_xpm); |
|---|
| 182 | LOAD2_ICON("Menu", MenuIcon, menu_xpm); |
|---|
| 183 | LOAD2_ICON("MultipleRec", MultipleRecIcon, multiplerec_xpm); |
|---|
| 184 | LOAD2_ICON("SecureOff", SecureOffIcon, secureoff_xpm); |
|---|
| 185 | LOAD2_ICON("SecureOn", SecureOnIcon, secureon_xpm); |
|---|
| 186 | LOAD2_ICON("Smile", SmileIcon, smile_xpm); |
|---|
| 187 | LOAD2_ICON("Strikethrough", StrikethroughIcon, strikethrough_xpm); |
|---|
| 188 | LOAD2_ICON("TextColor", TextColorIcon, textcolor_xpm); |
|---|
| 189 | LOAD2_ICON("ThroughServer", ThroughServerIcon, throughserver_xpm); |
|---|
| 190 | LOAD2_ICON("Underline", UnderlineIcon, underline_xpm); |
|---|
| 191 | LOAD2_ICON("Urgent", UrgentIcon, urgent_xpm); |
|---|
| 192 | |
|---|
| 193 | // Phonebook icons |
|---|
| 194 | LOAD2_ICON("Mobile", MobileIcon, mobile_xpm); |
|---|
| 195 | LOAD2_ICON("MobileSMS", SMSIcon, sms_xpm); |
|---|
| 196 | LOAD2_ICON("Fax", FaxIcon, fax_xpm); |
|---|
| 197 | LOAD2_ICON("Pager", PagerIcon, pager_xpm); |
|---|
| 198 | LOAD2_ICON("PSTN", PSTNIcon, pstn_xpm); |
|---|
| 199 | |
|---|
| 200 | #undef LOAD_ICON |
|---|
| 201 | #undef LOAD_ICON2 |
|---|
| 202 | #undef LOAD_STATUSICON |
|---|
| 203 | |
|---|
| 204 | myIconSet = iconSet; |
|---|
| 205 | emit iconsChanged(); |
|---|
| 206 | emit generalIconsChanged(); |
|---|
| 207 | emit statusIconsChanged(); |
|---|
| 208 | |
|---|
| 209 | return true; |
|---|
| 210 | } |
|---|
| 211 | |
|---|
| 212 | bool IconManager::loadExtendedIcons(QString iconSet) |
|---|
| 213 | { |
|---|
| 214 | CIniFile fIconsConf; |
|---|
| 215 | |
|---|
| 216 | QString iconListName = iconSet + ".icons"; |
|---|
| 217 | QString subdir = QString(QTGUI_DIR) + EXTICONS_DIR + iconSet + "/"; |
|---|
| 218 | QString iconPath = QString::fromLocal8Bit(BASE_DIR) + subdir; |
|---|
| 219 | if (!fIconsConf.LoadFile((iconPath + iconListName).toLocal8Bit())) |
|---|
| 220 | { |
|---|
| 221 | iconPath = QString::fromLocal8Bit(SHARE_DIR) + subdir; |
|---|
| 222 | if (!fIconsConf.LoadFile((iconPath + iconListName).toLocal8Bit())) |
|---|
| 223 | return false; |
|---|
| 224 | } |
|---|
| 225 | |
|---|
| 226 | fIconsConf.SetSection("icons"); |
|---|
| 227 | |
|---|
| 228 | char filename[MAX_FILENAME_LEN]; |
|---|
| 229 | |
|---|
| 230 | QPixmap p; |
|---|
| 231 | |
|---|
| 232 | #define LOAD_ICON(name, icon, deficon) \ |
|---|
| 233 | if (fIconsConf.ReadStr(name, filename) && p.load(iconPath + QString::fromLocal8Bit(filename))) \ |
|---|
| 234 | myIconMap.insert(icon, p); \ |
|---|
| 235 | else \ |
|---|
| 236 | myIconMap.insert(icon, deficon); |
|---|
| 237 | |
|---|
| 238 | LOAD_ICON("Birthday", BirthdayIcon, birthday_xpm); |
|---|
| 239 | LOAD_ICON("Cellular", CellularIcon, cellular_xpm); |
|---|
| 240 | LOAD_ICON("Collapsed", CollapsedIcon, collapsed_xpm); |
|---|
| 241 | LOAD_ICON("CustomAR", CustomArIcon, autoresponse_xpm); |
|---|
| 242 | LOAD_ICON("Expanded", ExpandedIcon, expanded_xpm); |
|---|
| 243 | #ifdef HAVE_LIBGPGME |
|---|
| 244 | LOAD_ICON("GPGKeyDisabled", GpgKeyDisabledIcon, gpgoff_xpm); |
|---|
| 245 | LOAD_ICON("GPGKeyEnabled", GpgKeyEnabledIcon, gpgon_xpm); |
|---|
| 246 | #endif |
|---|
| 247 | LOAD_ICON("ICQphoneActive", IcqPhoneActiveIcon, ICQphoneActive_xpm); |
|---|
| 248 | LOAD_ICON("ICQphoneBusy", IcqPhoneBusyIcon, ICQphoneBusy_xpm); |
|---|
| 249 | LOAD_ICON("Invisible", InvisibleIcon, invisible_xpm); |
|---|
| 250 | LOAD_ICON("Phone", PhoneIcon, phone_xpm); |
|---|
| 251 | LOAD_ICON("PhoneFollowMeActive", PfmActiveIcon, PFMActive_xpm); |
|---|
| 252 | LOAD_ICON("PhoneFollowMeBusy", PfmBusyIcon, PFMBusy_xpm); |
|---|
| 253 | LOAD_ICON("SharedFiles", SharedFilesIcon, sharedfiles_xpm); |
|---|
| 254 | LOAD_ICON("Typing", TypingIcon, typing_xpm); |
|---|
| 255 | |
|---|
| 256 | #undef LOAD_ICON |
|---|
| 257 | |
|---|
| 258 | myExtendedIconSet = iconSet; |
|---|
| 259 | emit iconsChanged(); |
|---|
| 260 | emit extendedIconsChanged(); |
|---|
| 261 | |
|---|
| 262 | return true; |
|---|
| 263 | } |
|---|
| 264 | |
|---|
| 265 | const QPixmap& IconManager::getIcon(IconType icon) |
|---|
| 266 | { |
|---|
| 267 | if (myIconMap.contains(icon)) |
|---|
| 268 | return myIconMap[icon]; |
|---|
| 269 | |
|---|
| 270 | qWarning("IconManager::getIcon - returning empty icon for IconType=%i", icon); |
|---|
| 271 | return myEmptyIcon; |
|---|
| 272 | } |
|---|
| 273 | |
|---|
| 274 | const QPixmap& IconManager::iconForStatus(unsigned long fullStatus, QString id, unsigned long ppid) |
|---|
| 275 | { |
|---|
| 276 | bool isAim = (ppid == LICQ_PPID) && (!id[0].isDigit()); |
|---|
| 277 | |
|---|
| 278 | ProtocolType protocol = (isAim ? ProtocolAim : static_cast<ProtocolType>(ppid)); |
|---|
| 279 | StatusIconType statusIcon = OnlineStatusIcon; |
|---|
| 280 | |
|---|
| 281 | // cut off the flags, since we should not mind about them |
|---|
| 282 | fullStatus &= ~ICQ_STATUS_FxFLAGS; |
|---|
| 283 | |
|---|
| 284 | if (fullStatus != ICQ_STATUS_OFFLINE && |
|---|
| 285 | (fullStatus & ICQ_STATUS_FxPRIVATE) && |
|---|
| 286 | !Config::ContactList::instance()->showExtendedIcons()) |
|---|
| 287 | statusIcon = PrivateStatusIcon; |
|---|
| 288 | |
|---|
| 289 | else if (fullStatus == ICQ_STATUS_OFFLINE) |
|---|
| 290 | statusIcon = OfflineStatusIcon; |
|---|
| 291 | |
|---|
| 292 | else |
|---|
| 293 | { |
|---|
| 294 | if (protocol == ProtocolMsn) |
|---|
| 295 | { |
|---|
| 296 | if (fullStatus & (ICQ_STATUS_DND | ICQ_STATUS_OCCUPIED)) |
|---|
| 297 | statusIcon = OccupiedStatusIcon; |
|---|
| 298 | |
|---|
| 299 | else if (fullStatus & (ICQ_STATUS_NA | ICQ_STATUS_AWAY)) |
|---|
| 300 | statusIcon = AwayStatusIcon; |
|---|
| 301 | } |
|---|
| 302 | else if (protocol == ProtocolAim) |
|---|
| 303 | { |
|---|
| 304 | if (fullStatus & (ICQ_STATUS_DND | ICQ_STATUS_OCCUPIED | ICQ_STATUS_NA | ICQ_STATUS_AWAY)) |
|---|
| 305 | statusIcon = AwayStatusIcon; |
|---|
| 306 | } |
|---|
| 307 | else |
|---|
| 308 | { |
|---|
| 309 | if (fullStatus & ICQ_STATUS_DND) |
|---|
| 310 | statusIcon = DoNotDisturbStatusIcon; |
|---|
| 311 | |
|---|
| 312 | else if (fullStatus & ICQ_STATUS_OCCUPIED) |
|---|
| 313 | statusIcon = OccupiedStatusIcon; |
|---|
| 314 | |
|---|
| 315 | else if (fullStatus & ICQ_STATUS_NA) |
|---|
| 316 | statusIcon = NotAvailableStatusIcon; |
|---|
| 317 | |
|---|
| 318 | else if (fullStatus & ICQ_STATUS_AWAY) |
|---|
| 319 | statusIcon = AwayStatusIcon; |
|---|
| 320 | |
|---|
| 321 | else if ((fullStatus & ICQ_STATUS_FREEFORCHAT) && |
|---|
| 322 | myStatusIconMap.contains( |
|---|
| 323 | QPair<ProtocolType, StatusIconType>(ProtocolIcq, FreeForChatStatusIcon))) |
|---|
| 324 | statusIcon = FreeForChatStatusIcon; |
|---|
| 325 | } |
|---|
| 326 | } |
|---|
| 327 | |
|---|
| 328 | if (myStatusIconMap.contains(QPair<ProtocolType, StatusIconType>(protocol, statusIcon))) |
|---|
| 329 | return myStatusIconMap[QPair<ProtocolType, StatusIconType>(protocol, statusIcon)]; |
|---|
| 330 | |
|---|
| 331 | // No protocol specific icon existed so use default (same as ICQ) |
|---|
| 332 | return myStatusIconMap[QPair<ProtocolType, StatusIconType>(ProtocolIcq, statusIcon)]; |
|---|
| 333 | } |
|---|
| 334 | |
|---|
| 335 | const QPixmap& IconManager::iconForEvent(unsigned short subCommand) |
|---|
| 336 | { |
|---|
| 337 | IconType icon; |
|---|
| 338 | switch(subCommand) |
|---|
| 339 | { |
|---|
| 340 | case ICQ_CMDxSUB_URL: |
|---|
| 341 | icon = UrlMessageIcon; |
|---|
| 342 | break; |
|---|
| 343 | case ICQ_CMDxSUB_CHAT: |
|---|
| 344 | icon = ChatMessageIcon; |
|---|
| 345 | break; |
|---|
| 346 | case ICQ_CMDxSUB_FILE: |
|---|
| 347 | icon = FileMessageIcon; |
|---|
| 348 | break; |
|---|
| 349 | case ICQ_CMDxSUB_CONTACTxLIST: |
|---|
| 350 | icon = ContactMessageIcon; |
|---|
| 351 | break; |
|---|
| 352 | case ICQ_CMDxSUB_AUTHxREQUEST: |
|---|
| 353 | icon = ReqAuthorizeMessageIcon; |
|---|
| 354 | break; |
|---|
| 355 | case ICQ_CMDxSUB_AUTHxREFUSED: |
|---|
| 356 | case ICQ_CMDxSUB_AUTHxGRANTED: |
|---|
| 357 | icon = AuthorizeMessageIcon; |
|---|
| 358 | break; |
|---|
| 359 | case ICQ_CMDxSUB_MSG: |
|---|
| 360 | default: |
|---|
| 361 | icon = StandardMessageIcon; |
|---|
| 362 | } |
|---|
| 363 | |
|---|
| 364 | return myIconMap[icon]; |
|---|
| 365 | } |
|---|