summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-01-28 15:15:20 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-01-28 15:15:20 +0000
commitda2409530d8eaf35f33aa8bfe478431bbad3c308 (patch)
tree13ae14c218d93d7c1924eb38bd575c016e9321c5 /plugins
parente052320014294575690ff5310cc9898b0b3d0fb1 (diff)
added option for disabling unicode overlay
git-svn-id: http://svn.miranda-ng.org/main/trunk@3322 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/FingerprintNG/res/resource.rc25
-rw-r--r--plugins/FingerprintNG/src/finger_groups.h5
-rw-r--r--plugins/FingerprintNG/src/fingerprint.cpp12
-rw-r--r--plugins/FingerprintNG/src/global.h2
-rw-r--r--plugins/FingerprintNG/src/masks.cpp2
-rw-r--r--plugins/FingerprintNG/src/options.cpp7
-rw-r--r--plugins/FingerprintNG/src/resource.h1
7 files changed, 28 insertions, 26 deletions
diff --git a/plugins/FingerprintNG/res/resource.rc b/plugins/FingerprintNG/res/resource.rc
index ddf03f600a..553c5bf0ae 100644
--- a/plugins/FingerprintNG/res/resource.rc
+++ b/plugins/FingerprintNG/res/resource.rc
@@ -13,13 +13,6 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// English (United States) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-
-/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
@@ -51,7 +44,7 @@ END
1 TEXTINCLUDE
BEGIN
- "resource.h\0"
+ "..\\src\\resource.h\0"
END
2 TEXTINCLUDE
@@ -80,7 +73,7 @@ EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- GROUPBOX "Fingerprint overlays icons", IDC_STATIC,15,15,290,60
+ GROUPBOX "Fingerprint overlays icons", IDC_STATIC,15,15,290,60
CONTROL "Miranda clients", IDC_GROUP_MIRANDA, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,30,140,10
CONTROL "Miranda packs overlays", IDC_GROUP_MIRANDA_PACKS, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,40,140,10
@@ -90,9 +83,10 @@ BEGIN
CONTROL "Resource overlays", IDC_GROUP_OVERLAYS_RESOURCE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,30,120,10
CONTROL "Platform overlays", IDC_GROUP_OVERLAYS_PLATFORM, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,40,120,10
CONTROL "Protocols overlays", IDC_GROUP_OVERLAYS_PROTO, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,50,120,10
-// CONTROL "Secure overlays", IDC_GROUP_OVERLAYS_SECURITY, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,60,120,10
+ CONTROL "Unicode overlay", IDC_GROUP_OVERLAYS_UNICODE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,60,120,10
+// CONTROL "Secure overlays", IDC_GROUP_OVERLAYS_SECURITY, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,70,120,10
- GROUPBOX "Select protocols", IDC_STATIC,15,75,290,140
+ GROUPBOX "Select protocols", IDC_STATIC,15,75,290,140
CONTROL "AIM clients", IDC_GROUP_AIM, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,90,120,10
CONTROL "Gadu-Gadu clients", IDC_GROUP_GG, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,100,120,10
@@ -111,7 +105,6 @@ BEGIN
CONTROL "Multi-protocol clients", IDC_GROUP_MULTI, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,90,120,10
CONTROL "Other (rare) protocols", IDC_GROUP_OTHER_PROTOS, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,100,120,10
CONTROL "Other icons", IDC_GROUP_OTHERS, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,110,120,10
-// LTEXT "Note: Miranda NG will have to be restarted for changes to take effect.", IDC_OPTCHANGENOTE,30,240,290,10
END
@@ -133,11 +126,6 @@ BEGIN
END
#endif // APSTUDIO_INVOKED
-#endif // English (United States) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
@@ -146,5 +134,4 @@ END
/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+#endif // not APSTUDIO_INVOKED \ No newline at end of file
diff --git a/plugins/FingerprintNG/src/finger_groups.h b/plugins/FingerprintNG/src/finger_groups.h
index e1a4fa8959..e760bc8d31 100644
--- a/plugins/FingerprintNG/src/finger_groups.h
+++ b/plugins/FingerprintNG/src/finger_groups.h
@@ -98,6 +98,11 @@ case OVERLAYS_PLATFORM_CASE:
return _T("Client icons/Overlays/Platform");
break;
+case OVERLAYS_UNICODE_CASE:
+ if ( db_get_b(NULL, "Finger", "GroupOverlaysUnicode", 1))
+ return _T("Client icons/Overlays/Platform");
+ break;
+
case OVERLAYS_PROTO_CASE:
if ( db_get_b(NULL, "Finger", "GroupOverlaysProtos", 1))
return _T("Client icons/Overlays/Protocol");
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp
index a1866752be..8c92a6e6e2 100644
--- a/plugins/FingerprintNG/src/fingerprint.cpp
+++ b/plugins/FingerprintNG/src/fingerprint.cpp
@@ -115,8 +115,16 @@ void RegisterIcons()
Prepare(&def_kn_fp_overlays2_mask[i], false);
}
- for (i = 0; i < DEFAULT_KN_FP_OVERLAYS3_COUNT; i++)
- Prepare(&def_kn_fp_overlays3_mask[i], true);
+ if ( db_get_b(NULL, "Finger", "GroupOverlaysUnicode", 1)) {
+ for (i = 0; i < DEFAULT_KN_FP_OVERLAYS3_COUNT; i++)
+ Prepare(&def_kn_fp_overlays3_mask[i], true);
+ }
+ else {
+ for (i = 0; i < DEFAULT_KN_FP_OVERLAYS3_NO_UNICODE_COUNT; i++)
+ Prepare(&def_kn_fp_overlays3_mask[i], true);
+ for (; i < DEFAULT_KN_FP_OVERLAYS3_COUNT; i++)
+ Prepare(&def_kn_fp_overlays3_mask[i], false);
+ }
for (i = 0; i < DEFAULT_KN_FP_OVERLAYS4_COUNT; i++)
Prepare(&def_kn_fp_overlays4_mask[i], true);
diff --git a/plugins/FingerprintNG/src/global.h b/plugins/FingerprintNG/src/global.h
index 9a77bd82f4..ccd1bf8782 100644
--- a/plugins/FingerprintNG/src/global.h
+++ b/plugins/FingerprintNG/src/global.h
@@ -119,6 +119,7 @@ typedef struct _foundInfo
#define OVERLAYS_RESOURCE_CASE 3020 // resource overlays
#define OVERLAYS_PLATFORM_CASE 3021 // platforms overlays
#define OVERLAYS_PROTO_CASE 3022 // protocols overlays
+#define OVERLAYS_UNICODE_CASE 3023 // unicode overlay
//#define OVERLAYS_SECURITY_CASE 3023 // security overlays
/*
@@ -183,3 +184,4 @@ extern int DEFAULT_KN_FP_MASK_COUNT, DEFAULT_KN_FP_OVERLAYS_COUNT, DEFAULT_KN_FP
#define NOTFOUND_MASK_NUMBER (DEFAULT_KN_FP_MASK_COUNT - 3) // third from end
// the last count is how many masks from 2nd layer is used as Miranda version overlays (counting from the end)
#define DEFAULT_KN_FP_OVERLAYS2_NO_VER_COUNT (DEFAULT_KN_FP_OVERLAYS2_COUNT - 13)
+#define DEFAULT_KN_FP_OVERLAYS3_NO_UNICODE_COUNT (DEFAULT_KN_FP_OVERLAYS3_COUNT - 1)
diff --git a/plugins/FingerprintNG/src/masks.cpp b/plugins/FingerprintNG/src/masks.cpp
index c9c7f698ab..e7a09036e7 100644
--- a/plugins/FingerprintNG/src/masks.cpp
+++ b/plugins/FingerprintNG/src/masks.cpp
@@ -796,7 +796,7 @@ KN_FP_MASK def_kn_fp_overlays3_mask[] =
{"client_platform_x64", _T("|*x64*|*64*bit*"), _T("x64 overlay"), IDI_PLATFORM_X64, OVERLAYS_PLATFORM_CASE },
{"client_platform_x32", _T("|*x32*|*32*bit*|*x86*"), _T("x32 overlay"), IDI_PLATFORM_X32, OVERLAYS_PLATFORM_CASE },
- {"client_Unicode", _T("*unicode*"), _T("Unicode overlay"), IDI_UNICODE_CLIENT, OVERLAYS_PLATFORM_CASE },
+ {"client_Unicode", _T("*unicode*"), _T("Unicode overlay"), IDI_UNICODE_CLIENT, OVERLAYS_UNICODE_CASE },
};
int DEFAULT_KN_FP_OVERLAYS3_COUNT = SIZEOF(def_kn_fp_overlays3_mask);
diff --git a/plugins/FingerprintNG/src/options.cpp b/plugins/FingerprintNG/src/options.cpp
index a4978a8134..704627d9b8 100644
--- a/plugins/FingerprintNG/src/options.cpp
+++ b/plugins/FingerprintNG/src/options.cpp
@@ -51,6 +51,7 @@ static settings[] =
{IDC_GROUP_OVERLAYS_RESOURCE, "GroupOverlaysResource"},
{IDC_GROUP_OVERLAYS_PLATFORM, "GroupOverlaysPlatform"},
+ {IDC_GROUP_OVERLAYS_UNICODE, "GroupOverlaysUnicode"},
{IDC_GROUP_OVERLAYS_PROTO, "GroupOverlaysProtos"},
// {IDC_GROUP_OVERLAYS_SECURITY, "GroupOtherProtos"}
};
@@ -79,7 +80,7 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP
TranslateDialogDefault(hwndDlg);
{
for (int i = 0; i < SIZEOF(settings); i++) {
- if (lstrcmpA(settings[i].szSetName, "GroupMirandaVersion") == 0)
+ if (!lstrcmpA(settings[i].szSetName, "GroupMirandaVersion"))
LoadDBCheckState(hwndDlg, settings[i].idCtrl, settings[i].szSetName, 0);
else
LoadDBCheckState(hwndDlg, settings[i].idCtrl, settings[i].szSetName, 1);
@@ -95,9 +96,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:
- //OptDlgChanged(hwndDlg, true);
- //break;
-
case IDC_GROUP_MULTI:
case IDC_GROUP_AIM:
case IDC_GROUP_GG:
@@ -118,6 +116,7 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case IDC_GROUP_OVERLAYS_RESOURCE:
case IDC_GROUP_OVERLAYS_PLATFORM:
case IDC_GROUP_OVERLAYS_PROTO:
+ case IDC_GROUP_OVERLAYS_UNICODE:
// case IDC_GROUP_OVERLAYS_SECURITY:
//OptDlgChanged(hwndDlg, false);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
diff --git a/plugins/FingerprintNG/src/resource.h b/plugins/FingerprintNG/src/resource.h
index ae8b85ee6a..1b0e6e4cc8 100644
--- a/plugins/FingerprintNG/src/resource.h
+++ b/plugins/FingerprintNG/src/resource.h
@@ -681,6 +681,7 @@
#define IDC_GROUP_OVERLAYS_PLATFORM 10045
#define IDC_GROUP_OVERLAYS_PROTO 10046
#define IDC_GROUP_OVERLAYS_SECURITY 10047
+#define IDC_GROUP_OVERLAYS_UNICODE 10048
//#define IDC_GROUP_OVERLAYS_RESOURCE_ALT 10048