summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-02-01 17:52:22 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-02-01 17:52:22 +0300
commit2eb26dc2acbcd30ae9f3673dae89ba647f594564 (patch)
tree3e79dccb35ce2a778f8e889b14858cddd54d851c
parenta394c200ee2664b177d376259ab26b78bb854c19 (diff)
PLI_ONLINE & PLI_OFFLINE - unused constants removed
-rw-r--r--include/delphi/m_protosvc.inc3
-rw-r--r--include/m_protosvc.h96
-rw-r--r--plugins/ConnectionNotify/src/ConnectionNotify.cpp9
-rw-r--r--plugins/LotusNotify/src/LotusNotify.cpp11
-rw-r--r--protocols/EmLanProto/src/amdproto.cpp9
-rw-r--r--protocols/Sametime/src/sametime.cpp3
-rw-r--r--src/mir_app/src/meta_services.cpp10
7 files changed, 67 insertions, 74 deletions
diff --git a/include/delphi/m_protosvc.inc b/include/delphi/m_protosvc.inc
index 83e1c2a841..8e0279c170 100644
--- a/include/delphi/m_protosvc.inc
+++ b/include/delphi/m_protosvc.inc
@@ -277,9 +277,8 @@ const
the online icon with further UI-specified icon to
repressent the exact status mode.
}
+
PLI_PROTOCOL = $1; // An icon representing the protocol (eg the multicoloured flower for ICQ)
- PLI_ONLINE = $2; // Online state icon for that protocol (eg green flower for ICQ)
- PLI_OFFLINE = $3; // Offline state icon for that protocol (eg red flower for ICQ)
PLIF_LARGE = $0; // Or with one of the above to get the large (32x32 by default) icon
PLIF_SMALL = $10000; // Or with one of the above to get the small (16x16 by default) icon
diff --git a/include/m_protosvc.h b/include/m_protosvc.h
index 8d01c2162f..64208048ae 100644
--- a/include/m_protosvc.h
+++ b/include/m_protosvc.h
@@ -48,55 +48,56 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// correctly
#define PFLAGNUM_1 1
-#define PF1_IMSEND 0x00000001 // supports IM sending
-#define PF1_IMRECV 0x00000002 // supports IM receiving
-#define PF1_IM (PF1_IMSEND|PF1_IMRECV)
-#define PF1_URLSEND 0x00000004 // supports separate URL sending
-#define PF1_URLRECV 0x00000008 // supports separate URL receiving
-#define PF1_URL (PF1_URLSEND|PF1_URLRECV)
-#define PF1_FILESEND 0x00000010 // supports file sending
-#define PF1_FILERECV 0x00000020 // supports file receiving
-#define PF1_FILE (PF1_FILESEND|PF1_FILERECV)
-#define PF1_MODEMSGSEND 0x00000040 // supports broadcasting away messages
-#define PF1_MODEMSGRECV 0x00000080 // supports reading others' away messages
-#define PF1_MODEMSG (PF1_MODEMSGSEND|PF1_MODEMSGRECV)
-#define PF1_SERVERCLIST 0x00000100 // contact lists are stored on the server, not locally. See notes below
-#define PF1_AUTHREQ 0x00000200 // will get authorisation requests for some or all contacts
-#define PF1_ADDED 0x00000400 // will get 'you were added' notifications
-#define PF1_VISLIST 0x00000800 // has an invisible list
-#define PF1_INVISLIST 0x00001000 // has a visible list for when in invisible mode
-#define PF1_INDIVSTATUS 0x00002000 // supports setting different status modes to each contact
-#define PF1_EXTENSIBLE 0x00004000 // the protocol is extensible and supports plugin-defined messages
-#define PF1_PEER2PEER 0x00008000 // supports direct (not server mediated) communication between clients
-#define PF1_NEWUSER 0x00010000 // supports creation of new user IDs
-#define PF1_CHAT 0x00020000 // has a realtime chat capability
-#define PF1_INDIVMODEMSG 0x00040000 // supports replying to a mode message request with different text depending on the contact requesting
-#define PF1_BASICSEARCH 0x00080000 // supports a basic user searching facility
-#define PF1_EXTSEARCH 0x00100000 // supports one or more protocol-specific extended search schemes
-#define PF1_CANRENAMEFILE 0x00200000 // supports renaming of incoming files as they are transferred
-#define PF1_FILERESUME 0x00400000 // can resume broken file transfers, see PS_FILERESUME below
-#define PF1_ADDSEARCHRES 0x00800000 // can add search results to the contact list
-#define PF1_CONTACTSEND 0x01000000 // can send contacts to other users
-#define PF1_CONTACTRECV 0x02000000 // can receive contacts from other users
-#define PF1_CONTACT (PF1_CONTACTSEND|PF1_CONTACTRECV)
-#define PF1_CHANGEINFO 0x04000000 // can change our user information stored on server
-#define PF1_SEARCHBYEMAIL 0x08000000 // supports a search by e-mail feature
-#define PF1_USERIDISEMAIL 0x10000000 // set if the uniquely identifying field of the network is the e-mail address
-#define PF1_SEARCHBYNAME 0x20000000 // supports searching by nick/first/last names
-#define PF1_EXTSEARCHUI 0x40000000 // has a dialog box to allow searching all the possible fields
-#define PF1_NUMERICUSERID 0x80000000 // the unique user IDs for this protocol are numeric
+#define PF1_IMSEND 0x00000001 // supports IM sending
+#define PF1_IMRECV 0x00000002 // supports IM receiving
+#define PF1_URLSEND 0x00000004 // supports separate URL sending
+#define PF1_URLRECV 0x00000008 // supports separate URL receiving
+#define PF1_FILESEND 0x00000010 // supports file sending
+#define PF1_FILERECV 0x00000020 // supports file receiving
+#define PF1_MODEMSGSEND 0x00000040 // supports broadcasting away messages
+#define PF1_MODEMSGRECV 0x00000080 // supports reading others' away messages
+#define PF1_SERVERCLIST 0x00000100 // contact lists are stored on the server, not locally. See notes below
+#define PF1_AUTHREQ 0x00000200 // will get authorisation requests for some or all contacts
+#define PF1_ADDED 0x00000400 // will get 'you were added' notifications
+#define PF1_VISLIST 0x00000800 // has an invisible list
+#define PF1_INVISLIST 0x00001000 // has a visible list for when in invisible mode
+#define PF1_INDIVSTATUS 0x00002000 // supports setting different status modes to each contact
+#define PF1_EXTENSIBLE 0x00004000 // the protocol is extensible and supports plugin-defined messages
+#define PF1_PEER2PEER 0x00008000 // supports direct (not server mediated) communication between clients
+#define PF1_NEWUSER 0x00010000 // supports creation of new user IDs
+#define PF1_CHAT 0x00020000 // has a realtime chat capability
+#define PF1_INDIVMODEMSG 0x00040000 // supports replying to a mode message request with different text depending on the contact requesting
+#define PF1_BASICSEARCH 0x00080000 // supports a basic user searching facility
+#define PF1_EXTSEARCH 0x00100000 // supports one or more protocol-specific extended search schemes
+#define PF1_CANRENAMEFILE 0x00200000 // supports renaming of incoming files as they are transferred
+#define PF1_FILERESUME 0x00400000 // can resume broken file transfers, see PS_FILERESUME below
+#define PF1_ADDSEARCHRES 0x00800000 // can add search results to the contact list
+#define PF1_CONTACTSEND 0x01000000 // can send contacts to other users
+#define PF1_CONTACTRECV 0x02000000 // can receive contacts from other users
+#define PF1_CHANGEINFO 0x04000000 // can change our user information stored on server
+#define PF1_SEARCHBYEMAIL 0x08000000 // supports a search by e-mail feature
+#define PF1_USERIDISEMAIL 0x10000000 // set if the uniquely identifying field of the network is the e-mail address
+#define PF1_SEARCHBYNAME 0x20000000 // supports searching by nick/first/last names
+#define PF1_EXTSEARCHUI 0x40000000 // has a dialog box to allow searching all the possible fields
+#define PF1_NUMERICUSERID 0x80000000 // the unique user IDs for this protocol are numeric
+
+#define PF1_IM (PF1_IMSEND|PF1_IMRECV)
+#define PF1_URL (PF1_URLSEND|PF1_URLRECV)
+#define PF1_FILE (PF1_FILESEND|PF1_FILERECV)
+#define PF1_MODEMSG (PF1_MODEMSGSEND|PF1_MODEMSGRECV)
+#define PF1_CONTACT (PF1_CONTACTSEND|PF1_CONTACTRECV)
///////////////////////////////////////////////////////////////////////////////
// the status modes that the protocol supports
#define PFLAGNUM_2 2
-#define PF2_ONLINE 0x00000001 // an unadorned online mode
+#define PF2_ONLINE 0x00000001 // an unadorned online mode
#define PF2_INVISIBLE 0x00000002
-#define PF2_SHORTAWAY 0x00000004 // Away on ICQ, BRB on MSN
-#define PF2_LONGAWAY 0x00000008 // NA on ICQ, Away on MSN
-#define PF2_LIGHTDND 0x00000010 // Occupied on ICQ, Busy on MSN
-#define PF2_HEAVYDND 0x00000020 // DND on ICQ
+#define PF2_SHORTAWAY 0x00000004 // Away on ICQ, BRB on MSN
+#define PF2_LONGAWAY 0x00000008 // NA on ICQ, Away on MSN
+#define PF2_LIGHTDND 0x00000010 // Occupied on ICQ, Busy on MSN
+#define PF2_HEAVYDND 0x00000020 // DND on ICQ
#define PF2_FREECHAT 0x00000040
#define PF2_OUTTOLUNCH 0x00000080
#define PF2_ONTHEPHONE 0x00000100
@@ -211,12 +212,11 @@ static __inline unsigned long Proto_Status2Flag(int status)
// The UI should overlay the online icon with a further UI-specified icon to
// represent the exact status mode.
-#define PLI_PROTOCOL 1 // An icon representing the protocol (eg the multicoloured flower for ICQ)
-#define PLI_ONLINE 2 // Online state icon for that protocol (eg green flower for ICQ)
-#define PLI_OFFLINE 3 // Offline state icon for that protocol (eg red flower for ICQ)
-#define PLIF_LARGE 0 // OR with one of the above to get the large (32x32 by default) icon
-#define PLIF_SMALL 0x10000 // OR with one of the above to get the small (16x16 by default) icon
-#define PLIF_ICOLIB 0x20000 // the returned HICON is managed by IcoLib, DO NOT DestroyIcon() it
+#define PLI_PROTOCOL 1 // An icon representing the protocol (eg the multicoloured flower for ICQ)
+
+#define PLIF_LARGE 0x00000 // OR with one of the above to get the large (32x32 by default) icon
+#define PLIF_SMALL 0x10000 // OR with one of the above to get the small (16x16 by default) icon
+#define PLIF_ICOLIB 0x20000 // the returned HICON is managed by IcoLib, DO NOT DestroyIcon() it
#define PLIF_ICOLIBHANDLE 0x40000 // the function will return IcoLib handle not HICON
#define PS_LOADICON "/LoadIcon"
diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
index 0ec95a3328..9bec312628 100644
--- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp
+++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
@@ -621,10 +621,11 @@ INT_PTR TMLoadIcon(WPARAM wParam, LPARAM)
UINT id;
switch (wParam & 0xFFFF) {
- case PLI_ONLINE:
- case PLI_PROTOCOL: id = IDI_ICON1; break; // IDI_TM is the main icon for the protocol
- case PLI_OFFLINE: id = IDI_ICON2; break;
- default: return 0;
+ case PLI_PROTOCOL:
+ id = IDI_ICON1;
+ break; // IDI_TM is the main icon for the protocol
+ default:
+ return 0;
}
return (INT_PTR)LoadImage(hInst, MAKEINTRESOURCE(id), IMAGE_ICON, GetSystemMetrics(wParam&PLIF_SMALL ? SM_CXSMICON : SM_CXICON), GetSystemMetrics(wParam&PLIF_SMALL ? SM_CYSMICON : SM_CYICON), 0);
}
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp
index 9c5d016cde..90a1d3fe59 100644
--- a/plugins/LotusNotify/src/LotusNotify.cpp
+++ b/plugins/LotusNotify/src/LotusNotify.cpp
@@ -1504,12 +1504,13 @@ INT_PTR TMLoadIcon(WPARAM wParam, LPARAM)
UINT id;
switch (wParam & 0xFFFF) {
- case PLI_ONLINE:
- case PLI_PROTOCOL: id = IDI_ICON1; break; // IDI_TM is the main icon for the protocol
- case PLI_OFFLINE: id = IDI_ICON2; break;
- default: return 0;
+ case PLI_PROTOCOL:
+ id = IDI_ICON1;
+ break; // IDI_TM is the main icon for the protocol
+ default:
+ return 0;
}
- return (INT_PTR)LoadImage(hInst, MAKEINTRESOURCE(id), IMAGE_ICON, GetSystemMetrics(wParam&PLIF_SMALL ? SM_CXSMICON : SM_CXICON), GetSystemMetrics(wParam&PLIF_SMALL ? SM_CYSMICON : SM_CYICON), 0);
+ return (INT_PTR)LoadImage(hInst, MAKEINTRESOURCE(id), IMAGE_ICON, GetSystemMetrics(wParam & PLIF_SMALL ? SM_CXSMICON : SM_CXICON), GetSystemMetrics(wParam & PLIF_SMALL ? SM_CYSMICON : SM_CYICON), 0);
}
diff --git a/protocols/EmLanProto/src/amdproto.cpp b/protocols/EmLanProto/src/amdproto.cpp
index 4ad6a6c077..c65fdeb4de 100644
--- a/protocols/EmLanProto/src/amdproto.cpp
+++ b/protocols/EmLanProto/src/amdproto.cpp
@@ -85,11 +85,10 @@ static INT_PTR __cdecl EMPGetName(WPARAM wParam, LPARAM lParam)
static INT_PTR __cdecl EMPLoadIcon(WPARAM wParam, LPARAM)
{
- UINT id = IDI_ICON_ONLINE;
- if ((wParam & 0xFFFF) == PLI_OFFLINE)
- id = IDI_ICON_OFFLINE;
- HICON res = LoadIcon(g_hInstance, MAKEINTRESOURCE(id));
- return (INT_PTR)res;
+ if ((wParam & 0xFFFF) != PLI_PROTOCOL)
+ return 0;
+
+ return (INT_PTR)LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_ICON_ONLINE));
}
static INT_PTR __cdecl EMPGetStatus(WPARAM, LPARAM)
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp
index 0a2e9631ff..0b78ced3f5 100644
--- a/protocols/Sametime/src/sametime.cpp
+++ b/protocols/Sametime/src/sametime.cpp
@@ -59,8 +59,7 @@ INT_PTR CSametimeProto::GetStatus(WPARAM wParam, LPARAM lParam)
/** Loads the icon corresponding to the status
* Called by the CList when the status changes.
-* @param wParam : one of the following values : \n
- <tt>PLI_PROTOCOL | PLI_ONLINE | PLI_OFFLINE</tt>
+* @param wParam : icon type
* @return an \c HICON in which the icon has been loaded.
*/
INT_PTR CSametimeProto::SametimeLoadIcon(WPARAM wParam, LPARAM lParam)
diff --git a/src/mir_app/src/meta_services.cpp b/src/mir_app/src/meta_services.cpp
index 37b23f355c..d3f1827e9f 100644
--- a/src/mir_app/src/meta_services.cpp
+++ b/src/mir_app/src/meta_services.cpp
@@ -94,8 +94,7 @@ INT_PTR Meta_GetName(WPARAM wParam, LPARAM lParam)
/** Loads the icon corresponding to the status
* Called by the CList when the status changes.
-* @param wParam : one of the following values : \n
-<tt>PLI_PROTOCOL | PLI_ONLINE | PLI_OFFLINE</tt>
+* @param wParam : icon type
* @return an \c HICON in which the icon has been loaded.
*/
@@ -106,12 +105,7 @@ INT_PTR Meta_LoadIcon(WPARAM wParam, LPARAM)
case PLI_PROTOCOL:
id = IDI_MCMENU;
break;
- case PLI_ONLINE:
- id = IDI_MCMENU;
- break;
- case PLI_OFFLINE:
- id = IDI_MCMENU;
- break;
+
default:
return 0;
}