diff options
Diffstat (limited to 'plugins/MetaContacts/src')
| -rw-r--r-- | plugins/MetaContacts/src/icons.h | 6 | ||||
| -rw-r--r-- | plugins/MetaContacts/src/meta_main.cpp | 9 | ||||
| -rwxr-xr-x | plugins/MetaContacts/src/meta_services.cpp | 116 | ||||
| -rw-r--r-- | plugins/MetaContacts/src/metacontacts.h | 23 | ||||
| -rw-r--r-- | plugins/MetaContacts/src/version.h | 18 | 
5 files changed, 71 insertions, 101 deletions
diff --git a/plugins/MetaContacts/src/icons.h b/plugins/MetaContacts/src/icons.h deleted file mode 100644 index c77b1b02fc..0000000000 --- a/plugins/MetaContacts/src/icons.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ICONS_INC
 -#define _ICONS_INC
 -
 -#include "metacontacts.h"
 -
 -#endif
 diff --git a/plugins/MetaContacts/src/meta_main.cpp b/plugins/MetaContacts/src/meta_main.cpp index 44c27c4e69..9c49a7ced9 100644 --- a/plugins/MetaContacts/src/meta_main.cpp +++ b/plugins/MetaContacts/src/meta_main.cpp @@ -84,9 +84,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  #include "metacontacts.h"
 -// Use VersionNo.h to set the version number, and ensure resource file is not open
 -#include "version.h"
 -
  BOOL os_unicode_enabled = FALSE;
  int hLangpack;
  CLIST_INTERFACE *pcli = NULL;
 @@ -94,16 +91,16 @@ CLIST_INTERFACE *pcli = NULL;  //! Information gathered by Miranda, displayed in the plugin pane of the Option Dialog
  PLUGININFOEX pluginInfo={
  	sizeof(PLUGININFOEX),
 -	__PLUGIN_NAME,		// altered here and on file listing, so as not to match original
 +	__PLUGIN_NAME,
  	PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
 -	__DESC,
 +	__DESCRIPTION,
  	__AUTHOR,
  	__AUTHOREMAIL,
  	__COPYRIGHT,
  	__AUTHORWEB,
  	UNICODE_AWARE,
  	// {4C4A27CF-5E64-4242-A332-B98B08243E89}
 -	{0x4c4a27cf, 0x5e64, 0x4242, {0xa3, 0x32, 0xb9, 0x8b, 0x8, 0x24, 0x3e, 0x89} }
 +	{0x4c4a27cf, 0x5e64, 0x4242, {0xa3, 0x32, 0xb9, 0x8b, 0x8, 0x24, 0x3e, 0x89}}
  };
  HINSTANCE hInstance;	//!< Global reference to the application
 diff --git a/plugins/MetaContacts/src/meta_services.cpp b/plugins/MetaContacts/src/meta_services.cpp index 290d0acd52..a86b255730 100755 --- a/plugins/MetaContacts/src/meta_services.cpp +++ b/plugins/MetaContacts/src/meta_services.cpp @@ -1031,45 +1031,45 @@ int Meta_ModulesLoaded(WPARAM wParam, LPARAM lParam)  	////////////////////////////////////////////////////////////////////////////
  	CLISTMENUITEM mi = { sizeof(mi) };
  	mi.flags = CMIM_ALL | CMIF_ICONFROMICOLIB;
 - -	// main menu item -	mi.icolibItem = GetIconHandle(I_MENUOFF); -	mi.pszName = LPGEN("Toggle MetaContacts Off"); -	mi.pszService = "MetaContacts/OnOff"; -	mi.position = 500010000; -	hMenuOnOff = Menu_AddMainMenuItem(&mi); -
 -	// contact menu items -	mi.icolibItem = GetIconHandle(I_CONVERT); -	mi.position = -200010; -	mi.pszName = LPGEN("Convert to MetaContact"); -	mi.pszService = "MetaContacts/Convert"; -	hMenuConvert = Menu_AddContactMenuItem(&mi); - -	mi.icolibItem = GetIconHandle(I_ADD); -	mi.position = -200009; -	mi.pszName = LPGEN("Add to existing MetaContact..."); -	mi.pszService = "MetaContacts/AddTo"; -	hMenuAdd = Menu_AddContactMenuItem(&mi); - -	mi.icolibItem = GetIconHandle(I_EDIT); -	mi.position = -200010; -	mi.pszName = LPGEN("Edit MetaContact..."); -	mi.pszService = "MetaContacts/Edit"; -	hMenuEdit = Menu_AddContactMenuItem(&mi); - -	mi.icolibItem = GetIconHandle(I_SETDEFAULT); -	mi.position = -200009; -	mi.pszName = LPGEN("Set as MetaContact default"); -	mi.pszService = "MetaContacts/Default"; -	hMenuDefault = Menu_AddContactMenuItem(&mi); - -	mi.icolibItem = GetIconHandle(I_REMOVE); -	mi.position = -200008; -	mi.pszName = LPGEN("Delete MetaContact"); -	mi.pszService = "MetaContacts/Delete"; -	hMenuDelete = Menu_AddContactMenuItem(&mi); - +
 +	// main menu item
 +	mi.icolibItem = GetIconHandle(I_MENUOFF);
 +	mi.pszName = LPGEN("Toggle MetaContacts Off");
 +	mi.pszService = "MetaContacts/OnOff";
 +	mi.position = 500010000;
 +	hMenuOnOff = Menu_AddMainMenuItem(&mi);
 +
 +	// contact menu items
 +	mi.icolibItem = GetIconHandle(I_CONVERT);
 +	mi.position = -200010;
 +	mi.pszName = LPGEN("Convert to MetaContact");
 +	mi.pszService = "MetaContacts/Convert";
 +	hMenuConvert = Menu_AddContactMenuItem(&mi);
 +
 +	mi.icolibItem = GetIconHandle(I_ADD);
 +	mi.position = -200009;
 +	mi.pszName = LPGEN("Add to existing MetaContact...");
 +	mi.pszService = "MetaContacts/AddTo";
 +	hMenuAdd = Menu_AddContactMenuItem(&mi);
 +
 +	mi.icolibItem = GetIconHandle(I_EDIT);
 +	mi.position = -200010;
 +	mi.pszName = LPGEN("Edit MetaContact...");
 +	mi.pszService = "MetaContacts/Edit";
 +	hMenuEdit = Menu_AddContactMenuItem(&mi);
 +
 +	mi.icolibItem = GetIconHandle(I_SETDEFAULT);
 +	mi.position = -200009;
 +	mi.pszName = LPGEN("Set as MetaContact default");
 +	mi.pszService = "MetaContacts/Default";
 +	hMenuDefault = Menu_AddContactMenuItem(&mi);
 +
 +	mi.icolibItem = GetIconHandle(I_REMOVE);
 +	mi.position = -200008;
 +	mi.pszName = LPGEN("Delete MetaContact");
 +	mi.pszService = "MetaContacts/Delete";
 +	hMenuDelete = Menu_AddContactMenuItem(&mi);
 +
  	mi.flags |= CMIF_HIDDEN;
  	mi.pszContactOwner = META_PROTO;
 @@ -1105,13 +1105,13 @@ int Meta_ModulesLoaded(WPARAM wParam, LPARAM lParam)  	Meta_HideLinkedContacts();
  	if ( !Meta_IsEnabled()) {
 -		// modify main menu item -		mi.flags = CMIM_NAME | CMIM_ICON; -		mi.icolibItem = GetIconHandle(I_MENU); -		mi.pszName = LPGEN("Toggle MetaContacts On"); -		CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuOnOff, (LPARAM)&mi); - -		Meta_HideMetaContacts(TRUE); +		// modify main menu item
 +		mi.flags = CMIM_NAME | CMIM_ICON;
 +		mi.icolibItem = GetIconHandle(I_MENU);
 +		mi.pszName = LPGEN("Toggle MetaContacts On");
 +		CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuOnOff, (LPARAM)&mi);
 +
 +		Meta_HideMetaContacts(TRUE);
  	}
  	else Meta_SuppressStatus(options.suppress_status);
 @@ -1408,18 +1408,18 @@ INT_PTR Meta_OnOff(WPARAM wParam, LPARAM lParam)  	mi.flags = CMIM_NAME | CMIM_ICON;
  	// just write to db - the rest is handled in the Meta_SettingChanged function
  	if (db_get_b(0, META_PROTO, "Enabled", 1)) {
 -		db_set_b(0, META_PROTO, "Enabled", 0); -		// modify main mi item -		mi.icolibItem = GetIconHandle(I_MENU); -		mi.pszName = LPGEN("Toggle MetaContacts On"); -	} else { -		db_set_b(0, META_PROTO, "Enabled", 1); -		// modify main mi item -		mi.icolibItem = GetIconHandle(I_MENUOFF); -		mi.pszName = LPGEN("Toggle MetaContacts Off"); -	} -	CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuOnOff, (LPARAM)&mi); -	return 0; +		db_set_b(0, META_PROTO, "Enabled", 0);
 +		// modify main mi item
 +		mi.icolibItem = GetIconHandle(I_MENU);
 +		mi.pszName = LPGEN("Toggle MetaContacts On");
 +	} else {
 +		db_set_b(0, META_PROTO, "Enabled", 1);
 +		// modify main mi item
 +		mi.icolibItem = GetIconHandle(I_MENUOFF);
 +		mi.pszName = LPGEN("Toggle MetaContacts Off");
 +	}
 +	CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuOnOff, (LPARAM)&mi);
 +	return 0;
  }
 diff --git a/plugins/MetaContacts/src/metacontacts.h b/plugins/MetaContacts/src/metacontacts.h index 4ca986a933..8dcca13ceb 100644 --- a/plugins/MetaContacts/src/metacontacts.h +++ b/plugins/MetaContacts/src/metacontacts.h @@ -28,42 +28,29 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  #define _WIN32_WINNT 0x0400
  #define _WIN32_IE 0x0300
 -#define MIRANDA_VER 0x0A00
 -
 -#include <m_stdhdr.h>
 -
  #include <windows.h>
 -#include <commctrl.h>
 -#include <string.h>
  #include <time.h>
 -#include "resource.h"
 -
 -#include "m_metacontacts.h"
  #include <newpluginapi.h>
  #include <m_clistint.h>
  #include <m_clui.h>
  #include <m_skin.h>
 -#include <m_langpack.h>
  #include <m_protomod.h>
  #include <m_database.h>
  #include <m_system.h>
 -#include <m_protocols.h>
  #include <m_userinfo.h>
 -#include <m_options.h>
 -#include <m_protosvc.h>
 -#include <m_utils.h>
 -#include <m_ignore.h>
 -#include <m_clc.h>
  #include <m_contacts.h>
  #include <m_message.h>
  #include <m_ignore.h>
  #include <m_icolib.h>
  #include <m_langpack.h>
 -#include <m_popup.h>
 -#include <m_cluiframes.h>
  #include <win2k.h>
 +#include <m_metacontacts.h>
 +
 +#include "resource.h"
 +#include "version.h"
 +
  #define META_PROTO				"MetaContacts"
  #define META_FILTER				"MetaContactsFilter"
  #define META_ID					"MetaID"
 diff --git a/plugins/MetaContacts/src/version.h b/plugins/MetaContacts/src/version.h index d05b7262a8..539b9f2d31 100644 --- a/plugins/MetaContacts/src/version.h +++ b/plugins/MetaContacts/src/version.h @@ -1,22 +1,14 @@ -// Set the version number here - it will affect the version resource and the version field of the pluginInfo structure
 -// (Be careful that you don't have the resource file open when you change this and rebuild, otherwise the changes may not 
 -// take effect within the version resource)
 -
  #define __MAJOR_VERSION				0
  #define __MINOR_VERSION				14
  #define __RELEASE_NUM				0
  #define __BUILD_NUM					13
 -#define __FILEVERSION_STRING        __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
 -#define __FILEVERSION_STRING_DOTS	__MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
 -#define __STRINGIFY(x)				#x
 -#define __VERSION_STRING			__STRINGIFY(__FILEVERSION_STRING_DOTS)
 +#define __FILEVERSION_STRING		__MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
 -#define __DESC						"Merges contacts from the same or different protocols into one."
 +#define __PLUGIN_NAME				"MetaContacts"
 +#define __FILENAME					"MetaContacts.dll"
 +#define __DESCRIPTION 				"Merges contacts from the same or different protocols into one."
  #define __AUTHOR					"J. Schaal & S. Ellis"
  #define __AUTHOREMAIL				"mail@scottellis.com.au"
 -#define __COPYRIGHT					"© 2005,2006 Scott Ellis"
  #define __AUTHORWEB					"http://miranda-ng.org/"
 -#define __PLUGIN_NAME				"MetaContacts"
 -#define __FILENAME					"MetaContacts.dll"
 -
 +#define __COPYRIGHT					"© 2005,2006 Scott Ellis"
  | 
