diff options
Diffstat (limited to 'plugins/ShellExt/src/options.cpp')
-rw-r--r-- | plugins/ShellExt/src/options.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/plugins/ShellExt/src/options.cpp b/plugins/ShellExt/src/options.cpp index e6b24c66f8..0933b708fc 100644 --- a/plugins/ShellExt/src/options.cpp +++ b/plugins/ShellExt/src/options.cpp @@ -42,15 +42,15 @@ static void InitControls(HWND hwndDlg) AutoSize(GetDlgItem(hwndDlg, IDC_CAPSHLSTATUS));
// show all the options
- int iCheck = db_get_b(0, SHLExt_Name, SHLExt_UseGroups, BST_UNCHECKED);
+ int iCheck = g_plugin.getByte(SHLExt_UseGroups, BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_USEGROUPS, iCheck ? BST_CHECKED : BST_UNCHECKED);
EnableWindow(GetDlgItem(hwndDlg, IDC_CLISTGROUPS), iCheck = BST_CHECKED);
- CheckDlgButton(hwndDlg, IDC_CLISTGROUPS, db_get_b(0, SHLExt_Name, SHLExt_UseCListSetting, BST_UNCHECKED));
- CheckDlgButton(hwndDlg, IDC_NOPROF, db_get_b(0, SHLExt_Name, SHLExt_ShowNoProfile, BST_UNCHECKED));
- CheckDlgButton(hwndDlg, IDC_SHOWFULL, db_get_b(0, SHLExt_Name, SHLExt_UseHITContacts, BST_UNCHECKED));
- CheckDlgButton(hwndDlg, IDC_SHOWINVISIBLES, db_get_b(0, SHLExt_Name, SHLExt_UseHIT2Contacts, BST_UNCHECKED));
- CheckDlgButton(hwndDlg, IDC_USEOWNERDRAW, db_get_b(0, SHLExt_Name, SHLExt_ShowNoIcons, BST_UNCHECKED));
- CheckDlgButton(hwndDlg, IDC_HIDEOFFLINE, db_get_b(0, SHLExt_Name, SHLExt_ShowNoOffline, BST_UNCHECKED));
+ CheckDlgButton(hwndDlg, IDC_CLISTGROUPS, g_plugin.getByte(SHLExt_UseCListSetting, BST_UNCHECKED));
+ CheckDlgButton(hwndDlg, IDC_NOPROF, g_plugin.getByte(SHLExt_ShowNoProfile, BST_UNCHECKED));
+ CheckDlgButton(hwndDlg, IDC_SHOWFULL, g_plugin.getByte(SHLExt_UseHITContacts, BST_UNCHECKED));
+ CheckDlgButton(hwndDlg, IDC_SHOWINVISIBLES, g_plugin.getByte(SHLExt_UseHIT2Contacts, BST_UNCHECKED));
+ CheckDlgButton(hwndDlg, IDC_USEOWNERDRAW, g_plugin.getByte(SHLExt_ShowNoIcons, BST_UNCHECKED));
+ CheckDlgButton(hwndDlg, IDC_HIDEOFFLINE, g_plugin.getByte(SHLExt_ShowNoOffline, BST_UNCHECKED));
// give the Remove button a Vista icon
SendDlgItemMessage(hwndDlg, IDC_REMOVE, BCM_SETSHIELD, 0, 1);
@@ -66,13 +66,13 @@ static INT_PTR CALLBACK OptDialogProc(HWND hwndDlg, UINT wMsg, WPARAM wParam, LP case WM_NOTIFY:
if (((LPNMHDR)lParam)->code == PSN_APPLY) {
- db_set_b(0, SHLExt_Name, SHLExt_UseGroups, IsDlgButtonChecked(hwndDlg, IDC_USEGROUPS));
- db_set_b(0, SHLExt_Name, SHLExt_UseCListSetting, IsDlgButtonChecked(hwndDlg, IDC_CLISTGROUPS));
- db_set_b(0, SHLExt_Name, SHLExt_ShowNoProfile, IsDlgButtonChecked(hwndDlg, IDC_NOPROF));
- db_set_b(0, SHLExt_Name, SHLExt_UseHITContacts, IsDlgButtonChecked(hwndDlg, IDC_SHOWFULL));
- db_set_b(0, SHLExt_Name, SHLExt_UseHIT2Contacts, IsDlgButtonChecked(hwndDlg, IDC_SHOWINVISIBLES));
- db_set_b(0, SHLExt_Name, SHLExt_ShowNoIcons, IsDlgButtonChecked(hwndDlg, IDC_USEOWNERDRAW));
- db_set_b(0, SHLExt_Name, SHLExt_ShowNoOffline, IsDlgButtonChecked(hwndDlg, IDC_HIDEOFFLINE));
+ g_plugin.setByte(SHLExt_UseGroups, IsDlgButtonChecked(hwndDlg, IDC_USEGROUPS));
+ g_plugin.setByte(SHLExt_UseCListSetting, IsDlgButtonChecked(hwndDlg, IDC_CLISTGROUPS));
+ g_plugin.setByte(SHLExt_ShowNoProfile, IsDlgButtonChecked(hwndDlg, IDC_NOPROF));
+ g_plugin.setByte(SHLExt_UseHITContacts, IsDlgButtonChecked(hwndDlg, IDC_SHOWFULL));
+ g_plugin.setByte(SHLExt_UseHIT2Contacts, IsDlgButtonChecked(hwndDlg, IDC_SHOWINVISIBLES));
+ g_plugin.setByte(SHLExt_ShowNoIcons, IsDlgButtonChecked(hwndDlg, IDC_USEOWNERDRAW));
+ g_plugin.setByte(SHLExt_ShowNoOffline, IsDlgButtonChecked(hwndDlg, IDC_HIDEOFFLINE));
}
break;
@@ -89,13 +89,13 @@ static INT_PTR CALLBACK OptDialogProc(HWND hwndDlg, UINT wMsg, WPARAM wParam, LP if (IDYES == MessageBox(nullptr,
TranslateT("Are you sure? This will remove all the settings stored in your database and all registry entries created for shlext to work with Explorer"),
TranslateT("Disable/Remove shlext"), MB_YESNO | MB_ICONQUESTION)) {
- db_unset(0, SHLExt_Name, SHLExt_UseGroups);
- db_unset(0, SHLExt_Name, SHLExt_UseCListSetting);
- db_unset(0, SHLExt_Name, SHLExt_UseHITContacts);
- db_unset(0, SHLExt_Name, SHLExt_UseHIT2Contacts);
- db_unset(0, SHLExt_Name, SHLExt_ShowNoProfile);
- db_unset(0, SHLExt_Name, SHLExt_ShowNoIcons);
- db_unset(0, SHLExt_Name, SHLExt_ShowNoOffline);
+ g_plugin.delSetting(SHLExt_UseGroups);
+ g_plugin.delSetting(SHLExt_UseCListSetting);
+ g_plugin.delSetting(SHLExt_UseHITContacts);
+ g_plugin.delSetting(SHLExt_UseHIT2Contacts);
+ g_plugin.delSetting(SHLExt_ShowNoProfile);
+ g_plugin.delSetting(SHLExt_ShowNoIcons);
+ g_plugin.delSetting(SHLExt_ShowNoOffline);
CheckUnregisterServer();
InitControls(hwndDlg);
|