summaryrefslogtreecommitdiff
path: root/plugins/SplashScreen
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-09-21 21:58:47 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-09-21 21:58:47 +0000
commit7c0fdf0c457d55b6bfdda0282cf5099057c715c7 (patch)
tree31389d750c1fb6a6e7ecdd9279d32c238a50ff62 /plugins/SplashScreen
parent4d970faf406c59e807a9ffd4d7a51f1aaad6636a (diff)
Not needed version checks removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@6172 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SplashScreen')
-rw-r--r--plugins/SplashScreen/src/options.cpp122
1 files changed, 67 insertions, 55 deletions
diff --git a/plugins/SplashScreen/src/options.cpp b/plugins/SplashScreen/src/options.cpp
index ded6acd23a..156974c7ed 100644
--- a/plugins/SplashScreen/src/options.cpp
+++ b/plugins/SplashScreen/src/options.cpp
@@ -48,67 +48,79 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case WM_INITDIALOG:
{
TranslateDialogDefault(hwndDlg);
- if (!png2dibavail)
- {
+ if (!png2dibavail) {
ShowWindow(GetDlgItem(hwndDlg, IDC_PNG2DIBWARN), SW_SHOW);
EnableWindow(GetDlgItem(hwndDlg, IDC_ACTIVE), false);
EnableWindow(GetDlgItem(hwndDlg, IDC_RANDOM), false);
EnableWindow(GetDlgItem(hwndDlg, IDC_SPLASHPATH), false);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHOOSESPLASH), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWVERSION), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_VERSIONPREFIX), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWTIME), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ST_SPIN), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FADEIN), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FISTEP), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FI_SPIN), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FADEOUT), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FOSTEP), false);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FO_SPIN), false);
+ } else {
+ ReadDbConfig();
+ TCHAR inBuf[80];
+ DBVARIANT dbv = {0};
+ db_get_ts(NULL, MODNAME, "Path", &dbv);
+ if (lstrcmp(dbv.ptszVal, NULL) == 0)
+ {
+ _tcscpy_s(inBuf, _T("splash\\splash.png"));
+ db_free(&dbv);
+ }
+ else
+ _tcscpy_s(inBuf, dbv.ptszVal);
+ dbv.ptszVal = NULL;
+ SetWindowText(GetDlgItem(hwndDlg, IDC_SPLASHPATH),inBuf);
+ db_get_ts(NULL, MODNAME, "Sound", &dbv);
+ if (lstrcmp(dbv.ptszVal, NULL) == 0)
+ {
+ _tcscpy_s(inBuf, _T("sounds\\startup.wav"));
+ db_free(&dbv);
+ }
+ else
+ _tcscpy_s(inBuf, dbv.ptszVal);
+ dbv.ptszVal = NULL;
+ SetWindowText(GetDlgItem(hwndDlg, IDC_SNDPATH),inBuf);
+
+ db_get_ts(NULL, MODNAME, "VersionPrefix", &dbv);
+ if (lstrcmp(dbv.ptszVal, NULL) == 0)
+ {
+ _tcscpy_s(inBuf, _T(""));
+ db_free(&dbv);
+ }
+ else
+ _tcscpy_s(inBuf, dbv.ptszVal);
+ dbv.ptszVal = NULL;
+ SetWindowText(GetDlgItem(hwndDlg, IDC_VERSIONPREFIX), inBuf);
+ if (options.active)
+ CheckDlgButton(hwndDlg, IDC_ACTIVE, BST_CHECKED);
+ if (options.playsnd && !options.inheritGS)
+ CheckDlgButton(hwndDlg, IDC_PLAYSND, BST_INDETERMINATE);
+ else if (options.playsnd)
+ CheckDlgButton(hwndDlg, IDC_PLAYSND, BST_CHECKED);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_LOOPSOUND), false);
+ if (options.fadein)
+ CheckDlgButton(hwndDlg, IDC_FADEIN, BST_CHECKED);
+ if (options.fadeout)
+ CheckDlgButton(hwndDlg, IDC_FADEOUT, BST_CHECKED);
+ if (options.random)
+ CheckDlgButton(hwndDlg, IDC_RANDOM, BST_CHECKED);
+ if (options.showversion)
+ CheckDlgButton(hwndDlg, IDC_SHOWVERSION, BST_CHECKED);
+
+ SetWindowText(GetDlgItem(hwndDlg, IDC_SHOWTIME), _itot(options.showtime, inBuf, 10));
+ SetWindowText(GetDlgItem(hwndDlg, IDC_FISTEP), _itot(options.fisteps, inBuf, 10));
+ SetWindowText(GetDlgItem(hwndDlg, IDC_FOSTEP), _itot(options.fosteps, inBuf, 10));
+
+ SendDlgItemMessage(hwndDlg, IDC_SHOWTIME, EM_LIMITTEXT, 5, 0);
}
- ReadDbConfig();
- TCHAR inBuf[80];
- DBVARIANT dbv = {0};
- db_get_ts(NULL, MODNAME, "Path", &dbv);
- if (lstrcmp(dbv.ptszVal, NULL) == 0)
- {
- _tcscpy_s(inBuf, _T("splash\\splash.png"));
- db_free(&dbv);
- }
- else
- _tcscpy_s(inBuf, dbv.ptszVal);
- dbv.ptszVal = NULL;
- SetWindowText(GetDlgItem(hwndDlg, IDC_SPLASHPATH),inBuf);
- db_get_ts(NULL, MODNAME, "Sound", &dbv);
- if (lstrcmp(dbv.ptszVal, NULL) == 0)
- {
- _tcscpy_s(inBuf, _T("sounds\\startup.wav"));
- db_free(&dbv);
- }
- else
- _tcscpy_s(inBuf, dbv.ptszVal);
- dbv.ptszVal = NULL;
- SetWindowText(GetDlgItem(hwndDlg, IDC_SNDPATH),inBuf);
- db_get_ts(NULL, MODNAME, "VersionPrefix", &dbv);
- if (lstrcmp(dbv.ptszVal, NULL) == 0)
- {
- _tcscpy_s(inBuf, _T(""));
- db_free(&dbv);
- }
- else
- _tcscpy_s(inBuf, dbv.ptszVal);
- dbv.ptszVal = NULL;
- SetWindowText(GetDlgItem(hwndDlg, IDC_VERSIONPREFIX), inBuf);
- if (options.active) CheckDlgButton(hwndDlg, IDC_ACTIVE, BST_CHECKED);
- if (options.playsnd && !options.inheritGS) CheckDlgButton(hwndDlg, IDC_PLAYSND, BST_INDETERMINATE);
- else if (options.playsnd) CheckDlgButton(hwndDlg, IDC_PLAYSND, BST_CHECKED);
- //if (options.loopsnd) CheckDlgButton(hwndDlg, IDC_LOOPSOUND, BST_CHECKED);
- EnableWindow(GetDlgItem(hwndDlg, IDC_LOOPSOUND), false);
- if (options.fadein) CheckDlgButton(hwndDlg, IDC_FADEIN, BST_CHECKED);
- if (options.fadeout) CheckDlgButton(hwndDlg, IDC_FADEOUT, BST_CHECKED);
- if (options.random) CheckDlgButton(hwndDlg, IDC_RANDOM, BST_CHECKED);
- if (options.showversion) CheckDlgButton(hwndDlg, IDC_SHOWVERSION, BST_CHECKED);
-
- SetWindowText(GetDlgItem(hwndDlg, IDC_SHOWTIME), _itot(options.showtime, inBuf, 10));
- SetWindowText(GetDlgItem(hwndDlg, IDC_FISTEP), _itot(options.fisteps, inBuf, 10));
- SetWindowText(GetDlgItem(hwndDlg, IDC_FOSTEP), _itot(options.fosteps, inBuf, 10));
-
- SendDlgItemMessage(hwndDlg, IDC_SHOWTIME, EM_LIMITTEXT, 5, 0);
- /*
- SendDlgItemMessage(hwndDlg, IDC_ST_SPIN, UDM_SETRANGE32, 0, 20000);
- SendDlgItemMessage(hwndDlg, IDC_FI_SPIN, UDM_SETRANGE32, 1, 7);
- SendDlgItemMessage(hwndDlg, IDC_FO_SPIN, UDM_SETRANGE32, 1, 7);
- */
return TRUE;
}