diff options
author | George Hazan <george.hazan@gmail.com> | 2014-07-23 15:43:46 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-07-23 15:43:46 +0000 |
commit | 59469a44731feba111a76f0154c42bb3fc5bb04e (patch) | |
tree | 2abca57dffa8bbf55be2b43d7d8ed669d542e529 /plugins/Scriver/src/msgdialog.cpp | |
parent | 480aab2b3ffb0b439e160a8c716ef0d982af1acf (diff) |
removing direct access to metas: Scriver
git-svn-id: http://svn.miranda-ng.org/main/trunk@9925 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src/msgdialog.cpp')
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 3f7d830faa..e471643fc2 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -254,16 +254,10 @@ void SetStatusIcon(SrmmWindowData *dat) if (dat->szProto == NULL)
return;
- char *szProto = dat->szProto;
- MCONTACT hContact = dat->windowData.hContact;
-
- if (!strcmp(dat->szProto, META_PROTO) && db_get_b(NULL,"CLC","Meta",0) == 0) {
- hContact = db_mc_getMostOnline(dat->windowData.hContact);
- if (hContact != NULL)
- szProto = GetContactProto(hContact);
- else
- hContact = dat->windowData.hContact;
- }
+ MCONTACT hContact = db_mc_getSrmmSub(dat->windowData.hContact);
+ if (hContact == NULL)
+ hContact = dat->windowData.hContact;
+ char *szProto = GetContactProto(hContact);
Skin_ReleaseIcon(dat->statusIcon);
dat->statusIcon = LoadSkinnedProtoIcon(szProto, dat->wStatus);
@@ -1749,19 +1743,16 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case IDC_SMILEYS:
if (g_dat.smileyAddInstalled) {
SMADD_SHOWSEL3 smaddInfo;
- RECT rc;
smaddInfo.cbSize = sizeof(SMADD_SHOWSEL3);
smaddInfo.hwndParent = dat->hwndParent;
smaddInfo.hwndTarget = GetDlgItem(hwndDlg, IDC_MESSAGE);
smaddInfo.targetMessage = EM_REPLACESEL;
smaddInfo.targetWParam = TRUE;
- smaddInfo.Protocolname = dat->szProto;
- if (dat->szProto != NULL && strcmp(dat->szProto, META_PROTO) == 0) {
- MCONTACT hContact = db_mc_getMostOnline(dat->windowData.hContact);
- if (hContact != NULL) {
- smaddInfo.Protocolname = GetContactProto(hContact);
- }
- }
+
+ MCONTACT hContact = db_mc_getSrmmSub(dat->windowData.hContact);
+ smaddInfo.Protocolname = (hContact != NULL) ? GetContactProto(hContact) : dat->szProto;
+
+ RECT rc;
GetWindowRect(GetDlgItem(hwndDlg, IDC_SMILEYS), &rc);
smaddInfo.Direction = 0;
smaddInfo.xPosition = rc.left;
|