summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-06-23 14:21:55 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-06-23 14:21:55 +0000
commit8ada609a501363add4c00dda936025712171fb00 (patch)
treee5936371dd88e18c4a0fc30cec34cbee02dc97b5
parentc507a151a8011784ba37228d33610fa0406736eb (diff)
MetaContacts:
plusified git-svn-id: http://svn.miranda-ng.org/main/trunk@558 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/MetaContacts/MetaContacts translations/metacontacts_template.txt205
-rw-r--r--plugins/MetaContacts/MetaContacts_10.vcxproj19
-rw-r--r--plugins/MetaContacts/MetaContacts_10.vcxproj.filters21
-rw-r--r--plugins/MetaContacts/meta_main.cpp14
-rw-r--r--plugins/MetaContacts/meta_services.cpp2
-rw-r--r--plugins/MetaContacts/meta_utils.cpp2
6 files changed, 26 insertions, 237 deletions
diff --git a/plugins/MetaContacts/MetaContacts translations/metacontacts_template.txt b/plugins/MetaContacts/MetaContacts translations/metacontacts_template.txt
deleted file mode 100644
index 18a000e683..0000000000
--- a/plugins/MetaContacts/MetaContacts translations/metacontacts_template.txt
+++ /dev/null
@@ -1,205 +0,0 @@
-[MetaContacts]
-
-[Allows the joining of several subcontacts into one]
-
-[Error - Database corruption.\nPlugin disabled.]
-
-;menu
-[Toggle MetaContacts On/Off]
-
-[Convert to MetaContact]
-
-[Add to existing MetaContact...]
-
-[Edit MetaContact...]
-
-[Delete MetaContact]
-
-[Remove from MetaContact]
-
-[Force Default]
-
-[Unforce Default]
-
-[Set as MetaContact default]
-
-[Context]
-
-;dialog
-[History Copy]
-
-[Please wait while the contact's history is copied.]
-
-[History Remove]
-
-[Please wait while the contact's history is removed.]
-
-[Add to Existing MetaContact]
-
-[Please select a MetaContact:]
-
-[Editing]
-
-[&OK]
-
-[&Cancel]
-
-[&Apply]
-
-[&Remove]
-
-[&Set as Default]
-
-[Move &Up]
-
-[Move &Down]
-
-[Force use of default for sending (even if offline)]
-
-[Information]
-
-[Name:]
-
-[Contacts]
-
-[Contact]
-
-[Id]
-
-[Protocol]
-
-[Default]
-
-[Yes]
-
-[No]
-
-[Options]
-
-[Automatically set default contact on receipt of message]
-
-[Always send to default contact if not offline]
-
-[Suppress status notification for subcontacts]
-
-[Hide in status bar and status menu (*requires restart, uncheck to set proto icons)]
-
-[Use subcontact message windows]
-
-[Context Menu]
-
-[Contact Labels]
-
-[Use contact's unique id]
-
-[Use contact's display name]
-
-[Function]
-
-[Set default and open message window]
-
-[Show subcontact context menu]
-
-[Show user information]
-
-[Contact List]
-
-[Display subcontact nickname]
-
-[Display subcontact display name]
-
-[History (** beware - change at your own risk **)]
-
-[Copy subcontact history to MetaContact when creating or adding]
-
-[Number of days to copy (0=all):]
-
-[Keep MetaContact history synchronized with subcontacts]
-
-[Keep subcontact history synchronized with MetaContact]
-
-[Nick]
-
-[Sender]
-
-;message
-[Delete MetaContact?]
-
-[You are going to remove all the contacts associated with this MetaContact.\nThis will delete the MetaContact.\n\nProceed Anyway?]
-
-[Contact not present in the DB]
-
-[This contact seems not to be in the database.\nThe database could be corrupted.\nTry to remove it manually.]
-
-[MetaContact Conflict]
-
-[This contact is a MetaContact.\nYou can't add a MetaContact to another MetaContact.\n\nPlease choose another.]
-
-[Multiple MetaContacts]
-
-[This contact is already associated to a MetaContact.\nYou cannot add a contact to multiple MetaContacts.]
-
-[No suitable MetaContact found]
-
-[Either there is no MetaContact in the database (in this case you should first convert a contact into one)\nor there is none that can host this contact.\nAnother solution could be to convert this contact into a new MetaContact.\n\nConvert this contact into a new MetaContact?]
-
-[Adding %s...]
-
-[a contact]
-
-[No MetaContact selected]
-
-[Please select a MetaContact]
-
-[Assignment failure]
-
-[The operation failed: Assigning <%s> to <%s>]
-
-[Assignment Error]
-
-[Could not get MetaContact id]
-
-[Could not retreive MetaContact contact count]
-
-[Could not retreive contact protocol]
-
-[Contact is 'Not on List' - please add the contact to your contact list before assigning.]
-
-[MetaContact is full]
-
-[Could not write contact protocol to MetaContact]
-
-[Could not get unique id of contact]
-
-[Could not write unique id of contact to MetaContact]
-
-[Could not write nickname of contact to MetaContact]
-
-[Could not write clist displayname of contact to MetaContact]
-
-[Could not write contact status to MetaContact]
-
-[Could not write contact handle to MetaContact]
-
-[Could not write contact status string to MetaContact]
-
-[Could not write MetaContact id to contact]
-
-[Could not write MetaContact contact number to contact]
-
-[Could not write contact count to MetaContact]
-
-[No contacts found.]
-
-[There was a problem in assigning the contact to the MetaContact]
-
-[Database Corruption]
-
-[This will remove the MetaContact permanently.\n\nProceed Anyway?]
-
-[Are you sure?]
-
-; db corruption
-[MetaID: ]
-
-[MetaContact corrupted - the number of subcontacts is incorrect.\nDelete MetaContact?]
diff --git a/plugins/MetaContacts/MetaContacts_10.vcxproj b/plugins/MetaContacts/MetaContacts_10.vcxproj
index c7599dee86..012f3a506b 100644
--- a/plugins/MetaContacts/MetaContacts_10.vcxproj
+++ b/plugins/MetaContacts/MetaContacts_10.vcxproj
@@ -179,17 +179,17 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="addto.c" />
- <ClCompile Include="edit.c" />
- <ClCompile Include="icons.c" />
- <ClCompile Include="meta_api.c" />
- <ClCompile Include="meta_main.c">
+ <ClCompile Include="addto.cpp" />
+ <ClCompile Include="edit.cpp" />
+ <ClCompile Include="icons.cpp" />
+ <ClCompile Include="meta_api.cpp" />
+ <ClCompile Include="meta_main.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
- <ClCompile Include="meta_menu.c" />
- <ClCompile Include="meta_options.c" />
- <ClCompile Include="meta_services.c" />
- <ClCompile Include="meta_utils.c" />
+ <ClCompile Include="meta_menu.cpp" />
+ <ClCompile Include="meta_options.cpp" />
+ <ClCompile Include="meta_services.cpp" />
+ <ClCompile Include="meta_utils.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="metacontacts.h" />
@@ -204,7 +204,6 @@
<None Include="meta_edit.ico" />
<None Include="meta_remove2.ico" />
<None Include="meta_set_as_default.ico" />
- <None Include="MetaContacts translations\metacontacts_template.txt" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="MetaContacts.rc" />
diff --git a/plugins/MetaContacts/MetaContacts_10.vcxproj.filters b/plugins/MetaContacts/MetaContacts_10.vcxproj.filters
index 306da96621..8277015a52 100644
--- a/plugins/MetaContacts/MetaContacts_10.vcxproj.filters
+++ b/plugins/MetaContacts/MetaContacts_10.vcxproj.filters
@@ -18,31 +18,31 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="addto.c">
+ <ClCompile Include="addto.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="edit.c">
+ <ClCompile Include="edit.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="icons.c">
+ <ClCompile Include="icons.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="meta_api.c">
+ <ClCompile Include="meta_api.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="meta_main.c">
+ <ClCompile Include="meta_main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="meta_menu.c">
+ <ClCompile Include="meta_menu.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="meta_options.c">
+ <ClCompile Include="meta_options.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="meta_services.c">
+ <ClCompile Include="meta_services.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="meta_utils.c">
+ <ClCompile Include="meta_utils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
@@ -79,9 +79,6 @@
<None Include="meta_set_as_default.ico">
<Filter>Resource Files</Filter>
</None>
- <None Include="MetaContacts translations\metacontacts_template.txt">
- <Filter>translation template</Filter>
- </None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="MetaContacts.rc">
diff --git a/plugins/MetaContacts/meta_main.cpp b/plugins/MetaContacts/meta_main.cpp
index dbe2f67224..fe88307225 100644
--- a/plugins/MetaContacts/meta_main.cpp
+++ b/plugins/MetaContacts/meta_main.cpp
@@ -101,7 +101,7 @@ PLUGININFOEX pluginInfo={
__AUTHOREMAIL,
__COPYRIGHT,
__AUTHORWEB,
- 0,
+ UNICODE_AWARE,
0,
{ 0x4c4a27cf, 0x5e64, 0x4242, { 0xa3, 0x32, 0xb9, 0x8b, 0x8, 0x24, 0x3e, 0x89 } } // {4C4A27CF-5E64-4242-A332-B98B08243E89}
};
@@ -113,32 +113,30 @@ PLUGINLINK *pluginLink; //!< Link between Miranda and this plugin
* It only returns the PLUGININFO structure, without any test on the version
* @param mirandaVersion The version of the application calling this function
*/
-__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
return &pluginInfo;
}
static const MUUID interfaces[] = {MIID_PROTOCOL, MIID_METACONTACTS, MIID_LAST};
-__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
{
return interfaces;
}
-
/** DLL entry point
* Required to store the instance handle
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
{
hInstance=hinstDLL;
- DisableThreadLibraryCalls(hInstance);
return TRUE;
}
/** Prepare the plugin to stop
* Called by Miranda when it will exit or when the plugin gets deselected
*/
-__declspec(dllexport)int Unload(void)
+extern "C" __declspec(dllexport) int Unload(void)
{
// see also meta_services.c, Meta_PreShutdown
Meta_CloseHandles();
@@ -157,7 +155,7 @@ BOOL IsUnicodeOS()
/** Initializes the services provided and the link to those needed
* Called when the plugin is loaded into Miranda
*/
-int __declspec(dllexport)Load(PLUGINLINK *link)
+extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
{
PROTOCOLDESCRIPTOR pd;
DBVARIANT dbv;
@@ -263,4 +261,4 @@ int __declspec(dllexport)Load(PLUGINLINK *link)
DBWriteContactSettingString(0, META_PROTO, "HiddenGroupName", META_HIDDEN_GROUP);
return 0;
-}
+} \ No newline at end of file
diff --git a/plugins/MetaContacts/meta_services.cpp b/plugins/MetaContacts/meta_services.cpp
index 8f570773b1..caeb95bdc8 100644
--- a/plugins/MetaContacts/meta_services.cpp
+++ b/plugins/MetaContacts/meta_services.cpp
@@ -1417,7 +1417,7 @@ int Meta_ModulesLoaded(WPARAM wParam, LPARAM lParam)
hNudgeEvent = HookEvent(str, NudgeRecieved);
if (hNudgeEvent != NULL) {
++iNudgeProtos;
- hNudgeEvents = realloc(hNudgeEvents, sizeof(HANDLE) * iNudgeProtos);
+ hNudgeEvents = (HANDLE *)realloc(hNudgeEvents, sizeof(HANDLE) * iNudgeProtos);
hNudgeEvents[iNudgeProtos - 1] = hNudgeEvent;
}
}
diff --git a/plugins/MetaContacts/meta_utils.cpp b/plugins/MetaContacts/meta_utils.cpp
index de30a369a3..e319bdac46 100644
--- a/plugins/MetaContacts/meta_utils.cpp
+++ b/plugins/MetaContacts/meta_utils.cpp
@@ -1537,7 +1537,7 @@ void copyHistory(HANDLE hContactFrom,HANDLE hContactTo)
if ((dbei.cbBlob = CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0)) == -1)
break;
- buffer = mir_realloc(buffer, dbei.cbBlob);// + id_length);
+ buffer = (BYTE *)mir_realloc(buffer, dbei.cbBlob);// + id_length);
dbei.pBlob = buffer;
if (CallService(MS_DB_EVENT_GET,(WPARAM)hDbEvent,(LPARAM)&dbei))