diff options
author | George Hazan <george.hazan@gmail.com> | 2012-12-04 16:30:53 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-12-04 16:30:53 +0000 |
commit | c6d147395447240320d3e37286603c11d8fb00c3 (patch) | |
tree | 69d414f104fd863d200d992fd0eb8eba27846bc3 /plugins/FingerprintNG/src/options.cpp | |
parent | b015a208cdd9feb11b0debd2988a3bdac5b9e1f6 (diff) |
applying changed options on the fly
git-svn-id: http://svn.miranda-ng.org/main/trunk@2641 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FingerprintNG/src/options.cpp')
-rw-r--r-- | plugins/FingerprintNG/src/options.cpp | 72 |
1 files changed, 34 insertions, 38 deletions
diff --git a/plugins/FingerprintNG/src/options.cpp b/plugins/FingerprintNG/src/options.cpp index 39a6c1a8ba..88382ccd01 100644 --- a/plugins/FingerprintNG/src/options.cpp +++ b/plugins/FingerprintNG/src/options.cpp @@ -21,40 +21,38 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //Start of header
#include "global.h"
-struct _settingsInfo
+struct
{
int idCtrl;
LPCSTR szSetName;
}
-static settings [] =
+static settings[] =
{
- {IDC_GROUP_MIRANDA, "GroupMiranda"},
- {IDC_GROUP_MIRANDA_VERSION, "GroupMirandaVersion"},
- {IDC_GROUP_MIRANDA_PACKS, "GroupMirandaPacks"},
+ {IDC_GROUP_MIRANDA, "GroupMiranda"},
+ {IDC_GROUP_MIRANDA_VERSION, "GroupMirandaVersion"},
+ {IDC_GROUP_MIRANDA_PACKS, "GroupMirandaPacks"},
- {IDC_GROUP_MULTI, "GroupMulti"},
- {IDC_GROUP_AIM, "GroupAIM"},
- {IDC_GROUP_GG, "GroupGG"},
- {IDC_GROUP_ICQ, "GroupICQ"},
- {IDC_GROUP_IRC, "GroupIRC"},
- {IDC_GROUP_JABBER, "GroupJabber"},
- {IDC_GROUP_MRA, "GroupMRA"},
- {IDC_GROUP_MSN, "GroupMSN"},
- {IDC_GROUP_QQ, "GroupQQ"},
- {IDC_GROUP_RSS, "GroupRSS"},
- {IDC_GROUP_TLEN, "GroupTlen"},
- {IDC_GROUP_WEATHER, "GroupWeather"},
- {IDC_GROUP_YAHOO, "GroupYahoo"},
+ {IDC_GROUP_MULTI, "GroupMulti"},
+ {IDC_GROUP_AIM, "GroupAIM"},
+ {IDC_GROUP_GG, "GroupGG"},
+ {IDC_GROUP_ICQ, "GroupICQ"},
+ {IDC_GROUP_IRC, "GroupIRC"},
+ {IDC_GROUP_JABBER, "GroupJabber"},
+ {IDC_GROUP_MRA, "GroupMRA"},
+ {IDC_GROUP_MSN, "GroupMSN"},
+ {IDC_GROUP_QQ, "GroupQQ"},
+ {IDC_GROUP_RSS, "GroupRSS"},
+ {IDC_GROUP_TLEN, "GroupTlen"},
+ {IDC_GROUP_WEATHER, "GroupWeather"},
+ {IDC_GROUP_YAHOO, "GroupYahoo"},
- {IDC_GROUP_OTHER_PROTOS, "GroupOtherProtos"},
- {IDC_GROUP_OTHERS, "GroupOthers"},
-
- {IDC_GROUP_OVERLAYS_RESOURCE, "GroupOverlaysResource"},
- {IDC_GROUP_OVERLAYS_PLATFORM, "GroupOverlaysPlatform"},
- {IDC_GROUP_OVERLAYS_PROTO, "GroupOverlaysProtos"},
- {IDC_GROUP_OVERLAYS_SECURITY, "GroupOtherProtos"},
-// {IDC_GROUP_OVERLAYS_RESOURCE_ALT, "GroupOverlays"},
+ {IDC_GROUP_OTHER_PROTOS, "GroupOtherProtos"},
+ {IDC_GROUP_OTHERS, "GroupOthers"},
+ {IDC_GROUP_OVERLAYS_RESOURCE, "GroupOverlaysResource"},
+ {IDC_GROUP_OVERLAYS_PLATFORM, "GroupOverlaysPlatform"},
+ {IDC_GROUP_OVERLAYS_PROTO, "GroupOverlaysProtos"},
+ {IDC_GROUP_OVERLAYS_SECURITY, "GroupOtherProtos"}
};
static void OptDlgChanged(HWND hwndDlg, BOOL show)
@@ -78,8 +76,8 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP {
switch(msg) {
case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
{
- TranslateDialogDefault(hwndDlg);
for (int i = 0; i < SIZEOF(settings); i++) {
if (lstrcmpA(settings[i].szSetName, "GroupMirandaVersion") == 0)
LoadDBCheckState(hwndDlg, settings[i].idCtrl, settings[i].szSetName, 0);
@@ -97,8 +95,6 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDC_GROUP_MIRANDA:
case IDC_GROUP_MIRANDA_VERSION:
case IDC_GROUP_MIRANDA_PACKS:
-// case IDC_GROUP_OVERLAYS_RESOURCE_ALT:
-
OptDlgChanged(hwndDlg, true);
break;
@@ -123,7 +119,6 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDC_GROUP_OVERLAYS_PLATFORM:
case IDC_GROUP_OVERLAYS_PROTO:
case IDC_GROUP_OVERLAYS_SECURITY:
-
OptDlgChanged(hwndDlg, false);
break;
@@ -133,15 +128,16 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP break;
case WM_NOTIFY:
- {
- NMHDR *hdr = (NMHDR *)lParam;
- if (hdr && hdr->code == PSN_APPLY) {
- for (int i = 0; i < SIZEOF(settings); i++)
- StoreDBCheckState(hwndDlg, settings[i].idCtrl, settings[i].szSetName);
+ NMHDR *hdr = (NMHDR *)lParam;
+ if (hdr && hdr->code == PSN_APPLY) {
+ for (int i = 0; i < SIZEOF(settings); i++)
+ StoreDBCheckState(hwndDlg, settings[i].idCtrl, settings[i].szSetName);
- ClearFI();
- RegisterIcons();
- }
+ ClearFI();
+ RegisterIcons();
+
+ for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ OnExtraImageApply((WPARAM)hContact, 0);
}
break;
}
|