diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-05-19 12:36:06 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-05-19 12:36:06 +0000 |
commit | 8bbf210610804623aa581f3a547fc782fed9c118 (patch) | |
tree | b824cb7b0aba1740501e861ee78dbd49bac65022 /plugins/Popup | |
parent | 02f6b3a61924a143b3a6db44d3428a651a3b979c (diff) |
"PopUp" everywhere was replaced to "Popup"
git-svn-id: http://svn.miranda-ng.org/main/trunk@4730 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup')
-rw-r--r-- | plugins/Popup/PopUp_10.vcxproj | 2 | ||||
-rw-r--r-- | plugins/Popup/PopUp_11.vcxproj | 2 | ||||
-rw-r--r-- | plugins/Popup/src/actions.cpp | 86 | ||||
-rw-r--r-- | plugins/Popup/src/common.h | 4 | ||||
-rw-r--r-- | plugins/Popup/src/config.cpp | 20 | ||||
-rw-r--r-- | plugins/Popup/src/config.h | 6 | ||||
-rw-r--r-- | plugins/Popup/src/def_settings.h | 4 | ||||
-rw-r--r-- | plugins/Popup/src/headers.h | 12 | ||||
-rw-r--r-- | plugins/Popup/src/history.cpp | 10 | ||||
-rw-r--r-- | plugins/Popup/src/main.cpp | 94 | ||||
-rw-r--r-- | plugins/Popup/src/notifications.cpp | 12 | ||||
-rw-r--r-- | plugins/Popup/src/opt_adv.cpp | 258 | ||||
-rw-r--r-- | plugins/Popup/src/opt_adv.h | 2 | ||||
-rw-r--r-- | plugins/Popup/src/opt_class.cpp | 8 | ||||
-rw-r--r-- | plugins/Popup/src/opt_gen.cpp | 286 | ||||
-rw-r--r-- | plugins/Popup/src/opt_gen.h | 4 | ||||
-rw-r--r-- | plugins/Popup/src/opt_skins.cpp | 98 | ||||
-rw-r--r-- | plugins/Popup/src/popup_thread.cpp | 30 | ||||
-rw-r--r-- | plugins/Popup/src/popup_wnd2.cpp | 68 | ||||
-rw-r--r-- | plugins/Popup/src/services.cpp | 94 | ||||
-rw-r--r-- | plugins/Popup/src/services.h | 38 | ||||
-rw-r--r-- | plugins/Popup/src/skin.cpp | 36 | ||||
-rw-r--r-- | plugins/Popup/src/version.h | 4 |
23 files changed, 589 insertions, 589 deletions
diff --git a/plugins/Popup/PopUp_10.vcxproj b/plugins/Popup/PopUp_10.vcxproj index b740f6d421..9768994269 100644 --- a/plugins/Popup/PopUp_10.vcxproj +++ b/plugins/Popup/PopUp_10.vcxproj @@ -19,7 +19,7 @@ </ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectName>PopUp</ProjectName>
+ <ProjectName>Popup</ProjectName>
<ProjectGuid>{726460C7-E1F1-4C37-B64F-DA8A8DD26D70}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
diff --git a/plugins/Popup/PopUp_11.vcxproj b/plugins/Popup/PopUp_11.vcxproj index e71b845fa7..53c641062a 100644 --- a/plugins/Popup/PopUp_11.vcxproj +++ b/plugins/Popup/PopUp_11.vcxproj @@ -19,7 +19,7 @@ </ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectName>PopUp</ProjectName>
+ <ProjectName>Popup</ProjectName>
<ProjectGuid>{726460C7-E1F1-4C37-B64F-DA8A8DD26D70}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
diff --git a/plugins/Popup/src/actions.cpp b/plugins/Popup/src/actions.cpp index 3582d69b31..5145153985 100644 --- a/plugins/Popup/src/actions.cpp +++ b/plugins/Popup/src/actions.cpp @@ -74,7 +74,7 @@ void RegisterAction(POPUPACTION *action) else {
POPUPACTION *actionCopy = new POPUPACTION;
*actionCopy = *action;
- actionCopy->flags = db_get_b(NULL, "PopUpActions", actionCopy->lpzTitle, actionCopy->flags & PAF_ENABLED) ? PAF_ENABLED : 0;
+ actionCopy->flags = db_get_b(NULL, "PopupActions", actionCopy->lpzTitle, actionCopy->flags & PAF_ENABLED) ? PAF_ENABLED : 0;
gActions.insert(actionCopy);
}
}
@@ -148,13 +148,13 @@ DWORD MouseOverride(HWND hCombo, int number) void LoadOption_Actions() {
- PopUpOptions.actions = db_get_dw(NULL, MODULNAME, "Actions",
+ PopupOptions.actions = db_get_dw(NULL, MODULNAME, "Actions",
ACT_ENABLE|ACT_RIGHTICONS|ACT_DEF_KEEPWND|ACT_DEF_IMONLY|
ACT_DEF_NOGLOBAL|ACT_DEF_MESSAGE|ACT_DEF_DETAILS|ACT_DEF_MENU|
ACT_DEF_ADD|ACT_DEF_DISMISS|ACT_DEF_PIN);
- PopUpOptions.overrideLeft = db_get_dw(NULL,MODULNAME, "OverrideLeft", 0);
- PopUpOptions.overrideMiddle = db_get_dw(NULL,MODULNAME, "OverrideMiddle", 0);
- PopUpOptions.overrideRight = db_get_dw(NULL,MODULNAME, "OverrideRight", 0);
+ PopupOptions.overrideLeft = db_get_dw(NULL,MODULNAME, "OverrideLeft", 0);
+ PopupOptions.overrideMiddle = db_get_dw(NULL,MODULNAME, "OverrideMiddle", 0);
+ PopupOptions.overrideRight = db_get_dw(NULL,MODULNAME, "OverrideRight", 0);
}
static UINT controls[] =
@@ -194,29 +194,29 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM SendMessage(GetDlgItem(hwnd, IDC_ICO_INFO), STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_MISC_NOTIFY,0), 0);
- CheckDlgButton(hwnd, IDC_CHK_ENABLEACTIONS, PopUpOptions.actions&ACT_ENABLE ? TRUE : FALSE);
- CheckDlgButton(hwnd, IDC_CHK_IMCONTACTSONLY, PopUpOptions.actions&ACT_DEF_IMONLY ? TRUE : FALSE);
- CheckDlgButton(hwnd, IDC_CHK_CONTACTSONLY, PopUpOptions.actions&ACT_DEF_NOGLOBAL ? TRUE : FALSE);
- CheckDlgButton(hwnd, IDC_CHK_DONTCLOSE, PopUpOptions.actions&ACT_DEF_KEEPWND ? TRUE : FALSE);
- CheckDlgButton(hwnd, IDC_CHK_LARGEICONS, PopUpOptions.actions&ACT_LARGE ? TRUE : FALSE);
- CheckDlgButton(hwnd, IDC_RD_TEXT, PopUpOptions.actions&ACT_TEXT ? TRUE : FALSE);
- CheckDlgButton(hwnd, IDC_RD_LEFTICONS, PopUpOptions.actions&ACT_LEFTICONS ? TRUE : FALSE);
- CheckDlgButton(hwnd, IDC_RD_RIGHTICONS, PopUpOptions.actions&ACT_RIGHTICONS ? TRUE : FALSE);
+ CheckDlgButton(hwnd, IDC_CHK_ENABLEACTIONS, PopupOptions.actions&ACT_ENABLE ? TRUE : FALSE);
+ CheckDlgButton(hwnd, IDC_CHK_IMCONTACTSONLY, PopupOptions.actions&ACT_DEF_IMONLY ? TRUE : FALSE);
+ CheckDlgButton(hwnd, IDC_CHK_CONTACTSONLY, PopupOptions.actions&ACT_DEF_NOGLOBAL ? TRUE : FALSE);
+ CheckDlgButton(hwnd, IDC_CHK_DONTCLOSE, PopupOptions.actions&ACT_DEF_KEEPWND ? TRUE : FALSE);
+ CheckDlgButton(hwnd, IDC_CHK_LARGEICONS, PopupOptions.actions&ACT_LARGE ? TRUE : FALSE);
+ CheckDlgButton(hwnd, IDC_RD_TEXT, PopupOptions.actions&ACT_TEXT ? TRUE : FALSE);
+ CheckDlgButton(hwnd, IDC_RD_LEFTICONS, PopupOptions.actions&ACT_LEFTICONS ? TRUE : FALSE);
+ CheckDlgButton(hwnd, IDC_RD_RIGHTICONS, PopupOptions.actions&ACT_RIGHTICONS ? TRUE : FALSE);
{
DWORD dwActiveItem = 0;
HWND hCombo = GetDlgItem(hwnd, IDC_CB_LEFT);
- dwActiveItem = MouseOverride(hCombo, PopUpOptions.overrideLeft);
+ dwActiveItem = MouseOverride(hCombo, PopupOptions.overrideLeft);
SendDlgItemMessage(hwnd, IDC_CB_LEFT, CB_SETCURSEL, dwActiveItem, 0);
dwActiveItem = 0;
hCombo = GetDlgItem(hwnd, IDC_CB_MIDDLE);
- dwActiveItem = MouseOverride(hCombo, PopUpOptions.overrideMiddle);
+ dwActiveItem = MouseOverride(hCombo, PopupOptions.overrideMiddle);
SendDlgItemMessage(hwnd, IDC_CB_MIDDLE, CB_SETCURSEL, dwActiveItem, 0);
dwActiveItem = 0;
hCombo = GetDlgItem(hwnd, IDC_CB_RIGHT);
- dwActiveItem = MouseOverride(hCombo, PopUpOptions.overrideRight);
+ dwActiveItem = MouseOverride(hCombo, PopupOptions.overrideRight);
SendDlgItemMessage(hwnd, IDC_CB_RIGHT, CB_SETCURSEL, dwActiveItem, 0);
HWND hwndList = GetDlgItem(hwnd, IDC_ACTIONS);
@@ -277,7 +277,7 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM groups.destroy();
- BOOL enabled = (PopUpOptions.actions&ACT_ENABLE) ? TRUE : FALSE;
+ BOOL enabled = (PopupOptions.actions&ACT_ENABLE) ? TRUE : FALSE;
for (i = 0; i < SIZEOF(controls); ++i)
EnableWindow(GetDlgItem(hwnd, controls[i]), enabled);
}
@@ -287,62 +287,62 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_CHK_ENABLEACTIONS:
- PopUpOptions.actions &= ~ACT_ENABLE;
- PopUpOptions.actions |= IsDlgButtonChecked(hwnd, IDC_CHK_ENABLEACTIONS) ? ACT_ENABLE : 0;
+ PopupOptions.actions &= ~ACT_ENABLE;
+ PopupOptions.actions |= IsDlgButtonChecked(hwnd, IDC_CHK_ENABLEACTIONS) ? ACT_ENABLE : 0;
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
{
- BOOL enabled = (PopUpOptions.actions & ACT_ENABLE) ? TRUE : FALSE;
+ BOOL enabled = (PopupOptions.actions & ACT_ENABLE) ? TRUE : FALSE;
for (i=0; i < SIZEOF(controls); ++i)
EnableWindow(GetDlgItem(hwnd, controls[i]), enabled);
}
break;
case IDC_CHK_IMCONTACTSONLY:
- PopUpOptions.actions &= ~ACT_DEF_IMONLY;
- PopUpOptions.actions |= IsDlgButtonChecked(hwnd, IDC_CHK_IMCONTACTSONLY) ? ACT_DEF_IMONLY : 0;
+ PopupOptions.actions &= ~ACT_DEF_IMONLY;
+ PopupOptions.actions |= IsDlgButtonChecked(hwnd, IDC_CHK_IMCONTACTSONLY) ? ACT_DEF_IMONLY : 0;
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
case IDC_CHK_CONTACTSONLY:
- PopUpOptions.actions &= ~ACT_DEF_NOGLOBAL;
- PopUpOptions.actions |= IsDlgButtonChecked(hwnd, IDC_CHK_CONTACTSONLY) ? ACT_DEF_NOGLOBAL : 0;
+ PopupOptions.actions &= ~ACT_DEF_NOGLOBAL;
+ PopupOptions.actions |= IsDlgButtonChecked(hwnd, IDC_CHK_CONTACTSONLY) ? ACT_DEF_NOGLOBAL : 0;
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
case IDC_CHK_DONTCLOSE:
- PopUpOptions.actions &= ~ACT_DEF_KEEPWND;
- PopUpOptions.actions |= IsDlgButtonChecked(hwnd, IDC_CHK_DONTCLOSE) ? ACT_DEF_KEEPWND : 0;
+ PopupOptions.actions &= ~ACT_DEF_KEEPWND;
+ PopupOptions.actions |= IsDlgButtonChecked(hwnd, IDC_CHK_DONTCLOSE) ? ACT_DEF_KEEPWND : 0;
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
case IDC_CHK_LARGEICONS:
- PopUpOptions.actions &= ~ACT_LARGE;
- PopUpOptions.actions |= IsDlgButtonChecked(hwnd, IDC_CHK_LARGEICONS) ? ACT_LARGE : 0;
+ PopupOptions.actions &= ~ACT_LARGE;
+ PopupOptions.actions |= IsDlgButtonChecked(hwnd, IDC_CHK_LARGEICONS) ? ACT_LARGE : 0;
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
case IDC_RD_TEXT:
- PopUpOptions.actions &= ~(ACT_TEXT|ACT_LEFTICONS|ACT_RIGHTICONS);
- PopUpOptions.actions |= IsDlgButtonChecked(hwnd, IDC_CHK_ENABLEACTIONS) ? ACT_TEXT : 0;
+ PopupOptions.actions &= ~(ACT_TEXT|ACT_LEFTICONS|ACT_RIGHTICONS);
+ PopupOptions.actions |= IsDlgButtonChecked(hwnd, IDC_CHK_ENABLEACTIONS) ? ACT_TEXT : 0;
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
case IDC_RD_LEFTICONS:
- PopUpOptions.actions &= ~(ACT_TEXT|ACT_LEFTICONS|ACT_RIGHTICONS);
- PopUpOptions.actions |= IsDlgButtonChecked(hwnd, IDC_RD_LEFTICONS) ? ACT_LEFTICONS : 0;
+ PopupOptions.actions &= ~(ACT_TEXT|ACT_LEFTICONS|ACT_RIGHTICONS);
+ PopupOptions.actions |= IsDlgButtonChecked(hwnd, IDC_RD_LEFTICONS) ? ACT_LEFTICONS : 0;
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
case IDC_RD_RIGHTICONS:
- PopUpOptions.actions &= ~(ACT_TEXT|ACT_LEFTICONS|ACT_RIGHTICONS);
- PopUpOptions.actions |= IsDlgButtonChecked(hwnd, IDC_RD_RIGHTICONS) ? ACT_RIGHTICONS : 0;
+ PopupOptions.actions &= ~(ACT_TEXT|ACT_LEFTICONS|ACT_RIGHTICONS);
+ PopupOptions.actions |= IsDlgButtonChecked(hwnd, IDC_RD_RIGHTICONS) ? ACT_RIGHTICONS : 0;
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
case IDC_PREVIEW:
- PopUpPreview();
+ PopupPreview();
break;
case IDC_CB_LEFT:
case IDC_CB_MIDDLE:
case IDC_CB_RIGHT:
- PopUpOptions.overrideLeft = SendDlgItemMessage(hwnd, IDC_CB_LEFT, CB_GETITEMDATA,
+ PopupOptions.overrideLeft = SendDlgItemMessage(hwnd, IDC_CB_LEFT, CB_GETITEMDATA,
SendDlgItemMessage(hwnd, IDC_CB_LEFT, CB_GETCURSEL,0,0),0);
- PopUpOptions.overrideMiddle = SendDlgItemMessage(hwnd, IDC_CB_MIDDLE, CB_GETITEMDATA,
+ PopupOptions.overrideMiddle = SendDlgItemMessage(hwnd, IDC_CB_MIDDLE, CB_GETITEMDATA,
SendDlgItemMessage(hwnd, IDC_CB_MIDDLE, CB_GETCURSEL,0,0),0);
- PopUpOptions.overrideRight = SendDlgItemMessage(hwnd, IDC_CB_RIGHT, CB_GETITEMDATA,
+ PopupOptions.overrideRight = SendDlgItemMessage(hwnd, IDC_CB_RIGHT, CB_GETITEMDATA,
SendDlgItemMessage(hwnd, IDC_CB_RIGHT, CB_GETCURSEL,0,0),0);
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
}
@@ -357,18 +357,18 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM break;
case PSN_APPLY:
- db_set_dw(NULL, MODULNAME, "Actions", PopUpOptions.actions);
+ db_set_dw(NULL, MODULNAME, "Actions", PopupOptions.actions);
HWND hwndList = GetDlgItem(hwnd, IDC_ACTIONS);
for (i=0; i < gActions.getCount(); ++i) {
gActions[i]->flags = (ListView_GetItemState(hwndList, i, LVIS_STATEIMAGEMASK) == 0x2000) ? PAF_ENABLED : 0;
- db_set_b(NULL, "PopUpActions", gActions[i]->lpzTitle, (gActions[i]->flags&PAF_ENABLED) ? 1 : 0);
+ db_set_b(NULL, "PopupActions", gActions[i]->lpzTitle, (gActions[i]->flags&PAF_ENABLED) ? 1 : 0);
}
//overrideActions
- db_set_dw(NULL, MODULNAME, "OverrideLeft", PopUpOptions.overrideLeft);
- db_set_dw(NULL, MODULNAME, "OverrideMiddle", PopUpOptions.overrideMiddle);
- db_set_dw(NULL, MODULNAME, "OverrideRight", PopUpOptions.overrideRight);
+ db_set_dw(NULL, MODULNAME, "OverrideLeft", PopupOptions.overrideLeft);
+ db_set_dw(NULL, MODULNAME, "OverrideMiddle", PopupOptions.overrideMiddle);
+ db_set_dw(NULL, MODULNAME, "OverrideRight", PopupOptions.overrideRight);
}
}
break;
diff --git a/plugins/Popup/src/common.h b/plugins/Popup/src/common.h index 6ad87ea594..8b587b6559 100644 --- a/plugins/Popup/src/common.h +++ b/plugins/Popup/src/common.h @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef COMMON_H
#define COMMON_H
-void PopUpPreview();
+void PopupPreview();
#define MAX_POPUPS 48
@@ -41,7 +41,7 @@ inline void GetBmpSize(HBITMAP hbm, SIZE *sz) }
inline void DebugMsg(LPTSTR msg){
- if (PopUpOptions.debug){
+ if (PopupOptions.debug){
MessageBox(NULL, msg, _T("debug"), MB_OK);
}
}
diff --git a/plugins/Popup/src/config.cpp b/plugins/Popup/src/config.cpp index c8cca233be..66fba97b46 100644 --- a/plugins/Popup/src/config.cpp +++ b/plugins/Popup/src/config.cpp @@ -40,7 +40,7 @@ LPCSTR gszMetaProto = ""; HBITMAP hbmNoAvatar;
//===== Options =====
-POPUPOPTIONS PopUpOptions;
+POPUPOPTIONS PopupOptions;
//SKINELEMENT *skin;
//SKINELEMENT *w_skin;
//SKINELEMENT *n_skin;
@@ -70,24 +70,24 @@ HRESULT (WINAPI *MyDwmEnableBlurBehindWindow)(HWND hWnd, DWM_BLURBEHIND *pBlurB // common funcs
void LoadOptions() {
- ZeroMemory(&PopUpOptions, sizeof(PopUpOptions));
+ ZeroMemory(&PopupOptions, sizeof(PopupOptions));
#if defined(_DEBUG)
- PopUpOptions.debug = db_get_b(NULL, MODULNAME, "debug", FALSE);
+ PopupOptions.debug = db_get_b(NULL, MODULNAME, "debug", FALSE);
#endif
- //Load PopUp Options
+ //Load Popup Options
if (!OptionLoaded){
LoadOption_General();
LoadOption_Skins();
LoadOption_Actions();
LoadOption_AdvOpts();
}
- Check_ReorderPopUps();
+ Check_ReorderPopups();
OptionLoaded = true;
return;
}
-void PopUpPreview()
+void PopupPreview()
{
TCHAR *lptzTitle1Eng = TranslateT("The Jabberwocky");
TCHAR *lptzText1Eng = TranslateT("`Twas brillig, and the slithy toves\r\nDid gyre and gimble in the wabe:\r\nAll mimsy were the borogoves,\r\nAnd the mome raths outgrabe.\r\n\t[b][i]Lewis Carroll, 1855[/i][/b]");
@@ -107,7 +107,7 @@ void PopUpPreview() ppd.lptzText = lptzText1Eng;
ppd.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
CallService(MS_POPUP_ADDPOPUP2, (WPARAM)&ppd, APF_NO_HISTORY);
- if (PopUpOptions.UseAnimations || PopUpOptions.UseEffect) Sleep((ANIM_TIME*2)/3); //Pause
+ if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME*2)/3); //Pause
ZeroMemory(&ppd, sizeof(ppd));
ppd.cbSize = sizeof(ppd);
@@ -118,13 +118,13 @@ void PopUpPreview() ppd.hbmAvatar = hbmNoAvatar;
CallService(MS_POPUP_ADDPOPUP2, (WPARAM)&ppd, APF_NO_HISTORY);
- if (PopUpOptions.UseAnimations || PopUpOptions.UseEffect) Sleep((ANIM_TIME*2)/3); //Pause
+ if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME*2)/3); //Pause
PUShowMessageT(TranslateT("This is a notification message"), (DWORD)SM_NOTIFY|0x80000000);
- if (PopUpOptions.UseAnimations || PopUpOptions.UseEffect) Sleep((ANIM_TIME*2)/3); //Pause
+ if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME*2)/3); //Pause
PUShowMessageT(TranslateT("This is a warning message"), (DWORD)SM_WARNING|0x80000000);
- if (PopUpOptions.UseAnimations || PopUpOptions.UseEffect) Sleep((ANIM_TIME*2)/3); //Pause
+ if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME*2)/3); //Pause
PUShowMessageT(TranslateT("This is an error message"), (DWORD)SM_ERROR|0x80000000);
}
\ No newline at end of file diff --git a/plugins/Popup/src/config.h b/plugins/Popup/src/config.h index e13c4c35e0..673b1e086e 100644 --- a/plugins/Popup/src/config.h +++ b/plugins/Popup/src/config.h @@ -45,8 +45,8 @@ typedef struct tagPOPUPOPTIONS { int gapRight;
int spacing;
//Miscellaneous
- BYTE ReorderPopUps;
- BYTE ReorderPopUpsWarning;
+ BYTE ReorderPopups;
+ BYTE ReorderPopupsWarning;
//Disable when
BOOL ModuleIsEnabled;
BYTE DisableWhenFullscreen;
@@ -145,7 +145,7 @@ extern LPCSTR gszMetaProto; extern HBITMAP hbmNoAvatar;
//===== Options =====
-extern POPUPOPTIONS PopUpOptions;
+extern POPUPOPTIONS PopupOptions;
extern bool OptionLoaded;
//extern SKINELEMENT *skin;
//extern SKINELEMENT *w_skin;
diff --git a/plugins/Popup/src/def_settings.h b/plugins/Popup/src/def_settings.h index 9fa02ff13c..9d09e9f9ee 100644 --- a/plugins/Popup/src/def_settings.h +++ b/plugins/Popup/src/def_settings.h @@ -57,7 +57,7 @@ enum STYLE_SZ_BORDER_FLAT = 2
};
-//===== PopUp Positioning =====
+//===== Popup Positioning =====
enum
{
POS_UPPERLEFT,
@@ -81,7 +81,7 @@ enum SPREADING_MAXVALUE = SPREADING_VERTICAL
};
-//===== PopUp Options flags
+//===== Popup Options flags
enum
{
SPK_NONE,
diff --git a/plugins/Popup/src/headers.h b/plugins/Popup/src/headers.h index d10e2cd9ca..e24116d5b2 100644 --- a/plugins/Popup/src/headers.h +++ b/plugins/Popup/src/headers.h @@ -23,9 +23,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /*
===============================================================================
- PopUp plugin
+ Popup plugin
-This plugin notifies you when a contact changes his/hers status with a PopUp.
+This plugin notifies you when a contact changes his/hers status with a Popup.
You can customize its look (style of popup, font, text...) and behaviour (the
position in the screen, the time to live, the action on a mouse click).
@@ -127,10 +127,10 @@ http://miranda-ng.org/distr/ #include "avatars_gif.h"
#include "popup_gdiplus.h"
-#define PU_MODULCLASS "PopUpCLASS" //temp DB modul for this plugin
-#define MODULNAME "PopUp"
-#define MODULNAME_LONG "Popup Plus" //dont use "PopUp Plus" coz notify register use "Popup Plus"
-#define MODULNAME_PLU "PopUps"
+#define PU_MODULCLASS "PopupCLASS" //temp DB modul for this plugin
+#define MODULNAME "Popup"
+#define MODULNAME_LONG "Popup Plus"
+#define MODULNAME_PLU "Popups"
INT_PTR svcEnableDisableMenuCommand(WPARAM, LPARAM);
diff --git a/plugins/Popup/src/history.cpp b/plugins/Popup/src/history.cpp index a44af22401..b43fe1c7a8 100644 --- a/plugins/Popup/src/history.cpp +++ b/plugins/Popup/src/history.cpp @@ -45,7 +45,7 @@ static void FreeHistoryItem(POPUPDATA2 *ppd) void PopupHistoryResize()
{
- popupHistoryBuffer = PopUpOptions.HistorySize;
+ popupHistoryBuffer = PopupOptions.HistorySize;
mir_cslock lck(csPopupHistory);
while (arPopupHistory.getCount() > popupHistoryBuffer) {
@@ -71,7 +71,7 @@ void PopupHistoryUnload() void PopupHistoryAdd(POPUPDATA2 *ppdNew)
{
- if (!PopUpOptions.EnableHistory)
+ if (!PopupOptions.EnableHistory)
return;
POPUPDATA2 *ppd = (POPUPDATA2*)mir_alloc( sizeof(POPUPDATA2));
@@ -100,7 +100,7 @@ void PopupHistoryAdd(POPUPDATA2 *ppdNew) void PopupHistoryShow()
{
- if (!PopUpOptions.EnableHistory) {
+ if (!PopupOptions.EnableHistory) {
MessageBox(NULL, TranslateT("Popup History is disabled"), TranslateT("Popup History message"), MB_OK);
return;
}
@@ -135,7 +135,7 @@ static INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIcon(ICO_HISTORY,0));
SendMessage(hwnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIcon(ICO_HISTORY,1));
- if (gbHppInstalled && PopUpOptions.UseHppHistoryLog) {
+ if (gbHppInstalled && PopupOptions.UseHppHistoryLog) {
logType = LOG_HPP;
ShowWindow(GetDlgItem(hwnd, IDC_POPUP_LIST), SW_HIDE);
@@ -246,7 +246,7 @@ static INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA if (rc.right - rc.left <= 30)
return FALSE;
- POPUPOPTIONS customOptions = PopUpOptions;
+ POPUPOPTIONS customOptions = PopupOptions;
customOptions.DynamicResize = FALSE;
customOptions.MinimumWidth = customOptions.MaximumWidth = rc.right-rc.left-30;
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index 8ec040ab6c..c74ca3551e 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -24,8 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. WORD SETTING_MAXIMUMWIDTH_MAX = GetSystemMetrics(SM_CXSCREEN);
-#define MENUCOMMAND_HISTORY "PopUp/ShowHistory"
-#define MENUCOMMAND_SVC "PopUp/EnableDisableMenuCommand"
+#define MENUCOMMAND_HISTORY "Popup/ShowHistory"
+#define MENUCOMMAND_SVC "Popup/EnableDisableMenuCommand"
//===== MessageBoxes =====
@@ -76,7 +76,7 @@ static int OptionsInitialize(WPARAM wParam, LPARAM) odp.pszTitle = MODULNAME_PLU;
odp.pszTab = LPGEN("General");
- odp.pfnDlgProc = DlgProcPopUpGeneral;
+ odp.pfnDlgProc = DlgProcPopupGeneral;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUP_GENERAL);
Options_AddPage(wParam, &odp);
@@ -96,7 +96,7 @@ static int OptionsInitialize(WPARAM wParam, LPARAM) Options_AddPage(wParam, &odp);
odp.pszTab = LPGEN("Advanced");
- odp.pfnDlgProc = DlgProcPopUpAdvOpts;
+ odp.pfnDlgProc = DlgProcPopupAdvOpts;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUP_ADVANCED);
Options_AddPage(wParam, &odp);
@@ -119,7 +119,7 @@ static int IconsChanged(WPARAM, LPARAM) LoadActions();
CLISTMENUITEM mi = { sizeof(mi) };
- if (PopUpOptions.ModuleIsEnabled == TRUE) { //The module is enabled.
+ if (PopupOptions.ModuleIsEnabled == TRUE) { //The module is enabled.
//The action to do is "disable popups" (show disabled) and we must write "enable popup" in the new item.
mi.hIcon = IcoLib_GetIcon(ICO_POPUP_ON, 0);
}
@@ -143,13 +143,13 @@ static int TTBLoaded(WPARAM, LPARAM) ttb.pszService = MENUCOMMAND_SVC;
ttb.lParamUp = 1;
ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ASPUSHBUTTON;
- if (PopUpOptions.ModuleIsEnabled)
+ if (PopupOptions.ModuleIsEnabled)
ttb.dwFlags |= TTBBF_PUSHED;
ttb.name = LPGEN("Toggle Popups");
ttb.hIconHandleUp = Skin_GetIconHandle(ICO_TB_POPUP_OFF);
ttb.hIconHandleDn = Skin_GetIconHandle(ICO_TB_POPUP_ON);
- ttb.pszTooltipUp = LPGEN("Enable popups");
- ttb.pszTooltipDn = LPGEN("Disable popups");
+ ttb.pszTooltipUp = LPGEN("Enable Popups");
+ ttb.pszTooltipDn = LPGEN("Disable Popups");
hTTButton = TopToolbar_AddButton(&ttb);
return 0;
}
@@ -158,20 +158,20 @@ static int TTBLoaded(WPARAM, LPARAM) INT_PTR svcEnableDisableMenuCommand(WPARAM, LPARAM)
{
CLISTMENUITEM mi = { sizeof(mi) };
- if (PopUpOptions.ModuleIsEnabled) {
+ if (PopupOptions.ModuleIsEnabled) {
//The module is enabled.
//The action to do is "disable popups" (show disabled) and we must write "enable popup" in the new item.
- PopUpOptions.ModuleIsEnabled = FALSE;
+ PopupOptions.ModuleIsEnabled = FALSE;
db_set_b(NULL, MODULNAME, "ModuleIsEnabled", FALSE);
- mi.ptszName = LPGENT("Enable &popup module");
+ mi.ptszName = LPGENT("Enable Popups");
mi.hIcon = IcoLib_GetIcon(ICO_POPUP_OFF,0);
}
else {
//The module is disabled.
//The action to do is enable popups (show enabled), then write "disable popup" in the new item.
- PopUpOptions.ModuleIsEnabled = TRUE;
+ PopupOptions.ModuleIsEnabled = TRUE;
db_set_b(NULL, MODULNAME, "ModuleIsEnabled", TRUE);
- mi.ptszName = LPGENT("Disable &popup module");
+ mi.ptszName = LPGENT("Disable Popups");
mi.hIcon = IcoLib_GetIcon(ICO_POPUP_ON,0);
}
mi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
@@ -180,7 +180,7 @@ INT_PTR svcEnableDisableMenuCommand(WPARAM, LPARAM) Menu_ModifyItem(hMenuRoot, &mi);
if (hTTButton)
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTButton, (PopUpOptions.ModuleIsEnabled) ? TTBST_PUSHED : TTBST_RELEASED);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTButton, (PopupOptions.ModuleIsEnabled) ? TTBST_PUSHED : TTBST_RELEASED);
return 0;
}
@@ -201,14 +201,14 @@ void InitMenuItems(void) // Build main menu
mi.position = -1000000000 /*1000001*/;
mi.ptszName = LPGENT(MODULNAME_PLU);
- mi.hIcon = IcoLib_GetIcon(PopUpOptions.ModuleIsEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF ,0);
+ mi.hIcon = IcoLib_GetIcon(PopupOptions.ModuleIsEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF ,0);
hMenuRoot = Menu_AddMainMenuItem(&mi);
// Add item to main menu
mi.hParentMenu = (HGENMENU)hMenuRoot;
CreateServiceFunction(MENUCOMMAND_SVC, svcEnableDisableMenuCommand);
- mi.ptszName = PopUpOptions.ModuleIsEnabled ? LPGENT("Disable &popup module") : LPGENT("Enable &popup module");
+ mi.ptszName = PopupOptions.ModuleIsEnabled ? LPGENT("Disable Popups") : LPGENT("Enable Popups");
mi.pszService = MENUCOMMAND_SVC;
hMenuItem = Menu_AddMainMenuItem(&mi);
@@ -226,7 +226,7 @@ void InitMenuItems(void) //===== GetStatus =====
INT_PTR GetStatus(WPARAM, LPARAM)
{
- return PopUpOptions.ModuleIsEnabled;
+ return PopupOptions.ModuleIsEnabled;
}
@@ -257,8 +257,8 @@ static int ModulesLoaded(WPARAM,LPARAM) (CallService(MS_HPP_GETVERSION, 0, 0) >= PLUGIN_MAKE_VERSION(1,5,0,112));
//check if MText plugin is installed
if (MText.Register) {
- htuText = MText.Register("PopUp Plus/Text", MTEXT_FANCY_DEFAULT);
- htuTitle = MText.Register("PopUp Plus/Title",MTEXT_FANCY_DEFAULT);
+ htuText = MText.Register("Popup Plus/Text", MTEXT_FANCY_DEFAULT);
+ htuTitle = MText.Register("Popup Plus/Title",MTEXT_FANCY_DEFAULT);
}
else htuTitle = htuText = NULL;
@@ -285,13 +285,13 @@ static int ModulesLoaded(WPARAM,LPARAM) //hook TopToolBar
HookEvent(ME_TTB_MODULELOADED, TTBLoaded);
//Folder plugin support
- folderId = FoldersRegisterCustomPathT(LPGEN("Skins"), LPGEN("Popup Plus"), MIRANDA_PATHT _T("\\Skins\\PopUp"));
+ folderId = FoldersRegisterCustomPathT(LPGEN("Skins"), LPGEN("Popup Plus"), MIRANDA_PATHT _T("\\Skins\\Popup"));
//load skin
skins.load(_T("dir"));
const PopupSkin *skin;
- if (skin = skins.getSkin(PopUpOptions.SkinPack)) {
- mir_free(PopUpOptions.SkinPack);
- PopUpOptions.SkinPack = mir_tstrdup(skin->getName());
+ if (skin = skins.getSkin(PopupOptions.SkinPack)) {
+ mir_free(PopupOptions.SkinPack);
+ PopupOptions.SkinPack = mir_tstrdup(skin->getName());
skin->loadOpts();
}
//init PopupEfects
@@ -344,9 +344,9 @@ MIRAPI int Load(void) CreateServiceFunction(MS_POPUP_GETSTATUS, GetStatus);
#if defined(_DEBUG)
- PopUpOptions.debug = db_get_b(NULL, MODULNAME, "debug", FALSE);
+ PopupOptions.debug = db_get_b(NULL, MODULNAME, "debug", FALSE);
#else
- PopUpOptions.debug = false;
+ PopupOptions.debug = false;
#endif
LoadGDIPlus();
@@ -359,7 +359,7 @@ MIRAPI int Load(void) PopupHistoryLoad();
LoadPopupThread();
if (!LoadPopupWnd2()) {
- MessageBox(0, TranslateT("Error: I could not register the PopUp Window class.\r\nThe plugin will not operate."), _T(MODULNAME_LONG), MB_ICONSTOP | MB_OK);
+ MessageBox(0, TranslateT("Error: I could not register the Popup Window class.\r\nThe plugin will not operate."), _T(MODULNAME_LONG), MB_ICONSTOP | MB_OK);
return 0; //We couldn't register our Window Class, don't hook any event: the plugin will act as if it was disabled.
}
RegisterOptPrevBox();
@@ -377,33 +377,33 @@ MIRAPI int Load(void) LoadOptions();
//Service Functions
- CreateServiceFunction(MS_POPUP_ADDPOPUP, PopUp_AddPopUp);
- CreateServiceFunction(MS_POPUP_ADDPOPUPW, PopUp_AddPopUpW);
- CreateServiceFunction(MS_POPUP_ADDPOPUP2, PopUp_AddPopUp2);
+ CreateServiceFunction(MS_POPUP_ADDPOPUP, Popup_AddPopup);
+ CreateServiceFunction(MS_POPUP_ADDPOPUPW, Popup_AddPopupW);
+ CreateServiceFunction(MS_POPUP_ADDPOPUP2, Popup_AddPopup2);
- CreateServiceFunction(MS_POPUP_CHANGETEXTW, PopUp_ChangeTextW);
+ CreateServiceFunction(MS_POPUP_CHANGETEXTW, Popup_ChangeTextW);
- CreateServiceFunction(MS_POPUP_CHANGEW, PopUp_ChangeW);
- CreateServiceFunction(MS_POPUP_CHANGEPOPUP2, PopUp_Change2);
+ CreateServiceFunction(MS_POPUP_CHANGEW, Popup_ChangeW);
+ CreateServiceFunction(MS_POPUP_CHANGEPOPUP2, Popup_Change2);
- CreateServiceFunction(MS_POPUP_GETCONTACT, PopUp_GetContact);
- CreateServiceFunction(MS_POPUP_GETPLUGINDATA, PopUp_GetPluginData);
- CreateServiceFunction(MS_POPUP_ISSECONDLINESHOWN, PopUp_IsSecondLineShown);
+ CreateServiceFunction(MS_POPUP_GETCONTACT, Popup_GetContact);
+ CreateServiceFunction(MS_POPUP_GETPLUGINDATA, Popup_GetPluginData);
+ CreateServiceFunction(MS_POPUP_ISSECONDLINESHOWN, Popup_IsSecondLineShown);
- CreateServiceFunction(MS_POPUP_SHOWMESSAGE, PopUp_ShowMessage);
- CreateServiceFunction(MS_POPUP_SHOWMESSAGEW, PopUp_ShowMessageW);
- CreateServiceFunction(MS_POPUP_QUERY, PopUp_Query);
+ CreateServiceFunction(MS_POPUP_SHOWMESSAGE, Popup_ShowMessage);
+ CreateServiceFunction(MS_POPUP_SHOWMESSAGEW, Popup_ShowMessageW);
+ CreateServiceFunction(MS_POPUP_QUERY, Popup_Query);
- CreateServiceFunction(MS_POPUP_REGISTERACTIONS, PopUp_RegisterActions);
- CreateServiceFunction(MS_POPUP_REGISTERNOTIFICATION, PopUp_RegisterNotification);
+ CreateServiceFunction(MS_POPUP_REGISTERACTIONS, Popup_RegisterActions);
+ CreateServiceFunction(MS_POPUP_REGISTERNOTIFICATION, Popup_RegisterNotification);
- CreateServiceFunction(MS_POPUP_UNHOOKEVENTASYNC, PopUp_UnhookEventAsync);
+ CreateServiceFunction(MS_POPUP_UNHOOKEVENTASYNC, Popup_UnhookEventAsync);
- CreateServiceFunction(MS_POPUP_REGISTERVFX, PopUp_RegisterVfx);
+ CreateServiceFunction(MS_POPUP_REGISTERVFX, Popup_RegisterVfx);
- CreateServiceFunction(MS_POPUP_REGISTERCLASS, PopUp_RegisterPopupClass);
- CreateServiceFunction(MS_POPUP_UNREGISTERCLASS, PopUp_UnregisterPopupClass);
- CreateServiceFunction(MS_POPUP_ADDPOPUPCLASS, PopUp_CreateClassPopup);
+ CreateServiceFunction(MS_POPUP_REGISTERCLASS, Popup_RegisterPopupClass);
+ CreateServiceFunction(MS_POPUP_UNREGISTERCLASS, Popup_UnregisterPopupClass);
+ CreateServiceFunction(MS_POPUP_ADDPOPUPCLASS, Popup_CreateClassPopup);
//load icons / create hook
InitIcons();
@@ -433,8 +433,8 @@ MIRAPI int Unload(void) FreeLibrary(hMsimgDll);
FreeLibrary(hGdiDll);
- if (PopUpOptions.SkinPack) mir_free(PopUpOptions.SkinPack);
- mir_free(PopUpOptions.Effect);
+ if (PopupOptions.SkinPack) mir_free(PopupOptions.SkinPack);
+ mir_free(PopupOptions.Effect);
OptAdv_UnregisterVfx();
UnloadPopupThread();
diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp index e9c70d8c79..92a2e28652 100644 --- a/plugins/Popup/src/notifications.cpp +++ b/plugins/Popup/src/notifications.cpp @@ -191,15 +191,15 @@ HANDLE RegisterNotification(POPUPNOTIFICATION *notification) ptd->notification = *notification;
if (!ptd->notification.lpzLAction) ptd->notification.lpzLAction = POPUP_ACTION_NOTHING;
if (!ptd->notification.lpzRAction) ptd->notification.lpzRAction = POPUP_ACTION_DISMISS;
- LoadNotificationSettings(ptd, "PopUpNotifications");
+ LoadNotificationSettings(ptd, "PopupNotifications");
// ugly hack to make reset always possible
- SaveNotificationSettings(ptd,"PopUpNotifications");
+ SaveNotificationSettings(ptd,"PopupNotifications");
FontID fontid = {0};
fontid.cbSize = sizeof(fontid);
mir_snprintf(fontid.group, sizeof(fontid.group), "%s/%s", PU_FNT_AND_COLOR, notification->lpzGroup);
- lstrcpyA(fontid.dbSettingsGroup, "PopUpNotifications");
+ lstrcpyA(fontid.dbSettingsGroup, "PopupNotifications");
fontid.flags = FIDF_DEFAULTVALID;
fontid.deffontsettings.charset = DEFAULT_CHARSET;
fontid.deffontsettings.colour = ptd->notification.colorText;
@@ -214,14 +214,14 @@ HANDLE RegisterNotification(POPUPNOTIFICATION *notification) ColourID colourid = {0};
colourid.cbSize = sizeof(colourid);
mir_snprintf(colourid.group, sizeof(colourid.group), "%s/%s", PU_FNT_AND_COLOR, notification->lpzGroup);
- lstrcpyA(colourid.dbSettingsGroup, "PopUpNotifications");
+ lstrcpyA(colourid.dbSettingsGroup, "PopupNotifications");
mir_snprintf(colourid.name, SIZEOF(colourid.name), "%s (colors only)", notification->lpzName);
mir_snprintf(colourid.setting, SIZEOF(colourid.setting), "{%s/%s}backColor", notification->lpzGroup, notification->lpzName);
colourid.defcolour = ptd->notification.colorBack;
ColourRegister(&colourid);
char section[MAXMODULELABELLENGTH], setting[MAXMODULELABELLENGTH];
- mir_snprintf(section, sizeof(section), "PopUps/%s", notification->lpzGroup);
+ mir_snprintf(section, sizeof(section), "Popups/%s", notification->lpzGroup);
mir_snprintf(setting, sizeof(setting), "%s_%s_%s", MODULNAME, notification->lpzGroup, notification->lpzName);
SKINICONDESC sid = { sizeof(sid) };
@@ -325,7 +325,7 @@ bool PerformAction(HANDLE hNotification, HWND hwnd, UINT message, WPARAM wparam, if (!lstrcmpA(lpzAction, POPUP_ACTION_DISMISS))
{
- PUDeletePopUp(hwnd);
+ PUDeletePopup(hwnd);
return true;
}
diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp index c4c5513244..33e323618a 100644 --- a/plugins/Popup/src/opt_adv.cpp +++ b/plugins/Popup/src/opt_adv.cpp @@ -46,38 +46,38 @@ void OptAdv_UnregisterVfx() void LoadOption_AdvOpts()
{
//History
- PopUpOptions.EnableHistory = db_get_b(NULL, MODULNAME, "EnableHistory", TRUE);
- PopUpOptions.HistorySize = db_get_w(NULL, MODULNAME, "HistorySize", SETTING_HISTORYSIZE_DEFAULT);
- PopUpOptions.UseHppHistoryLog = db_get_b(NULL, MODULNAME, "UseHppHistoryLog", TRUE);
+ PopupOptions.EnableHistory = db_get_b(NULL, MODULNAME, "EnableHistory", TRUE);
+ PopupOptions.HistorySize = db_get_w(NULL, MODULNAME, "HistorySize", SETTING_HISTORYSIZE_DEFAULT);
+ PopupOptions.UseHppHistoryLog = db_get_b(NULL, MODULNAME, "UseHppHistoryLog", TRUE);
//Avatars
- PopUpOptions.avatarBorders = db_get_b(NULL, MODULNAME, "AvatarBorders", TRUE);
- PopUpOptions.avatarPNGBorders = db_get_b(NULL, MODULNAME, "AvatarPNGBorders", FALSE);
- PopUpOptions.avatarRadius = db_get_b(NULL, MODULNAME, "AvatarRadius", 2);
- PopUpOptions.avatarSize = db_get_w(NULL, MODULNAME, "AvatarSize", SETTING_AVTSIZE_DEFAULT);
- PopUpOptions.EnableAvatarUpdates = db_get_b(NULL, MODULNAME, "EnableAvatarUpdates", FALSE);
+ PopupOptions.avatarBorders = db_get_b(NULL, MODULNAME, "AvatarBorders", TRUE);
+ PopupOptions.avatarPNGBorders = db_get_b(NULL, MODULNAME, "AvatarPNGBorders", FALSE);
+ PopupOptions.avatarRadius = db_get_b(NULL, MODULNAME, "AvatarRadius", 2);
+ PopupOptions.avatarSize = db_get_w(NULL, MODULNAME, "AvatarSize", SETTING_AVTSIZE_DEFAULT);
+ PopupOptions.EnableAvatarUpdates = db_get_b(NULL, MODULNAME, "EnableAvatarUpdates", FALSE);
//Monitor
- PopUpOptions.Monitor = db_get_b(NULL, MODULNAME, "Monitor", SETTING_MONITOR_DEFAULT);
+ PopupOptions.Monitor = db_get_b(NULL, MODULNAME, "Monitor", SETTING_MONITOR_DEFAULT);
//Transparency
- PopUpOptions.Enable9xTransparency = db_get_b(NULL, MODULNAME, "EnableRegionTransparency", TRUE);
- PopUpOptions.UseTransparency = db_get_b(NULL, MODULNAME, "UseTransparency", TRUE);
- PopUpOptions.Alpha = db_get_b(NULL, MODULNAME, "Alpha", SETTING_ALPHA_DEFAULT);
- PopUpOptions.OpaqueOnHover = db_get_b(NULL, MODULNAME, "OpaqueOnHover", TRUE);
+ PopupOptions.Enable9xTransparency = db_get_b(NULL, MODULNAME, "EnableRegionTransparency", TRUE);
+ PopupOptions.UseTransparency = db_get_b(NULL, MODULNAME, "UseTransparency", TRUE);
+ PopupOptions.Alpha = db_get_b(NULL, MODULNAME, "Alpha", SETTING_ALPHA_DEFAULT);
+ PopupOptions.OpaqueOnHover = db_get_b(NULL, MODULNAME, "OpaqueOnHover", TRUE);
//Effects
- PopUpOptions.UseAnimations = db_get_b(NULL, MODULNAME, "UseAnimations", TRUE);
- PopUpOptions.UseEffect = db_get_b(NULL, MODULNAME, "Fade", TRUE);
- PopUpOptions.Effect = (LPTSTR)DBGetContactSettingStringX(NULL, MODULNAME, "Effect", "", DBVT_TCHAR);
- PopUpOptions.FadeIn = db_get_dw(NULL, MODULNAME, "FadeInTime", SETTING_FADEINTIME_DEFAULT);
- PopUpOptions.FadeOut = db_get_dw(NULL, MODULNAME, "FadeOutTime", SETTING_FADEOUTTIME_DEFAULT);
+ PopupOptions.UseAnimations = db_get_b(NULL, MODULNAME, "UseAnimations", TRUE);
+ PopupOptions.UseEffect = db_get_b(NULL, MODULNAME, "Fade", TRUE);
+ PopupOptions.Effect = (LPTSTR)DBGetContactSettingStringX(NULL, MODULNAME, "Effect", "", DBVT_TCHAR);
+ PopupOptions.FadeIn = db_get_dw(NULL, MODULNAME, "FadeInTime", SETTING_FADEINTIME_DEFAULT);
+ PopupOptions.FadeOut = db_get_dw(NULL, MODULNAME, "FadeOutTime", SETTING_FADEOUTTIME_DEFAULT);
//other old stuff
- PopUpOptions.MaxPopups = db_get_w(NULL, MODULNAME, "MaxPopups", 20);
+ PopupOptions.MaxPopups = db_get_w(NULL, MODULNAME, "MaxPopups", 20);
}
-INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
TCHAR tstr[64];
static bool bDlgInit = false; //some controls send WM_COMMAND before or during WM_INITDIALOG
@@ -104,40 +104,40 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM }
//Group: History
{
- CheckDlgButton(hwnd, IDC_ENABLE_HISTORY, PopUpOptions.EnableHistory);
- SetDlgItemInt (hwnd, IDC_HISTORYSIZE, PopUpOptions.HistorySize, FALSE);
- CheckDlgButton(hwnd, IDC_HPPLOG, PopUpOptions.UseHppHistoryLog);
+ CheckDlgButton(hwnd, IDC_ENABLE_HISTORY, PopupOptions.EnableHistory);
+ SetDlgItemInt (hwnd, IDC_HISTORYSIZE, PopupOptions.HistorySize, FALSE);
+ CheckDlgButton(hwnd, IDC_HPPLOG, PopupOptions.UseHppHistoryLog);
HWND hCtrl = GetDlgItem(hwnd, IDC_SHOWHISTORY);
SendMessage(hCtrl, BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)Translate("Popup History"), 0);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_HISTORY,0));
- EnableWindow(GetDlgItem(hwnd, IDC_HISTORY_STATIC1), PopUpOptions.EnableHistory);
- EnableWindow(GetDlgItem(hwnd, IDC_HISTORYSIZE), PopUpOptions.EnableHistory);
- EnableWindow(GetDlgItem(hwnd, IDC_HISTORY_STATIC2), PopUpOptions.EnableHistory);
- EnableWindow(GetDlgItem(hwnd, IDC_SHOWHISTORY), PopUpOptions.EnableHistory);
- EnableWindow(GetDlgItem(hwnd, IDC_HPPLOG), PopUpOptions.EnableHistory && gbHppInstalled);
+ EnableWindow(GetDlgItem(hwnd, IDC_HISTORY_STATIC1), PopupOptions.EnableHistory);
+ EnableWindow(GetDlgItem(hwnd, IDC_HISTORYSIZE), PopupOptions.EnableHistory);
+ EnableWindow(GetDlgItem(hwnd, IDC_HISTORY_STATIC2), PopupOptions.EnableHistory);
+ EnableWindow(GetDlgItem(hwnd, IDC_SHOWHISTORY), PopupOptions.EnableHistory);
+ EnableWindow(GetDlgItem(hwnd, IDC_HPPLOG), PopupOptions.EnableHistory && gbHppInstalled);
}
//Group: Avatars
{
//Borders
- CheckDlgButton(hwnd, IDC_AVT_BORDER, PopUpOptions.avatarBorders);
- CheckDlgButton(hwnd, IDC_AVT_PNGBORDER, PopUpOptions.avatarPNGBorders);
- EnableWindow(GetDlgItem(hwnd, IDC_AVT_PNGBORDER), PopUpOptions.avatarBorders);
+ CheckDlgButton(hwnd, IDC_AVT_BORDER, PopupOptions.avatarBorders);
+ CheckDlgButton(hwnd, IDC_AVT_PNGBORDER, PopupOptions.avatarPNGBorders);
+ EnableWindow(GetDlgItem(hwnd, IDC_AVT_PNGBORDER), PopupOptions.avatarBorders);
//Radius
- SetDlgItemInt(hwnd, IDC_AVT_RADIUS, PopUpOptions.avatarRadius, FALSE);
- SendDlgItemMessage(hwnd, IDC_AVT_RADIUS_SPIN,UDM_SETRANGE, 0, (LPARAM)MAKELONG((PopUpOptions.avatarSize / 2),0));
+ SetDlgItemInt(hwnd, IDC_AVT_RADIUS, PopupOptions.avatarRadius, FALSE);
+ SendDlgItemMessage(hwnd, IDC_AVT_RADIUS_SPIN,UDM_SETRANGE, 0, (LPARAM)MAKELONG((PopupOptions.avatarSize / 2),0));
//Size
mir_subclassWindow(GetDlgItem(hwnd, IDC_AVT_SIZE_SLIDE), AvatarTrackBarWndProc);
SendDlgItemMessage(hwnd, IDC_AVT_SIZE_SLIDE, TBM_SETRANGE,FALSE,
MAKELONG(SETTING_AVTSIZE_MIN, SETTING_AVTSIZE_MAX));
SendDlgItemMessage(hwnd, IDC_AVT_SIZE_SLIDE, TBM_SETPOS, TRUE,
- max(PopUpOptions.avatarSize, SETTING_AVTSIZE_MIN));
- SetDlgItemInt(hwnd, IDC_AVT_SIZE, PopUpOptions.avatarSize, FALSE);
+ max(PopupOptions.avatarSize, SETTING_AVTSIZE_MIN));
+ SetDlgItemInt(hwnd, IDC_AVT_SIZE, PopupOptions.avatarSize, FALSE);
//Request avatars
- CheckDlgButton(hwnd, IDC_AVT_REQUEST, PopUpOptions.EnableAvatarUpdates);
+ CheckDlgButton(hwnd, IDC_AVT_REQUEST, PopupOptions.EnableAvatarUpdates);
}
//Group: Monitor
{
@@ -145,8 +145,8 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM bMonitor = GetSystemMetrics(SM_CMONITORS)>1;
- CheckDlgButton(hwnd, IDC_MIRANDAWND, bMonitor ? (PopUpOptions.Monitor == MN_MIRANDA) : TRUE);
- CheckDlgButton(hwnd, IDC_ACTIVEWND, bMonitor ? (PopUpOptions.Monitor == MN_ACTIVE) : FALSE);
+ CheckDlgButton(hwnd, IDC_MIRANDAWND, bMonitor ? (PopupOptions.Monitor == MN_MIRANDA) : TRUE);
+ CheckDlgButton(hwnd, IDC_ACTIVEWND, bMonitor ? (PopupOptions.Monitor == MN_ACTIVE) : FALSE);
EnableWindow(GetDlgItem(hwnd, IDC_GRP_MULTIMONITOR), bMonitor);
EnableWindow(GetDlgItem(hwnd, IDC_MULTIMONITOR_DESC), bMonitor);
EnableWindow(GetDlgItem(hwnd, IDC_MIRANDAWND), bMonitor);
@@ -155,42 +155,42 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM //Group: Transparency
{
//9x/ME
- CheckDlgButton(hwnd, IDC_TRANS_9X, PopUpOptions.Enable9xTransparency);
+ CheckDlgButton(hwnd, IDC_TRANS_9X, PopupOptions.Enable9xTransparency);
//EnableWindow(GetDlgItem(hwnd, IDC_TRANS_9X), !IsWinVer2000Plus());
ShowWindow(GetDlgItem(hwnd, IDC_TRANS_9X), IsWinVer2000Plus() ? SW_HIDE : SW_SHOW);
//win2k+
- CheckDlgButton(hwnd, IDC_TRANS, PopUpOptions.UseTransparency);
+ CheckDlgButton(hwnd, IDC_TRANS, PopupOptions.UseTransparency);
SendDlgItemMessage(hwnd, IDC_TRANS_SLIDER, TBM_SETRANGE, FALSE, MAKELONG(1,255));
- SendDlgItemMessage(hwnd, IDC_TRANS_SLIDER, TBM_SETPOS, TRUE, PopUpOptions.Alpha);
+ SendDlgItemMessage(hwnd, IDC_TRANS_SLIDER, TBM_SETPOS, TRUE, PopupOptions.Alpha);
mir_subclassWindow(GetDlgItem(hwnd, IDC_TRANS_SLIDER), AlphaTrackBarWndProc);
- wsprintf(tstr, _T("%d%%"), Byte2Percentile(PopUpOptions.Alpha));
+ wsprintf(tstr, _T("%d%%"), Byte2Percentile(PopupOptions.Alpha));
SetDlgItemText(hwnd, IDC_TRANS_PERCENT, tstr);
- CheckDlgButton(hwnd, IDC_TRANS_OPAQUEONHOVER, PopUpOptions.OpaqueOnHover);
+ CheckDlgButton(hwnd, IDC_TRANS_OPAQUEONHOVER, PopupOptions.OpaqueOnHover);
{
BOOL how = TRUE;
EnableWindow(GetDlgItem(hwnd, IDC_TRANS), how);
- EnableWindow(GetDlgItem(hwnd, IDC_TRANS_TXT1), how && PopUpOptions.UseTransparency);
- EnableWindow(GetDlgItem(hwnd, IDC_TRANS_SLIDER), how && PopUpOptions.UseTransparency);
- EnableWindow(GetDlgItem(hwnd, IDC_TRANS_PERCENT), how && PopUpOptions.UseTransparency);
- EnableWindow(GetDlgItem(hwnd, IDC_TRANS_OPAQUEONHOVER), how && PopUpOptions.UseTransparency);
+ EnableWindow(GetDlgItem(hwnd, IDC_TRANS_TXT1), how && PopupOptions.UseTransparency);
+ EnableWindow(GetDlgItem(hwnd, IDC_TRANS_SLIDER), how && PopupOptions.UseTransparency);
+ EnableWindow(GetDlgItem(hwnd, IDC_TRANS_PERCENT), how && PopupOptions.UseTransparency);
+ EnableWindow(GetDlgItem(hwnd, IDC_TRANS_OPAQUEONHOVER), how && PopupOptions.UseTransparency);
}
ShowWindow(GetDlgItem(hwnd, IDC_TRANS), IsWinVer2000Plus() ? SW_SHOW : SW_HIDE);
}
//Group: Effects
{
//Use Animations
- CheckDlgButton(hwnd, IDC_USEANIMATIONS, PopUpOptions.UseAnimations);
+ CheckDlgButton(hwnd, IDC_USEANIMATIONS, PopupOptions.UseAnimations);
//Fade
- SetDlgItemInt (hwnd, IDC_FADEIN, PopUpOptions.FadeIn, FALSE);
- SetDlgItemInt (hwnd, IDC_FADEOUT,PopUpOptions.FadeOut,FALSE);
+ SetDlgItemInt (hwnd, IDC_FADEIN, PopupOptions.FadeIn, FALSE);
+ SetDlgItemInt (hwnd, IDC_FADEOUT,PopupOptions.FadeOut,FALSE);
UDACCEL aAccels[] = {{0,50},{1,100},{3,500}};
SendDlgItemMessage(hwnd, IDC_FADEIN_SPIN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(SETTING_FADEINTIME_MAX, SETTING_FADEINTIME_MIN));
SendDlgItemMessage(hwnd, IDC_FADEIN_SPIN, UDM_SETACCEL, (WPARAM)SIZEOF(aAccels), (LPARAM)&aAccels);
SendDlgItemMessage(hwnd, IDC_FADEOUT_SPIN,UDM_SETRANGE, 0, (LPARAM)MAKELONG(SETTING_FADEOUTTIME_MAX,SETTING_FADEOUTTIME_MIN));
SendDlgItemMessage(hwnd, IDC_FADEOUT_SPIN,UDM_SETACCEL, (WPARAM)SIZEOF(aAccels), (LPARAM)&aAccels);
- BOOL how = PopUpOptions.UseAnimations || PopUpOptions.UseEffect;
+ BOOL how = PopupOptions.UseAnimations || PopupOptions.UseEffect;
EnableWindow(GetDlgItem(hwnd, IDC_FADEIN_TXT1), how);
EnableWindow(GetDlgItem(hwnd, IDC_FADEIN), how);
EnableWindow(GetDlgItem(hwnd, IDC_FADEIN_SPIN), how);
@@ -211,11 +211,11 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM HWND hCtrl = GetDlgItem(hwnd, IDC_EFFECT);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("No effect")) ,-2);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("Fade in/out")) ,-1);
- dwActiveItem = (DWORD)PopUpOptions.UseEffect;
+ dwActiveItem = (DWORD)PopupOptions.UseEffect;
for (int i=0; i < g_lstPopupVfx.getCount(); ++i) {
dwItem = ComboBox_AddString(hCtrl, TranslateTS(g_lstPopupVfx[i]));
ComboBox_SetItemData(hCtrl, dwItem, i);
- if (PopUpOptions.UseEffect && !lstrcmp(g_lstPopupVfx[i], PopUpOptions.Effect))
+ if (PopupOptions.UseEffect && !lstrcmp(g_lstPopupVfx[i], PopupOptions.Effect))
dwActiveItem = dwItem;
}
SendDlgItemMessage(hwnd, IDC_EFFECT, CB_SETCURSEL, dwActiveItem, 0);
@@ -223,7 +223,7 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM }
//later check stuff
- SetDlgItemInt(hwnd, IDC_MAXPOPUPS, PopUpOptions.MaxPopups, FALSE);
+ SetDlgItemInt(hwnd, IDC_MAXPOPUPS, PopupOptions.MaxPopups, FALSE);
TranslateDialogDefault(hwnd); //do it on end of WM_INITDIALOG
bDlgInit = true;
return TRUE;
@@ -231,15 +231,15 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case WM_HSCROLL:
switch (idCtrl = GetDlgCtrlID((HWND)lParam)) {
case IDC_AVT_SIZE_SLIDE:
- PopUpOptions.avatarSize = SendDlgItemMessage(hwnd,IDC_AVT_SIZE_SLIDE, TBM_GETPOS,0,0);
- SetDlgItemInt(hwnd, IDC_AVT_SIZE ,PopUpOptions.avatarSize,FALSE);
- SendDlgItemMessage(hwnd, IDC_AVT_RADIUS_SPIN,UDM_SETRANGE, 0, (LPARAM)MAKELONG((PopUpOptions.avatarSize / 2),0));
+ PopupOptions.avatarSize = SendDlgItemMessage(hwnd,IDC_AVT_SIZE_SLIDE, TBM_GETPOS,0,0);
+ SetDlgItemInt(hwnd, IDC_AVT_SIZE ,PopupOptions.avatarSize,FALSE);
+ SendDlgItemMessage(hwnd, IDC_AVT_RADIUS_SPIN,UDM_SETRANGE, 0, (LPARAM)MAKELONG((PopupOptions.avatarSize / 2),0));
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
break;
case IDC_TRANS_SLIDER:
- PopUpOptions.Alpha = (BYTE)SendDlgItemMessage(hwnd,IDC_TRANS_SLIDER, TBM_GETPOS, 0,0);
- wsprintf(tstr, TranslateT("%d%%"), Byte2Percentile(PopUpOptions.Alpha));
+ PopupOptions.Alpha = (BYTE)SendDlgItemMessage(hwnd,IDC_TRANS_SLIDER, TBM_GETPOS, 0,0);
+ wsprintf(tstr, TranslateT("%d%%"), Byte2Percentile(PopupOptions.Alpha));
SetDlgItemText(hwnd, IDC_TRANS_PERCENT, tstr);
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
break;
@@ -252,12 +252,12 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case BN_CLICKED: //Button controls
switch(idCtrl) {
case IDC_ENABLE_HISTORY:
- PopUpOptions.EnableHistory = !PopUpOptions.EnableHistory;
- EnableWindow(GetDlgItem(hwnd, IDC_HISTORY_STATIC1), PopUpOptions.EnableHistory);
- EnableWindow(GetDlgItem(hwnd, IDC_HISTORYSIZE), PopUpOptions.EnableHistory);
- EnableWindow(GetDlgItem(hwnd, IDC_HISTORY_STATIC2), PopUpOptions.EnableHistory);
- EnableWindow(GetDlgItem(hwnd, IDC_SHOWHISTORY), PopUpOptions.EnableHistory);
- EnableWindow(GetDlgItem(hwnd, IDC_HPPLOG), PopUpOptions.EnableHistory && gbHppInstalled);
+ PopupOptions.EnableHistory = !PopupOptions.EnableHistory;
+ EnableWindow(GetDlgItem(hwnd, IDC_HISTORY_STATIC1), PopupOptions.EnableHistory);
+ EnableWindow(GetDlgItem(hwnd, IDC_HISTORYSIZE), PopupOptions.EnableHistory);
+ EnableWindow(GetDlgItem(hwnd, IDC_HISTORY_STATIC2), PopupOptions.EnableHistory);
+ EnableWindow(GetDlgItem(hwnd, IDC_SHOWHISTORY), PopupOptions.EnableHistory);
+ EnableWindow(GetDlgItem(hwnd, IDC_HPPLOG), PopupOptions.EnableHistory && gbHppInstalled);
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
@@ -266,62 +266,62 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM break;
case IDC_HPPLOG:
- PopUpOptions.UseHppHistoryLog = !PopUpOptions.UseHppHistoryLog;
+ PopupOptions.UseHppHistoryLog = !PopupOptions.UseHppHistoryLog;
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
case IDC_AVT_BORDER:
- PopUpOptions.avatarBorders = !PopUpOptions.avatarBorders;
- EnableWindow(GetDlgItem(hwnd, IDC_AVT_PNGBORDER), PopUpOptions.avatarBorders);
+ PopupOptions.avatarBorders = !PopupOptions.avatarBorders;
+ EnableWindow(GetDlgItem(hwnd, IDC_AVT_PNGBORDER), PopupOptions.avatarBorders);
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
case IDC_AVT_PNGBORDER:
- PopUpOptions.avatarPNGBorders = !PopUpOptions.avatarPNGBorders;
+ PopupOptions.avatarPNGBorders = !PopupOptions.avatarPNGBorders;
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
case IDC_AVT_REQUEST:
- PopUpOptions.EnableAvatarUpdates = !PopUpOptions.EnableAvatarUpdates;
+ PopupOptions.EnableAvatarUpdates = !PopupOptions.EnableAvatarUpdates;
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
case IDC_MIRANDAWND:
- PopUpOptions.Monitor = MN_MIRANDA;
+ PopupOptions.Monitor = MN_MIRANDA;
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
case IDC_ACTIVEWND:
- PopUpOptions.Monitor = MN_ACTIVE;
+ PopupOptions.Monitor = MN_ACTIVE;
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
case IDC_TRANS_9X:
- PopUpOptions.Enable9xTransparency = !PopUpOptions.Enable9xTransparency;
+ PopupOptions.Enable9xTransparency = !PopupOptions.Enable9xTransparency;
SendMessage(GetParent(hwnd), PSM_CHANGED,0,0);
break;
case IDC_TRANS:
- PopUpOptions.UseTransparency = !PopUpOptions.UseTransparency;
+ PopupOptions.UseTransparency = !PopupOptions.UseTransparency;
{
BOOL how = TRUE;
- EnableWindow(GetDlgItem(hwnd, IDC_TRANS_TXT1) ,how && PopUpOptions.UseTransparency);
- EnableWindow(GetDlgItem(hwnd, IDC_TRANS_SLIDER) ,how && PopUpOptions.UseTransparency);
- EnableWindow(GetDlgItem(hwnd, IDC_TRANS_PERCENT) ,how && PopUpOptions.UseTransparency);
- EnableWindow(GetDlgItem(hwnd, IDC_TRANS_OPAQUEONHOVER) ,how && PopUpOptions.UseTransparency);
+ EnableWindow(GetDlgItem(hwnd, IDC_TRANS_TXT1) ,how && PopupOptions.UseTransparency);
+ EnableWindow(GetDlgItem(hwnd, IDC_TRANS_SLIDER) ,how && PopupOptions.UseTransparency);
+ EnableWindow(GetDlgItem(hwnd, IDC_TRANS_PERCENT) ,how && PopupOptions.UseTransparency);
+ EnableWindow(GetDlgItem(hwnd, IDC_TRANS_OPAQUEONHOVER) ,how && PopupOptions.UseTransparency);
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
}
break;
case IDC_TRANS_OPAQUEONHOVER:
- PopUpOptions.OpaqueOnHover = !PopUpOptions.OpaqueOnHover;
+ PopupOptions.OpaqueOnHover = !PopupOptions.OpaqueOnHover;
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
break;
case IDC_USEANIMATIONS:
- PopUpOptions.UseAnimations = !PopUpOptions.UseAnimations;
+ PopupOptions.UseAnimations = !PopupOptions.UseAnimations;
{
- BOOL enable = PopUpOptions.UseAnimations || PopUpOptions.UseEffect;
+ BOOL enable = PopupOptions.UseAnimations || PopupOptions.UseEffect;
EnableWindow(GetDlgItem(hwnd, IDC_FADEIN_TXT1), enable);
EnableWindow(GetDlgItem(hwnd, IDC_FADEIN), enable);
EnableWindow(GetDlgItem(hwnd, IDC_FADEIN_SPIN), enable);
@@ -335,7 +335,7 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM break;
case IDC_PREVIEW:
- PopUpPreview();
+ PopupPreview();
break;
}
break;
@@ -346,11 +346,11 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case IDC_EFFECT:
{
int iEffect = ComboBox_GetItemData((HWND)lParam, ComboBox_GetCurSel((HWND)lParam));
- PopUpOptions.UseEffect = (iEffect != -2) ? TRUE : FALSE;
- mir_free(PopUpOptions.Effect);
- PopUpOptions.Effect = mir_tstrdup((iEffect >= 0) ? g_lstPopupVfx[iEffect] : _T(""));
+ PopupOptions.UseEffect = (iEffect != -2) ? TRUE : FALSE;
+ mir_free(PopupOptions.Effect);
+ PopupOptions.Effect = mir_tstrdup((iEffect >= 0) ? g_lstPopupVfx[iEffect] : _T(""));
- BOOL enable = PopUpOptions.UseAnimations || PopUpOptions.UseEffect;
+ BOOL enable = PopupOptions.UseAnimations || PopupOptions.UseEffect;
EnableWindow(GetDlgItem(hwnd, IDC_FADEIN_TXT1), enable);
EnableWindow(GetDlgItem(hwnd, IDC_FADEIN), enable);
EnableWindow(GetDlgItem(hwnd, IDC_FADEIN_SPIN), enable);
@@ -373,7 +373,7 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
int maxPop = GetDlgItemInt(hwnd, idCtrl, NULL, FALSE);
if (maxPop > 0){
- PopUpOptions.MaxPopups = maxPop;
+ PopupOptions.MaxPopups = maxPop;
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
}
}
@@ -383,7 +383,7 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM int histSize = GetDlgItemInt(hwnd, idCtrl, NULL, FALSE);
if ( histSize > 0 &&
histSize <= SETTING_HISTORYSIZE_MAX){
- PopUpOptions.HistorySize = histSize;
+ PopupOptions.HistorySize = histSize;
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
}
}
@@ -392,7 +392,7 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
int avtRadius = GetDlgItemInt(hwnd, idCtrl, NULL, FALSE);
if ( avtRadius <= SETTING_AVTSIZE_MAX / 2 ) {
- PopUpOptions.avatarRadius = avtRadius;
+ PopupOptions.avatarRadius = avtRadius;
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
}
}
@@ -402,7 +402,7 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM int fadeIn = GetDlgItemInt(hwnd, idCtrl, NULL, FALSE);
if ( fadeIn >= SETTING_FADEINTIME_MIN &&
fadeIn <= SETTING_FADEINTIME_MAX ) {
- PopUpOptions.FadeIn = fadeIn;
+ PopupOptions.FadeIn = fadeIn;
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
}
}
@@ -412,7 +412,7 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM int fadeOut = GetDlgItemInt(hwnd, idCtrl, NULL, FALSE);
if ( fadeOut >= SETTING_FADEOUTTIME_MIN &&
fadeOut <= SETTING_FADEOUTTIME_MAX){
- PopUpOptions.FadeOut = fadeOut;
+ PopupOptions.FadeOut = fadeOut;
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
}
}
@@ -427,9 +427,9 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
int maxPop = GetDlgItemInt(hwnd, idCtrl, NULL, FALSE);
if (maxPop <= 0)
- PopUpOptions.MaxPopups = 20;
- if (maxPop != PopUpOptions.MaxPopups) {
- SetDlgItemInt(hwnd, idCtrl, PopUpOptions.MaxPopups, FALSE);
+ PopupOptions.MaxPopups = 20;
+ if (maxPop != PopupOptions.MaxPopups) {
+ SetDlgItemInt(hwnd, idCtrl, PopupOptions.MaxPopups, FALSE);
//ErrorMSG(1);
SetFocus((HWND)lParam);
}
@@ -439,11 +439,11 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
int histSize = GetDlgItemInt(hwnd, idCtrl, NULL, FALSE);
if (histSize <= 0)
- PopUpOptions.HistorySize = SETTING_HISTORYSIZE_DEFAULT;
+ PopupOptions.HistorySize = SETTING_HISTORYSIZE_DEFAULT;
else if (histSize > SETTING_HISTORYSIZE_MAX)
- PopUpOptions.HistorySize = SETTING_HISTORYSIZE_MAX;
- if (histSize != PopUpOptions.HistorySize) {
- SetDlgItemInt(hwnd, idCtrl, PopUpOptions.HistorySize, FALSE);
+ PopupOptions.HistorySize = SETTING_HISTORYSIZE_MAX;
+ if (histSize != PopupOptions.HistorySize) {
+ SetDlgItemInt(hwnd, idCtrl, PopupOptions.HistorySize, FALSE);
ErrorMSG(1, SETTING_HISTORYSIZE_MAX);
SetFocus((HWND)lParam);
}
@@ -453,9 +453,9 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
int avtRadius = GetDlgItemInt(hwnd, idCtrl, NULL, FALSE);
if (avtRadius > SETTING_AVTSIZE_MAX / 2)
- PopUpOptions.avatarRadius = SETTING_AVTSIZE_MAX / 2;
- if (avtRadius != PopUpOptions.avatarRadius) {
- SetDlgItemInt(hwnd, idCtrl, PopUpOptions.avatarRadius, FALSE);
+ PopupOptions.avatarRadius = SETTING_AVTSIZE_MAX / 2;
+ if (avtRadius != PopupOptions.avatarRadius) {
+ SetDlgItemInt(hwnd, idCtrl, PopupOptions.avatarRadius, FALSE);
ErrorMSG(0, SETTING_AVTSIZE_MAX / 2);
SetFocus((HWND)lParam);
}
@@ -465,11 +465,11 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
int fade = GetDlgItemInt(hwnd, idCtrl, NULL, FALSE);
if (fade < SETTING_FADEINTIME_MIN)
- PopUpOptions.FadeIn = SETTING_FADEINTIME_MIN;
+ PopupOptions.FadeIn = SETTING_FADEINTIME_MIN;
else if (fade > SETTING_FADEINTIME_MAX)
- PopUpOptions.FadeIn = SETTING_FADEINTIME_MAX;
- if (fade != PopUpOptions.FadeIn) {
- SetDlgItemInt(hwnd, idCtrl, PopUpOptions.FadeIn, FALSE);
+ PopupOptions.FadeIn = SETTING_FADEINTIME_MAX;
+ if (fade != PopupOptions.FadeIn) {
+ SetDlgItemInt(hwnd, idCtrl, PopupOptions.FadeIn, FALSE);
ErrorMSG(SETTING_FADEINTIME_MIN, SETTING_FADEINTIME_MAX);
SetFocus((HWND)lParam);
}
@@ -479,11 +479,11 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
int fade = GetDlgItemInt(hwnd, idCtrl, NULL, FALSE);
if (fade < SETTING_FADEOUTTIME_MIN)
- PopUpOptions.FadeOut = SETTING_FADEOUTTIME_MIN;
+ PopupOptions.FadeOut = SETTING_FADEOUTTIME_MIN;
else if (fade > SETTING_FADEOUTTIME_MAX)
- PopUpOptions.FadeOut = SETTING_FADEOUTTIME_MAX;
- if (fade != PopUpOptions.FadeOut) {
- SetDlgItemInt(hwnd, idCtrl, PopUpOptions.FadeOut, FALSE);
+ PopupOptions.FadeOut = SETTING_FADEOUTTIME_MAX;
+ if (fade != PopupOptions.FadeOut) {
+ SetDlgItemInt(hwnd, idCtrl, PopupOptions.FadeOut, FALSE);
ErrorMSG(SETTING_FADEOUTTIME_MIN, SETTING_FADEOUTTIME_MAX);
SetFocus((HWND)lParam);
}
@@ -502,32 +502,32 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case PSN_APPLY:
//History
- db_set_b(NULL, MODULNAME, "EnableHistory", (BYTE)PopUpOptions.EnableHistory);
- db_set_w(NULL, MODULNAME, "HistorySize", PopUpOptions.HistorySize);
+ db_set_b(NULL, MODULNAME, "EnableHistory", (BYTE)PopupOptions.EnableHistory);
+ db_set_w(NULL, MODULNAME, "HistorySize", PopupOptions.HistorySize);
PopupHistoryResize();
- db_set_b(NULL, MODULNAME, "UseHppHistoryLog", PopUpOptions.UseHppHistoryLog);
+ db_set_b(NULL, MODULNAME, "UseHppHistoryLog", PopupOptions.UseHppHistoryLog);
//Avatars
- db_set_b(NULL, MODULNAME, "AvatarBorders", PopUpOptions.avatarBorders);
- db_set_b(NULL, MODULNAME, "AvatarPNGBorders", PopUpOptions.avatarPNGBorders);
- db_set_b(NULL, MODULNAME, "AvatarRadius", PopUpOptions.avatarRadius);
- db_set_w(NULL, MODULNAME, "AvatarSize", PopUpOptions.avatarSize);
- db_set_b(NULL, MODULNAME, "EnableAvatarUpdates", PopUpOptions.EnableAvatarUpdates);
+ db_set_b(NULL, MODULNAME, "AvatarBorders", PopupOptions.avatarBorders);
+ db_set_b(NULL, MODULNAME, "AvatarPNGBorders", PopupOptions.avatarPNGBorders);
+ db_set_b(NULL, MODULNAME, "AvatarRadius", PopupOptions.avatarRadius);
+ db_set_w(NULL, MODULNAME, "AvatarSize", PopupOptions.avatarSize);
+ db_set_b(NULL, MODULNAME, "EnableAvatarUpdates", PopupOptions.EnableAvatarUpdates);
//Monitor
- db_set_b(NULL, MODULNAME, "Monitor", PopUpOptions.Monitor);
+ db_set_b(NULL, MODULNAME, "Monitor", PopupOptions.Monitor);
//Transparency
- db_set_b(NULL, MODULNAME, "EnableRegionTransparency", PopUpOptions.Enable9xTransparency);
- db_set_b(NULL, MODULNAME, "UseTransparency", PopUpOptions.UseTransparency);
- db_set_b(NULL, MODULNAME, "Alpha", PopUpOptions.Alpha);
- db_set_b(NULL, MODULNAME, "OpaqueOnHover", PopUpOptions.OpaqueOnHover);
+ db_set_b(NULL, MODULNAME, "EnableRegionTransparency", PopupOptions.Enable9xTransparency);
+ db_set_b(NULL, MODULNAME, "UseTransparency", PopupOptions.UseTransparency);
+ db_set_b(NULL, MODULNAME, "Alpha", PopupOptions.Alpha);
+ db_set_b(NULL, MODULNAME, "OpaqueOnHover", PopupOptions.OpaqueOnHover);
//Effects
- db_set_b(NULL, MODULNAME, "UseAnimations", PopUpOptions.UseAnimations);
- db_set_b(NULL, MODULNAME, "Fade", PopUpOptions.UseEffect);
- db_set_ts(NULL, MODULNAME, "Effect", PopUpOptions.Effect);
- db_set_dw(NULL, MODULNAME, "FadeInTime", PopUpOptions.FadeIn);
- db_set_dw(NULL, MODULNAME, "FadeOutTime", PopUpOptions.FadeOut);
+ db_set_b(NULL, MODULNAME, "UseAnimations", PopupOptions.UseAnimations);
+ db_set_b(NULL, MODULNAME, "Fade", PopupOptions.UseEffect);
+ db_set_ts(NULL, MODULNAME, "Effect", PopupOptions.Effect);
+ db_set_dw(NULL, MODULNAME, "FadeInTime", PopupOptions.FadeIn);
+ db_set_dw(NULL, MODULNAME, "FadeOutTime", PopupOptions.FadeOut);
//other old stuff
- db_set_w(NULL, MODULNAME, "MaxPopups", (BYTE)PopUpOptions.MaxPopups);
+ db_set_w(NULL, MODULNAME, "MaxPopups", (BYTE)PopupOptions.MaxPopups);
}
return TRUE;
}
@@ -572,7 +572,7 @@ LRESULT CALLBACK AvatarTrackBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA (rc.left+rc.right-newVal)/2, rc.bottom+2, newVal, newVal,
SWP_NOACTIVATE|SWP_DEFERERASE|SWP_NOSENDCHANGING|SWP_SHOWWINDOW);
- HRGN rgn = CreateRoundRectRgn(0, 0, newVal, newVal, 2 * PopUpOptions.avatarRadius, 2 * PopUpOptions.avatarRadius);
+ HRGN rgn = CreateRoundRectRgn(0, 0, newVal, newVal, 2 * PopupOptions.avatarRadius, 2 * PopupOptions.avatarRadius);
SetWindowRgn(hwndBox, rgn, TRUE);
InvalidateRect(hwndBox, NULL, FALSE);
oldVal = newVal;
diff --git a/plugins/Popup/src/opt_adv.h b/plugins/Popup/src/opt_adv.h index 8b2774c4bf..cadf0c4648 100644 --- a/plugins/Popup/src/opt_adv.h +++ b/plugins/Popup/src/opt_adv.h @@ -30,7 +30,7 @@ void OptAdv_RegisterVfx(char *name); void OptAdv_UnregisterVfx();
void LoadOption_AdvOpts();
-INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND, UINT, WPARAM, LPARAM);
+INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND, UINT, WPARAM, LPARAM);
#endif // __opt_adv_h__
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp index d39877f8b8..5e87499881 100644 --- a/plugins/Popup/src/opt_class.cpp +++ b/plugins/Popup/src/opt_class.cpp @@ -453,7 +453,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l for(i=0; i < gTreeData.getCount(); ++i) {
switch (gTreeData[i]->typ) {
case 1:
- LoadNotificationSettings(gTreeData[i], "PopUpNotifications");
+ LoadNotificationSettings(gTreeData[i], "PopupNotifications");
break;
case 2: //not finish
LoadClassSettings(gTreeData[i], PU_MODULCLASS);
@@ -468,11 +468,11 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l switch (gTreeData[i]->typ) {
case 1:
gTreeData[i]->notification.iSeconds = gTreeData[i]->timeoutValue;
- SaveNotificationSettings(gTreeData[i],"PopUpNotifications");
+ SaveNotificationSettings(gTreeData[i],"PopupNotifications");
break;
case 2: //not finish
gTreeData[i]->pupClass.iSeconds = gTreeData[i]->timeoutValue;
- SaveClassSettings(gTreeData[i],"PopUpCLASS");
+ SaveClassSettings(gTreeData[i],"PopupCLASS");
break;
}
}
@@ -509,7 +509,7 @@ void LoadClassSettings(POPUPTREEDATA *ptd, char* szModul) mir_snprintf(setting, sizeof(setting), "%s/TimeoutVal", ptd->pupClass.pszName);
ptd->timeoutValue =
(signed char)db_get_w(NULL, szModul, setting,
- ptd->pupClass.iSeconds ? ptd->pupClass.iSeconds : PopUpOptions.Seconds);
+ ptd->pupClass.iSeconds ? ptd->pupClass.iSeconds : PopupOptions.Seconds);
mir_snprintf(setting, sizeof(setting), "%s/leftAction", ptd->pupClass.pszName);
szTmp = db_get_s(NULL, szModul, setting, POPUP_ACTION_NOTHING); //standart ??
diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp index 648df83f46..23cbb98aaf 100644 --- a/plugins/Popup/src/opt_gen.cpp +++ b/plugins/Popup/src/opt_gen.cpp @@ -88,43 +88,43 @@ int AddStatusModes(OPTTREE_OPTION *options, int pos, LPTSTR prefix, DWORD flags) void LoadOption_General()
{
//Seconds
- PopUpOptions.InfiniteDelay = db_get_b(NULL, MODULNAME, "InfiniteDelay", FALSE);
- PopUpOptions.Seconds =
+ PopupOptions.InfiniteDelay = db_get_b(NULL, MODULNAME, "InfiniteDelay", FALSE);
+ PopupOptions.Seconds =
DBGetContactSettingRangedWord(NULL, MODULNAME, "Seconds", SETTING_LIFETIME_DEFAULT, SETTING_LIFETIME_MIN, SETTING_LIFETIME_MAX);
- PopUpOptions.LeaveHovered = db_get_b(NULL, MODULNAME, "LeaveHovered", TRUE);
+ PopupOptions.LeaveHovered = db_get_b(NULL, MODULNAME, "LeaveHovered", TRUE);
//Dynamic Resize
- PopUpOptions.DynamicResize = db_get_b(NULL, MODULNAME, "DynamicResize", FALSE);
- PopUpOptions.UseMinimumWidth = db_get_b(NULL, MODULNAME, "UseMinimumWidth", TRUE);
- PopUpOptions.MinimumWidth = db_get_w(NULL, MODULNAME, "MinimumWidth", 160);
- PopUpOptions.UseMaximumWidth = db_get_b(NULL, MODULNAME, "UseMaximumWidth", TRUE);
- PopUpOptions.MaximumWidth = db_get_w(NULL, MODULNAME, "MaximumWidth", 300);
+ PopupOptions.DynamicResize = db_get_b(NULL, MODULNAME, "DynamicResize", FALSE);
+ PopupOptions.UseMinimumWidth = db_get_b(NULL, MODULNAME, "UseMinimumWidth", TRUE);
+ PopupOptions.MinimumWidth = db_get_w(NULL, MODULNAME, "MinimumWidth", 160);
+ PopupOptions.UseMaximumWidth = db_get_b(NULL, MODULNAME, "UseMaximumWidth", TRUE);
+ PopupOptions.MaximumWidth = db_get_w(NULL, MODULNAME, "MaximumWidth", 300);
//Position
- PopUpOptions.Position
+ PopupOptions.Position
= DBGetContactSettingRangedByte(NULL, MODULNAME, "Position", POS_LOWERRIGHT, POS_MINVALUE, POS_MAXVALUE);
//Configure popup area
- PopUpOptions.gapTop = db_get_w(NULL, MODULNAME, "gapTop", 5);
- PopUpOptions.gapBottom = db_get_w(NULL, MODULNAME, "gapBottom", 5);
- PopUpOptions.gapLeft = db_get_w(NULL, MODULNAME, "gapLeft", 5);
- PopUpOptions.gapRight = db_get_w(NULL, MODULNAME, "gapRight", 5);
- PopUpOptions.spacing = db_get_w(NULL, MODULNAME, "spacing", 5);
+ PopupOptions.gapTop = db_get_w(NULL, MODULNAME, "gapTop", 5);
+ PopupOptions.gapBottom = db_get_w(NULL, MODULNAME, "gapBottom", 5);
+ PopupOptions.gapLeft = db_get_w(NULL, MODULNAME, "gapLeft", 5);
+ PopupOptions.gapRight = db_get_w(NULL, MODULNAME, "gapRight", 5);
+ PopupOptions.spacing = db_get_w(NULL, MODULNAME, "spacing", 5);
//Spreading
- PopUpOptions.Spreading
+ PopupOptions.Spreading
= DBGetContactSettingRangedByte(NULL, MODULNAME, "Spreading", SPREADING_VERTICAL, SPREADING_MINVALUE, SPREADING_MAXVALUE);
//miscellaneous
- PopUpOptions.ReorderPopUps = db_get_b(NULL, MODULNAME, "ReorderPopUps", TRUE);
- PopUpOptions.ReorderPopUpsWarning = db_get_b(NULL, MODULNAME, "ReorderPopUpsWarning", TRUE);
+ PopupOptions.ReorderPopups = db_get_b(NULL, MODULNAME, "ReorderPopups", TRUE);
+ PopupOptions.ReorderPopupsWarning = db_get_b(NULL, MODULNAME, "ReorderPopupsWarning", TRUE);
//disable When
- PopUpOptions.ModuleIsEnabled = db_get_b(NULL, MODULNAME, "ModuleIsEnabled", TRUE);
- PopUpOptions.DisableWhenFullscreen = db_get_b(NULL, MODULNAME, "DisableWhenFullscreen", TRUE);
+ PopupOptions.ModuleIsEnabled = db_get_b(NULL, MODULNAME, "ModuleIsEnabled", TRUE);
+ PopupOptions.DisableWhenFullscreen = db_get_b(NULL, MODULNAME, "DisableWhenFullscreen", TRUE);
}
-INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
static bool bDlgInit = false; //some controls send WM_COMMAND before or during WM_INITDIALOG
@@ -139,37 +139,37 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM switch (msg) {
case WM_INITDIALOG:
//Seconds of delay
- CheckDlgButton(hwnd, IDC_INFINITEDELAY, PopUpOptions.InfiniteDelay);
- CheckDlgButton(hwnd, IDC_LEAVEHOVERED, PopUpOptions.LeaveHovered);
- EnableWindow(GetDlgItem(hwnd, IDC_SECONDS), !PopUpOptions.InfiniteDelay);
- EnableWindow(GetDlgItem(hwnd, IDC_SECONDS_STATIC1), !PopUpOptions.InfiniteDelay);
- EnableWindow(GetDlgItem(hwnd, IDC_SECONDS_STATIC2), !PopUpOptions.InfiniteDelay);
- EnableWindow(GetDlgItem(hwnd, IDC_LEAVEHOVERED), !PopUpOptions.InfiniteDelay);
- SetDlgItemInt(hwnd, IDC_SECONDS, PopUpOptions.Seconds, FALSE);
+ CheckDlgButton(hwnd, IDC_INFINITEDELAY, PopupOptions.InfiniteDelay);
+ CheckDlgButton(hwnd, IDC_LEAVEHOVERED, PopupOptions.LeaveHovered);
+ EnableWindow(GetDlgItem(hwnd, IDC_SECONDS), !PopupOptions.InfiniteDelay);
+ EnableWindow(GetDlgItem(hwnd, IDC_SECONDS_STATIC1), !PopupOptions.InfiniteDelay);
+ EnableWindow(GetDlgItem(hwnd, IDC_SECONDS_STATIC2), !PopupOptions.InfiniteDelay);
+ EnableWindow(GetDlgItem(hwnd, IDC_LEAVEHOVERED), !PopupOptions.InfiniteDelay);
+ SetDlgItemInt(hwnd, IDC_SECONDS, PopupOptions.Seconds, FALSE);
SendDlgItemMessage(hwnd, IDC_SECONDS_SPIN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(SETTING_LIFETIME_MAX, SETTING_LIFETIME_MIN));
//Dynamic Resize
- CheckDlgButton(hwnd, IDC_DYNAMICRESIZE, PopUpOptions.DynamicResize);
- SetDlgItemText(hwnd, IDC_USEMAXIMUMWIDTH, PopUpOptions.DynamicResize ? LPGENT("Maximum width"): LPGENT("Width"));
+ CheckDlgButton(hwnd, IDC_DYNAMICRESIZE, PopupOptions.DynamicResize);
+ SetDlgItemText(hwnd, IDC_USEMAXIMUMWIDTH, PopupOptions.DynamicResize ? LPGENT("Maximum width"): LPGENT("Width"));
//Minimum Width
- CheckDlgButton(hwnd, IDC_USEMINIMUMWIDTH, PopUpOptions.UseMinimumWidth);
+ CheckDlgButton(hwnd, IDC_USEMINIMUMWIDTH, PopupOptions.UseMinimumWidth);
SendDlgItemMessage(hwnd, IDC_MINIMUMWIDTH_SPIN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(
SETTING_MAXIMUMWIDTH_MAX,
SETTING_MINIMUMWIDTH_MIN));
- SetDlgItemInt(hwnd, IDC_MINIMUMWIDTH, PopUpOptions.MinimumWidth, FALSE);
+ SetDlgItemInt(hwnd, IDC_MINIMUMWIDTH, PopupOptions.MinimumWidth, FALSE);
//Maximum Width
- PopUpOptions.UseMaximumWidth = PopUpOptions.DynamicResize ? PopUpOptions.UseMaximumWidth : TRUE;
- CheckDlgButton(hwnd, IDC_USEMAXIMUMWIDTH, PopUpOptions.UseMaximumWidth);
+ PopupOptions.UseMaximumWidth = PopupOptions.DynamicResize ? PopupOptions.UseMaximumWidth : TRUE;
+ CheckDlgButton(hwnd, IDC_USEMAXIMUMWIDTH, PopupOptions.UseMaximumWidth);
SendDlgItemMessage(hwnd, IDC_MAXIMUMWIDTH_SPIN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(
SETTING_MAXIMUMWIDTH_MAX,
SETTING_MINIMUMWIDTH_MIN));
- SetDlgItemInt(hwnd, IDC_MAXIMUMWIDTH, PopUpOptions.MaximumWidth, FALSE);
+ SetDlgItemInt(hwnd, IDC_MAXIMUMWIDTH, PopupOptions.MaximumWidth, FALSE);
//And finally let's enable/disable them.
- EnableWindow(GetDlgItem(hwnd, IDC_USEMINIMUMWIDTH), PopUpOptions.DynamicResize);
- EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH), PopUpOptions.DynamicResize && PopUpOptions.UseMinimumWidth);
- EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH_SPIN), PopUpOptions.DynamicResize && PopUpOptions.UseMinimumWidth);
- EnableWindow(GetDlgItem(hwnd, IDC_MAXIMUMWIDTH), PopUpOptions.UseMaximumWidth);
- EnableWindow(GetDlgItem(hwnd, IDC_MAXIMUMWIDTH_SPIN), PopUpOptions.UseMaximumWidth);
+ EnableWindow(GetDlgItem(hwnd, IDC_USEMINIMUMWIDTH), PopupOptions.DynamicResize);
+ EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH), PopupOptions.DynamicResize && PopupOptions.UseMinimumWidth);
+ EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH_SPIN), PopupOptions.DynamicResize && PopupOptions.UseMinimumWidth);
+ EnableWindow(GetDlgItem(hwnd, IDC_MAXIMUMWIDTH), PopupOptions.UseMaximumWidth);
+ EnableWindow(GetDlgItem(hwnd, IDC_MAXIMUMWIDTH_SPIN), PopupOptions.UseMaximumWidth);
//Position combobox.
{
@@ -178,7 +178,7 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("lower left corner")) ,POS_LOWERLEFT);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("lower right corner")) ,POS_LOWERRIGHT);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("upper right corner")) ,POS_UPPERRIGHT);
- SendDlgItemMessage(hwnd, IDC_WHERE, CB_SETCURSEL, (PopUpOptions.Position) , 0);
+ SendDlgItemMessage(hwnd, IDC_WHERE, CB_SETCURSEL, (PopupOptions.Position) , 0);
}
//Configure popup area
{
@@ -192,16 +192,16 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM HWND hCtrl = GetDlgItem(hwnd, IDC_LAYOUT);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("horizontal")) ,SPREADING_HORIZONTAL);
ComboBox_SetItemData(hCtrl, ComboBox_AddString(hCtrl, TranslateT("vertical")) ,SPREADING_VERTICAL);
- SendDlgItemMessage(hwnd, IDC_LAYOUT, CB_SETCURSEL, (PopUpOptions.Spreading), 0);
+ SendDlgItemMessage(hwnd, IDC_LAYOUT, CB_SETCURSEL, (PopupOptions.Spreading), 0);
}
//miscellaneous
- CheckDlgButton(hwnd, IDC_REORDERPOPUPS, PopUpOptions.ReorderPopUps);
+ CheckDlgButton(hwnd, IDC_REORDERPOPUPS, PopupOptions.ReorderPopups);
//Popup enabled
- CheckDlgButton(hwnd, IDC_POPUPENABLED, PopUpOptions.ModuleIsEnabled?BST_UNCHECKED:BST_CHECKED);
- CheckDlgButton(hwnd, IDC_DISABLEINFS, PopUpOptions.DisableWhenFullscreen);
- EnableWindow(GetDlgItem(hwnd, IDC_DISABLEINFS), PopUpOptions.ModuleIsEnabled);
- EnableWindow(GetDlgItem(hwnd, IDC_STATUSES), PopUpOptions.ModuleIsEnabled);
+ CheckDlgButton(hwnd, IDC_POPUPENABLED, PopupOptions.ModuleIsEnabled?BST_UNCHECKED:BST_CHECKED);
+ CheckDlgButton(hwnd, IDC_DISABLEINFS, PopupOptions.DisableWhenFullscreen);
+ EnableWindow(GetDlgItem(hwnd, IDC_DISABLEINFS), PopupOptions.ModuleIsEnabled);
+ EnableWindow(GetDlgItem(hwnd, IDC_STATUSES), PopupOptions.ModuleIsEnabled);
//new status options
{
@@ -256,27 +256,27 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case BN_CLICKED: //Button controls
switch( LOWORD(wParam)) {
case IDC_INFINITEDELAY:
- PopUpOptions.InfiniteDelay = !PopUpOptions.InfiniteDelay;
- EnableWindow(GetDlgItem(hwnd, IDC_SECONDS),!PopUpOptions.InfiniteDelay);
- EnableWindow(GetDlgItem(hwnd, IDC_SECONDS_STATIC1), !PopUpOptions.InfiniteDelay);
- EnableWindow(GetDlgItem(hwnd, IDC_SECONDS_STATIC2), !PopUpOptions.InfiniteDelay);
- EnableWindow(GetDlgItem(hwnd, IDC_LEAVEHOVERED), !PopUpOptions.InfiniteDelay);
+ PopupOptions.InfiniteDelay = !PopupOptions.InfiniteDelay;
+ EnableWindow(GetDlgItem(hwnd, IDC_SECONDS),!PopupOptions.InfiniteDelay);
+ EnableWindow(GetDlgItem(hwnd, IDC_SECONDS_STATIC1), !PopupOptions.InfiniteDelay);
+ EnableWindow(GetDlgItem(hwnd, IDC_SECONDS_STATIC2), !PopupOptions.InfiniteDelay);
+ EnableWindow(GetDlgItem(hwnd, IDC_LEAVEHOVERED), !PopupOptions.InfiniteDelay);
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
break;
case IDC_LEAVEHOVERED:
- PopUpOptions.LeaveHovered = !PopUpOptions.LeaveHovered;
+ PopupOptions.LeaveHovered = !PopupOptions.LeaveHovered;
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
break;
case IDC_DYNAMICRESIZE:
- PopUpOptions.DynamicResize=!PopUpOptions.DynamicResize;
- EnableWindow(GetDlgItem(hwnd, IDC_USEMINIMUMWIDTH), PopUpOptions.DynamicResize);
- EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH), PopUpOptions.DynamicResize && PopUpOptions.UseMinimumWidth);
- EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH_SPIN), PopUpOptions.DynamicResize && PopUpOptions.UseMinimumWidth);
- SetDlgItemText(hwnd, IDC_USEMAXIMUMWIDTH, PopUpOptions.DynamicResize ? TranslateT("Maximum width"): TranslateT("Width"));
- if (!PopUpOptions.DynamicResize) {
- PopUpOptions.UseMaximumWidth = TRUE;
+ PopupOptions.DynamicResize=!PopupOptions.DynamicResize;
+ EnableWindow(GetDlgItem(hwnd, IDC_USEMINIMUMWIDTH), PopupOptions.DynamicResize);
+ EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH), PopupOptions.DynamicResize && PopupOptions.UseMinimumWidth);
+ EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH_SPIN), PopupOptions.DynamicResize && PopupOptions.UseMinimumWidth);
+ SetDlgItemText(hwnd, IDC_USEMAXIMUMWIDTH, PopupOptions.DynamicResize ? TranslateT("Maximum width"): TranslateT("Width"));
+ if (!PopupOptions.DynamicResize) {
+ PopupOptions.UseMaximumWidth = TRUE;
CheckDlgButton(hwnd, IDC_USEMAXIMUMWIDTH, BST_CHECKED);
EnableWindow(GetDlgItem(hwnd, IDC_USEMAXIMUMWIDTH), TRUE);
EnableWindow(GetDlgItem(hwnd, IDC_MAXIMUMWIDTH), TRUE);
@@ -286,20 +286,20 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM break;
case IDC_USEMINIMUMWIDTH:
- PopUpOptions.UseMinimumWidth= !PopUpOptions.UseMinimumWidth;
- EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH), PopUpOptions.UseMinimumWidth);
- EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH_SPIN), PopUpOptions.UseMinimumWidth);
+ PopupOptions.UseMinimumWidth= !PopupOptions.UseMinimumWidth;
+ EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH), PopupOptions.UseMinimumWidth);
+ EnableWindow(GetDlgItem(hwnd, IDC_MINIMUMWIDTH_SPIN), PopupOptions.UseMinimumWidth);
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
break;
case IDC_USEMAXIMUMWIDTH:
- PopUpOptions.UseMaximumWidth= Button_GetCheck((HWND)lParam);
- if (!PopUpOptions.DynamicResize) { //ugly - set always on if DynamicResize = off
+ PopupOptions.UseMaximumWidth= Button_GetCheck((HWND)lParam);
+ if (!PopupOptions.DynamicResize) { //ugly - set always on if DynamicResize = off
CheckDlgButton(hwnd, LOWORD(wParam), BST_CHECKED);
- PopUpOptions.UseMaximumWidth = TRUE;
+ PopupOptions.UseMaximumWidth = TRUE;
}
- EnableWindow(GetDlgItem(hwnd, IDC_MAXIMUMWIDTH), PopUpOptions.UseMaximumWidth);
- EnableWindow(GetDlgItem(hwnd, IDC_MAXIMUMWIDTH_SPIN), PopUpOptions.UseMaximumWidth);
+ EnableWindow(GetDlgItem(hwnd, IDC_MAXIMUMWIDTH), PopupOptions.UseMaximumWidth);
+ EnableWindow(GetDlgItem(hwnd, IDC_MAXIMUMWIDTH_SPIN), PopupOptions.UseMaximumWidth);
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
break;
@@ -333,9 +333,9 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case IDC_REORDERPOPUPS:
{
- PopUpOptions.ReorderPopUps = !PopUpOptions.ReorderPopUps;
- PopUpOptions.ReorderPopUpsWarning = PopUpOptions.ReorderPopUps ?
- db_get_b(NULL, MODULNAME, "ReorderPopUpsWarning", TRUE) : TRUE;
+ PopupOptions.ReorderPopups = !PopupOptions.ReorderPopups;
+ PopupOptions.ReorderPopupsWarning = PopupOptions.ReorderPopups ?
+ db_get_b(NULL, MODULNAME, "ReorderPopupsWarning", TRUE) : TRUE;
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
}
break;
@@ -343,20 +343,20 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case IDC_POPUPENABLED:
{
int chk = IsDlgButtonChecked(hwnd, IDC_POPUPENABLED);
- if (PopUpOptions.ModuleIsEnabled&&chk || !PopUpOptions.ModuleIsEnabled&&!chk)
+ if (PopupOptions.ModuleIsEnabled&&chk || !PopupOptions.ModuleIsEnabled&&!chk)
svcEnableDisableMenuCommand(0,0);
- EnableWindow(GetDlgItem(hwnd, IDC_STATUSES), PopUpOptions.ModuleIsEnabled);
- EnableWindow(GetDlgItem(hwnd, IDC_DISABLEINFS), PopUpOptions.ModuleIsEnabled);
+ EnableWindow(GetDlgItem(hwnd, IDC_STATUSES), PopupOptions.ModuleIsEnabled);
+ EnableWindow(GetDlgItem(hwnd, IDC_DISABLEINFS), PopupOptions.ModuleIsEnabled);
}
break;
case IDC_DISABLEINFS:
- PopUpOptions.DisableWhenFullscreen = !PopUpOptions.DisableWhenFullscreen;
+ PopupOptions.DisableWhenFullscreen = !PopupOptions.DisableWhenFullscreen;
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
break;
case IDC_PREVIEW:
- PopUpPreview();
+ PopupPreview();
break;
}
break;
@@ -365,11 +365,11 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM switch( LOWORD(wParam)) {
//lParam = Handle to the control
case IDC_WHERE:
- PopUpOptions.Position = ComboBox_GetItemData((HWND)lParam, ComboBox_GetCurSel((HWND)lParam));
+ PopupOptions.Position = ComboBox_GetItemData((HWND)lParam, ComboBox_GetCurSel((HWND)lParam));
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
break;
case IDC_LAYOUT:
- PopUpOptions.Spreading = ComboBox_GetItemData((HWND)lParam, ComboBox_GetCurSel((HWND)lParam));
+ PopupOptions.Spreading = ComboBox_GetItemData((HWND)lParam, ComboBox_GetCurSel((HWND)lParam));
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
break;
}
@@ -384,8 +384,8 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM int seconds = GetDlgItemInt(hwnd, LOWORD(wParam), NULL, FALSE);
if ( seconds >= SETTING_LIFETIME_MIN &&
seconds <= SETTING_LIFETIME_MAX &&
- seconds != PopUpOptions.Seconds) {
- PopUpOptions.Seconds = seconds;
+ seconds != PopupOptions.Seconds) {
+ PopupOptions.Seconds = seconds;
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
}
}
@@ -395,8 +395,8 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM int temp = GetDlgItemInt(hwnd, IDC_MINIMUMWIDTH, NULL, FALSE);
if ( temp >= SETTING_MINIMUMWIDTH_MIN &&
temp <= SETTING_MAXIMUMWIDTH_MAX &&
- temp != PopUpOptions.MinimumWidth) {
- PopUpOptions.MinimumWidth = temp;
+ temp != PopupOptions.MinimumWidth) {
+ PopupOptions.MinimumWidth = temp;
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
}
}
@@ -406,8 +406,8 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM int temp = GetDlgItemInt(hwnd, IDC_MAXIMUMWIDTH, NULL, FALSE);
if ( temp >= SETTING_MINIMUMWIDTH_MIN &&
temp <= SETTING_MAXIMUMWIDTH_MAX &&
- temp != PopUpOptions.MaximumWidth) {
- PopUpOptions.MaximumWidth = temp;
+ temp != PopupOptions.MaximumWidth) {
+ PopupOptions.MaximumWidth = temp;
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
}
}
@@ -422,11 +422,11 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
int seconds = GetDlgItemInt(hwnd, LOWORD(wParam), NULL, FALSE);
if (seconds > SETTING_LIFETIME_MAX)
- PopUpOptions.Seconds = SETTING_LIFETIME_MAX;
+ PopupOptions.Seconds = SETTING_LIFETIME_MAX;
else if (seconds < SETTING_LIFETIME_MIN)
- PopUpOptions.Seconds = SETTING_LIFETIME_MIN;
- if (seconds != PopUpOptions.Seconds) {
- SetDlgItemInt(hwnd, LOWORD(wParam), PopUpOptions.Seconds, FALSE);
+ PopupOptions.Seconds = SETTING_LIFETIME_MIN;
+ if (seconds != PopupOptions.Seconds) {
+ SetDlgItemInt(hwnd, LOWORD(wParam), PopupOptions.Seconds, FALSE);
ErrorMSG(SETTING_LIFETIME_MIN, SETTING_LIFETIME_MAX);
SetFocus((HWND)lParam);
}
@@ -436,18 +436,18 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
int temp = GetDlgItemInt(hwnd, LOWORD(wParam), NULL, FALSE);
if (temp < SETTING_MINIMUMWIDTH_MIN)
- PopUpOptions.MinimumWidth = SETTING_MINIMUMWIDTH_MIN;
+ PopupOptions.MinimumWidth = SETTING_MINIMUMWIDTH_MIN;
else if (temp > SETTING_MAXIMUMWIDTH_MAX)
- PopUpOptions.MinimumWidth = SETTING_MAXIMUMWIDTH_MAX;
- if (temp != PopUpOptions.MinimumWidth) {
- SetDlgItemInt(hwnd, LOWORD(wParam), PopUpOptions.MinimumWidth, FALSE);
+ PopupOptions.MinimumWidth = SETTING_MAXIMUMWIDTH_MAX;
+ if (temp != PopupOptions.MinimumWidth) {
+ SetDlgItemInt(hwnd, LOWORD(wParam), PopupOptions.MinimumWidth, FALSE);
ErrorMSG(SETTING_MINIMUMWIDTH_MIN, SETTING_MAXIMUMWIDTH_MAX);
SetFocus((HWND)lParam);
break;
}
- if (temp > PopUpOptions.MaximumWidth) {
- PopUpOptions.MaximumWidth = min(temp, SETTING_MAXIMUMWIDTH_MAX);
- SetDlgItemInt(hwnd, IDC_MAXIMUMWIDTH, PopUpOptions.MaximumWidth, FALSE);
+ if (temp > PopupOptions.MaximumWidth) {
+ PopupOptions.MaximumWidth = min(temp, SETTING_MAXIMUMWIDTH_MAX);
+ SetDlgItemInt(hwnd, IDC_MAXIMUMWIDTH, PopupOptions.MaximumWidth, FALSE);
}
}
break;
@@ -455,18 +455,18 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
int temp = GetDlgItemInt(hwnd, LOWORD(wParam), NULL, FALSE);
if (temp >= SETTING_MAXIMUMWIDTH_MAX)
- PopUpOptions.MaximumWidth = SETTING_MAXIMUMWIDTH_MAX;
+ PopupOptions.MaximumWidth = SETTING_MAXIMUMWIDTH_MAX;
else if (temp < SETTING_MINIMUMWIDTH_MIN)
- PopUpOptions.MaximumWidth = SETTING_MINIMUMWIDTH_MIN;
- if (temp != PopUpOptions.MaximumWidth) {
- SetDlgItemInt(hwnd, LOWORD(wParam), PopUpOptions.MaximumWidth, FALSE);
+ PopupOptions.MaximumWidth = SETTING_MINIMUMWIDTH_MIN;
+ if (temp != PopupOptions.MaximumWidth) {
+ SetDlgItemInt(hwnd, LOWORD(wParam), PopupOptions.MaximumWidth, FALSE);
ErrorMSG(SETTING_MINIMUMWIDTH_MIN, SETTING_MAXIMUMWIDTH_MAX);
SetFocus((HWND)lParam);
break;
}
- if (temp < PopUpOptions.MinimumWidth) {
- PopUpOptions.MinimumWidth = max(temp, SETTING_MINIMUMWIDTH_MIN);
- SetDlgItemInt(hwnd, IDC_MINIMUMWIDTH, PopUpOptions.MinimumWidth, FALSE);
+ if (temp < PopupOptions.MinimumWidth) {
+ PopupOptions.MinimumWidth = max(temp, SETTING_MINIMUMWIDTH_MIN);
+ SetDlgItemInt(hwnd, IDC_MINIMUMWIDTH, PopupOptions.MinimumWidth, FALSE);
}
}
break;
@@ -485,35 +485,35 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case PSN_APPLY:
//Seconds
- db_set_b(NULL, MODULNAME, "InfiniteDelay", PopUpOptions.InfiniteDelay);
- db_set_w(NULL, MODULNAME, "Seconds", (WORD)PopUpOptions.Seconds);
- db_set_b(NULL, MODULNAME, "LeaveHovered", PopUpOptions.LeaveHovered);
+ db_set_b(NULL, MODULNAME, "InfiniteDelay", PopupOptions.InfiniteDelay);
+ db_set_w(NULL, MODULNAME, "Seconds", (WORD)PopupOptions.Seconds);
+ db_set_b(NULL, MODULNAME, "LeaveHovered", PopupOptions.LeaveHovered);
//Dynamic Resize
- db_set_b(NULL, MODULNAME, "DynamicResize", PopUpOptions.DynamicResize);
- db_set_b(NULL, MODULNAME, "UseMinimumWidth", PopUpOptions.UseMinimumWidth);
- db_set_w(NULL, MODULNAME, "MinimumWidth", PopUpOptions.MinimumWidth);
- db_set_b(NULL, MODULNAME, "UseMaximumWidth", PopUpOptions.UseMaximumWidth);
- db_set_w(NULL, MODULNAME, "MaximumWidth", PopUpOptions.MaximumWidth);
+ db_set_b(NULL, MODULNAME, "DynamicResize", PopupOptions.DynamicResize);
+ db_set_b(NULL, MODULNAME, "UseMinimumWidth", PopupOptions.UseMinimumWidth);
+ db_set_w(NULL, MODULNAME, "MinimumWidth", PopupOptions.MinimumWidth);
+ db_set_b(NULL, MODULNAME, "UseMaximumWidth", PopupOptions.UseMaximumWidth);
+ db_set_w(NULL, MODULNAME, "MaximumWidth", PopupOptions.MaximumWidth);
//Position
- db_set_b(NULL, MODULNAME, "Position", (BYTE)PopUpOptions.Position);
+ db_set_b(NULL, MODULNAME, "Position", (BYTE)PopupOptions.Position);
//Configure popup area
- db_set_w(NULL, MODULNAME, "gapTop", (WORD)PopUpOptions.gapTop);
- db_set_w(NULL, MODULNAME, "gapBottom", (WORD)PopUpOptions.gapBottom);
- db_set_w(NULL, MODULNAME, "gapLeft", (WORD)PopUpOptions.gapLeft);
- db_set_w(NULL, MODULNAME, "gapRight", (WORD)PopUpOptions.gapRight);
- db_set_w(NULL, MODULNAME, "spacing", (WORD)PopUpOptions.spacing);
+ db_set_w(NULL, MODULNAME, "gapTop", (WORD)PopupOptions.gapTop);
+ db_set_w(NULL, MODULNAME, "gapBottom", (WORD)PopupOptions.gapBottom);
+ db_set_w(NULL, MODULNAME, "gapLeft", (WORD)PopupOptions.gapLeft);
+ db_set_w(NULL, MODULNAME, "gapRight", (WORD)PopupOptions.gapRight);
+ db_set_w(NULL, MODULNAME, "spacing", (WORD)PopupOptions.spacing);
//Spreading
- db_set_b(NULL, MODULNAME, "Spreading", (BYTE)PopUpOptions.Spreading);
+ db_set_b(NULL, MODULNAME, "Spreading", (BYTE)PopupOptions.Spreading);
//miscellaneous
- Check_ReorderPopUps(hwnd); //this save also PopUpOptions.ReorderPopUps
+ Check_ReorderPopups(hwnd); //this save also PopupOptions.ReorderPopups
//disable When
- db_set_b(NULL, MODULNAME, "DisableWhenFullscreen", PopUpOptions.DisableWhenFullscreen);
+ db_set_b(NULL, MODULNAME, "DisableWhenFullscreen", PopupOptions.DisableWhenFullscreen);
//new status options
{
@@ -539,9 +539,9 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
LPNMUPDOWN lpnmud = (LPNMUPDOWN) lParam;
int temp = lpnmud->iPos + lpnmud->iDelta;
- if (temp > PopUpOptions.MaximumWidth) {
- PopUpOptions.MaximumWidth = min(temp, SETTING_MAXIMUMWIDTH_MAX);
- SetDlgItemInt(hwnd, IDC_MAXIMUMWIDTH, PopUpOptions.MaximumWidth, FALSE);
+ if (temp > PopupOptions.MaximumWidth) {
+ PopupOptions.MaximumWidth = min(temp, SETTING_MAXIMUMWIDTH_MAX);
+ SetDlgItemInt(hwnd, IDC_MAXIMUMWIDTH, PopupOptions.MaximumWidth, FALSE);
}
}
break;
@@ -550,9 +550,9 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
LPNMUPDOWN lpnmud = (LPNMUPDOWN) lParam;
int temp = lpnmud->iPos + lpnmud->iDelta;
- if (temp < PopUpOptions.MinimumWidth) {
- PopUpOptions.MinimumWidth = max(temp, SETTING_MINIMUMWIDTH_MIN);
- SetDlgItemInt(hwnd, IDC_MINIMUMWIDTH, PopUpOptions.MinimumWidth, FALSE);
+ if (temp < PopupOptions.MinimumWidth) {
+ PopupOptions.MinimumWidth = max(temp, SETTING_MINIMUMWIDTH_MIN);
+ SetDlgItemInt(hwnd, IDC_MINIMUMWIDTH, PopupOptions.MinimumWidth, FALSE);
}
}
}
@@ -581,29 +581,29 @@ void ErrorMSG(int minValue, int maxValue) MSGERROR(str);
}
-void Check_ReorderPopUps(HWND hwnd) {
- if (!PopUpOptions.ReorderPopUps && PopUpOptions.ReorderPopUpsWarning) {
+void Check_ReorderPopups(HWND hwnd) {
+ if (!PopupOptions.ReorderPopups && PopupOptions.ReorderPopupsWarning) {
int res = MessageBox(hwnd,
TranslateT("'Reorder Popups' option is currently diabled.\r\nThis may cause misaligned popups when used with\r\navatars and text replacement (mainly NewStatusNotify).\r\n\r\nDo you want to enable popup reordering now?\r\n"),
TranslateT("Popup Plus Warning"), MB_ICONEXCLAMATION | MB_YESNOCANCEL);
switch (res) {
case IDYES:
- PopUpOptions.ReorderPopUps = TRUE;
+ PopupOptions.ReorderPopups = TRUE;
//Reset warning for next option change !!!
- PopUpOptions.ReorderPopUpsWarning = TRUE;
+ PopupOptions.ReorderPopupsWarning = TRUE;
break;
case IDNO:
- PopUpOptions.ReorderPopUps = FALSE;
- PopUpOptions.ReorderPopUpsWarning = FALSE;
+ PopupOptions.ReorderPopups = FALSE;
+ PopupOptions.ReorderPopupsWarning = FALSE;
break;
default:
return;
}
}
- db_set_b(NULL, MODULNAME, "ReorderPopUps", PopUpOptions.ReorderPopUps);
- db_set_b(NULL, MODULNAME, "ReorderPopUpsWarning", PopUpOptions.ReorderPopUpsWarning);
- if (hwnd) CheckDlgButton(hwnd, IDC_REORDERPOPUPS, PopUpOptions.ReorderPopUps);
+ db_set_b(NULL, MODULNAME, "ReorderPopups", PopupOptions.ReorderPopups);
+ db_set_b(NULL, MODULNAME, "ReorderPopupsWarning", PopupOptions.ReorderPopupsWarning);
+ if (hwnd) CheckDlgButton(hwnd, IDC_REORDERPOPUPS, PopupOptions.ReorderPopups);
}
void ThemeDialogBackground(HWND hwnd)
@@ -642,22 +642,22 @@ INT_PTR CALLBACK PositionBoxDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SendMessage(GetDlgItem(hwndDlg, IDCANCEL), BUTTONADDTOOLTIP, (WPARAM)_T("Cancel"), BATF_TCHAR);
SendMessage(GetDlgItem(hwndDlg, IDCANCEL), BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_OPT_CANCEL,0));
- SetDlgItemInt(hwndDlg, IDC_TXT_TOP, PopUpOptions.gapTop, FALSE);
- SetDlgItemInt(hwndDlg, IDC_TXT_BOTTOM, PopUpOptions.gapBottom, FALSE);
- SetDlgItemInt(hwndDlg, IDC_TXT_LEFT, PopUpOptions.gapLeft, FALSE);
- SetDlgItemInt(hwndDlg, IDC_TXT_RIGHT, PopUpOptions.gapRight, FALSE);
- SetDlgItemInt(hwndDlg, IDC_TXT_SPACING, PopUpOptions.spacing, FALSE);
+ SetDlgItemInt(hwndDlg, IDC_TXT_TOP, PopupOptions.gapTop, FALSE);
+ SetDlgItemInt(hwndDlg, IDC_TXT_BOTTOM, PopupOptions.gapBottom, FALSE);
+ SetDlgItemInt(hwndDlg, IDC_TXT_LEFT, PopupOptions.gapLeft, FALSE);
+ SetDlgItemInt(hwndDlg, IDC_TXT_RIGHT, PopupOptions.gapRight, FALSE);
+ SetDlgItemInt(hwndDlg, IDC_TXT_SPACING, PopupOptions.spacing, FALSE);
TranslateDialogDefault(hwndDlg);
break;
case WM_COMMAND:
if ((LOWORD(wParam)) == IDOK) {
- PopUpOptions.gapTop = GetDlgItemInt(hwndDlg, IDC_TXT_TOP, NULL, FALSE);
- PopUpOptions.gapBottom = GetDlgItemInt(hwndDlg, IDC_TXT_BOTTOM, NULL, FALSE);
- PopUpOptions.gapLeft = GetDlgItemInt(hwndDlg, IDC_TXT_LEFT, NULL, FALSE);
- PopUpOptions.gapRight = GetDlgItemInt(hwndDlg, IDC_TXT_RIGHT, NULL, FALSE);
- PopUpOptions.spacing = GetDlgItemInt(hwndDlg, IDC_TXT_SPACING, NULL, FALSE);
+ PopupOptions.gapTop = GetDlgItemInt(hwndDlg, IDC_TXT_TOP, NULL, FALSE);
+ PopupOptions.gapBottom = GetDlgItemInt(hwndDlg, IDC_TXT_BOTTOM, NULL, FALSE);
+ PopupOptions.gapLeft = GetDlgItemInt(hwndDlg, IDC_TXT_LEFT, NULL, FALSE);
+ PopupOptions.gapRight = GetDlgItemInt(hwndDlg, IDC_TXT_RIGHT, NULL, FALSE);
+ PopupOptions.spacing = GetDlgItemInt(hwndDlg, IDC_TXT_SPACING, NULL, FALSE);
PostMessage(hwndDlg, WM_CLOSE, 0, 0);
}
else if ((LOWORD(wParam)) == IDCANCEL)
diff --git a/plugins/Popup/src/opt_gen.h b/plugins/Popup/src/opt_gen.h index 48dfda6f13..6a5c037b38 100644 --- a/plugins/Popup/src/opt_gen.h +++ b/plugins/Popup/src/opt_gen.h @@ -25,8 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define __opt_gen_h__
void LoadOption_General();
-void Check_ReorderPopUps(HWND hwnd = 0);
-INT_PTR CALLBACK DlgProcPopUpGeneral(HWND, UINT, WPARAM, LPARAM);
+void Check_ReorderPopups(HWND hwnd = 0);
+INT_PTR CALLBACK DlgProcPopupGeneral(HWND, UINT, WPARAM, LPARAM);
void ErrorMSG(int minValue, int maxValue);
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index 8075bee830..f79259cc24 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -79,7 +79,7 @@ static void updatePreviewImage(HWND hwndBox) ppd.lptzTitle = TranslateT("Skin preview");
ppd.lptzText = TranslateT("Just take a look at this skin... ;)");
- POPUPOPTIONS customOptions = PopUpOptions;
+ POPUPOPTIONS customOptions = PopupOptions;
customOptions.DynamicResize = FALSE;
customOptions.MinimumWidth = customOptions.MaximumWidth = 250;
@@ -177,7 +177,7 @@ LRESULT CALLBACK WndProcPreviewBox(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP int SkinOptionList_AddSkin(OPTTREE_OPTION* &options, int *OptionsCount, int pos, DWORD *dwGlobalOptions) {
const PopupSkin *skin = 0;
LPTSTR pszName = NULL;
- if (skin = skins.getSkin(PopUpOptions.SkinPack)) {
+ if (skin = skins.getSkin(PopupOptions.SkinPack)) {
for (int i = 1; i <= 10; i++) {
if (!skin->getFlagName(i))
continue;
@@ -214,32 +214,32 @@ int SkinOptionList_AddMain(OPTTREE_OPTION* &options, int *OptionsCount, int pos bCheck = 0;
switch (i) {
case 0:
- *dwGlobalOptions |= PopUpOptions.DisplayTime ? (1 << i) : 0;
- bCheck = PopUpOptions.DisplayTime;
+ *dwGlobalOptions |= PopupOptions.DisplayTime ? (1 << i) : 0;
+ bCheck = PopupOptions.DisplayTime;
break;
case 1:
if (!IsWinVerXPPlus()) continue;
- *dwGlobalOptions |= PopUpOptions.DropShadow ? (1 << i) : 0;
- bCheck = PopUpOptions.DropShadow;
+ *dwGlobalOptions |= PopupOptions.DropShadow ? (1 << i) : 0;
+ bCheck = PopupOptions.DropShadow;
break;
case 2:
if (!IsWinVerXPPlus()) continue;
- *dwGlobalOptions |= PopUpOptions.EnableFreeformShadows ? (1 << i) : 0;
- bCheck = PopUpOptions.EnableFreeformShadows;
+ *dwGlobalOptions |= PopupOptions.EnableFreeformShadows ? (1 << i) : 0;
+ bCheck = PopupOptions.EnableFreeformShadows;
break;
case 3:
if (!MyDwmEnableBlurBehindWindow) continue;
- *dwGlobalOptions |= PopUpOptions.EnableAeroGlass ? (1 << i) : 0;
- bCheck = PopUpOptions.EnableAeroGlass;
+ *dwGlobalOptions |= PopupOptions.EnableAeroGlass ? (1 << i) : 0;
+ bCheck = PopupOptions.EnableAeroGlass;
break;
case 4:
- *dwGlobalOptions |= PopUpOptions.UseWinColors ? (1 << i) : 0;
- bCheck = PopUpOptions.UseWinColors;
+ *dwGlobalOptions |= PopupOptions.UseWinColors ? (1 << i) : 0;
+ bCheck = PopupOptions.UseWinColors;
break;
case 5:
if (!(htuText&&htuTitle)) continue;
- *dwGlobalOptions |= PopUpOptions.UseMText ? (1 << i) : 0;
- bCheck = PopUpOptions.UseMText;
+ *dwGlobalOptions |= PopupOptions.UseMText ? (1 << i) : 0;
+ bCheck = PopupOptions.UseMText;
break;
}
*OptionsCount += 1;
@@ -283,7 +283,7 @@ bool SkinOptionList_Update (OPTTREE_OPTION* &options, int *OptionsCount, HWND hw //check "Skin options" state
char prefix[128];
- mir_snprintf(prefix, sizeof(prefix),"skin.%S", PopUpOptions.SkinPack);
+ mir_snprintf(prefix, sizeof(prefix),"skin.%S", PopupOptions.SkinPack);
OptTree_SetOptions(hwndDlg, IDC_SKIN_LIST_OPT, options, *OptionsCount,
db_get_dw(NULL, MODULNAME, prefix, dwSkinOptions), _T("Skin options"));
@@ -296,14 +296,14 @@ bool SkinOptionList_Update (OPTTREE_OPTION* &options, int *OptionsCount, HWND hw void LoadOption_Skins() {
//skin pack
- PopUpOptions.SkinPack = (LPTSTR)DBGetContactSettingStringX(NULL,MODULNAME, "SkinPack", "* Popup Classic",DBVT_TCHAR);
+ PopupOptions.SkinPack = (LPTSTR)DBGetContactSettingStringX(NULL,MODULNAME, "SkinPack", "* Popup Classic",DBVT_TCHAR);
//more Skin options
- PopUpOptions.DisplayTime = db_get_b(NULL,MODULNAME, "DisplayTime", TRUE);
- PopUpOptions.DropShadow = db_get_b(NULL,MODULNAME, "DropShadow", TRUE);
- PopUpOptions.EnableFreeformShadows = db_get_b(NULL,MODULNAME, "EnableShadowRegion", 1);
- PopUpOptions.EnableAeroGlass = db_get_b(NULL,MODULNAME, "EnableAeroGlass", 1);
- PopUpOptions.UseWinColors = db_get_b(NULL,MODULNAME, "UseWinColors", FALSE);
- PopUpOptions.UseMText = db_get_b(NULL,MODULNAME, "UseMText", TRUE);
+ PopupOptions.DisplayTime = db_get_b(NULL,MODULNAME, "DisplayTime", TRUE);
+ PopupOptions.DropShadow = db_get_b(NULL,MODULNAME, "DropShadow", TRUE);
+ PopupOptions.EnableFreeformShadows = db_get_b(NULL,MODULNAME, "EnableShadowRegion", 1);
+ PopupOptions.EnableAeroGlass = db_get_b(NULL,MODULNAME, "EnableAeroGlass", 1);
+ PopupOptions.UseWinColors = db_get_b(NULL,MODULNAME, "UseWinColors", FALSE);
+ PopupOptions.UseMText = db_get_b(NULL,MODULNAME, "UseMText", TRUE);
}
INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -319,29 +319,29 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (index != -1) {
if (lstrcmp(skinOptions[index].pszSettingName, _T("Skin options")) == 0) {
const PopupSkin *skin = 0;
- if (skin = skins.getSkin(PopUpOptions.SkinPack)) {
+ if (skin = skins.getSkin(PopupOptions.SkinPack)) {
skin->setFlag(skinOptions[index].Data, skinOptions[index].bState ? true : false);
}
}
else if (lstrcmp(skinOptions[index].pszSettingName, _T("Global settings")) == 0) {
switch (skinOptions[index].dwFlag) {
case (1 << 0):
- PopUpOptions.DisplayTime = skinOptions[index].bState;
+ PopupOptions.DisplayTime = skinOptions[index].bState;
break;
case (1 << 1):
- PopUpOptions.DropShadow = skinOptions[index].bState;
+ PopupOptions.DropShadow = skinOptions[index].bState;
break;
case (1 << 2):
- PopUpOptions.EnableFreeformShadows = skinOptions[index].bState;
+ PopupOptions.EnableFreeformShadows = skinOptions[index].bState;
break;
case (1 << 3):
- PopUpOptions.EnableAeroGlass = skinOptions[index].bState;
+ PopupOptions.EnableAeroGlass = skinOptions[index].bState;
break;
case (1 << 4):
- PopUpOptions.UseWinColors = skinOptions[index].bState;
+ PopupOptions.UseWinColors = skinOptions[index].bState;
break;
case (1 << 5):
- PopUpOptions.UseMText = skinOptions[index].bState;
+ PopupOptions.UseMText = skinOptions[index].bState;
break;
}
}
@@ -365,7 +365,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR dwIndex = ListBox_AddString(hCtrl, sl->name);
ListBox_SetItemData(hCtrl, dwIndex, sl->name);
}
- ListBox_SetCurSel(hCtrl, ListBox_FindString(hCtrl, 0, PopUpOptions.SkinPack));
+ ListBox_SetCurSel(hCtrl, ListBox_FindString(hCtrl, 0, PopupOptions.SkinPack));
//Skin List reload button
SendMessage(GetDlgItem(hwndDlg, IDC_BTN_RELOAD), BUTTONSETASFLATBTN, TRUE, 0);
@@ -403,7 +403,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR case BN_CLICKED: //Button controls
switch(idCtrl) {
case IDC_PREVIEW:
- PopUpPreview();
+ PopupPreview();
break;
case IDC_BTN_RELOAD:
@@ -411,7 +411,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR LPTSTR Temp = NULL;
DWORD dwIndex = 0;
TCHAR szNewSkin[128];
- LPTSTR pszOldSkin = mir_tstrdup(PopUpOptions.SkinPack);
+ LPTSTR pszOldSkin = mir_tstrdup(PopupOptions.SkinPack);
skins.load(_T(""));
hCtrl = GetDlgItem(hwndDlg, IDC_SKINLIST);
ListBox_ResetContent(hCtrl);
@@ -420,17 +420,17 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR dwIndex = ListBox_AddString(hCtrl, sl->name);
ListBox_SetItemData(hCtrl, dwIndex, sl->name);
}
- ListBox_SetCurSel(hCtrl, ListBox_FindString(hCtrl, 0, PopUpOptions.SkinPack));
+ ListBox_SetCurSel(hCtrl, ListBox_FindString(hCtrl, 0, PopupOptions.SkinPack));
//make shure we have select skin (ListBox_SetCurSel may be fail)
ListBox_GetText(hCtrl, ListBox_GetCurSel(hCtrl), &szNewSkin);
if (lstrcmp(pszOldSkin, szNewSkin) != 0) {
- mir_free(PopUpOptions.SkinPack);
- PopUpOptions.SkinPack = mir_tstrdup(szNewSkin);
+ mir_free(PopupOptions.SkinPack);
+ PopupOptions.SkinPack = mir_tstrdup(szNewSkin);
}
mir_free(pszOldSkin);
const PopupSkin *skin = 0;
- if (skin = skins.getSkin(PopUpOptions.SkinPack)) {
+ if (skin = skins.getSkin(PopupOptions.SkinPack)) {
//update Skin Option List from reload SkinPack
bDlgInit = false;
bDlgInit = SkinOptionList_Update (skinOptions, &skinOptionsCount, hwndDlg);
@@ -450,17 +450,17 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR case IDC_SKINLIST:
{
//Skin list change
- mir_free(PopUpOptions.SkinPack);
- PopUpOptions.SkinPack = mir_tstrdup((TCHAR *)SendDlgItemMessage(
+ mir_free(PopupOptions.SkinPack);
+ PopupOptions.SkinPack = mir_tstrdup((TCHAR *)SendDlgItemMessage(
hwndDlg,
IDC_SKINLIST,
LB_GETITEMDATA,
(WPARAM)SendDlgItemMessage(hwndDlg, IDC_SKINLIST, LB_GETCURSEL,0,0),
0));
const PopupSkin *skin = 0;
- if (skin = skins.getSkin(PopUpOptions.SkinPack)) {
- mir_free(PopUpOptions.SkinPack);
- PopUpOptions.SkinPack = mir_tstrdup(skin->getName());
+ if (skin = skins.getSkin(PopupOptions.SkinPack)) {
+ mir_free(PopupOptions.SkinPack);
+ PopupOptions.SkinPack = mir_tstrdup(skin->getName());
//update Skin Option List
bDlgInit = false;
@@ -489,18 +489,18 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR case PSN_APPLY:
{
//skin pack
- db_set_ts(NULL, MODULNAME, "SkinPack", PopUpOptions.SkinPack);
+ db_set_ts(NULL, MODULNAME, "SkinPack", PopupOptions.SkinPack);
//skin options
const PopupSkin *skin = 0;
- if (skin = skins.getSkin(PopUpOptions.SkinPack))
+ if (skin = skins.getSkin(PopupOptions.SkinPack))
skin->saveOpts();
skins.freeAllButActive();
//more Skin options
- db_set_b(NULL, MODULNAME, "DisplayTime", PopUpOptions.DisplayTime);
- db_set_b(NULL, MODULNAME, "DropShadow", PopUpOptions.DropShadow);
- db_set_b(NULL, MODULNAME, "EnableShadowRegion", PopUpOptions.EnableFreeformShadows);
- db_set_b(NULL, MODULNAME, "EnableAeroGlass", PopUpOptions.EnableAeroGlass);
- db_set_b(NULL, MODULNAME, "UseMText", PopUpOptions.UseMText);
+ db_set_b(NULL, MODULNAME, "DisplayTime", PopupOptions.DisplayTime);
+ db_set_b(NULL, MODULNAME, "DropShadow", PopupOptions.DropShadow);
+ db_set_b(NULL, MODULNAME, "EnableShadowRegion", PopupOptions.EnableFreeformShadows);
+ db_set_b(NULL, MODULNAME, "EnableAeroGlass", PopupOptions.EnableAeroGlass);
+ db_set_b(NULL, MODULNAME, "UseMText", PopupOptions.UseMText);
}//end PSN_APPLY:
return TRUE;
}//switch (((LPNMHDR)lParam)->code)
@@ -544,7 +544,7 @@ static void BoxPreview_OnPaint(HWND hwnd, HDC mydc, int mode) StretchBlt(mydc, 0, 0, rc.right, rc.bottom, hdcAvatar, 0, 0, abs(bmp.bmWidth), abs(bmp.bmHeight), SRCCOPY);
SelectObject(hdcAvatar, hbmSave);
DeleteDC(hdcAvatar);
- HRGN rgn = CreateRoundRectRgn(0, 0, rc.right, rc.bottom, 2 * PopUpOptions.avatarRadius, 2 * PopUpOptions.avatarRadius);
+ HRGN rgn = CreateRoundRectRgn(0, 0, rc.right, rc.bottom, 2 * PopupOptions.avatarRadius, 2 * PopupOptions.avatarRadius);
FrameRgn(mydc, rgn, (HBRUSH)GetStockObject(BLACK_BRUSH), 1, 1);
DeleteObject(rgn);
break;
diff --git a/plugins/Popup/src/popup_thread.cpp b/plugins/Popup/src/popup_thread.cpp index de7b808a22..6bb9084155 100644 --- a/plugins/Popup/src/popup_thread.cpp +++ b/plugins/Popup/src/popup_thread.cpp @@ -53,9 +53,9 @@ enum bool UpdatePopupPosition(PopupWnd2 *prev, PopupWnd2 *wnd)
{
if (!wnd) return false;
- if (!PopUpOptions.ReorderPopUps && wnd->isPositioned()) return false;
+ if (!PopupOptions.ReorderPopups && wnd->isPositioned()) return false;
- int POPUP_SPACING = PopUpOptions.spacing;
+ int POPUP_SPACING = PopupOptions.spacing;
POINT pos;
SIZE prevSize = {0}, curSize = wnd->getSize();
@@ -68,9 +68,9 @@ bool UpdatePopupPosition(PopupWnd2 *prev, PopupWnd2 *wnd) SystemParametersInfo(SPI_GETWORKAREA, 0, &rc, 0);
else { //Multimonitor stuff (we have more then 1)
HWND hWnd;
- if (PopUpOptions.Monitor == MN_MIRANDA)
+ if (PopupOptions.Monitor == MN_MIRANDA)
hWnd = (HWND)CallService(MS_CLUI_GETHWND,0,0);
- else // PopUpOptions.Monitor == MN_ACTIVE
+ else // PopupOptions.Monitor == MN_ACTIVE
hWnd = GetForegroundWindow();
HMONITOR hMonitor = MonitorFromWindow(hWnd, MONITOR_DEFAULTTOPRIMARY);
@@ -83,12 +83,12 @@ bool UpdatePopupPosition(PopupWnd2 *prev, PopupWnd2 *wnd) SystemParametersInfo(SPI_GETWORKAREA,0,&rc,0);
}
- rc.left += PopUpOptions.gapLeft - POPUP_SPACING;
- rc.right -= PopUpOptions.gapRight - POPUP_SPACING;
- rc.top += PopUpOptions.gapTop - POPUP_SPACING;
- rc.bottom -= PopUpOptions.gapBottom - POPUP_SPACING;
- if (PopUpOptions.Spreading == SPREADING_VERTICAL) {
- switch (PopUpOptions.Position) {
+ rc.left += PopupOptions.gapLeft - POPUP_SPACING;
+ rc.right -= PopupOptions.gapRight - POPUP_SPACING;
+ rc.top += PopupOptions.gapTop - POPUP_SPACING;
+ rc.bottom -= PopupOptions.gapBottom - POPUP_SPACING;
+ if (PopupOptions.Spreading == SPREADING_VERTICAL) {
+ switch (PopupOptions.Position) {
case POS_UPPERLEFT:
pos.x = rc.left + POPUP_SPACING;
pos.y = (prev ? (prev->getPosition().y + prev->getSize().cy) : rc.top) + POPUP_SPACING;
@@ -108,7 +108,7 @@ bool UpdatePopupPosition(PopupWnd2 *prev, PopupWnd2 *wnd) }
}
else {
- switch (PopUpOptions.Position) {
+ switch (PopupOptions.Position) {
case POS_UPPERLEFT:
pos.x = (prev ? (prev->getPosition().x + prev->getSize().cx) : rc.left) + POPUP_SPACING;
pos.y = rc.top + POPUP_SPACING;
@@ -134,7 +134,7 @@ bool UpdatePopupPosition(PopupWnd2 *prev, PopupWnd2 *wnd) void RepositionPopups()
{
PopupWnd2 *prev = 0;
- if (PopUpOptions.ReorderPopUps) {
+ if (PopupOptions.ReorderPopups) {
for (int i=0; i < popupList.getCount(); ++i) {
UpdatePopupPosition(prev, popupList[i]);
prev = popupList[i];
@@ -154,7 +154,7 @@ static LRESULT CALLBACK PopupThreadManagerWndProc(HWND hwnd, UINT message, WPARA gTerminating = true;
if (db_get_b(NULL, MODULNAME, "FastExit", 0))
for (int i=0; i < popupList.getCount(); ++i)
- PUDeletePopUp(popupList[i]->getHwnd());
+ PUDeletePopup(popupList[i]->getHwnd());
PostQuitMessage(0);
break;
@@ -172,7 +172,7 @@ static LRESULT CALLBACK PopupThreadManagerWndProc(HWND hwnd, UINT message, WPARA break;
case UTM_REQUEST_REMOVE:
- if ((PopUpOptions.LeaveHovered && gLockCount) || (wnd && wnd->isLocked()))
+ if ((PopupOptions.LeaveHovered && gLockCount) || (wnd && wnd->isLocked()))
wnd->updateTimer();
else
PostMessage(wnd->getHwnd(), WM_CLOSE, 0, 0);
@@ -285,7 +285,7 @@ void PopupThreadUnlock() bool PopupThreadIsFull()
{
- return nPopups >= PopUpOptions.MaxPopups;
+ return nPopups >= PopupOptions.MaxPopups;
}
bool PopupThreadAddWindow(PopupWnd2 *wnd)
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index 6f2ae05cdd..158736b427 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -156,7 +156,7 @@ PopupWnd2::PopupWnd2(POPUPDATA2 *ppd, POPUPOPTIONS *theCustomOptions, bool rende {
m_signature = POPUP_OBJECT_SIGNARURE;
m_textType = TT_NONE;
- m_options = theCustomOptions ? theCustomOptions : &PopUpOptions;
+ m_options = theCustomOptions ? theCustomOptions : &PopupOptions;
m_hfnText = fonts.text;
m_hfnTitle = fonts.title;
updateData(ppd);
@@ -328,11 +328,11 @@ void PopupWnd2::animate() {
m_bReshapeWindow = false;
- if (m_hwnd && m_bmp && m_options->DropShadow && PopUpOptions.EnableFreeformShadows /*DoWeNeedRegionForThisSkin()*/)
+ if (m_hwnd && m_bmp && m_options->DropShadow && PopupOptions.EnableFreeformShadows /*DoWeNeedRegionForThisSkin()*/)
SetWindowRgn(m_hwnd, m_bmp->buildOpaqueRgn(skin->getShadowRegionOpacity()), FALSE);
- if (MyDwmEnableBlurBehindWindow && PopUpOptions.EnableAeroGlass) {
+ if (MyDwmEnableBlurBehindWindow && PopupOptions.EnableAeroGlass) {
DWM_BLURBEHIND bb = {0};
bb.dwFlags = DWM_BB_ENABLE|DWM_BB_BLURREGION;
bb.fEnable = TRUE;
@@ -369,10 +369,10 @@ void PopupWnd2::show() m_btAlpha1 = m_options->UseTransparency ? m_options->Alpha : 255;
updateLayered(m_btAlpha0);
- if (*PopUpOptions.Effect)
+ if (*PopupOptions.Effect)
{
char vfxService[128];
- mir_snprintf(vfxService, sizeof(vfxService), "PopUp/Vfx/%S", PopUpOptions.Effect);
+ mir_snprintf(vfxService, sizeof(vfxService), "Popup/Vfx/%S", PopupOptions.Effect);
if (ServiceExists(vfxService))
if (effect = (IPopupPlusEffect *)CallService(vfxService, 0, 0))
{
@@ -467,10 +467,10 @@ void PopupWnd2::hide() m_btAlpha1 = 0;
updateLayered(m_btAlpha0);
- if (*PopUpOptions.Effect)
+ if (*PopupOptions.Effect)
{
char vfxService[128];
- mir_snprintf(vfxService, sizeof(vfxService), "PopUp/Vfx/%S", PopUpOptions.Effect);
+ mir_snprintf(vfxService, sizeof(vfxService), "Popup/Vfx/%S", PopupOptions.Effect);
if (ServiceExists(vfxService))
if (effect = (IPopupPlusEffect *)CallService(vfxService, 0, 0))
{
@@ -615,11 +615,11 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) {
bool isIm = (m_hContact && (CallProtoService(GetContactProto(m_hContact), PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) ? true : false;
- bool enableDefaultGen = (m_hContact || !(PopUpOptions.actions&ACT_DEF_NOGLOBAL)) ? true : false;
- bool enableDefaultUsr = (isIm || m_hContact && !(PopUpOptions.actions&ACT_DEF_IMONLY)) ? true : false;
- bool iconSize = PopUpOptions.actions&ACT_LARGE ? TRUE : FALSE;
+ bool enableDefaultGen = (m_hContact || !(PopupOptions.actions&ACT_DEF_NOGLOBAL)) ? true : false;
+ bool enableDefaultUsr = (isIm || m_hContact && !(PopupOptions.actions&ACT_DEF_IMONLY)) ? true : false;
+ bool iconSize = PopupOptions.actions&ACT_LARGE ? TRUE : FALSE;
- if (PopUpOptions.actions & ACT_ENABLE) {
+ if (PopupOptions.actions & ACT_ENABLE) {
if (enableDefaultUsr && isIm && IsActionEnabled("General/Quick reply")) ++m_actionCount;
if (enableDefaultUsr && isIm && IsActionEnabled("General/Send message")) ++m_actionCount;
if (enableDefaultUsr && IsActionEnabled("General/User details")) ++m_actionCount;
@@ -836,7 +836,7 @@ void PopupWnd2::updateData(POPUPDATA2 *ppd) void PopupWnd2::buildMText()
{
- if (!(htuText && htuTitle && PopUpOptions.UseMText))
+ if (!(htuText && htuTitle && PopupOptions.UseMText))
return;
if (m_mtText) MText.Destroy(m_mtText);
@@ -930,7 +930,7 @@ LRESULT CALLBACK NullWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM l {
case WM_COMMAND:
case WM_CONTEXTMENU:
- PUDeletePopUp(hwnd);
+ PUDeletePopup(hwnd);
break;
}
return DefWindowProc(hwnd, message, wParam, lParam);
@@ -1042,8 +1042,8 @@ LRESULT CALLBACK ReplyEditWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM case WM_DESTROY:
PopupThreadUnlock();
- if (!(PopUpOptions.actions&ACT_DEF_KEEPWND))
- PUDeletePopUp(dat->hwndPopup);
+ if (!(PopupOptions.actions&ACT_DEF_KEEPWND))
+ PUDeletePopup(dat->hwndPopup);
SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)dat->oldWndProc);
SetWindowLongPtr(hwnd, GWLP_USERDATA, 0);
mir_free(dat);
@@ -1064,7 +1064,7 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara case UM_INITPOPUP:
if (!m_customPopup) PopupThreadAddWindow(this);
if (m_iTimeout > 0) SetTimer(m_hwnd, POPUP_TIMER, m_iTimeout*1000, 0);
- if (m_hContact && !m_hbmAvatar && PopUpOptions.EnableAvatarUpdates)
+ if (m_hContact && !m_hbmAvatar && PopupOptions.EnableAvatarUpdates)
m_hhkAvatarChanged = HookEventMessage(ME_AV_AVATARCHANGED, m_hwnd, UM_AVATARCHANGED);
if (m_avatar->activeFrameDelay() > 0) SetTimer(m_hwnd, AVATAR_TIMER, m_avatar->activeFrameDelay(), 0);
@@ -1096,8 +1096,8 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara switch (lParam) {
case ACT_DEF_MESSAGE:
CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)m_hContact, 0);
- if (!(PopUpOptions.actions&ACT_DEF_KEEPWND))
- PUDeletePopUp(m_hwnd);
+ if (!(PopupOptions.actions&ACT_DEF_KEEPWND))
+ PUDeletePopup(m_hwnd);
break;
case ACT_DEF_REPLY:
@@ -1135,8 +1135,8 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara case ACT_DEF_DETAILS:
CallServiceSync(MS_USERINFO_SHOWDIALOG, (WPARAM)m_hContact, 0);
- if (!(PopUpOptions.actions&ACT_DEF_KEEPWND))
- PUDeletePopUp(m_hwnd);
+ if (!(PopupOptions.actions&ACT_DEF_KEEPWND))
+ PUDeletePopup(m_hwnd);
break;
case ACT_DEF_MENU:
@@ -1151,8 +1151,8 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara acs.handleType = HANDLE_CONTACT;
acs.szProto = 0;
CallServiceSync(MS_ADDCONTACT_SHOW, NULL, (LPARAM)&acs);
- if (!(PopUpOptions.actions&ACT_DEF_KEEPWND))
- PUDeletePopUp(m_hwnd);
+ if (!(PopupOptions.actions&ACT_DEF_KEEPWND))
+ PUDeletePopup(m_hwnd);
}
break;
@@ -1164,13 +1164,13 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara m_bIsPinned = !m_bIsPinned;
{
- bool iconSize = PopUpOptions.actions&ACT_LARGE ? TRUE : FALSE;
+ bool iconSize = PopupOptions.actions&ACT_LARGE ? TRUE : FALSE;
PUModifyActionIcon(m_hwnd, wParam, lParam, m_bIsPinned ? IcoLib_GetIcon(ICO_ACT_PINNED,iconSize) : IcoLib_GetIcon(ICO_ACT_PIN,iconSize));
}
break;
case ACT_DEF_DISMISS:
- PUDeletePopUp(m_hwnd);
+ PUDeletePopup(m_hwnd);
break;
case ACT_DEF_COPY:
@@ -1201,7 +1201,7 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara CloseClipboard();
if (sztext)
mir_free(text);
- PUDeletePopUp(m_hwnd);
+ PUDeletePopup(m_hwnd);
break;
}
}
@@ -1224,8 +1224,8 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara case UM_MENUDONE:
{
unlock();
- if (!(PopUpOptions.actions&ACT_DEF_KEEPWND))
- PUDeletePopUp(m_hwnd);
+ if (!(PopupOptions.actions&ACT_DEF_KEEPWND))
+ PUDeletePopup(m_hwnd);
break;
}
@@ -1240,8 +1240,8 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara }
if (i == m_actionCount) {
- if (PopUpOptions.overrideLeft!=false && (m_hContact!=NULL || PopUpOptions.overrideLeft == 5 || PopUpOptions.overrideLeft == 6)) {
- switch (PopUpOptions.overrideLeft){
+ if (PopupOptions.overrideLeft!=false && (m_hContact!=NULL || PopupOptions.overrideLeft == 5 || PopupOptions.overrideLeft == 6)) {
+ switch (PopupOptions.overrideLeft){
default:
case 1:SendMessage(m_hwnd, UM_POPUPACTION,0, ACT_DEF_MESSAGE); break;
case 2:SendMessage(m_hwnd, UM_POPUPACTION,0, ACT_DEF_REPLY); break;
@@ -1263,8 +1263,8 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara }
case WM_MBUTTONUP:
- if ( PopUpOptions.overrideMiddle!=false && (m_hContact!=NULL || PopUpOptions.overrideMiddle == 5 || PopUpOptions.overrideMiddle == 6)) {
- switch (PopUpOptions.overrideMiddle){
+ if ( PopupOptions.overrideMiddle!=false && (m_hContact!=NULL || PopupOptions.overrideMiddle == 5 || PopupOptions.overrideMiddle == 6)) {
+ switch (PopupOptions.overrideMiddle){
default:
case 1:SendMessage(m_hwnd, UM_POPUPACTION,0, ACT_DEF_MESSAGE); break;
case 2:SendMessage(m_hwnd, UM_POPUPACTION,0, ACT_DEF_REPLY); break;
@@ -1278,8 +1278,8 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara break;
case WM_CONTEXTMENU:
- if ( PopUpOptions.overrideRight!=false && (m_hContact!=NULL || PopUpOptions.overrideRight == 5 || PopUpOptions.overrideRight == 6)) {
- switch (PopUpOptions.overrideRight){
+ if ( PopupOptions.overrideRight!=false && (m_hContact!=NULL || PopupOptions.overrideRight == 5 || PopupOptions.overrideRight == 6)) {
+ switch (PopupOptions.overrideRight){
default:
case 1:SendMessage(m_hwnd, UM_POPUPACTION,0, ACT_DEF_MESSAGE); break;
case 2:SendMessage(m_hwnd, UM_POPUPACTION,0, ACT_DEF_REPLY); break;
@@ -1429,7 +1429,7 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara m_bIsHovered = false;
}
if (m_hhkAvatarChanged)
- PopUp_UnhookEventAsync((WPARAM)m_hwnd, (LPARAM)m_hhkAvatarChanged);
+ Popup_UnhookEventAsync((WPARAM)m_hwnd, (LPARAM)m_hhkAvatarChanged);
SendMessage(m_hwnd, UM_FREEPLUGINDATA, 0, 0);
SetWindowLongPtr(m_hwnd, GWLP_USERDATA, 0);
m_hwnd = 0;
diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp index b1f2dde562..932943f698 100644 --- a/plugins/Popup/src/services.cpp +++ b/plugins/Popup/src/services.cpp @@ -80,8 +80,8 @@ static bool isFullScreen() return false;
}
-//===== PopUp/AddPopUp
-INT_PTR PopUp_AddPopUp(WPARAM wParam, LPARAM lParam)
+//===== Popup/AddPopup
+INT_PTR Popup_AddPopup(WPARAM wParam, LPARAM lParam)
{
if (!gbPopupLoaded) return -1;
@@ -99,11 +99,11 @@ INT_PTR PopUp_AddPopUp(WPARAM wParam, LPARAM lParam) ppd2.PluginWindowProc = ppd->PluginWindowProc;
ppd2.PluginData = ppd->PluginData;
ppd2.iSeconds = ppd->iSeconds;
- return PopUp_AddPopUp2((WPARAM)&ppd2, lParam);
+ return Popup_AddPopup2((WPARAM)&ppd2, lParam);
}
-//===== PopUp/AddPopupW
-INT_PTR PopUp_AddPopUpW(WPARAM wParam, LPARAM lParam)
+//===== Popup/AddPopupW
+INT_PTR Popup_AddPopupW(WPARAM wParam, LPARAM lParam)
{
if (!gbPopupLoaded) return -1;
@@ -129,10 +129,10 @@ INT_PTR PopUp_AddPopUpW(WPARAM wParam, LPARAM lParam) ppd2.lpActions = ppd->lpActions;
}
- return PopUp_AddPopUp2((WPARAM)&ppd2, lParam);
+ return Popup_AddPopup2((WPARAM)&ppd2, lParam);
}
-//===== PopUp/AddPopup2
+//===== Popup/AddPopup2
static __forceinline DWORD Proto_Status2Flag_My(DWORD status)
{
if (DWORD res = Proto_Status2Flag(status))
@@ -140,7 +140,7 @@ static __forceinline DWORD Proto_Status2Flag_My(DWORD status) return PF2_IDLE;
}
-INT_PTR PopUp_AddPopUp2(WPARAM wParam, LPARAM lParam)
+INT_PTR Popup_AddPopup2(WPARAM wParam, LPARAM lParam)
{
/* NOTE: we will return 0 instead of -1 since tabSRMM stops using popup after first failure :/ */
@@ -184,11 +184,11 @@ INT_PTR PopUp_AddPopUp2(WPARAM wParam, LPARAM lParam) if (bShowMode != PU_SHOWMODE_FAVORITE)
{
- if (!PopUpOptions.ModuleIsEnabled)
+ if (!PopupOptions.ModuleIsEnabled)
return -1;
#ifdef _DEBUG
- _itoa(PopUpOptions.DisableWhenFullscreen,temp,10);
- OutputDebugStringA("PopUpOptions.DisableWhenFullscreen: \t");
+ _itoa(PopupOptions.DisableWhenFullscreen,temp,10);
+ OutputDebugStringA("PopupOptions.DisableWhenFullscreen: \t");
OutputDebugStringA(temp);
OutputDebugStringA("\n");
_itoa(bShowMode,temp,10);
@@ -200,7 +200,7 @@ INT_PTR PopUp_AddPopUp2(WPARAM wParam, LPARAM lParam) OutputDebugStringA("\n");
#endif
- if (PopUpOptions.DisableWhenFullscreen && (bShowMode != PU_SHOWMODE_FULLSCREEN) && isFullScreen())
+ if (PopupOptions.DisableWhenFullscreen && (bShowMode != PU_SHOWMODE_FULLSCREEN) && isFullScreen())
return -1;
if (db_get_dw(NULL, MODULNAME, LPGEN("Global Status"), 0) &
@@ -235,8 +235,8 @@ INT_PTR PopUp_AddPopUp2(WPARAM wParam, LPARAM lParam) return 0;
}
-//===== PopUp/GetContact
-INT_PTR PopUp_GetContact(WPARAM wParam, LPARAM lParam)
+//===== Popup/GetContact
+INT_PTR Popup_GetContact(WPARAM wParam, LPARAM lParam)
{
if (!gbPopupLoaded) return -1;
@@ -246,8 +246,8 @@ INT_PTR PopUp_GetContact(WPARAM wParam, LPARAM lParam) return (INT_PTR)(-1);
}
-//===== PopUp/GetPluginData
-INT_PTR PopUp_GetPluginData(WPARAM wParam, LPARAM lParam)
+//===== Popup/GetPluginData
+INT_PTR Popup_GetPluginData(WPARAM wParam, LPARAM lParam)
{
if (!gbPopupLoaded || !wParam)
return -1;
@@ -258,14 +258,14 @@ INT_PTR PopUp_GetPluginData(WPARAM wParam, LPARAM lParam) return (INT_PTR)(-1);
}
-//===== PopUp/IsSecondLineShown
-INT_PTR PopUp_IsSecondLineShown(WPARAM wParam, LPARAM lParam)
+//===== Popup/IsSecondLineShown
+INT_PTR Popup_IsSecondLineShown(WPARAM wParam, LPARAM lParam)
{
return 1;
}
-//===== PopUp/ChangeTextW
-INT_PTR PopUp_ChangeTextW(WPARAM wParam, LPARAM lParam)
+//===== Popup/ChangeTextW
+INT_PTR Popup_ChangeTextW(WPARAM wParam, LPARAM lParam)
{
if (!gbPopupLoaded || !wParam)
return -1;
@@ -278,8 +278,8 @@ INT_PTR PopUp_ChangeTextW(WPARAM wParam, LPARAM lParam) return 0;
}
-//===== PopUp/ChangeW
-INT_PTR PopUp_ChangeW(WPARAM wParam, LPARAM lParam)
+//===== Popup/ChangeW
+INT_PTR Popup_ChangeW(WPARAM wParam, LPARAM lParam)
{
if (!gbPopupLoaded || !wParam)
return -1;
@@ -292,8 +292,8 @@ INT_PTR PopUp_ChangeW(WPARAM wParam, LPARAM lParam) return 0;
}
-//===== PopUp/Change2
-INT_PTR PopUp_Change2(WPARAM wParam, LPARAM lParam)
+//===== Popup/Change2
+INT_PTR Popup_Change2(WPARAM wParam, LPARAM lParam)
{
if (!gbPopupLoaded) return -1;
@@ -304,8 +304,8 @@ INT_PTR PopUp_Change2(WPARAM wParam, LPARAM lParam) return 0;
}
-//===== PopUp/ShowMessage
-INT_PTR PopUp_ShowMessage(WPARAM wParam, LPARAM lParam) {
+//===== Popup/ShowMessage
+INT_PTR Popup_ShowMessage(WPARAM wParam, LPARAM lParam) {
if (!gbPopupLoaded || !wParam || !lParam) return -1;
if (closing) return 0;
@@ -338,10 +338,10 @@ INT_PTR PopUp_ShowMessage(WPARAM wParam, LPARAM lParam) { default: //No no no... you must give me a good value.
return -1;
}
- return PopUp_AddPopUp2((WPARAM)&ppd2, (LPARAM)((lParam&0x80000000)?APF_NO_HISTORY:0));
+ return Popup_AddPopup2((WPARAM)&ppd2, (LPARAM)((lParam&0x80000000)?APF_NO_HISTORY:0));
}
-INT_PTR PopUp_ShowMessageW(WPARAM wParam, LPARAM lParam) {
+INT_PTR Popup_ShowMessageW(WPARAM wParam, LPARAM lParam) {
if (!gbPopupLoaded || !wParam || !lParam) return -1;
if (closing) return 0;
@@ -374,11 +374,11 @@ INT_PTR PopUp_ShowMessageW(WPARAM wParam, LPARAM lParam) { default: //No no no... you must give me a good value.
return -1;
}
- return PopUp_AddPopUp2((WPARAM)&ppd2, (LPARAM)((lParam&0x80000000)?APF_NO_HISTORY:0));
+ return Popup_AddPopup2((WPARAM)&ppd2, (LPARAM)((lParam&0x80000000)?APF_NO_HISTORY:0));
}
-//===== PopUp/Query
-INT_PTR PopUp_Query(WPARAM wParam, LPARAM lParam)
+//===== Popup/Query
+INT_PTR Popup_Query(WPARAM wParam, LPARAM lParam)
{
if (!gbPopupLoaded) return -1;
@@ -387,21 +387,21 @@ INT_PTR PopUp_Query(WPARAM wParam, LPARAM lParam) switch (wParam) {
case PUQS_ENABLEPOPUPS: {
- if (PopUpOptions.ModuleIsEnabled) return 1; //They're already ON!!!
+ if (PopupOptions.ModuleIsEnabled) return 1; //They're already ON!!!
else { //Module was disabled.
svcEnableDisableMenuCommand(0,0);
return 0;
}
}
case PUQS_DISABLEPOPUPS: {
- if (!(PopUpOptions.ModuleIsEnabled)) return 1; //They're already OFF!!!
+ if (!(PopupOptions.ModuleIsEnabled)) return 1; //They're already OFF!!!
else {
svcEnableDisableMenuCommand(0,0);
return 0;
}
}
case PUQS_GETSTATUS:
- return (PopUpOptions.ModuleIsEnabled);
+ return (PopupOptions.ModuleIsEnabled);
default:
return -1;
}
@@ -409,8 +409,8 @@ INT_PTR PopUp_Query(WPARAM wParam, LPARAM lParam) }
-//===== PopUp/RegisterActions
-INT_PTR PopUp_RegisterActions(WPARAM wParam, LPARAM lParam)
+//===== Popup/RegisterActions
+INT_PTR Popup_RegisterActions(WPARAM wParam, LPARAM lParam)
{
LPPOPUPACTION actions = (LPPOPUPACTION)wParam;
for (int i=0; i < lParam; ++i)
@@ -419,13 +419,13 @@ INT_PTR PopUp_RegisterActions(WPARAM wParam, LPARAM lParam) }
-INT_PTR PopUp_RegisterNotification(WPARAM wParam, LPARAM lParam)
+INT_PTR Popup_RegisterNotification(WPARAM wParam, LPARAM lParam)
{
return (INT_PTR)RegisterNotification((LPPOPUPNOTIFICATION)wParam);
}
-//===== PopUp/UnhookEventAsync
+//===== Popup/UnhookEventAsync
struct SafeUnhookEventParam
{
HWND hwndPopup;
@@ -440,7 +440,7 @@ static void CALLBACK SafeUnhookEventFunc(ULONG_PTR dwParam) delete (SafeUnhookEventParam *)dwParam;
}
-INT_PTR PopUp_UnhookEventAsync(WPARAM wParam, LPARAM lParam)
+INT_PTR Popup_UnhookEventAsync(WPARAM wParam, LPARAM lParam)
{
SafeUnhookEventParam *param = new SafeUnhookEventParam;
param->hwndPopup = (HWND)wParam;
@@ -449,15 +449,15 @@ INT_PTR PopUp_UnhookEventAsync(WPARAM wParam, LPARAM lParam) return 0;
}
-//===== PopUp/RegisterVfx (effekt name for drop down box)
-INT_PTR PopUp_RegisterVfx(WPARAM wParam, LPARAM lParam)
+//===== Popup/RegisterVfx (effekt name for drop down box)
+INT_PTR Popup_RegisterVfx(WPARAM wParam, LPARAM lParam)
{
OptAdv_RegisterVfx((char *)lParam);
return 0;
}
-//===== PopUp/RegisterClass (for core class api support)
-INT_PTR PopUp_RegisterPopupClass(WPARAM wParam, LPARAM lParam)
+//===== Popup/RegisterClass (for core class api support)
+INT_PTR Popup_RegisterPopupClass(WPARAM wParam, LPARAM lParam)
{
char setting[256];
POPUPCLASS *pc = (POPUPCLASS *)lParam;
@@ -513,7 +513,7 @@ INT_PTR PopUp_RegisterPopupClass(WPARAM wParam, LPARAM lParam) return (INT_PTR)ptd;
}
-INT_PTR PopUp_UnregisterPopupClass(WPARAM wParam, LPARAM lParam)
+INT_PTR Popup_UnregisterPopupClass(WPARAM wParam, LPARAM lParam)
{
POPUPTREEDATA *ptd = (POPUPTREEDATA*)lParam;
if (ptd == NULL)
@@ -529,8 +529,8 @@ INT_PTR PopUp_UnregisterPopupClass(WPARAM wParam, LPARAM lParam) return 1;
}
-//===== PopUp/AddPopupClass (for core class api support)
-INT_PTR PopUp_CreateClassPopup(WPARAM wParam, LPARAM lParam) {
+//===== Popup/AddPopupClass (for core class api support)
+INT_PTR Popup_CreateClassPopup(WPARAM wParam, LPARAM lParam) {
int ret = 1;
POPUPDATACLASS *pdc = (POPUPDATACLASS *)lParam;
if (pdc->cbSize != sizeof(POPUPDATACLASS)) return ret;
@@ -564,7 +564,7 @@ INT_PTR PopUp_CreateClassPopup(WPARAM wParam, LPARAM lParam) { ppd2.lchContact = pdc->hContact;
ppd2.PluginData = pdc->PluginData;
- ret = PopUp_AddPopUp2((WPARAM)&ppd2, 0);
+ ret = Popup_AddPopup2((WPARAM)&ppd2, 0);
}
return ret!=0 ? 1 : 0;
}
diff --git a/plugins/Popup/src/services.h b/plugins/Popup/src/services.h index 1e965fbbe2..8dd363b679 100644 --- a/plugins/Popup/src/services.h +++ b/plugins/Popup/src/services.h @@ -26,31 +26,31 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern int num_classes; //for core class api support
-INT_PTR PopUp_AddPopUpW(WPARAM, LPARAM);
+INT_PTR Popup_AddPopupW(WPARAM, LPARAM);
-INT_PTR PopUp_AddPopUp(WPARAM, LPARAM);
-INT_PTR PopUp_AddPopUp2(WPARAM, LPARAM);
+INT_PTR Popup_AddPopup(WPARAM, LPARAM);
+INT_PTR Popup_AddPopup2(WPARAM, LPARAM);
-INT_PTR PopUp_GetContact(WPARAM, LPARAM);
-INT_PTR PopUp_IsSecondLineShown(WPARAM, LPARAM);
+INT_PTR Popup_GetContact(WPARAM, LPARAM);
+INT_PTR Popup_IsSecondLineShown(WPARAM, LPARAM);
-INT_PTR PopUp_ChangeTextW(WPARAM, LPARAM);
+INT_PTR Popup_ChangeTextW(WPARAM, LPARAM);
-INT_PTR PopUp_ChangeW(WPARAM, LPARAM);
-INT_PTR PopUp_Change2(WPARAM, LPARAM);
+INT_PTR Popup_ChangeW(WPARAM, LPARAM);
+INT_PTR Popup_Change2(WPARAM, LPARAM);
-INT_PTR PopUp_ShowMessage(WPARAM, LPARAM);
-INT_PTR PopUp_ShowMessageW(WPARAM, LPARAM);
+INT_PTR Popup_ShowMessage(WPARAM, LPARAM);
+INT_PTR Popup_ShowMessageW(WPARAM, LPARAM);
-INT_PTR PopUp_Query(WPARAM, LPARAM);
-INT_PTR PopUp_GetPluginData(WPARAM, LPARAM);
-INT_PTR PopUp_RegisterActions(WPARAM wParam, LPARAM lParam);
-INT_PTR PopUp_RegisterNotification(WPARAM wParam, LPARAM lParam);
-INT_PTR PopUp_UnhookEventAsync(WPARAM wParam, LPARAM lParam);
-INT_PTR PopUp_RegisterVfx(WPARAM wParam, LPARAM lParam);
+INT_PTR Popup_Query(WPARAM, LPARAM);
+INT_PTR Popup_GetPluginData(WPARAM, LPARAM);
+INT_PTR Popup_RegisterActions(WPARAM wParam, LPARAM lParam);
+INT_PTR Popup_RegisterNotification(WPARAM wParam, LPARAM lParam);
+INT_PTR Popup_UnhookEventAsync(WPARAM wParam, LPARAM lParam);
+INT_PTR Popup_RegisterVfx(WPARAM wParam, LPARAM lParam);
-INT_PTR PopUp_RegisterPopupClass(WPARAM wParam, LPARAM lParam);
-INT_PTR PopUp_UnregisterPopupClass(WPARAM wParam, LPARAM lParam);
-INT_PTR PopUp_CreateClassPopup(WPARAM wParam, LPARAM lParam);
+INT_PTR Popup_RegisterPopupClass(WPARAM wParam, LPARAM lParam);
+INT_PTR Popup_UnregisterPopupClass(WPARAM wParam, LPARAM lParam);
+INT_PTR Popup_CreateClassPopup(WPARAM wParam, LPARAM lParam);
#endif // __services_h__
diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp index 864d6c4c59..865912ca29 100644 --- a/plugins/Popup/src/skin.cpp +++ b/plugins/Popup/src/skin.cpp @@ -47,10 +47,10 @@ PopupSkin::~PopupSkin() SIZE PopupSkin::measureAction(HDC hdc, POPUPACTION *act) const
{
SIZE sz = {0};
- if (!(PopUpOptions.actions&ACT_ENABLE))
+ if (!(PopupOptions.actions&ACT_ENABLE))
return sz;
- if (PopUpOptions.actions&ACT_LARGE)
+ if (PopupOptions.actions&ACT_LARGE)
{
sz.cx = sz.cy = 32;
} else
@@ -58,7 +58,7 @@ SIZE PopupSkin::measureAction(HDC hdc, POPUPACTION *act) const sz.cx = sz.cy = 16;
}
- if (PopUpOptions.actions&ACT_TEXT)
+ if (PopupOptions.actions&ACT_TEXT)
{
char *name = strchr(act->lpzTitle, '/');
if (!name) name = act->lpzTitle;
@@ -94,7 +94,7 @@ SIZE PopupSkin::measureActionBar(HDC hdc, PopupWnd2 *wnd) const {
SIZE szAction = measureAction(hdc, &wnd->getActions()[i].actionA);
- if (PopUpOptions.actions & ACT_TEXT)
+ if (PopupOptions.actions & ACT_TEXT)
{
sz.cx = max(sz.cx, szAction.cx);
sz.cy += szAction.cy;
@@ -110,16 +110,16 @@ SIZE PopupSkin::measureActionBar(HDC hdc, PopupWnd2 *wnd) const void PopupSkin::drawAction(MyBitmap *bmp, POPUPACTION *act, int x, int y, bool hover) const
{
- if (!(PopUpOptions.actions&ACT_ENABLE))
+ if (!(PopupOptions.actions&ACT_ENABLE))
return;
bmp->DrawIcon(act->lchIcon,
- (PopUpOptions.actions&ACT_TEXT) ? x : (x+2),
+ (PopupOptions.actions&ACT_TEXT) ? x : (x+2),
y+2,
- (PopUpOptions.actions&ACT_LARGE) ? 32 : 16,
- (PopUpOptions.actions&ACT_LARGE) ? 32 : 16);
+ (PopupOptions.actions&ACT_LARGE) ? 32 : 16,
+ (PopupOptions.actions&ACT_LARGE) ? 32 : 16);
- if (PopUpOptions.actions&ACT_TEXT)
+ if (PopupOptions.actions&ACT_TEXT)
{
char *name = strchr(act->lpzTitle, '/');
if (!name) name = act->lpzTitle;
@@ -138,10 +138,10 @@ void PopupSkin::drawAction(MyBitmap *bmp, POPUPACTION *act, int x, int y, bool h WCHAR *str = TranslateW(wname);
GetTextExtentPoint32W(bmp->getDC(), str, lstrlenW(str), &szText);
bmp->Draw_TextW(str,
- (PopUpOptions.actions&ACT_LARGE) ? (x+szSpace.cx+32) : (x+szSpace.cx+16),
+ (PopupOptions.actions&ACT_LARGE) ? (x+szSpace.cx+32) : (x+szSpace.cx+16),
max(
y+2,
- y+2 + (((PopUpOptions.actions&ACT_LARGE) ? 32 : 16) - szText.cy)/2
+ y+2 + (((PopupOptions.actions&ACT_LARGE) ? 32 : 16) - szText.cy)/2
));
mir_free(wname);
@@ -153,8 +153,8 @@ void PopupSkin::drawAction(MyBitmap *bmp, POPUPACTION *act, int x, int y, bool h RECT rc;
rc.left = x;
rc.top = y;
- rc.right = x + ((PopUpOptions.actions&ACT_LARGE) ? 32 : 16) + 4;
- rc.bottom = y + ((PopUpOptions.actions&ACT_LARGE) ? 32 : 16) + 4;
+ rc.right = x + ((PopupOptions.actions&ACT_LARGE) ? 32 : 16) + 4;
+ rc.bottom = y + ((PopupOptions.actions&ACT_LARGE) ? 32 : 16) + 4;
bmp->saveAlpha(rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top);
HBRUSH hbr = CreateSolidBrush(fonts.clActionHover);
FrameRect(bmp->getDC(), &rc, hbr);
@@ -176,7 +176,7 @@ void PopupSkin::drawActionBar(MyBitmap *bmp, PopupWnd2 *wnd, int x, int y) const wnd->getActions()[i].rc.right = x + szAction.cx;
wnd->getActions()[i].rc.bottom = y + szAction.cy;
- if (PopUpOptions.actions & ACT_TEXT)
+ if (PopupOptions.actions & ACT_TEXT)
{
y += szAction.cy;
} else
@@ -227,7 +227,7 @@ void PopupSkin::measure(HDC hdc, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *options }
wnd->getArgs()->clear();
- wnd->getArgs()->add("options.avatarsize", PopUpOptions.avatarSize);
+ wnd->getArgs()->add("options.avatarsize", PopupOptions.avatarSize);
wnd->getArgs()->add("window.width", maxw);
wnd->getArgs()->add("window.maxwidth", maxw);
@@ -627,7 +627,7 @@ void PopupSkin::display(MyBitmap *bmp, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *o drawActionBar(bmp, wnd,
db_get_b(NULL, MODULNAME, "CenterActions", 0) ?
(pos.x + (textAreaWidth - wnd->getRenderInfo()->actw)/2) :
- (PopUpOptions.actions&ACT_RIGHTICONS) ?
+ (PopupOptions.actions&ACT_RIGHTICONS) ?
(pos.x + textAreaWidth - wnd->getRenderInfo()->actw) :
// else
pos.x,
@@ -1403,7 +1403,7 @@ const PopupSkin *Skins::getSkin(LPCTSTR name) void Skins::loadActiveSkin()
{
for (SKINLIST *p = m_skins; p; p = p->next)
- if (!lstrcmpi(p->name, PopUpOptions.SkinPack))
+ if (!lstrcmpi(p->name, PopupOptions.SkinPack))
{
if (p->skin)
break;
@@ -1417,7 +1417,7 @@ void Skins::loadActiveSkin() void Skins::freeAllButActive()
{
for (SKINLIST *p = m_skins; p; p = p->next)
- if (lstrcmpi(p->name, PopUpOptions.SkinPack))
+ if (lstrcmpi(p->name, PopupOptions.SkinPack))
{
delete p->skin;
p->skin = NULL;
diff --git a/plugins/Popup/src/version.h b/plugins/Popup/src/version.h index 3fef922ed5..a9dea05713 100644 --- a/plugins/Popup/src/version.h +++ b/plugins/Popup/src/version.h @@ -5,8 +5,8 @@ #define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
-#define __PLUGIN_NAME "PopUp plus"
-#define __FILENAME "PopUp.dll"
+#define __PLUGIN_NAME "Popup plus"
+#define __FILENAME "Popup.dll"
#define __DESCRIPTION "Provides popup notification services for different plugins."
#define __AUTHOR "MPK, Merlin_de (Luca Santarelli, Victor Pavlychko)"
#define __AUTHOREMAIL "mp-king@web.de"
|