diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/UserInfoEx/Res/resource.h | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/Res/resource.rc | 22 | ||||
-rw-r--r-- | plugins/UserInfoEx/init.cpp | 123 | ||||
-rw-r--r-- | plugins/UserInfoEx/psp_options.cpp | 3 | ||||
-rw-r--r-- | plugins/UserInfoEx/svc_constants.h | 1 | ||||
-rw-r--r-- | plugins/UserInfoEx/svc_contactinfo.cpp | 29 | ||||
-rw-r--r-- | plugins/UserInfoEx/svc_homepage.cpp | 47 |
7 files changed, 95 insertions, 132 deletions
diff --git a/plugins/UserInfoEx/Res/resource.h b/plugins/UserInfoEx/Res/resource.h index 8958ebfbb3..1419fcc501 100644 --- a/plugins/UserInfoEx/Res/resource.h +++ b/plugins/UserInfoEx/Res/resource.h @@ -181,9 +181,7 @@ #define TXT_HISTORY1 1551
#define GROUP_STATS 1553
#define BTN_BROWSEDIR 1555
-#define CHECK_OPT_GETCONTACTINFO_ENABLED 1560
#define CHECK_OPT_AUTOTIMEZONE 1561
-#define CHECK_OPT_GETCONTACTINFO_ENABLED2 1562
#define CHECK_OPT_SREMAIL_ENABLED 1562
#define CHECK_OPT_SENDSMS_MENUITEMS3 1563
#define IDNONE 1565
diff --git a/plugins/UserInfoEx/Res/resource.rc b/plugins/UserInfoEx/Res/resource.rc index f2dd16759e..167327e714 100644 --- a/plugins/UserInfoEx/Res/resource.rc +++ b/plugins/UserInfoEx/Res/resource.rc @@ -15,10 +15,8 @@ // Neutral resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
-#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-#pragma code_page(1252)
-#endif //_WIN32
+#pragma code_page(1251)
/////////////////////////////////////////////////////////////////////////////
//
@@ -345,11 +343,9 @@ BEGIN GROUPBOX "MetaContacts",STATIC_OPT_METAGROUP,3,52,303,32
CONTROL "Scan SubContacts for missing information",CHECK_OPT_METASCAN,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,67,290,10
- CONTROL "Enable extended 'GetContactInfo' module (*)",CHECK_OPT_GETCONTACTINFO_ENABLED,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,93,275,10
CONTROL "Enable extended 'send/receive email' service (*)",CHECK_OPT_SREMAIL_ENABLED,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,107,275,10
- CONTROL "Use Windows Timezone",CHECK_OPT_AUTOTIMEZONE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,122,275,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,91,275,10
+ CONTROL "Use Windows Timezone",CHECK_OPT_AUTOTIMEZONE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,106,275,10
LTEXT "(*) Requires Miranda to be restarted.",IDC_STATIC,11,207,167,8
PUSHBUTTON "Reset factory defaults",BTN_OPT_RESET,209,204,95,14
END
@@ -571,13 +567,17 @@ CURSOR_ADDGROUP CURSOR "dragcopy.cur" //
#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
+GUIDELINES DESIGNINFO
BEGIN
IDD_OPT_REMINDER, DIALOG
BEGIN
VERTGUIDE, 144
VERTGUIDE, 290
END
+
+ IDD_OPT_ADVANCED, DIALOG
+ BEGIN
+ END
END
#endif // APSTUDIO_INVOKED
@@ -586,13 +586,11 @@ END /////////////////////////////////////////////////////////////////////////////
-// Deutsch (Deutschland) resources
+// German (Germany) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
-#ifdef _WIN32
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
#pragma code_page(1252)
-#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
@@ -624,7 +622,7 @@ END //
IDB_FLAGSPNG PNG "flags.png"
-#endif // Deutsch (Deutschland) resources
+#endif // German (Germany) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/UserInfoEx/init.cpp b/plugins/UserInfoEx/init.cpp index c146193354..514260af99 100644 --- a/plugins/UserInfoEx/init.cpp +++ b/plugins/UserInfoEx/init.cpp @@ -292,74 +292,71 @@ extern "C" INT __declspec(dllexport) Unload(VOID) **/
extern "C" INT __declspec(dllexport) Load(void)
{
+ mir_getLP(&pluginInfo);
+ if ( !CoreCheck())
+ return 1;
+
+ // init common controls
INITCOMMONCONTROLSEX ccEx;
+ ccEx.dwSize = sizeof(ccEx);
+ ccEx.dwICC = ICC_WIN95_CLASSES|ICC_DATE_CLASSES;
+ InitCommonControlsEx(&ccEx);
+ ZeroMemory(&myGlobals, sizeof(MGLOBAL));
- mir_getLP(&pluginInfo);
- if (CoreCheck())
+ // init clist interface
+ pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)0);
+
+ // init new miranda timezone interface
+ mir_getTMI(&tmi);
+
+ // init freeimage interface
+ INT_PTR result = CALLSERVICE_NOTFOUND;
+ if(ServiceExists(MS_IMG_GETINTERFACE))
+ result = CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&FIP);
+
+ if(FIP == NULL || result != S_OK) {
+ MessageBoxEx(NULL, TranslateT("Fatal error, image services not found. Flags Module will be disabled."), _T("Error"), MB_OK | MB_ICONERROR | MB_APPLMODAL, 0);
+ return 1;
+ }
+
+ if (IsWinVerVistaPlus())
{
- // init common controls
- ccEx.dwSize = sizeof(ccEx);
- ccEx.dwICC = ICC_WIN95_CLASSES|ICC_DATE_CLASSES;
- InitCommonControlsEx(&ccEx);
-
- ZeroMemory(&myGlobals, sizeof(MGLOBAL));
-
- // init clist interface
- pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)0);
-
- // init new miranda timezone interface
- mir_getTMI(&tmi);
-
- // init freeimage interface
- INT_PTR result = CALLSERVICE_NOTFOUND;
- if(ServiceExists(MS_IMG_GETINTERFACE))
- result = CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&FIP);
-
- if(FIP == NULL || result != S_OK) {
- MessageBoxEx(NULL, TranslateT("Fatal error, image services not found. Flags Module will be disabled."), _T("Error"), MB_OK | MB_ICONERROR | MB_APPLMODAL, 0);
- return 1;
- }
-
- if (IsWinVerVistaPlus())
- {
- HMODULE hDwmApi = LoadLibraryA("dwmapi.dll");
- if (hDwmApi)
- dwmIsCompositionEnabled = (pfnDwmIsCompositionEnabled)GetProcAddress(hDwmApi,"DwmIsCompositionEnabled");
- }
-
- // check for dbx_tree
- myGlobals.UseDbxTree = ServiceExists("DBT/Entity/GetRoot");
-
- // load icon library
- IcoLib_LoadModule();
-
- SvcFlagsLoadModule();
- tmi.getTimeZoneTime ? SvcTimezoneLoadModule() : SvcTimezoneLoadModule_old();
- SvcContactInfoLoadModule();
- SvcEMailLoadModule();
- SvcRefreshContactInfoLoadModule();
-
- CtrlContactLoadModule();
- // load my button class
- CtrlButtonLoadModule();
- // initializes the Ex/Import Services
- SvcExImport_LoadModule();
- // load the UserInfoPropertySheet module
- DlgContactInfoLoadModule();
-
- // Anniversary stuff
- DlgAnniversaryListLoadModule();
- SvcReminderLoadModule();
-
- // Now the module is loaded! Start initializing certain things
- ghModulesLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- ghTopToolBarLoaded = HookEvent(ME_TTB_MODULELOADED, OnTopToolBarLoaded);
- ghModernToolBarLoaded = HookEvent(ME_TB_MODULELOADED, OnModernToolBarLoaded);
- ghShutdownHook = HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
- return 0;
+ HMODULE hDwmApi = LoadLibraryA("dwmapi.dll");
+ if (hDwmApi)
+ dwmIsCompositionEnabled = (pfnDwmIsCompositionEnabled)GetProcAddress(hDwmApi,"DwmIsCompositionEnabled");
}
- return 1;
+
+ // check for dbx_tree
+ myGlobals.UseDbxTree = ServiceExists("DBT/Entity/GetRoot");
+
+ // load icon library
+ IcoLib_LoadModule();
+
+ SvcFlagsLoadModule();
+ tmi.getTimeZoneTime ? SvcTimezoneLoadModule() : SvcTimezoneLoadModule_old();
+ SvcContactInfoLoadModule();
+ SvcEMailLoadModule();
+ SvcRefreshContactInfoLoadModule();
+
+ CtrlContactLoadModule();
+ // load my button class
+ CtrlButtonLoadModule();
+ // initializes the Ex/Import Services
+ SvcExImport_LoadModule();
+ // load the UserInfoPropertySheet module
+ DlgContactInfoLoadModule();
+
+ // Anniversary stuff
+ DlgAnniversaryListLoadModule();
+ SvcReminderLoadModule();
+
+ // Now the module is loaded! Start initializing certain things
+ ghModulesLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
+ ghTopToolBarLoaded = HookEvent(ME_TTB_MODULELOADED, OnTopToolBarLoaded);
+ ghModernToolBarLoaded = HookEvent(ME_TB_MODULELOADED, OnModernToolBarLoaded);
+ ghShutdownHook = HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
+ return 0;
}
/**
diff --git a/plugins/UserInfoEx/psp_options.cpp b/plugins/UserInfoEx/psp_options.cpp index 3d0427ecba..9399e90f63 100644 --- a/plugins/UserInfoEx/psp_options.cpp +++ b/plugins/UserInfoEx/psp_options.cpp @@ -688,7 +688,6 @@ static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam DBGetCheckBtn(hDlg, CHECK_OPT_ICOVERSION, SET_ICONS_CHECKFILEVERSION, TRUE);
DBGetCheckBtn(hDlg, CHECK_OPT_BUTTONICONS, SET_ICONS_BUTTONS, TRUE);
DBGetCheckBtn(hDlg, CHECK_OPT_METASCAN, SET_META_SCAN, TRUE);
- DBGetCheckBtn(hDlg, CHECK_OPT_GETCONTACTINFO_ENABLED, SET_GETCONTACTINFO_ENABLED, DEFVAL_GETCONTACTINFO_ENABLED);
DBGetCheckBtn(hDlg, CHECK_OPT_SREMAIL_ENABLED, SET_EXTENDED_EMAILSERVICE, TRUE);
if(tmi.getTimeZoneTime) {
CheckDlgButton(hDlg, CHECK_OPT_AUTOTIMEZONE, TRUE);
@@ -707,7 +706,6 @@ static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam DBWriteCheckBtn(hDlg, CHECK_OPT_BUTTONICONS, SET_ICONS_BUTTONS);
DBWriteCheckBtn(hDlg, CHECK_OPT_METASCAN, SET_META_SCAN);
- DBWriteCheckBtn(hDlg, CHECK_OPT_GETCONTACTINFO_ENABLED, SET_GETCONTACTINFO_ENABLED);
DBWriteCheckBtn(hDlg, CHECK_OPT_SREMAIL_ENABLED, SET_EXTENDED_EMAILSERVICE);
if (!tmi.getTimeZoneTime) {
DBWriteCheckBtn(hDlg, CHECK_OPT_AUTOTIMEZONE, SET_OPT_AUTOTIMEZONE);
@@ -725,7 +723,6 @@ static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam case CHECK_OPT_ICOVERSION:
case CHECK_OPT_BUTTONICONS:
case CHECK_OPT_METASCAN:
- case CHECK_OPT_GETCONTACTINFO_ENABLED:
case CHECK_OPT_SREMAIL_ENABLED:
case CHECK_OPT_AUTOTIMEZONE:
{
diff --git a/plugins/UserInfoEx/svc_constants.h b/plugins/UserInfoEx/svc_constants.h index 1ea761e770..d2c5a5c135 100644 --- a/plugins/UserInfoEx/svc_constants.h +++ b/plugins/UserInfoEx/svc_constants.h @@ -71,7 +71,6 @@ Last change by : $Author: ing.u.horn $ #define SET_MI_STATUS "miStatus"
#define SET_MI_ACCOUNT "miAccount"
-#define SET_GETCONTACTINFO_ENABLED "ExtendedCIS"
#define SET_EXTENDED_EMAILSERVICE "emailEx"
#define SET_CLIST_EXTRAICON_GENDER "GenderColumn"
#define SET_CLIST_EXTRAICON_GENDER2 "cliGender"
diff --git a/plugins/UserInfoEx/svc_contactinfo.cpp b/plugins/UserInfoEx/svc_contactinfo.cpp index 06053e8e7f..6a54880e67 100644 --- a/plugins/UserInfoEx/svc_contactinfo.cpp +++ b/plugins/UserInfoEx/svc_contactinfo.cpp @@ -780,24 +780,19 @@ static INT OnSettingChanged(WPARAM wParam, LPARAM lParam) VOID SvcContactInfoLoadModule()
{
CreateServiceFunction(MS_DB_CONTACT_GETSETTING_STR_EX, GetContactSettingStrExService);
+ CreateServiceFunction(MS_CONTACT_GETCONTACTINFO, GetContactInfo);
- if (DB::Setting::GetByte(SET_GETCONTACTINFO_ENABLED, DEFVAL_GETCONTACTINFO_ENABLED))
- {
- if (!myDestroyServiceFunction(MS_CONTACT_GETCONTACTINFO)) {
- if (CreateServiceFunction(MS_CONTACT_GETCONTACTINFO, GetContactInfo)) {
- DBVARIANT dbv;
- if (DB::Setting::GetAString(NULL, "Contact", "NameOrder", &dbv)) {
- BYTE i;
- for (i = 0; i < NAMEORDERCOUNT; i++) {
- gNameOrder[i] = i;
- }
- }
- else {
- memcpy(gNameOrder, dbv.pbVal, dbv.cpbVal);
- DB::Variant::Free(&dbv);
- }
- HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnSettingChanged);
- }
+ DBVARIANT dbv;
+ if (DB::Setting::GetAString(NULL, "Contact", "NameOrder", &dbv)) {
+ BYTE i;
+ for (i = 0; i < NAMEORDERCOUNT; i++) {
+ gNameOrder[i] = i;
}
}
+ else {
+ memcpy(gNameOrder, dbv.pbVal, dbv.cpbVal);
+ DB::Variant::Free(&dbv);
+ }
+
+ HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnSettingChanged);
}
diff --git a/plugins/UserInfoEx/svc_homepage.cpp b/plugins/UserInfoEx/svc_homepage.cpp index 52b6e799e3..77248960ac 100644 --- a/plugins/UserInfoEx/svc_homepage.cpp +++ b/plugins/UserInfoEx/svc_homepage.cpp @@ -205,40 +205,19 @@ VOID SvcHomepageRebuildMenu() {
static HANDLE hPrebuildMenuHook = NULL;
- if (DB::Setting::GetByte(SET_GETCONTACTINFO_ENABLED, DEFVAL_GETCONTACTINFO_ENABLED))
- {
-
- if (!hPrebuildMenuHook)
- {
- hPrebuildMenuHook = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnPreBuildMenu);
- }
-
- if (!ghMenuItem)
- {
- CLISTMENUITEM mi;
-
- // insert contact menuitem
- ZeroMemory(&mi, sizeof(mi));
- mi.cbSize = sizeof(mi);
- mi.position = -2000010000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_GOTO);
- mi.pszName = "&Homepage";
- mi.pszService = MS_USERINFO_HOMEPAGE_OPENURL;
- ghMenuItem = Menu_AddContactMenuItem(&mi);
- }
- }
- else
- {
- if (hPrebuildMenuHook)
- {
- UnhookEvent(ME_CLIST_PREBUILDCONTACTMENU);
- hPrebuildMenuHook = NULL;
- }
- if (ghMenuItem)
- {
- CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)ghMenuItem, NULL);
- ghMenuItem = NULL;
- }
+ if (!hPrebuildMenuHook)
+ hPrebuildMenuHook = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnPreBuildMenu);
+
+ if (!ghMenuItem) {
+ // insert contact menuitem
+ CLISTMENUITEM mi = { 0 };
+ ZeroMemory(&mi, sizeof(mi));
+ mi.cbSize = sizeof(mi);
+ mi.position = -2000010000;
+ mi.hIcon = IcoLib_GetIcon(ICO_BTN_GOTO);
+ mi.pszName = "&Homepage";
+ mi.pszService = MS_USERINFO_HOMEPAGE_OPENURL;
+ ghMenuItem = Menu_AddContactMenuItem(&mi);
}
}
|