summaryrefslogtreecommitdiff
path: root/plugins/RecentContacts/src/options.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-11-18 20:07:43 +0000
committerRobert Pösel <robyer@seznam.cz>2014-11-18 20:07:43 +0000
commit4f4b39e3e0c9b1906af739cf85311e7ca0388fe4 (patch)
tree8eeb84203862443316c015fae726e94d3e58fdbf /plugins/RecentContacts/src/options.cpp
parentf5220435e21a209d91116819bf0305ed79b29116 (diff)
RecentContacts: Add option "Resize window according to contact list" (patch by Vojtěch Kinkor, thanks); version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@11017 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/RecentContacts/src/options.cpp')
-rw-r--r--plugins/RecentContacts/src/options.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/plugins/RecentContacts/src/options.cpp b/plugins/RecentContacts/src/options.cpp
index e3905cff99..e5c587613d 100644
--- a/plugins/RecentContacts/src/options.cpp
+++ b/plugins/RecentContacts/src/options.cpp
@@ -12,6 +12,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
CheckDlgButton(hwndDlg, IDC_HIDEOFFLINE, (LastUCOpt.HideOffline ? BST_CHECKED : BST_UNCHECKED));
+ CheckDlgButton(hwndDlg, IDC_WINDOWAUTOSIZE, (LastUCOpt.WindowAutoSize ? BST_CHECKED : BST_UNCHECKED));
mir_snprintf(str, SIZEOF(str), "%d", LastUCOpt.MaxShownContacts);
SetDlgItemTextA(hwndDlg, IDC_SHOWNCONTACTS, str);
@@ -41,6 +42,9 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
LastUCOpt.HideOffline = (BOOL)IsDlgButtonChecked(hwndDlg, IDC_HIDEOFFLINE);
db_set_b(NULL, dbLastUC_ModuleName, dbLastUC_HideOfflineContacts, (BYTE)LastUCOpt.HideOffline);
+ LastUCOpt.WindowAutoSize = (BOOL)IsDlgButtonChecked(hwndDlg, IDC_WINDOWAUTOSIZE);
+ db_set_b(NULL, dbLastUC_ModuleName, dbLastUC_WindowAutosize, (BYTE)LastUCOpt.WindowAutoSize);
+
GetDlgItemTextA(hwndDlg, IDC_SHOWNCONTACTS, str, SIZEOF(str));
LastUCOpt.MaxShownContacts= atoi(str);
db_set_b(0,dbLastUC_ModuleName, dbLastUC_MaxShownContacts, LastUCOpt.MaxShownContacts);
@@ -60,12 +64,12 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
int onOptInitialise(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
- odp.hInstance = hInst;
- odp.pszGroup = LPGEN("Contacts");
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_LASTUC_OPT);
- odp.pszTitle = msLastUC_ShowListName;
- odp.pfnDlgProc = DlgProcOptions;
- odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
- return 0;
+ odp.hInstance = hInst;
+ odp.pszGroup = LPGEN("Contacts");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_LASTUC_OPT);
+ odp.pszTitle = msLastUC_ShowListName;
+ odp.pfnDlgProc = DlgProcOptions;
+ odp.flags = ODPF_BOLDGROUPS;
+ Options_AddPage(wParam, &odp);
+ return 0;
}