summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-15 21:51:28 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-15 21:51:28 +0000
commitd5d85efcecd6fa2f2efd84b369a642f47a511169 (patch)
tree48ba1d4b12bd71aebe9ebe2faa996b5344065e5d
parent9d482ed81c2a6a3361a5a9b2d0efbfc4b6b815c5 (diff)
oops
git-svn-id: http://svn.miranda-ng.org/main/trunk@4058 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp55
-rw-r--r--plugins/ChangeKeyboardLayout/src/options.cpp2
-rw-r--r--plugins/ChangeKeyboardLayout/src/text_operations.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/dlg_msgbox.cpp2
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp3
-rw-r--r--plugins/UserInfoEx/src/dlg_msgbox.cpp2
-rw-r--r--plugins/UserInfoEx/src/svc_refreshci.cpp2
7 files changed, 32 insertions, 36 deletions
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 3af375bfb7..fdc2161c2f 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -230,37 +230,34 @@ bool isContactGoneFor(HANDLE hContact, int days)
int daysSinceMessage = -1;
if (lastInputMsg != -1) daysSinceMessage = (int)((currentTime - lastInputMsg)/(60*60*24));
- if (options.hideInactive) {
- if (daysSinceMessage >= options.iSilencePeriod)
- if (!db_get_b(hContact, "CList", "Hidden", 0) && !db_get_b(hContact, MODULE_NAME, "NeverHide", 0)) {
- TCHAR szInfo[200];
-
- POPUPDATAT_V2 ppd = {0};
- ppd.cbSize = sizeof(ppd);
-
- ppd.lchContact = hContact;
- ppd.lchIcon = Skin_GetIcon("enabled_icon");
-
- mir_sntprintf(szInfo, 200, TranslateT("Hiding %s (%S)"), (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR), GetContactProto(hContact));
- _tcsncpy(ppd.lptzContactName, szInfo, MAX_CONTACTNAME);
- mir_sntprintf(szInfo, 200, TranslateT("%d days since last message"), daysSinceMessage);
- _tcsncpy(ppd.lptzText, szInfo, MAX_SECONDLINE);
- if (!options.iUsePopupColors) {
- ppd.colorBack = options.iPopUpColorBack;
- ppd.colorText = options.iPopUpColorFore;
- }
- ppd.PluginWindowProc = HidePopupDlgProc;
- ppd.PluginData = NULL;
- ppd.iSeconds = -1;
+ if (options.hideInactive)
+ if (daysSinceMessage >= options.iSilencePeriod)
+ if (!db_get_b(hContact, "CList", "Hidden", 0) && !db_get_b(hContact, MODULE_NAME, "NeverHide", 0)) {
+ POPUPDATAT_V2 ppd = {0};
+ ppd.cbSize = sizeof(ppd);
+ ppd.lchContact = hContact;
+ ppd.lchIcon = Skin_GetIcon("enabled_icon");
- hideactions[0].flags = hideactions[1].flags = PAF_ENABLED;
- ppd.lpActions = hideactions;
- ppd.actionCount = 2;
+ mir_sntprintf(ppd.lptzContactName, MAX_CONTACTNAME, TranslateT("Hiding %s (%S)"),
+ CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR),
+ GetContactProto(hContact));
- CallService(MS_POPUP_ADDPOPUPT, (WPARAM) &ppd, APF_NEWDATA);
+ mir_sntprintf(ppd.lptzText, MAX_SECONDLINE, TranslateT("%d days since last message"), daysSinceMessage);
- SkinPlaySound("buddyExpectatorHide");
- }
+ if (!options.iUsePopupColors) {
+ ppd.colorBack = options.iPopUpColorBack;
+ ppd.colorText = options.iPopUpColorFore;
+ }
+ ppd.PluginWindowProc = HidePopupDlgProc;
+ ppd.iSeconds = -1;
+
+ hideactions[0].flags = hideactions[1].flags = PAF_ENABLED;
+ ppd.lpActions = hideactions;
+ ppd.actionCount = 2;
+
+ CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, APF_NEWDATA);
+
+ SkinPlaySound("buddyExpectatorHide");
}
return (daysSinceOnline >= days && (daysSinceMessage == -1 || daysSinceMessage >= days));
@@ -520,7 +517,7 @@ int SettingChanged(WPARAM wParam, LPARAM lParam)
if (db_get_b(hContact, MODULE_NAME, "MissYou", 0)) {
// Display PopUp
POPUPDATAT_V2 ppd = {0};
- ppd.cbSize = sizeof(POPUPDATAT_V2);
+ ppd.cbSize = sizeof(ppd);
ppd.lchContact = hContact;
ppd.lchIcon = Skin_GetIcon("enabled_icon");
diff --git a/plugins/ChangeKeyboardLayout/src/options.cpp b/plugins/ChangeKeyboardLayout/src/options.cpp
index 44571e1352..1136e4b15a 100644
--- a/plugins/ChangeKeyboardLayout/src/options.cpp
+++ b/plugins/ChangeKeyboardLayout/src/options.cpp
@@ -353,7 +353,7 @@ INT_PTR CALLBACK DlgPopupsProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam,
ptszPopupPreviewText = (LPTSTR)mir_alloc(MaxTextSize*sizeof(TCHAR));
POPUPDATAT_V2 pdtData = { 0 };
- pdtData.cbSize = sizeof(POPUPDATAT_V2);
+ pdtData.cbSize = sizeof(pdtData);
_tcsncpy(pdtData.lptzContactName, TranslateT(ModuleName), MAX_CONTACTNAME);
_tcsncpy(pdtData.lptzText, _T("Ghbdtn? rfr ltkf&"), MAX_SECONDLINE);
diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.cpp b/plugins/ChangeKeyboardLayout/src/text_operations.cpp
index a7c00aa4ea..440840781d 100644
--- a/plugins/ChangeKeyboardLayout/src/text_operations.cpp
+++ b/plugins/ChangeKeyboardLayout/src/text_operations.cpp
@@ -527,7 +527,7 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord)
_tcscpy(ptszPopupText, ptszMBox);
POPUPDATAT_V2 pdtData = { 0 };
- pdtData.cbSize = sizeof(POPUPDATAT_V2);
+ pdtData.cbSize = sizeof(pdtData);
_tcsncpy(pdtData.lptzContactName, TranslateT(ModuleName), MAX_CONTACTNAME);
_tcsncpy(pdtData.lptzText, ptszPopupText, MAX_SECONDLINE);
diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
index 71accc2067..9d49a9b63f 100644
--- a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
+++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp
@@ -568,7 +568,7 @@ INT_PTR CALLBACK MsgBoxPop(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
LPMSGPOPUPDATA pmpd = (LPMSGPOPUPDATA)mir_alloc(sizeof(MSGPOPUPDATA));
if (pmpd) {
POPUPDATAT_V2 pd = { 0 };
- pd.cbSize = sizeof(POPUPDATAT);
+ pd.cbSize = sizeof(pd);
pd.lchContact = NULL; //(HANDLE)wParam;
// icon
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index d42c2cac8c..4ca5ebb313 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -114,6 +114,7 @@ void TN_TypingMessage(HANDLE hContact, int iMode)
int notyping;
POPUPDATAT_V2 ppd = { 0 };
+ ppd.cbSize = sizeof(ppd);
if (iMode == PROTOTYPE_CONTACTTYPING_OFF) {
if (StopDisabled)
@@ -180,8 +181,6 @@ void TN_TypingMessage(HANDLE hContact, int iMode)
ppd.lchIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
ppd.lchContact = hContact;
ppd.PluginWindowProc = (WNDPROC) PopupDlgProc;
- ppd.PluginData = NULL;
- ppd.cbSize = sizeof(ppd);
CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, APF_NEWDATA);
}
diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp
index 0b57e0d2e8..92500282ff 100644
--- a/plugins/UserInfoEx/src/dlg_msgbox.cpp
+++ b/plugins/UserInfoEx/src/dlg_msgbox.cpp
@@ -569,7 +569,7 @@ static INT_PTR CALLBACK MsgBoxPop(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lP
LPMSGPOPUPDATA pmpd = (LPMSGPOPUPDATA)mir_alloc(sizeof(MSGPOPUPDATA));
if (pmpd) {
POPUPDATAT_V2 pd = { 0 };
- pd.cbSize = sizeof(POPUPDATAT_V2);
+ pd.cbSize = sizeof(pd);
pd.lchContact = NULL; //(HANDLE)wParam;
// icon
pd.lchIcon = MsgLoadIcon(pMsgBox);
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp
index d61aad666b..dfddc39fad 100644
--- a/plugins/UserInfoEx/src/svc_refreshci.cpp
+++ b/plugins/UserInfoEx/src/svc_refreshci.cpp
@@ -425,7 +425,7 @@ public:
virtual HWND Create(LPCTSTR szTitle, PUpdCallback pFnCallBack)
{
POPUPDATAT_V2 pd = { 0 };
- pd.cbSize = sizeof(POPUPDATAT_V2);
+ pd.cbSize = sizeof(pd);
pd.lchIcon = IcoLib_GetIcon(ICO_BTN_UPDATE);
pd.iSeconds = -1;
pd.PluginData = this;