summaryrefslogtreecommitdiff
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
parentde898be6a2857dababe3eaa2bfb394a9ea92ecbe (diff)
PF2_NONE : flag for protocols that have no statuses at all
fixes #1247
-rw-r--r--include/m_protosvc.h1
-rw-r--r--plugins/CloudFile/src/cloud_file.cpp3
-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
5 files changed, 7 insertions, 2 deletions
diff --git a/include/m_protosvc.h b/include/m_protosvc.h
index 0709e5b542..562c77c0e6 100644
--- a/include/m_protosvc.h
+++ b/include/m_protosvc.h
@@ -102,6 +102,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define PF2_OUTTOLUNCH 0x00000080
#define PF2_ONTHEPHONE 0x00000100
#define PF2_IDLE 0x00000200
+#define PF2_NONE 0x10000000 // protocol has no statuses at all
///////////////////////////////////////////////////////////////////////////////
// the status modes that the protocol supports
diff --git a/plugins/CloudFile/src/cloud_file.cpp b/plugins/CloudFile/src/cloud_file.cpp
index 331d4d426c..6d92528f8a 100644
--- a/plugins/CloudFile/src/cloud_file.cpp
+++ b/plugins/CloudFile/src/cloud_file.cpp
@@ -39,6 +39,9 @@ DWORD_PTR CCloudService::GetCaps(int type, MCONTACT)
switch (type) {
case PFLAGNUM_1:
return PF1_FILESEND;
+ case PFLAGNUM_2:
+ case PFLAGNUM_5:
+ return PF2_NONE;
default:
return 0;
}
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 },