From 4b8a74d9f8b6e9b891c6d81f57e3d92f482d0df9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 4 Jun 2019 19:41:41 +0300 Subject: fixes #1963 (third portion) --- include/delphi/m_skin.inc | 6 +- plugins/Clist_nicer/res/overlay/lunch.ico | Bin 1150 -> 0 bytes plugins/Clist_nicer/res/overlay/phone.ico | Bin 1150 -> 0 bytes plugins/Clist_nicer/res/resource.rc | 4 -- plugins/Clist_nicer/src/clui.cpp | 6 +- plugins/Clist_nicer/src/resource.h | 2 - plugins/TrafficCounter/src/resource.h | 102 +----------------------------- protocols/JabberG/src/jabber_icolib.cpp | 17 ++--- protocols/Non-IM Contact/res/resource.rc | 3 - 9 files changed, 13 insertions(+), 127 deletions(-) delete mode 100644 plugins/Clist_nicer/res/overlay/lunch.ico delete mode 100644 plugins/Clist_nicer/res/overlay/phone.ico diff --git a/include/delphi/m_skin.inc b/include/delphi/m_skin.inc index 27c3d8a86e..d487bcc5c1 100644 --- a/include/delphi/m_skin.inc +++ b/include/delphi/m_skin.inc @@ -103,10 +103,7 @@ const SKINICON_STATUS_NA = 3; SKINICON_STATUS_OCCUPIED = 4; SKINICON_STATUS_DND = 5; - SKINICON_STATUS_FREE4CHAT = 6; - SKINICON_STATUS_INVISIBLE = 7; - SKINICON_STATUS_ONTHEPHONE = 8; - SKINICON_STATUS_OUTTOLUNCH = 9; + SKINICON_STATUS_INVISIBLE = 6; function Skin_LoadProtoIcon(protoName:PAnsiChar; iconId:int; big:byte) : HICON; stdcall; external AppDLL name 'Skin_LoadProtoIcon'; @@ -120,4 +117,5 @@ const } MS_SKIN_LOADICON:PAnsiChar = 'Skin/Icons/Load'; + {$ENDIF} diff --git a/plugins/Clist_nicer/res/overlay/lunch.ico b/plugins/Clist_nicer/res/overlay/lunch.ico deleted file mode 100644 index 1a5abaaa0e..0000000000 Binary files a/plugins/Clist_nicer/res/overlay/lunch.ico and /dev/null differ diff --git a/plugins/Clist_nicer/res/overlay/phone.ico b/plugins/Clist_nicer/res/overlay/phone.ico deleted file mode 100644 index 3aad71f13a..0000000000 Binary files a/plugins/Clist_nicer/res/overlay/phone.ico and /dev/null differ diff --git a/plugins/Clist_nicer/res/resource.rc b/plugins/Clist_nicer/res/resource.rc index 5f1474bf7d..7f4918c797 100644 --- a/plugins/Clist_nicer/res/resource.rc +++ b/plugins/Clist_nicer/res/resource.rc @@ -501,10 +501,6 @@ IDI_OVL_OCCUPIED ICON "overlay/occupied.ico" IDI_OVL_INVISIBLE ICON "overlay/invisible.ico" -IDI_OVL_ONTHEPHONE ICON "overlay/phone.ico" - -IDI_OVL_OUTTOLUNCH ICON "overlay/lunch.ico" - IDI_HIDEOFFLINE ICON "online.ico" IDI_HIDEGROUPS ICON "groups.ico" diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 182e2970be..eecf002363 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -227,7 +227,7 @@ static HICON hIconSaved = nullptr; void ClearIcons(int mode) { - for (int i = IDI_OVL_OFFLINE; i <= IDI_OVL_OUTTOLUNCH; i++) { + for (int i = IDI_OVL_OFFLINE; i <= IDI_OVL_INVISIBLE; i++) { if (overlayicons[i - IDI_OVL_OFFLINE] != nullptr) { if (mode) DestroyIcon(overlayicons[i - IDI_OVL_OFFLINE]); @@ -240,7 +240,7 @@ static void CacheClientIcons() { ClearIcons(0); - for (int i = IDI_OVL_OFFLINE; i <= IDI_OVL_OUTTOLUNCH; i++) { + for (int i = IDI_OVL_OFFLINE; i <= IDI_OVL_INVISIBLE; i++) { char szBuffer[128]; mir_snprintf(szBuffer, "cln_ovl_%d", ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE)); overlayicons[i - IDI_OVL_OFFLINE] = IcoLib_GetIcon(szBuffer); @@ -251,7 +251,7 @@ static void InitIcoLib() { g_plugin.registerIcon(LPGEN("Contact list") "/" LPGEN("Default"), myIcons); - for (int i = IDI_OVL_OFFLINE; i <= IDI_OVL_OUTTOLUNCH; i++) { + for (int i = IDI_OVL_OFFLINE; i <= IDI_OVL_INVISIBLE; i++) { char szBuffer[128]; mir_snprintf(szBuffer, "cln_ovl_%d", ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE)); IconItemT icon[] = { { Clist_GetStatusModeDescription(ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE), 0), szBuffer, i } }; diff --git a/plugins/Clist_nicer/src/resource.h b/plugins/Clist_nicer/src/resource.h index 57072d9256..c530f2f768 100644 --- a/plugins/Clist_nicer/src/resource.h +++ b/plugins/Clist_nicer/src/resource.h @@ -260,8 +260,6 @@ #define IDI_OVL_NA 2054 #define IDI_OVL_OCCUPIED 2055 #define IDI_OVL_INVISIBLE 2057 -#define IDI_OVL_ONTHEPHONE 2058 -#define IDI_OVL_OUTTOLUNCH 2059 #define IDI_HIDEOFFLINE 2100 #define IDI_HIDEGROUPS 2101 #define IDI_SOUNDSON 2102 diff --git a/plugins/TrafficCounter/src/resource.h b/plugins/TrafficCounter/src/resource.h index b2bc799716..f822684f63 100644 --- a/plugins/TrafficCounter/src/resource.h +++ b/plugins/TrafficCounter/src/resource.h @@ -2,111 +2,13 @@ // Microsoft Visual C++ generated include file. // Used by resource.rc // -#define IDC_AUTHICON 1 -#define IDC_NOTOALL 3 #define IDC_APPLY 3 -#define IDI_MIRANDA 102 #define IDD_OPT_TRAFFIC_POPUPS 103 -#define IDD_ABOUT 103 -#define IDI_SMS 103 -#define IDI_ONLINE 104 -#define IDI_OFFLINE 105 -#define IDD_CUSTOM_FONT 106 -#define IDD_OPT_FONTS 107 -#define IDD_OPT_GENMENU 108 -#define IDD_OPT_PROTOCOLORDER 109 -#define IDD_OPT_ICOLIB 110 -#define IDD_ICOLIB_IMPORT 111 -#define IDD_ADDED 115 -#define IDD_AUTHREQ 121 -#define IDD_DETAILS 125 -#define IDD_HISTORY 127 -#define IDI_AWAY 128 -#define IDI_INVISIBLE 130 -#define IDI_NA 131 -#define IDI_LOAD 132 -#define IDD_OPT_SOUND 134 -#define IDI_RECVMSG 136 -#define IDI_URL 138 -#define IDI_DND 158 -#define IDI_OCCUPIED 159 -#define IDI_USERDETAILS 160 -#define IDI_FINDUSER 161 -#define IDI_HELP 162 -#define IDI_OPTIONS 163 -#define IDI_MIRANDAWEBSITE 172 -#define IDI_RENAME 173 -#define IDI_HISTORY 174 -#define IDI_DELETE 175 -#define IDR_CONTEXT 180 -#define IDR_ICOLIB_CONTEXT 181 -#define IDC_DROP 183 -#define IDD_HISTORY_FIND 192 -#define IDI_SENDEMAIL 193 -#define IDD_FILERECV 194 -#define IDD_PROFILEMANAGER 197 -#define IDI_BLANK 200 -#define IDD_FINDADD 201 -#define IDI_USERONLINE 201 -#define IDI_GROUPSHUT 202 -#define IDD_OPTIONS 203 -#define IDI_GROUPOPEN 203 -#define IDD_FILESEND 205 -#define IDI_NOTICK 205 -#define IDD_OPT_PLUGINS 206 -#define IDI_TICK 206 -#define IDD_OPT_ICONS 207 -#define IDI_FILE 207 -#define IDI_ADDCONTACT 210 -#define IDI_SMALLDOT 211 -#define IDI_FILLEDBLOB 212 -#define IDD_READAWAYMSG 213 -#define IDI_EMPTYBLOB 213 -#define IDD_OPT_IGNORE 214 -#define IDC_HYPERLINKHAND 214 -#define IDD_OPT_VISIBILITY 215 -#define IDC_DROPUSER 215 -#define IDD_SETAWAYMSG 216 -#define IDI_DETAILSLOGO 216 -#define IDD_OPT_AWAYMSG 217 -#define IDI_UNICODE 218 -#define IDI_ANSI 219 -#define IDD_INFO_SUMMARY 220 -#define IDI_LOADED 220 -#define IDD_INFO_CONTACT 221 -#define IDR_CREDITS 221 -#define IDI_NOTLOADED 221 -#define IDD_INFO_BACKGROUND 222 -#define IDD_INFO_NOTES 223 -#define IDD_ADDEMAIL 226 -#define IDD_ICONINDEX 227 -#define IDD_INFO_LOCATION 231 -#define IDD_INFO_WORK 232 -#define IDD_ADDPHONE 233 -#define IDD_INSTALLINI 235 -#define IDD_WARNINICHANGE 236 -#define IDD_INIIMPORTDONE 237 -#define IDB_SORTCOLUP 239 -#define IDB_SORTCOLDOWN 240 #define IDD_OPT_TRAFFIC 248 -#define IDD_FILETRANSFERINFO 249 -#define IDD_OPT_FILETRANSFER 250 -#define IDD_FILEEXISTS 251 -#define IDD_DELETECONTACT 254 -#define IDD_DENYREASON 256 -#define IDD_ADDCONTACT 257 -#define IDD_OPT_CONTACT 261 -#define IDI_DOWNARROW 264 -#define IDD_OPT_IDLE 268 -#define IDD_PROFILE_SELECTION 269 -#define IDD_PROFILE_NEW 270 -#define IDI_TYPING 274 -#define IDD_UPDATE_NOTIFY 275 -#define IDD_OPT_UPDATENOTIFY 276 -#define IDI_GROUP_ICON 286 -#define IDI_UNINSTALL_ICON 287 #define IDD_OPT_STATS 295 +#define IDI_ONTHEPHONE 1002 #define IDC_MESSAGE 1002 +#define IDI_OUTTOLUNCH 1003 #define IDC_AUTOCLOSE 1004 #define IDC_FROM 1005 #define IDC_AUTOMIN 1005 diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index 620600bf0f..6a81703261 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -29,13 +29,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define IDI_ONLINE 104 #define IDI_OFFLINE 105 #define IDI_AWAY 128 -#define IDI_FREE4CHAT 129 #define IDI_INVISIBLE 130 #define IDI_NA 131 #define IDI_DND 158 #define IDI_OCCUPIED 159 -#define IDI_ONTHEPHONE 1002 -#define IDI_OUTTOLUNCH 1003 HIMAGELIST hAdvancedStatusIcon = nullptr; @@ -75,8 +72,7 @@ static CTransportProtoTableItem TransportProtoTable[] = { "meinvz*", "MeinVZ" }, }; -static int skinIconStatusToResourceId[] = {IDI_OFFLINE,IDI_ONLINE,IDI_AWAY,IDI_DND,IDI_NA,IDI_NA,/*IDI_OCCUPIED,*/IDI_FREE4CHAT,IDI_INVISIBLE,IDI_ONTHEPHONE,IDI_OUTTOLUNCH}; -static int skinStatusToJabberStatus[] = {0,1,2,3,4,4,6,7,2,2}; +static int skinIconStatusToResourceId[] = { IDI_OFFLINE, IDI_ONLINE, IDI_AWAY, IDI_DND, IDI_NA, IDI_NA, IDI_OCCUPIED, IDI_INVISIBLE }; /////////////////////////////////////////////////////////////////////////////// // CIconPool class @@ -264,11 +260,10 @@ int CJabberProto::LoadAdvancedIcons(int iID) mir_cslock lck(m_csModeMsgMutex); for (int i = 0; i < ID_STATUS_MAX - ID_STATUS_OFFLINE; i++) { BOOL needFree; - int n = skinStatusToJabberStatus[i]; - wchar_t *descr = Clist_GetStatusModeDescription(n + ID_STATUS_OFFLINE, 0); - mir_snprintf(Uname, "%s_Transport_%s_%d", m_szModuleName, proto, n); - HICON hicon = LoadTransportIcon(defFile, -skinIconStatusToResourceId[i], Uname, Group, descr, -(n + ID_STATUS_OFFLINE), &needFree); - int index = (m_transportProtoTableStartIndex[iID] == -1) ? -1 : m_transportProtoTableStartIndex[iID] + n; + wchar_t *descr = Clist_GetStatusModeDescription(i + ID_STATUS_OFFLINE, 0); + mir_snprintf(Uname, "%s_Transport_%s_%d", m_szModuleName, proto, i); + HICON hicon = LoadTransportIcon(defFile, -skinIconStatusToResourceId[i], Uname, Group, descr, -(i + ID_STATUS_OFFLINE), &needFree); + int index = (m_transportProtoTableStartIndex[iID] == -1) ? -1 : m_transportProtoTableStartIndex[iID] + i; int added = ImageList_ReplaceIcon(hAdvancedStatusIcon, index, hicon ? hicon : empty); if (first == -1) first = added; @@ -306,7 +301,7 @@ int CJabberProto::GetTransportStatusIconIndex(int iID, int Status) if (Status < ID_STATUS_OFFLINE) Status = ID_STATUS_OFFLINE; - return m_transportProtoTableStartIndex[iID] + skinStatusToJabberStatus[Status - ID_STATUS_OFFLINE]; + return m_transportProtoTableStartIndex[iID] + Status - ID_STATUS_OFFLINE; } ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/protocols/Non-IM Contact/res/resource.rc b/protocols/Non-IM Contact/res/resource.rc index 14d3f4624b..f4e7ae70ff 100644 --- a/protocols/Non-IM Contact/res/resource.rc +++ b/protocols/Non-IM Contact/res/resource.rc @@ -74,10 +74,7 @@ BEGIN CONTROL "",CHK_NA,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,109,95,16,16 CONTROL "",CHK_OCC,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,128,95,16,16 CONTROL "",CHK_DND,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,147,95,16,16 - CONTROL "",CHK_FFC,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,166,95,16,16 CONTROL "",CHK_INVISIBLE,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,185,95,16,16 - CONTROL "",CHK_PHONE,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,204,95,16,16 - CONTROL "",CHK_LUNCH,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,223,95,16,16 LTEXT "Group:",IDC_STATIC,12,81,29,8 LTEXT "Status Icon",IDC_STATIC,12,99,54,8 LTEXT "Group\\Sub-Group",IDC_STATIC,205,81,67,8 -- cgit v1.2.3