diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-29 19:35:02 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-29 19:35:02 +0000 |
commit | adeae0289c3a08d6e8fae2d2644053341bd371ab (patch) | |
tree | 816589bea007bdf0af6e5d2b2cf039de21f2ba12 /plugins/UserInfoEx/src/psp_options.cpp | |
parent | 7c51a5c643c99f624147bd0fb56f5c29d65fd5dc (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@11157 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/psp_options.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/psp_options.cpp | 65 |
1 files changed, 31 insertions, 34 deletions
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp index 5db6f1418c..10c1bb257d 100644 --- a/plugins/UserInfoEx/src/psp_options.cpp +++ b/plugins/UserInfoEx/src/psp_options.cpp @@ -594,32 +594,30 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam switch (uMsg) {
case WM_INITDIALOG:
TranslateDialogDefault(hDlg);
- {
- ShowWindow(GetDlgItem(hDlg, CHECK_REMIND_SECURED), myGlobals.UseDbxTree ? SW_HIDE : SW_SHOW);
-
- SendDlgItemMessage(hDlg, ICO_BIRTHDAY, STM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon(ICO_DLG_ANNIVERSARY, TRUE));
-
- // set colours
- SendDlgItemMessage(hDlg, EDIT_REMIND, EM_LIMITTEXT, 2, 0);
- SendDlgItemMessage(hDlg, SPIN_REMIND, UDM_SETRANGE32, 0, 50);
- SendDlgItemMessage(hDlg, EDIT_REMIND2, EM_LIMITTEXT, 4, 0);
- SendDlgItemMessage(hDlg, SPIN_REMIND2, UDM_SETRANGE32, 1, 8760);
- SendDlgItemMessage(hDlg, EDIT_REMIND_SOUNDOFFSET, EM_LIMITTEXT, 2, 0);
- SendDlgItemMessage(hDlg, SPIN_REMIND_SOUNDOFFSET, UDM_SETRANGE32, 0, 50);
-
- HWND hCtrl;
- if (hCtrl = GetDlgItem(hDlg, EDIT_REMIND_ENABLED)) {
- ComboBox_AddString(hCtrl, TranslateT("Reminder disabled"));
- ComboBox_AddString(hCtrl, TranslateT("Anniversaries only"));
- ComboBox_AddString(hCtrl, TranslateT("Birthdays only"));
- ComboBox_AddString(hCtrl, TranslateT("Everything"));
- }
- if (hCtrl = GetDlgItem(hDlg, EDIT_BIRTHMODULE)) {
- ComboBox_AddString(hCtrl, TranslateT("mBirthday"));
- ComboBox_AddString(hCtrl, TranslateT("UserInfo (default)"));
- }
- SendNotify_InfoChanged(hDlg);
+ ShowWindow(GetDlgItem(hDlg, CHECK_REMIND_SECURED), myGlobals.UseDbxTree ? SW_HIDE : SW_SHOW);
+
+ SendDlgItemMessage(hDlg, ICO_BIRTHDAY, STM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon(ICO_DLG_ANNIVERSARY, TRUE));
+
+ // set colours
+ SendDlgItemMessage(hDlg, EDIT_REMIND, EM_LIMITTEXT, 2, 0);
+ SendDlgItemMessage(hDlg, SPIN_REMIND, UDM_SETRANGE32, 0, 50);
+ SendDlgItemMessage(hDlg, EDIT_REMIND2, EM_LIMITTEXT, 4, 0);
+ SendDlgItemMessage(hDlg, SPIN_REMIND2, UDM_SETRANGE32, 1, 8760);
+ SendDlgItemMessage(hDlg, EDIT_REMIND_SOUNDOFFSET, EM_LIMITTEXT, 2, 0);
+ SendDlgItemMessage(hDlg, SPIN_REMIND_SOUNDOFFSET, UDM_SETRANGE32, 0, 50);
+
+ HWND hCtrl;
+ if (hCtrl = GetDlgItem(hDlg, EDIT_REMIND_ENABLED)) {
+ ComboBox_AddString(hCtrl, TranslateT("Reminder disabled"));
+ ComboBox_AddString(hCtrl, TranslateT("Anniversaries only"));
+ ComboBox_AddString(hCtrl, TranslateT("Birthdays only"));
+ ComboBox_AddString(hCtrl, TranslateT("Everything"));
+ }
+ if (hCtrl = GetDlgItem(hDlg, EDIT_BIRTHMODULE)) {
+ ComboBox_AddString(hCtrl, TranslateT("mBirthday"));
+ ComboBox_AddString(hCtrl, TranslateT("UserInfo (default)"));
}
+ SendNotify_InfoChanged(hDlg);
return TRUE;
case WM_NOTIFY:
@@ -678,12 +676,12 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam BYTE bOld = db_get_b(NULL, MODNAME, SET_REMIND_BIRTHMODULE, DEFVAL_REMIND_BIRTHMODULE); // = 1
BYTE bNew = (BYTE)ComboBox_GetCurSel(GetDlgItem(hDlg, EDIT_BIRTHMODULE));
if (bOld != bNew) {
- //keep the database clean
- MAnnivDate mdb;
- MCONTACT hContact = NULL;
+ // keep the database clean
DBWriteComboByte(hDlg, EDIT_BIRTHMODULE, SET_REMIND_BIRTHMODULE, DEFVAL_REMIND_BIRTHMODULE);
- //walk through all the contacts stored in the DB
- for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
+
+ // walk through all the contacts stored in the DB
+ MAnnivDate mdb;
+ for (MCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
mdb.DBMoveBirthDate(hContact, bOld, bNew);
}
@@ -695,14 +693,13 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam SvcReminderEnable(FALSE);
bReminderCheck = FALSE;
}
- else
- bReminderCheck = TRUE;
+ else bReminderCheck = TRUE;
}
// update all contact list extra icons
if (bReminderCheck) {
- SvcReminderEnable(TRUE); // reinit reminder options from db
- SvcReminderCheckAll(NOTIFY_CLIST); // notify
+ SvcReminderEnable(TRUE); // reinit reminder options from db
+ SvcReminderCheckAll(NOTIFY_CLIST); // notify
}
RebuildMain();
}
|