summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-06 22:24:29 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-06 22:24:29 +0000
commit75822327172aac61e3834ebdeb91f799c210345c (patch)
treef0cb8ea63cfeac43b34af12aed765de2b4d60966 /src
parentb8a20c7e3e0dca06effc09868bc5cf1702be30cf (diff)
fix for the problem with UserInfoEx
git-svn-id: http://svn.miranda-ng.org/main/trunk@804 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/core/modules.cpp2
-rw-r--r--src/core/stduserinfo/contacts.cpp (renamed from src/modules/contacts/contacts.cpp)12
-rw-r--r--src/core/stduserinfo/main.cpp2
-rw-r--r--src/core/stduserinfo/resource.rc18
-rw-r--r--src/core/stduserinfo/stduserinfo_10.vcxproj1
-rw-r--r--src/core/stduserinfo/stduserinfo_10.vcxproj.filters3
-rw-r--r--src/miranda32_10.vcxproj3
-rw-r--r--src/miranda32_10.vcxproj.filters6
-rw-r--r--src/modules/plugins/newplugins.cpp10
-rw-r--r--src/resource.rc18
10 files changed, 37 insertions, 38 deletions
diff --git a/src/core/modules.cpp b/src/core/modules.cpp
index 2a02103a10..a18c758f3d 100644
--- a/src/core/modules.cpp
+++ b/src/core/modules.cpp
@@ -57,7 +57,6 @@ int LoadAddContactModule(void); // ui: authcontrol contacts
int LoadUtilsModule(void); // ui: utils (has a few window classes, like HyperLink)
int LoadCLCModule(void); // window class: CLC control
int LoadButtonModule(void); // window class: button class
-int LoadContactsModule(void); // random: contact
int LoadFontserviceModule(void); // ui: font manager
int LoadIcoLibModule(void); // ui: icons manager
int LoadServiceModePlugin(void);
@@ -118,7 +117,6 @@ int LoadDefaultModules(void)
NetlibInitSsl();
if ( LoadProtocolsModule()) return 1;
LoadDbAccounts(); // retrieves the account array from a database
- if ( LoadContactsModule()) return 1;
if ( LoadContactListModule()) return 1;
if ( LoadAddContactModule()) return 1;
if ( LoadNewPluginsModule()) return 1; // will call Load(void) on everything, clist will load first
diff --git a/src/modules/contacts/contacts.cpp b/src/core/stduserinfo/contacts.cpp
index dbdd874fbb..03c546b64c 100644
--- a/src/modules/contacts/contacts.cpp
+++ b/src/core/stduserinfo/contacts.cpp
@@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "..\..\core\commonheaders.h"
+#include "commonheaders.h"
#define NAMEORDERCOUNT 8
static TCHAR* nameOrderDescr[ NAMEORDERCOUNT ] =
@@ -34,12 +34,12 @@ BYTE nameOrder[NAMEORDERCOUNT];
static int GetDatabaseString(CONTACTINFO *ci, const char* setting, DBVARIANT* dbv)
{
- if (strcmp(ci->szProto, "CList") && CallProtoServiceInt(NULL,ci->szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_INFOSETTINGSVC)
+ if (strcmp(ci->szProto, "CList") && CallProtoService(ci->szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_INFOSETTINGSVC)
{
DBCONTACTGETSETTING cgs = { ci->szProto, setting, dbv };
dbv->type = (ci->dwFlag & CNF_UNICODE) ? DBVT_WCHAR : DBVT_ASCIIZ;
- int res = CallProtoServiceInt(NULL,ci->szProto, PS_GETINFOSETTING, (WPARAM)ci->hContact, (LPARAM)&cgs);
+ int res = CallProtoService(ci->szProto, PS_GETINFOSETTING, (WPARAM)ci->hContact, (LPARAM)&cgs);
if (res != CALLSERVICE_NOTFOUND) return res;
}
@@ -197,7 +197,7 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) {
case CNF_UNIQUEID:
{
- char *uid = (char*)CallProtoServiceInt(NULL,ci->szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
+ char *uid = (char*)CallProtoService(ci->szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if ((INT_PTR)uid != CALLSERVICE_NOTFOUND && uid)
if ( !ProcessDatabaseValueDefault(ci, uid))
return 0;
@@ -208,7 +208,7 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) {
{
if ( !ProcessDatabaseValueDefault(ci, "display_uid"))
return 0;
- char *uid = (char*)CallProtoServiceInt(NULL,ci->szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
+ char *uid = (char*)CallProtoService(ci->szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if ((INT_PTR)uid != CALLSERVICE_NOTFOUND && uid)
if ( !ProcessDatabaseValueDefault(ci, uid))
return 0;
@@ -252,7 +252,7 @@ static INT_PTR GetContactInfo(WPARAM, LPARAM lParam) {
case 5: // Unique id
{
// protocol must define a PFLAG_UNIQUEIDSETTING
- char *uid = (char*)CallProtoServiceInt(NULL,ci->szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
+ char *uid = (char*)CallProtoService(ci->szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if ((INT_PTR)uid != CALLSERVICE_NOTFOUND && uid) {
if ( !GetDatabaseString(ci, uid, &dbv)) {
if (dbv.type == DBVT_BYTE || dbv.type == DBVT_WORD || dbv.type == DBVT_DWORD) {
diff --git a/src/core/stduserinfo/main.cpp b/src/core/stduserinfo/main.cpp
index 88ed31e921..8b413abab4 100644
--- a/src/core/stduserinfo/main.cpp
+++ b/src/core/stduserinfo/main.cpp
@@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "commonheaders.h"
int LoadUserInfoModule(void);
+int LoadContactsModule(void);
CLIST_INTERFACE* pcli;
TIME_API tmi;
@@ -75,6 +76,7 @@ extern "C" int __declspec(dllexport) Load(void)
enableThemeDialogTexture = (pfnEnableThemeDialogTexture)GetProcAddress(hThemeAPI, "EnableThemeDialogTexture");
}
+ LoadContactsModule();
LoadUserInfoModule();
return 0;
}
diff --git a/src/core/stduserinfo/resource.rc b/src/core/stduserinfo/resource.rc
index 4b2a37b640..0c483813c5 100644
--- a/src/core/stduserinfo/resource.rc
+++ b/src/core/stduserinfo/resource.rc
@@ -187,6 +187,16 @@ BEGIN
CONTROL "",IDC_WEBPAGE,"Hyperlink",WS_TABSTOP,57,109,160,8
END
+IDD_OPT_CONTACT DIALOGEX 0, 0, 199, 147
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ GROUPBOX "Contact Display Options",IDC_STATIC,13,7,176,133
+ LTEXT "Instead of displaying contacts by their nickname, drag to choose another order:",IDC_STATIC,19,17,165,27
+ CONTROL "Tree1",IDC_NAMEORDER,"SysTreeView32",TVS_NOTOOLTIPS | TVS_FULLROWSELECT | WS_BORDER | WS_HSCROLL | WS_TABSTOP,19,48,164,86
+END
+
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
@@ -272,6 +282,14 @@ BEGIN
TOPMARGIN, 5
BOTTOMMARGIN, 86
END
+
+ IDD_OPT_CONTACT, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 192
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 140
+ END
END
#endif // APSTUDIO_INVOKED
diff --git a/src/core/stduserinfo/stduserinfo_10.vcxproj b/src/core/stduserinfo/stduserinfo_10.vcxproj
index 7f0d57e336..c2b06c9637 100644
--- a/src/core/stduserinfo/stduserinfo_10.vcxproj
+++ b/src/core/stduserinfo/stduserinfo_10.vcxproj
@@ -201,6 +201,7 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="contactinfo.cpp" />
+ <ClCompile Include="contacts.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="stdinfo.cpp" />
<ClCompile Include="userinfo.cpp" />
diff --git a/src/core/stduserinfo/stduserinfo_10.vcxproj.filters b/src/core/stduserinfo/stduserinfo_10.vcxproj.filters
index ac101b1384..abd2924e59 100644
--- a/src/core/stduserinfo/stduserinfo_10.vcxproj.filters
+++ b/src/core/stduserinfo/stduserinfo_10.vcxproj.filters
@@ -30,6 +30,9 @@
<ClCompile Include="userinfo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="contacts.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\stdplug.h">
diff --git a/src/miranda32_10.vcxproj b/src/miranda32_10.vcxproj
index 36b42b7b1f..29f16a6394 100644
--- a/src/miranda32_10.vcxproj
+++ b/src/miranda32_10.vcxproj
@@ -289,9 +289,6 @@
<ClCompile Include="modules\button\button.cpp">
<PrecompiledHeaderFile>..\..\core\commonheaders.h</PrecompiledHeaderFile>
</ClCompile>
- <ClCompile Include="modules\contacts\contacts.cpp">
- <PrecompiledHeaderFile>..\..\core\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
<ClCompile Include="modules\database\database.cpp">
<PrecompiledHeaderFile>..\..\core\commonheaders.h</PrecompiledHeaderFile>
</ClCompile>
diff --git a/src/miranda32_10.vcxproj.filters b/src/miranda32_10.vcxproj.filters
index 3f127520ac..ab91bc3aca 100644
--- a/src/miranda32_10.vcxproj.filters
+++ b/src/miranda32_10.vcxproj.filters
@@ -16,9 +16,6 @@
<Filter Include="Modules\button">
<UniqueIdentifier>{880105c7-0ef2-41ee-9541-fe2c9e5a7679}</UniqueIdentifier>
</Filter>
- <Filter Include="Modules\contacts">
- <UniqueIdentifier>{3e919355-7099-4252-be9f-46e5b4f6bbc7}</UniqueIdentifier>
- </Filter>
<Filter Include="Modules\database">
<UniqueIdentifier>{a4463881-5b8c-497a-b5f4-5832dbc5fbfa}</UniqueIdentifier>
</Filter>
@@ -290,9 +287,6 @@
<ClCompile Include="modules\button\button.cpp">
<Filter>Modules\button</Filter>
</ClCompile>
- <ClCompile Include="modules\contacts\contacts.cpp">
- <Filter>Modules\contacts</Filter>
- </ClCompile>
<ClCompile Include="modules\database\database.cpp">
<Filter>Modules\database</Filter>
</ClCompile>
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp
index 7e4e9ac80c..24a4881521 100644
--- a/src/modules/plugins/newplugins.cpp
+++ b/src/modules/plugins/newplugins.cpp
@@ -333,12 +333,16 @@ int Plugin_UnloadDyn(pluginEntry* p)
}
// release default plugin
- if ( !(p->pclass & PCLASS_CORE))
+ bool bCore = (p->pclass & PCLASS_CORE) != 0;
+ Plugin_Uninit(p);
+
+ if ( !bCore )
for (int i=0; i < SIZEOF(pluginDefault); i++)
- if (pluginDefault[i].pImpl == p)
+ if (pluginDefault[i].pImpl == p) {
+ pluginDefault[i].pImpl = NULL;
LoadCorePlugin( pluginDefault[i] );
+ }
- Plugin_Uninit(p);
return TRUE;
}
diff --git a/src/resource.rc b/src/resource.rc
index 62fa74bcb3..c5e9920d6b 100644
--- a/src/resource.rc
+++ b/src/resource.rc
@@ -74,16 +74,6 @@ BEGIN
LTEXT "This will erase all history and settings for this contact!",IDC_STATIC,7,18,239,14
END
-IDD_OPT_CONTACT DIALOGEX 0, 0, 199, 147
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- GROUPBOX "Contact Display Options",IDC_STATIC,13,7,176,133
- LTEXT "Instead of displaying contacts by their nickname, drag to choose another order:",IDC_STATIC,19,17,165,27
- CONTROL "Tree1",IDC_NAMEORDER,"SysTreeView32",TVS_NOTOOLTIPS | TVS_FULLROWSELECT | WS_BORDER | WS_HSCROLL | WS_TABSTOP,19,48,164,86
-END
-
IDD_PROFILEMANAGER DIALOGEX 0, 0, 400, 211
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Miranda IM Profile Manager"
@@ -804,14 +794,6 @@ BEGIN
BOTTOMMARGIN, 88
END
- IDD_OPT_CONTACT, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 192
- TOPMARGIN, 7
- BOTTOMMARGIN, 140
- END
-
IDD_FINDADD, DIALOG
BEGIN
LEFTMARGIN, 5