summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-06 00:02:09 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-06 00:02:09 +0300
commitf748401840ee648552825c99170c7d53d1b2ff43 (patch)
tree52818bf8bf5f1cefb36ebef2414ce74d5bf8c2b1 /src/mir_app
parentde898be6a2857dababe3eaa2bfb394a9ea92ecbe (diff)
PF2_NONE : flag for protocols that have no statuses at all
fixes #1247
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/proto_accs.cpp2
-rw-r--r--src/mir_app/src/proto_utils.cpp1
-rw-r--r--src/mir_app/src/skinicons.cpp2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/mir_app/src/proto_accs.cpp b/src/mir_app/src/proto_accs.cpp
index bd6bfc2e3c..1143ab5590 100644
--- a/src/mir_app/src/proto_accs.cpp
+++ b/src/mir_app/src/proto_accs.cpp
@@ -296,6 +296,8 @@ bool ActivateAccount(PROTOACCOUNT *pa)
return false;
pa->ppro = ppi;
+ if (ppi->m_hProtoIcon == nullptr)
+ ppi->m_hProtoIcon = IcoLib_IsManaged(Skin_LoadProtoIcon(pa->szModuleName, ID_STATUS_ONLINE));
ppi->m_iDesiredStatus = ppi->m_iStatus = ID_STATUS_OFFLINE;
return true;
}
diff --git a/src/mir_app/src/proto_utils.cpp b/src/mir_app/src/proto_utils.cpp
index 6fef3ccdab..932d8e6e7f 100644
--- a/src/mir_app/src/proto_utils.cpp
+++ b/src/mir_app/src/proto_utils.cpp
@@ -152,7 +152,6 @@ PROTO_INTERFACE::PROTO_INTERFACE(const char *pszModuleName, const wchar_t *ptszU
m_iVersion = 2;
m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
m_szModuleName = mir_strdup(pszModuleName);
- m_hProtoIcon = IcoLib_IsManaged(Skin_LoadProtoIcon(pszModuleName, ID_STATUS_ONLINE));
m_tszUserName = mir_wstrdup(ptszUserName);
db_set_resident(m_szModuleName, "Status");
diff --git a/src/mir_app/src/skinicons.cpp b/src/mir_app/src/skinicons.cpp
index 3f289f3eb6..4ba68c2241 100644
--- a/src/mir_app/src/skinicons.cpp
+++ b/src/mir_app/src/skinicons.cpp
@@ -102,7 +102,7 @@ static struct StandardIconDescription mainIcons[] =
static struct StandardIconDescription statusIcons[] =
{
- { ID_STATUS_OFFLINE, LPGEN("Offline"), -IDI_OFFLINE, 0xFFFFFFFF },
+ { ID_STATUS_OFFLINE, LPGEN("Offline"), -IDI_OFFLINE, 0x0FFFFFFF },
{ ID_STATUS_ONLINE, LPGEN("Online"), -IDI_ONLINE, PF2_ONLINE },
{ ID_STATUS_AWAY, LPGEN("Away"), -IDI_AWAY, PF2_SHORTAWAY },
{ ID_STATUS_NA, LPGEN("Not available"), -IDI_NA, PF2_LONGAWAY },