diff options
-rw-r--r-- | src/core/modules.cpp | 4 | ||||
-rw-r--r-- | src/core/stduserinfo/main.cpp | 2 | ||||
-rw-r--r-- | src/core/stduserinfo/resource.rc | 18 | ||||
-rw-r--r-- | src/core/stduserinfo/stduserinfo_10.vcxproj | 1 | ||||
-rw-r--r-- | src/core/stduserinfo/stduserinfo_10.vcxproj.filters | 3 | ||||
-rw-r--r-- | src/miranda32_10.vcxproj | 3 | ||||
-rw-r--r-- | src/miranda32_10.vcxproj.filters | 6 | ||||
-rw-r--r-- | src/modules/contacts/contacts.cpp (renamed from src/core/stduserinfo/contacts.cpp) | 12 | ||||
-rw-r--r-- | src/modules/plugins/newplugins.cpp | 12 | ||||
-rw-r--r-- | src/resource.rc | 18 |
10 files changed, 40 insertions, 39 deletions
diff --git a/src/core/modules.cpp b/src/core/modules.cpp index a18c758f3d..462d6b27c3 100644 --- a/src/core/modules.cpp +++ b/src/core/modules.cpp @@ -57,6 +57,7 @@ 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);
@@ -117,6 +118,7 @@ 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
@@ -131,7 +133,7 @@ int LoadDefaultModules(void) if ( LoadIgnoreModule()) return 1;
if ( LoadVisibilityModule()) return 1;
- for (int i=0; i < 10; i++) {
+ for (int i=1; i < 10; i++) {
if ( pluginDefault[i].pImpl )
continue;
diff --git a/src/core/stduserinfo/main.cpp b/src/core/stduserinfo/main.cpp index 8b413abab4..88ed31e921 100644 --- a/src/core/stduserinfo/main.cpp +++ b/src/core/stduserinfo/main.cpp @@ -22,7 +22,6 @@ 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;
@@ -76,7 +75,6 @@ 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 0c483813c5..4b2a37b640 100644 --- a/src/core/stduserinfo/resource.rc +++ b/src/core/stduserinfo/resource.rc @@ -187,16 +187,6 @@ 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
/////////////////////////////////////////////////////////////////////////////
@@ -282,14 +272,6 @@ 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 c2b06c9637..7f0d57e336 100644 --- a/src/core/stduserinfo/stduserinfo_10.vcxproj +++ b/src/core/stduserinfo/stduserinfo_10.vcxproj @@ -201,7 +201,6 @@ <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 abd2924e59..ac101b1384 100644 --- a/src/core/stduserinfo/stduserinfo_10.vcxproj.filters +++ b/src/core/stduserinfo/stduserinfo_10.vcxproj.filters @@ -30,9 +30,6 @@ <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 29f16a6394..36b42b7b1f 100644 --- a/src/miranda32_10.vcxproj +++ b/src/miranda32_10.vcxproj @@ -289,6 +289,9 @@ <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 ab91bc3aca..3f127520ac 100644 --- a/src/miranda32_10.vcxproj.filters +++ b/src/miranda32_10.vcxproj.filters @@ -16,6 +16,9 @@ <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>
@@ -287,6 +290,9 @@ <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/core/stduserinfo/contacts.cpp b/src/modules/contacts/contacts.cpp index 03c546b64c..dbdd874fbb 100644 --- a/src/core/stduserinfo/contacts.cpp +++ b/src/modules/contacts/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 "commonheaders.h"
+#include "..\..\core\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") && CallProtoService(ci->szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_INFOSETTINGSVC)
+ if (strcmp(ci->szProto, "CList") && CallProtoServiceInt(NULL,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 = CallProtoService(ci->szProto, PS_GETINFOSETTING, (WPARAM)ci->hContact, (LPARAM)&cgs);
+ int res = CallProtoServiceInt(NULL,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*)CallProtoService(ci->szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
+ char *uid = (char*)CallProtoServiceInt(NULL,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*)CallProtoService(ci->szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
+ char *uid = (char*)CallProtoServiceInt(NULL,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*)CallProtoService(ci->szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
+ char *uid = (char*)CallProtoServiceInt(NULL,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/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index 24a4881521..b6120c4e01 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -333,16 +333,12 @@ int Plugin_UnloadDyn(pluginEntry* p) }
// release default plugin
- bool bCore = (p->pclass & PCLASS_CORE) != 0;
- Plugin_Uninit(p);
-
- if ( !bCore )
+ if ( !(p->pclass & PCLASS_CORE))
for (int i=0; i < SIZEOF(pluginDefault); i++)
- if (pluginDefault[i].pImpl == p) {
- pluginDefault[i].pImpl = NULL;
+ if (pluginDefault[i].pImpl == p)
LoadCorePlugin( pluginDefault[i] );
- }
+ Plugin_Uninit(p);
return TRUE;
}
@@ -563,7 +559,7 @@ bool TryLoadPlugin(pluginEntry *p, bool bDynamic) for (int i=0; !equalUUID(miid_last, piface[i]); i++) {
int idx = getDefaultPluginIdx( piface[i] );
if (idx != -1 && pluginDefault[idx].pImpl) {
- if ( !bDynamic) {
+ if ( bModulesLoadedFired && !bDynamic) {
SetPluginOnWhiteList(p->pluginname, 0);
return false;
}
diff --git a/src/resource.rc b/src/resource.rc index c5e9920d6b..62fa74bcb3 100644 --- a/src/resource.rc +++ b/src/resource.rc @@ -74,6 +74,16 @@ 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"
@@ -794,6 +804,14 @@ BEGIN BOTTOMMARGIN, 88
END
+ IDD_OPT_CONTACT, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 192
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 140
+ END
+
IDD_FINDADD, DIALOG
BEGIN
LEFTMARGIN, 5
|