diff options
author | George Hazan <george.hazan@gmail.com> | 2015-03-02 17:24:43 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-03-02 17:24:43 +0000 |
commit | 20cc2883a8790563b18e7ba2985b6e92b27073af (patch) | |
tree | 9a7fb043b04465a9df88434ffc0f60e438bfe7c1 /plugins/SeenPlugin/src/menu.cpp | |
parent | 2c65784dd4a3c4bfdca6487244291926b9ff9132 (diff) |
- much more effective protocol filter;
- support for server-side LastSeen requests;
- interception of LastSeen writes from another modules;
- code cleaning;
- version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@12300 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SeenPlugin/src/menu.cpp')
-rw-r--r-- | plugins/SeenPlugin/src/menu.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp index bf8e1e2709..1e07d649d7 100644 --- a/plugins/SeenPlugin/src/menu.cpp +++ b/plugins/SeenPlugin/src/menu.cpp @@ -25,16 +25,16 @@ HGENMENU hmenuitem = NULL; void InitHistoryDialog(void);
-/*
-Handles the messages sent by clicking the contact's menu item
-*/
-INT_PTR MenuitemClicked(WPARAM wparam,LPARAM)
+/////////////////////////////////////////////////////////////////////////////////////////
+// Handles the messages sent by clicking the contact's menu item
+
+INT_PTR MenuitemClicked(WPARAM wparam, LPARAM)
{
ShowHistory((MCONTACT)wparam, 0);
return 0;
}
-int BuildContactMenu(WPARAM wparam,LPARAM)
+int BuildContactMenu(WPARAM wparam, LPARAM)
{
int id = -1, isetting;
MCONTACT hContact = (MCONTACT)wparam;
@@ -48,21 +48,21 @@ int BuildContactMenu(WPARAM wparam,LPARAM) cmi.hIcon = NULL;
DBVARIANT dbv;
- if ( !db_get_ts(NULL, S_MOD, "MenuStamp", &dbv)) {
+ if (!db_get_ts(NULL, S_MOD, "MenuStamp", &dbv)) {
cmi.ptszName = ParseString(dbv.ptszVal, (MCONTACT)wparam, 0);
db_free(&dbv);
}
else cmi.ptszName = ParseString(DEFAULT_MENUSTAMP, (MCONTACT)wparam, 0);
-
- if ( !_tcscmp(cmi.ptszName, TranslateT("<unknown>"))) {
- if ( IsWatchedProtocol(szProto))
+
+ if (!_tcscmp(cmi.ptszName, TranslateT("<unknown>"))) {
+ if (IsWatchedProtocol(szProto))
cmi.flags |= CMIF_GRAYED;
else
- cmi.flags |= CMIF_HIDDEN;
+ cmi.flags |= CMIF_HIDDEN;
}
- else if ( db_get_b(NULL, S_MOD, "ShowIcon",1)) {
+ else if (db_get_b(NULL, S_MOD, "ShowIcon", 1)) {
isetting = db_get_w(hContact, S_MOD, "StatusTriger", -1);
- cmi.hIcon = LoadSkinnedProtoIcon(szProto, isetting|0x8000);
+ cmi.hIcon = LoadSkinnedProtoIcon(szProto, isetting | 0x8000);
}
}
@@ -80,8 +80,8 @@ void InitMenuitem() cmi.ptszName = LPGENT("<none>");
cmi.pszService = "LastSeenUserDetails";
hmenuitem = Menu_AddContactMenuItem(&cmi);
-
- HookEvent(ME_CLIST_PREBUILDCONTACTMENU,BuildContactMenu);
+
+ HookEvent(ME_CLIST_PREBUILDCONTACTMENU, BuildContactMenu);
InitHistoryDialog();
}
|