summaryrefslogtreecommitdiff
path: root/recent_contacts/options.cpp
diff options
context:
space:
mode:
authormataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-11-26 15:41:10 +0000
committermataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-11-26 15:41:10 +0000
commitf04d64869f3b1de54fb343f28f955584780001b8 (patch)
tree5453dc10de3d980de79ffe019fa0b5fcb692a27d /recent_contacts/options.cpp
parent7aff1e4cb053394db57c2814d5fe1e6493e0cc75 (diff)
Project folders rename part 3
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@215 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'recent_contacts/options.cpp')
-rw-r--r--recent_contacts/options.cpp99
1 files changed, 0 insertions, 99 deletions
diff --git a/recent_contacts/options.cpp b/recent_contacts/options.cpp
deleted file mode 100644
index ba76ecd..0000000
--- a/recent_contacts/options.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-#include "V_RecentContacts.h"
-#include "resource.h"
-extern HINSTANCE hInst;
-extern void LoadDBSettings();
-
-
-BOOL CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- static int bInitializing = 0;
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_HIDEOFFLINE, (LastUCOpt.HideOffline ? BST_CHECKED : BST_UNCHECKED));
- char MaxShownContacts[32];
- mir_snprintf(MaxShownContacts,sizeof(MaxShownContacts),"%d", LastUCOpt.MaxShownContacts);
-
- SetDlgItemText(hwndDlg,IDC_SHOWNCONTACTS,MaxShownContacts);
-
- char DateFormat[32];
- mir_snprintf(DateFormat,sizeof(DateFormat),"%s", LastUCOpt.DateTimeFormat.c_str());
- SetDlgItemText(hwndDlg,IDC_DATETIME,DateFormat);
-
-// bInitializing = 1;
-// bInitializing = 0;
- SetWindowLong(hwndDlg,GWL_USERDATA,lParam);
- return TRUE;
- }
-
- case WM_COMMAND:
- {
- switch(HIWORD(wParam))
- {
- case EN_CHANGE:
- case BN_CLICKED:
- case CBN_EDITCHANGE:
- case CBN_SELCHANGE:
- SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
- }
- break;
-
- }
-
- case WM_NOTIFY:
- {
- LPNMHDR phdr = (LPNMHDR)(lParam);
-
- if (0 == phdr->idFrom)
- {
- switch (phdr->code)
- {
- case PSN_APPLY:
- {
- BOOL bSuccess = FALSE;
- char str[32];
-
- LastUCOpt.HideOffline = (BOOL)IsDlgButtonChecked(hwndDlg, IDC_HIDEOFFLINE);
- DBWriteContactSettingByte(NULL, dbLastUC_ModuleName, dbLastUC_HideOfflineContacts, (BYTE)LastUCOpt.HideOffline);
-
- GetDlgItemTextA(hwndDlg,IDC_SHOWNCONTACTS,str,sizeof(str));
- LastUCOpt.MaxShownContacts= atoi(str);
- DBWriteContactSettingByte(0,dbLastUC_ModuleName, dbLastUC_MaxShownContacts, LastUCOpt.MaxShownContacts);
-
- GetDlgItemTextA(hwndDlg,IDC_DATETIME,str,sizeof(str));
- DBWriteContactSettingString(0,dbLastUC_ModuleName, dbLastUC_DateTimeFormat, str );
-
- LoadDBSettings();
- return TRUE;
- }
- }
- }
- break;
- }
-
- case WM_DESTROY:
- break;
-
- }
- return FALSE;
-}
-
-int onOptInitialise(WPARAM wParam, LPARAM lParam)
-{
- OPTIONSDIALOGPAGE odp;
-
- ZeroMemory(&odp, sizeof(odp));
- odp.cbSize = sizeof(odp);
- odp.position = 0;
- odp.hInstance = hInst;
- odp.pszGroup = Translate("Contact List");
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_LASTUC_OPT);
- odp.pszTitle = Translate(msLastUC_ShowListName);
- odp.pfnDlgProc = DlgProcOptions;
- odp.flags = ODPF_BOLDGROUPS;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
-
- return 0;
-}