diff options
author | George Hazan <ghazan@miranda.im> | 2019-06-04 19:41:41 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-06-04 19:42:35 +0300 |
commit | 4b8a74d9f8b6e9b891c6d81f57e3d92f482d0df9 (patch) | |
tree | 1c547520cb2994231b2eadb1a50456e453beff58 /protocols | |
parent | 1b084ebf8f809354d9dcc90b90f46aea244896a0 (diff) |
fixes #1963 (third portion)
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/JabberG/src/jabber_icolib.cpp | 17 | ||||
-rw-r--r-- | protocols/Non-IM Contact/res/resource.rc | 3 |
2 files changed, 6 insertions, 14 deletions
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 |