summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2012-11-04 17:50:00 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2012-11-04 17:50:00 +0000
commit0ffd13e1e6de76f47e1f4d0f32eba05e30bf6134 (patch)
tree7824ba061071cc9653d0a5b943ad3c6b1634b85e
parent4036afa9b54a8c3ccb84981eb248febc3dd4e7cf (diff)
completly removed support for clist modern icons
git-svn-id: http://svn.miranda-ng.org/main/trunk@2185 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/FingerPrintModPlus/fingerprint_mod_vs2010.vcxproj1
-rw-r--r--plugins/FingerPrintModPlus/res/resource.rc36
-rw-r--r--plugins/FingerPrintModPlus/src/fingerprint.cpp59
-rw-r--r--plugins/FingerPrintModPlus/src/global.h4
-rw-r--r--plugins/FingerPrintModPlus/src/main.cpp7
-rw-r--r--plugins/FingerPrintModPlus/src/options.cpp29
6 files changed, 31 insertions, 105 deletions
diff --git a/plugins/FingerPrintModPlus/fingerprint_mod_vs2010.vcxproj b/plugins/FingerPrintModPlus/fingerprint_mod_vs2010.vcxproj
index dfcea5c54b..f7bf5fcd3e 100644
--- a/plugins/FingerPrintModPlus/fingerprint_mod_vs2010.vcxproj
+++ b/plugins/FingerPrintModPlus/fingerprint_mod_vs2010.vcxproj
@@ -175,6 +175,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClInclude Include="res\resource.h" />
<ClInclude Include="src\resource.h" />
<ClInclude Include="src\version.h" />
<ClInclude Include="src\finger_groups.h" />
diff --git a/plugins/FingerPrintModPlus/res/resource.rc b/plugins/FingerPrintModPlus/res/resource.rc
index 1b6a847d51..96ce67b6fb 100644
--- a/plugins/FingerPrintModPlus/res/resource.rc
+++ b/plugins/FingerPrintModPlus/res/resource.rc
@@ -8,37 +8,35 @@
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
+
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
+// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
-#endif //_WIN32
#ifdef APSTUDIO_INVOKED
-
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
@@ -46,24 +44,28 @@ END
#endif // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
IDD_DIALOG DIALOGEX 0, 0, 314, 254
STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
GROUPBOX "Fingerprint icons",IDC_STATIC,0,0,156,238
- LTEXT "icon slot",IDC_STATIC,6,206,144,10
- COMBOBOX IDC_ADVICON,6,220,144,83,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP,WS_EX_CLIENTEDGE
CONTROL "Overlay#1",IDC_OVERLAY1,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,6,13,144,10
CONTROL "Overlay#2",IDC_OVERLAY2,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,6,23,144,10
CONTROL "Overlay#3",IDC_OVERLAY3,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,6,33,144,10
- CONTROL "Show Version as Overlay#2",IDC_VERSION,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,6,43,144,10
+ CONTROL "Show Version as Overlay#2",IDC_VERSION,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,6,43,144,10
GROUPBOX "Showing groups",IDC_STATIC,158,0,155,238
- CONTROL "Miranda",IDC_GROUPMIRANDA,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,164,13,144,10
+ CONTROL "Miranda",IDC_GROUPMIRANDA,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,164,13,144,10
CONTROL "Multi-Protocol",IDC_GROUPMULTI,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,164,23,144,10
CONTROL "Pack overlays",IDC_GROUPPACKS,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,164,33,144,10
- CONTROL "Others",IDC_GROUPOTHERS,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,164,43,144,10
- CONTROL "AIM",IDC_GROUPAIM,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,164,63,144,10
+ CONTROL "Others",IDC_GROUPOTHERS,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,164,43,144,10
+ CONTROL "AIM",IDC_GROUPAIM,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,164,63,144,10
CONTROL "Gadu-Gadu",IDC_GROUPGADU,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,164,73,144,10
CONTROL "ICQ",IDC_GROUPICQ,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,164,83,144,10
CONTROL "IRC",IDC_GROUPIRC,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,164,93,144,10
@@ -80,13 +82,14 @@ BEGIN
LTEXT "Note: Miranda NG will have to be restarted for changes to take effect.",IDC_OPTCHANGENOTE,0,240,302,10
END
-///////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
+GUIDELINES DESIGNINFO
BEGIN
IDD_DIALOG, DIALOG
BEGIN
@@ -98,7 +101,7 @@ BEGIN
END
#endif // APSTUDIO_INVOKED
-#endif // English (U.S.) resources
+#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
@@ -112,3 +115,4 @@ END
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
+
diff --git a/plugins/FingerPrintModPlus/src/fingerprint.cpp b/plugins/FingerPrintModPlus/src/fingerprint.cpp
index 89825499db..f89b51374a 100644
--- a/plugins/FingerPrintModPlus/src/fingerprint.cpp
+++ b/plugins/FingerPrintModPlus/src/fingerprint.cpp
@@ -133,28 +133,13 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
{
g_LPCodePage = CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);
- g_bExtraIcon_Register_ServiceExist = ServiceExists(MS_EXTRAICON_REGISTER);
- g_bCList_Extra_Set_Icon_ServiceExist = ServiceExists(MS_CLIST_EXTRA_SET_ICON);
-
//Hook necessary events
HookEvent(ME_SKIN2_ICONSCHANGED, OnIconsChanged);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnContactSettingChanged);
HookEvent(ME_OPT_INITIALISE, OnOptInitialise);
- if (g_bExtraIcon_Register_ServiceExist) {
- EXTRAICON_INFO ico = { 0 };
-
- ico.cbSize = sizeof(ico);
- ico.type = EXTRAICON_TYPE_CALLBACK;
- ico.RebuildIcons = OnExtraIconListRebuild;
- ico.ApplyIcon = OnExtraImageApply;
- ico.OnClick = (MIRANDAHOOKPARAM)OnExtraIconClick;
- ico.name = "Client";
- ico.description= "Fingerprint";
- ico.descIcon = "client_Miranda_Unknown";
- hExtraIcon = (HANDLE)CallService(MS_EXTRAICON_REGISTER, (WPARAM)&ico, 0);
- }
- else InitFingerEvents();
+ hExtraIcon = ExtraIcon_Register("Client","Fingerprint","client_Miranda_Unknown",
+ OnExtraIconListRebuild,OnExtraImageApply,OnExtraIconClick);
if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) {
hIconFolder = FoldersRegisterCustomPathT("Fingerprint", "Icons", _T(MIRANDA_PATH) _T("\\") DEFAULT_SKIN_FOLDER);
@@ -166,13 +151,6 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
return 0;
}
-int OnExtraIconClicked(WPARAM wParam, LPARAM lParam)
-{
- if (lParam == bColumn)
- CallService(MS_USERINFO_SHOWDIALOG, wParam, NULL);
- return 0;
-}
-
/* ApplyFingerprintImage
* 1)Try to find appropriate mask
* 2)Register icon in extraimage list if not yet registered (0xFF)
@@ -188,38 +166,13 @@ int FASTCALL ApplyFingerprintImage(HANDLE hContact, LPTSTR szMirVer)
if (szMirVer)
hImage = GetIconIndexFromFI(szMirVer);
- if (g_bCList_Extra_Set_Icon_ServiceExist && !g_bExtraIcon_Register_ServiceExist) {
- IconExtraColumn iec;
- WORD bColumn = DBGetContactSettingWord(NULL, "Finger", "Column", EXTRA_ICON_CLIENT);
-
- if (bColumn <= 0 || bColumn > EXTRA_ICON_COUNT)
- bColumn = EXTRA_ICON_CLIENT;
-
- iec.cbSize = sizeof(IconExtraColumn);
- iec.hImage = hImage;
- iec.ColumnType = bColumn;
-
- CallService(MS_CLIST_EXTRA_SET_ICON, (WPARAM)hContact, (LPARAM)&iec);
- }
- else if (g_bExtraIcon_Register_ServiceExist && hExtraIcon != INVALID_HANDLE_VALUE && hExtraIcon != NULL) {
- EXTRAICON ei = { 0 };
- ei.cbSize = sizeof(ei);
- ei.hExtraIcon = hExtraIcon;
- ei.hContact = hContact;
- ei.hImage = hImage;
- CallService(MS_EXTRAICON_SET_ICON, (WPARAM)&ei, 0);
- }
+ if (hExtraIcon != INVALID_HANDLE_VALUE && hExtraIcon != NULL)
+ ExtraIcon_SetIcon(hExtraIcon,hContact,hImage);
+
return 0;
}
-void InitFingerEvents()
-{
- HookEvent(ME_CLIST_EXTRA_CLICK, OnExtraIconClicked);
- HookEvent(ME_CLIST_EXTRA_LIST_REBUILD, OnExtraIconListRebuild);
- HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, OnExtraImageApply);
-}
-
-int OnExtraIconClick(WPARAM wParam, LPARAM lParam)
+int OnExtraIconClick(WPARAM wParam, LPARAM lParam,LPARAM)
{
CallService(MS_USERINFO_SHOWDIALOG, wParam, NULL);
return 0;
diff --git a/plugins/FingerPrintModPlus/src/global.h b/plugins/FingerPrintModPlus/src/global.h
index 7978721cf4..f4971c1cee 100644
--- a/plugins/FingerPrintModPlus/src/global.h
+++ b/plugins/FingerPrintModPlus/src/global.h
@@ -131,11 +131,10 @@ typedef struct _foundInfo
#define DEFAULT_SKIN_FOLDER _T("Icons\\Fp_ClientIcons")
-void InitFingerEvents();
void FASTCALL ClearFI();
int OnIconsChanged(WPARAM wParam, LPARAM lParam);
-int OnExtraIconClick(WPARAM wParam, LPARAM lParam);
+int OnExtraIconClick(WPARAM wParam, LPARAM lParam,LPARAM);
int OnExtraIconListRebuild(WPARAM wParam, LPARAM lParam);
int OnExtraImageApply(WPARAM wParam, LPARAM lParam);
int OnContactSettingChanged(WPARAM wParam, LPARAM lParam);
@@ -164,7 +163,6 @@ void RegisterIcons();
#define WildCompare WildCompareW
#define GetIconsIndexes GetIconsIndexesW
-extern int g_bExtraIcon_Register_ServiceExist, g_bCList_Extra_Set_Icon_ServiceExist;
extern HINSTANCE g_hInst;
extern HANDLE hHeap;
extern LPSTR g_szClientDescription;
diff --git a/plugins/FingerPrintModPlus/src/main.cpp b/plugins/FingerPrintModPlus/src/main.cpp
index c2073b7098..4de8a793a2 100644
--- a/plugins/FingerPrintModPlus/src/main.cpp
+++ b/plugins/FingerPrintModPlus/src/main.cpp
@@ -24,15 +24,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define LIB_REG 2
#define LIB_USE 3
-#define REGISTER_BETA
-
HINSTANCE g_hInst;
int hLangpack;
HANDLE hHeap = NULL;
-HANDLE hExtraImageListRebuild = NULL; // hook event handle for ME_CLIST_EXTRA_LIST_REBUILD
-HANDLE hExtraImageApply = NULL; // hook event handle for ME_CLIST_EXTRA_IMAGE_APPLY
-HANDLE hExtraIconClick = NULL; // hook event handle for ME_CLIST_EXTRA_CLICK
HANDLE compClientServA = NULL;
HANDLE getClientIconA = NULL;
@@ -43,8 +38,6 @@ LPSTR g_szClientDescription = NULL;
HANDLE hStaticHooks[1] = { NULL };
-int g_bExtraIcon_Register_ServiceExist = FALSE, g_bCList_Extra_Set_Icon_ServiceExist = FALSE;
-
//End of header
// PluginInfo & PluginInfoEx
diff --git a/plugins/FingerPrintModPlus/src/options.cpp b/plugins/FingerPrintModPlus/src/options.cpp
index c1d3e5230c..8d6378053b 100644
--- a/plugins/FingerPrintModPlus/src/options.cpp
+++ b/plugins/FingerPrintModPlus/src/options.cpp
@@ -83,26 +83,6 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP
else
LoadDBCheckState(hwndDlg, settings[i].idCtrl, settings[i].szSetName, 1);
}
- LPTSTR CIdComboBox[] =
- {
- _T("Email"),
- _T("Protocol"),
- _T("SMS"),
- _T("Advanced 1"),
- _T("Advanced 2"),
- _T("Web"),
- _T("Client (default)"),
- _T("VisMode"),
- _T("Advanced 3"),
- _T("Advanced 4")
- };
-
- for(int i = 0; i < SIZEOF(CIdComboBox); i++)
- ComboBoxAddString(GetDlgItem(hwndDlg, IDC_ADVICON), CIdComboBox[i], i);
-
- SendDlgItemMessage(hwndDlg, IDC_ADVICON, CB_SETCURSEL, (DBGetContactSettingWord(NULL, "Finger", "Column", EXTRA_ICON_CLIENT)) - 1, 0);
- if (g_bExtraIcon_Register_ServiceExist)
- EnableWindow(GetDlgItem(hwndDlg, IDC_ADVICON), FALSE);
ShowWindow(GetDlgItem(hwndDlg, IDC_OPTCHANGENOTE), SW_HIDE);
}
@@ -151,9 +131,6 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP
{
NMHDR *hdr = (NMHDR *)lParam;
if (hdr && hdr->code == PSN_APPLY) {
- int i = SendDlgItemMessage(hwndDlg, IDC_ADVICON, CB_GETCURSEL, 0, 0) + 1;
- DBWriteContactSettingWord(NULL, "Finger", "Column", (WORD)i);
-
for (int i = 0; i < SIZEOF(settings); i++)
StoreDBCheckState(hwndDlg, settings[i].idCtrl, settings[i].szSetName);
@@ -171,11 +148,11 @@ int OnOptInitialise(WPARAM wParam, LPARAM lParam)
OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.hInstance = g_hInst;
- odp.pszGroup = LPGEN("Customize");
+ odp.ptszGroup = LPGENT("Customize");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_DIALOG);
- odp.pszTitle = LPGEN("Fingerprint");
+ odp.ptszTitle = LPGENT("Fingerprint");
odp.pfnDlgProc = DlgProcOptions;
- odp.flags = ODPF_BOLDGROUPS;
+ odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;;
Options_AddPage(wParam, &odp);
return 0;
}