diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-05 22:27:16 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-05 22:27:16 +0000 |
commit | 007b4c7301f0d26a72f89f74e9929f42e24eb3e6 (patch) | |
tree | b1ee30b70c6e36d1a06aed6885cb80dc560a68ca /plugins/SplashScreen | |
parent | f4a1bbc6ba4b8137cb868639ac146aa97e97e9df (diff) |
- rest of menus cleared;
- old database macroses wiped out from all plugins (left in m_database.h for compatibility)
git-svn-id: http://svn.miranda-ng.org/main/trunk@4324 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SplashScreen')
-rw-r--r-- | plugins/SplashScreen/src/main.cpp | 20 | ||||
-rw-r--r-- | plugins/SplashScreen/src/options.cpp | 78 |
2 files changed, 49 insertions, 49 deletions
diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp index 96054f39f6..4ae218f6b4 100644 --- a/plugins/SplashScreen/src/main.cpp +++ b/plugins/SplashScreen/src/main.cpp @@ -94,8 +94,8 @@ void SplashMain() {
if (options.runonce)
{
- DBWriteContactSettingByte(NULL, MODNAME, "Active", 0);
- DBWriteContactSettingByte(NULL, MODNAME, "DisableAfterStartup", 0);
+ db_set_b(NULL, MODNAME, "Active", 0);
+ db_set_b(NULL, MODNAME, "DisableAfterStartup", 0);
}
if (hUserDll == NULL)
@@ -133,21 +133,21 @@ void SplashMain() //for 9x "alfa" testing
DBVARIANT dbv = {0};
- DBGetContactSettingTString(NULL, MODNAME, "VersionPrefix", &dbv);
+ db_get_ts(NULL, MODNAME, "VersionPrefix", &dbv);
if (lstrcmp(dbv.ptszVal, NULL) == 0)
{
_tcscpy_s(szPrefix, _T(""));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
else
_tcscpy_s(szPrefix, dbv.ptszVal);
dbv.ptszVal = NULL;
- DBGetContactSettingTString(NULL, MODNAME, "Path", &dbv);
+ db_get_ts(NULL, MODNAME, "Path", &dbv);
if (lstrcmp(dbv.ptszVal, NULL) == 0)
{
_tcscpy_s(inBuf, _T("splash\\splash.png"));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
else
_tcscpy_s(inBuf, dbv.ptszVal);
@@ -164,11 +164,11 @@ void SplashMain() else
_tcscpy_s(szSplashFile, inBuf);
- DBGetContactSettingTString(NULL, MODNAME, "Sound", &dbv);
+ db_get_ts(NULL, MODNAME, "Sound", &dbv);
if (lstrcmp(dbv.ptszVal, NULL) == 0)
{
_tcscpy_s(inBuf, _T("sounds\\startup.wav"));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
else
_tcscpy_s(inBuf, dbv.ptszVal);
@@ -282,7 +282,7 @@ int PlugDisableHook(WPARAM wParam, LPARAM lParam) {
if (!lstrcmp(tszModule, _T("Skin")) & !lstrcmp(tszSetting, _T("UseSound")))
{
- DBWriteContactSettingByte(NULL, MODNAME, "PlaySound", cws->value.bVal);
+ db_set_b(NULL, MODNAME, "PlaySound", cws->value.bVal);
#ifdef _DEBUG
cws->value.bVal ? _DebugPopup(NULL, _T("Sounds enabled."), _T("")) : _DebugPopup(NULL, _T("Sounds disabled."), _T(""));
logMessage(_T("Module"), tszModule);
@@ -292,7 +292,7 @@ int PlugDisableHook(WPARAM wParam, LPARAM lParam) }
if (!lstrcmp(tszModule, _T("PluginDisable")) & (!lstrcmp(tszSetting, szDllName)))
{
- DBWriteContactSettingByte(NULL, MODNAME, "Active", cws->value.bVal);
+ db_set_b(NULL, MODNAME, "Active", cws->value.bVal);
#ifdef _DEBUG
cws->value.bVal ? _DebugPopup(NULL, _T("Disabled."), "") : _DebugPopup(NULL, _T("Enabled."), _T(""));
logMessage(_T("PlugDisableHook"), _T("Triggered"));
diff --git a/plugins/SplashScreen/src/options.cpp b/plugins/SplashScreen/src/options.cpp index 8c0248985b..128b0d4856 100644 --- a/plugins/SplashScreen/src/options.cpp +++ b/plugins/SplashScreen/src/options.cpp @@ -24,17 +24,17 @@ TCHAR szPath2Spash [MAX_PATH], szSoundFilePath[MAX_PATH]; // Reads values from db
void ReadIniConfig()
{
- options.active = DBGetContactSettingByte(NULL, MODNAME, "Active", 1);
- options.playsnd = DBGetContactSettingByte(NULL, MODNAME, "PlaySound", 0);
- options.fadein = DBGetContactSettingByte(NULL, MODNAME, "FadeIn", 1);
- options.fadeout = DBGetContactSettingByte(NULL, MODNAME, "FadeOut", 1);
- options.showtime = DBGetContactSettingDword(NULL, MODNAME, "TimeToShow", 2000);
- options.fisteps = DBGetContactSettingDword(NULL, MODNAME, "FadeinSpeed", 5);
- options.fosteps = DBGetContactSettingDword(NULL, MODNAME, "FadeoutSpeed", 5);
- options.inheritGS = DBGetContactSettingByte(NULL, MODNAME, "InheritGlobalSound", 1);
- options.showversion = DBGetContactSettingByte(NULL, MODNAME, "ShowVersion", 0);
- options.random = DBGetContactSettingByte(NULL, MODNAME, "Random", 0);
- options.runonce = DBGetContactSettingByte(NULL, MODNAME, "DisableAfterStartup", 0);
+ options.active = db_get_b(NULL, MODNAME, "Active", 1);
+ options.playsnd = db_get_b(NULL, MODNAME, "PlaySound", 0);
+ options.fadein = db_get_b(NULL, MODNAME, "FadeIn", 1);
+ options.fadeout = db_get_b(NULL, MODNAME, "FadeOut", 1);
+ options.showtime = db_get_dw(NULL, MODNAME, "TimeToShow", 2000);
+ options.fisteps = db_get_dw(NULL, MODNAME, "FadeinSpeed", 5);
+ options.fosteps = db_get_dw(NULL, MODNAME, "FadeoutSpeed", 5);
+ options.inheritGS = db_get_b(NULL, MODNAME, "InheritGlobalSound", 1);
+ options.showversion = db_get_b(NULL, MODNAME, "ShowVersion", 0);
+ options.random = db_get_b(NULL, MODNAME, "Random", 0);
+ options.runonce = db_get_b(NULL, MODNAME, "DisableAfterStartup", 0);
}
BOOL Exists(LPCTSTR strName)
@@ -60,31 +60,31 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP ReadIniConfig();
TCHAR inBuf[80];
DBVARIANT dbv = {0};
- DBGetContactSettingTString(NULL, MODNAME, "Path", &dbv);
+ db_get_ts(NULL, MODNAME, "Path", &dbv);
if (lstrcmp(dbv.ptszVal, NULL) == 0)
{
_tcscpy_s(inBuf, _T("splash\\splash.png"));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
else
_tcscpy_s(inBuf, dbv.ptszVal);
dbv.ptszVal = NULL;
SetWindowText(GetDlgItem(hwndDlg, IDC_SPLASHPATH),inBuf);
- DBGetContactSettingTString(NULL, MODNAME, "Sound", &dbv);
+ db_get_ts(NULL, MODNAME, "Sound", &dbv);
if (lstrcmp(dbv.ptszVal, NULL) == 0)
{
_tcscpy_s(inBuf, _T("sounds\\startup.wav"));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
else
_tcscpy_s(inBuf, dbv.ptszVal);
dbv.ptszVal = NULL;
SetWindowText(GetDlgItem(hwndDlg, IDC_SNDPATH),inBuf);
- DBGetContactSettingTString(NULL, MODNAME, "VersionPrefix", &dbv);
+ db_get_ts(NULL, MODNAME, "VersionPrefix", &dbv);
if (lstrcmp(dbv.ptszVal, NULL) == 0)
{
_tcscpy_s(inBuf, _T(""));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
else
_tcscpy_s(inBuf, dbv.ptszVal);
@@ -301,58 +301,58 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP TCHAR tmp[MAX_PATH];
GetWindowText(GetDlgItem(hwndDlg, IDC_SPLASHPATH), tmp, MAX_PATH);
- DBWriteContactSettingTString(NULL, MODNAME, "Path", tmp);
+ db_set_ts(NULL, MODNAME, "Path", tmp);
GetWindowText(GetDlgItem(hwndDlg, IDC_SNDPATH), tmp, MAX_PATH);
- DBWriteContactSettingTString(NULL, MODNAME, "Sound", tmp);
+ db_set_ts(NULL, MODNAME, "Sound", tmp);
GetWindowText(GetDlgItem(hwndDlg, IDC_VERSIONPREFIX), tmp, MAX_PATH);
- DBWriteContactSettingTString(NULL, MODNAME, "VersionPrefix", tmp);
+ db_set_ts(NULL, MODNAME, "VersionPrefix", tmp);
_tcscpy_s(szPrefix, tmp);
GetWindowText(GetDlgItem(hwndDlg, IDC_SHOWTIME), tmp, MAX_PATH);
- DBWriteContactSettingDword(NULL, MODNAME, "TimeToShow", _ttoi(tmp));
+ db_set_dw(NULL, MODNAME, "TimeToShow", _ttoi(tmp));
options.showtime = _ttoi(tmp);
GetWindowText(GetDlgItem(hwndDlg, IDC_FISTEP), tmp, MAX_PATH);
- DBWriteContactSettingDword(NULL, MODNAME, "FadeinSpeed", _ttoi(tmp));
+ db_set_dw(NULL, MODNAME, "FadeinSpeed", _ttoi(tmp));
options.fisteps = _ttoi(tmp);
GetWindowText(GetDlgItem(hwndDlg, IDC_FOSTEP), tmp, MAX_PATH);
- DBWriteContactSettingDword(NULL, MODNAME, "FadeoutSpeed", _ttoi(tmp));
+ db_set_dw(NULL, MODNAME, "FadeoutSpeed", _ttoi(tmp));
options.fosteps = _ttoi(tmp);
if (IsDlgButtonChecked(hwndDlg, IDC_ACTIVE))
{
- DBWriteContactSettingByte(NULL, MODNAME, "Active", 1);
+ db_set_b(NULL, MODNAME, "Active", 1);
options.active = 1;
}
else
{
- DBWriteContactSettingByte(NULL, MODNAME, "Active", 0);
+ db_set_b(NULL, MODNAME, "Active", 0);
options.active = 0;
}
if (IsDlgButtonChecked(hwndDlg, IDC_PLAYSND))
{
- DBWriteContactSettingByte(NULL, MODNAME, "PlaySound", 1);
+ db_set_b(NULL, MODNAME, "PlaySound", 1);
options.playsnd = 1;
- DBWriteContactSettingByte(NULL, MODNAME, "InheritGlobalSound", 1);
+ db_set_b(NULL, MODNAME, "InheritGlobalSound", 1);
options.inheritGS = 1;
}
else
{
- DBWriteContactSettingByte(NULL, MODNAME, "PlaySound", 0);
+ db_set_b(NULL, MODNAME, "PlaySound", 0);
options.playsnd = 0;
- DBWriteContactSettingByte(NULL, MODNAME, "InheritGlobalSound", 0);
+ db_set_b(NULL, MODNAME, "InheritGlobalSound", 0);
options.inheritGS = 0;
}
if (IsDlgButtonChecked(hwndDlg, IDC_PLAYSND) == BST_INDETERMINATE)
{
- DBWriteContactSettingByte(NULL, MODNAME, "PlaySound", 1);
+ db_set_b(NULL, MODNAME, "PlaySound", 1);
options.playsnd = 1;
- DBWriteContactSettingByte(NULL, MODNAME, "InheritGlobalSound", 0);
+ db_set_b(NULL, MODNAME, "InheritGlobalSound", 0);
options.inheritGS = 0;
}
@@ -371,42 +371,42 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (IsDlgButtonChecked(hwndDlg, IDC_FADEIN))
{
- DBWriteContactSettingByte(NULL, MODNAME, "FadeIn", 1);
+ db_set_b(NULL, MODNAME, "FadeIn", 1);
options.fadein = 1;
}
else
{
- DBWriteContactSettingByte(NULL, MODNAME, "FadeIn", 0);
+ db_set_b(NULL, MODNAME, "FadeIn", 0);
options.fadein = 0;
}
if (IsDlgButtonChecked(hwndDlg, IDC_FADEOUT))
{
- DBWriteContactSettingByte(NULL, MODNAME, "FadeOut", 1);
+ db_set_b(NULL, MODNAME, "FadeOut", 1);
options.fadeout = 1;
}
else
{
- DBWriteContactSettingByte(NULL, MODNAME, "FadeOut", 0);
+ db_set_b(NULL, MODNAME, "FadeOut", 0);
options.fadeout = 0;
}
if (IsDlgButtonChecked(hwndDlg, IDC_RANDOM))
{
- DBWriteContactSettingByte(NULL, MODNAME, "Random", 1);
+ db_set_b(NULL, MODNAME, "Random", 1);
options.random = 1;
}
else
{
- DBWriteContactSettingByte(NULL, MODNAME, "Random", 0);
+ db_set_b(NULL, MODNAME, "Random", 0);
options.random = 0;
}
if (IsDlgButtonChecked(hwndDlg, IDC_SHOWVERSION))
{
- DBWriteContactSettingByte(NULL, MODNAME, "ShowVersion", 1);
+ db_set_b(NULL, MODNAME, "ShowVersion", 1);
options.showversion = 1;
}
else
{
- DBWriteContactSettingByte(NULL, MODNAME, "ShowVersion", 0);
+ db_set_b(NULL, MODNAME, "ShowVersion", 0);
options.showversion = 0;
}
return TRUE;
|