summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Scriver/src/Version.h4
-rw-r--r--plugins/Scriver/src/msgdialog.cpp27
-rw-r--r--plugins/Scriver/src/msglog.cpp10
-rw-r--r--plugins/Scriver/src/msgs.cpp10
4 files changed, 20 insertions, 31 deletions
diff --git a/plugins/Scriver/src/Version.h b/plugins/Scriver/src/Version.h
index 7c1393992f..18d5a1a47d 100644
--- a/plugins/Scriver/src/Version.h
+++ b/plugins/Scriver/src/Version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 2
#define __MINOR_VERSION 11
-#define __RELEASE_NUM 0
-#define __BUILD_NUM 2
+#define __RELEASE_NUM 1
+#define __BUILD_NUM 1
#include <stdver.h>
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;
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index 585cd5f7ab..096e106ea1 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -916,12 +916,10 @@ void StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAppend)
SMADD_RICHEDIT3 smre;
smre.cbSize = sizeof(SMADD_RICHEDIT3);
smre.hwndRichEditControl = GetDlgItem(hwndDlg, IDC_LOG);
- smre.Protocolname = dat->szProto;
- if (dat->szProto != NULL && strcmp(dat->szProto, META_PROTO) == 0) {
- MCONTACT hContact = db_mc_getMostOnline(dat->windowData.hContact);
- if (hContact != NULL)
- smre.Protocolname = GetContactProto(hContact);
- }
+
+ MCONTACT hContact = db_mc_getSrmmSub(dat->windowData.hContact);
+ smre.Protocolname = (hContact != NULL) ? GetContactProto(hContact) : dat->szProto;
+
if (fi.chrg.cpMin > 0) {
sel.cpMin = fi.chrg.cpMin;
sel.cpMax = -1;
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index ec47078267..0ebb48f1f2 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -62,11 +62,11 @@ static int SRMMStatusToPf2(int status)
int IsAutoPopup(MCONTACT hContact) {
if (g_dat.flags & SMF_AUTOPOPUP) {
char *szProto = GetContactProto(hContact);
- if (strcmp(szProto, META_PROTO) == 0) {
- hContact = db_mc_getMostOnline(hContact);
- if (hContact != NULL)
- szProto = GetContactProto(hContact);
- }
+
+ hContact = db_mc_getSrmmSub(hContact);
+ if (hContact != NULL)
+ szProto = GetContactProto(hContact);
+
if (szProto && (g_dat.openFlags & SRMMStatusToPf2(CallProtoService(szProto, PS_GETSTATUS, 0, 0))))
return 1;
}