summaryrefslogtreecommitdiff
path: root/gender
diff options
context:
space:
mode:
Diffstat (limited to 'gender')
-rw-r--r--gender/Gender.dsp126
-rw-r--r--gender/Gender.dsw29
-rw-r--r--gender/Gender.mdsp101
-rw-r--r--gender/Makefile125
-rw-r--r--gender/commonheaders.h63
-rw-r--r--gender/docs/gender-readme.txt62
-rw-r--r--gender/docs/gender-translate.txt24
-rw-r--r--gender/gender.rc129
-rw-r--r--gender/gender.sln21
-rw-r--r--gender/gender.vcproj179
-rw-r--r--gender/gender_10.sln31
-rw-r--r--gender/gender_10.suobin0 -> 8704 bytes
-rw-r--r--gender/gender_10.vcxproj237
-rw-r--r--gender/gender_10.vcxproj.user3
-rw-r--r--gender/icons/female.icobin0 -> 2550 bytes
-rw-r--r--gender/icons/gender.icobin0 -> 2550 bytes
-rw-r--r--gender/icons/male.icobin0 -> 2550 bytes
-rw-r--r--gender/main.cpp474
-rw-r--r--gender/options.cpp167
-rw-r--r--gender/resource.h25
-rw-r--r--gender/sdk/m_extraicons.h182
-rw-r--r--gender/sdk/m_gender.h30
-rw-r--r--gender/sdk/m_metacontacts.h166
-rw-r--r--gender/sdk/m_updater.h150
24 files changed, 2324 insertions, 0 deletions
diff --git a/gender/Gender.dsp b/gender/Gender.dsp
new file mode 100644
index 0000000..ad8ac8e
--- /dev/null
+++ b/gender/Gender.dsp
@@ -0,0 +1,126 @@
+# Microsoft Developer Studio Project File - Name="Gender" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=Gender - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "Gender.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "Gender.mak" CFG="Gender - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Gender - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "Gender - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""$/Miranda/miranda/plugins/Gender", FLIAAAAA"
+# PROP Scc_LocalPath "."
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Gender - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "Gender_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /Zi /O1 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x419 /d "NDEBUG"
+# ADD RSC /l 0x419 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:none /machine:I386 /out:"../../bin/Release/plugins/Gender.dll" /filealign:512
+# SUBTRACT LINK32 /map /debug
+
+!ELSEIF "$(CFG)" == "Gender - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "Gender_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NO_GZIP" /D "PNG_NO_STDIO" /D "PNG_NO_CONSOLE_IO" /FR /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x419 /d "_DEBUG"
+# ADD RSC /l 0x419 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../../bin/Debug/plugins/Gender.dll" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none /incremental:no
+
+!ENDIF
+
+# Begin Target
+
+# Name "Gender - Win32 Release"
+# Name "Gender - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\main.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\options.cpp
+# End Source File
+# End Group
+# Begin Group "Resources"
+
+# PROP Default_Filter "*.rc"
+# Begin Source File
+
+SOURCE=.\gender.rc
+# End Source File
+# End Group
+# Begin Group "Headers"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\commonheaders.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\resource.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/gender/Gender.dsw b/gender/Gender.dsw
new file mode 100644
index 0000000..9320280
--- /dev/null
+++ b/gender/Gender.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "Gender"=".\Gender.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/gender/Gender.mdsp b/gender/Gender.mdsp
new file mode 100644
index 0000000..34811ae
--- /dev/null
+++ b/gender/Gender.mdsp
@@ -0,0 +1,101 @@
+[Project]
+name=Gender
+type=2
+defaultConfig=1
+
+
+[Debug]
+// compiler
+workingDirectory=
+arguments=
+intermediateFilesDirectory=Debug
+outputFilesDirectory=Debug
+compilerPreprocessor=
+extraCompilerOptions=
+compilerIncludeDirectory=..\..\include
+noWarning=0
+defaultWarning=0
+allWarning=1
+extraWarning=0
+isoWarning=0
+warningsAsErrors=0
+debugType=1
+debugLevel=2
+exceptionEnabled=1
+runtimeTypeEnabled=1
+optimizeLevel=4
+
+// linker
+libraryPath=
+outputFilename=Debug\Gender.dll
+libraries=
+extraLinkerOptions=
+ignoreStartupFile=0
+ignoreDefaultLibs=0
+stripExecutableFile=0
+
+// archive
+extraArchiveOptions=
+
+//resource
+resourcePreprocessor=
+resourceIncludeDirectory=
+extraResourceOptions=
+
+[Release]
+// compiler
+workingDirectory=
+arguments=
+intermediateFilesDirectory=Release
+outputFilesDirectory=Release
+compilerPreprocessor=
+extraCompilerOptions=
+compilerIncludeDirectory=..\..\include
+noWarning=0
+defaultWarning=1
+allWarning=1
+extraWarning=0
+isoWarning=0
+warningsAsErrors=0
+debugType=0
+debugLevel=1
+exceptionEnabled=1
+runtimeTypeEnabled=1
+optimizeLevel=4
+
+// linker
+libraryPath=
+outputFilename=Release\Gender.dll
+libraries=
+extraLinkerOptions=
+ignoreStartupFile=0
+ignoreDefaultLibs=0
+stripExecutableFile=1
+
+// archive
+extraArchiveOptions=
+
+//resource
+resourcePreprocessor=
+resourceIncludeDirectory=
+extraResourceOptions=
+
+[Source]
+1=main.cpp
+2=options.cpp
+[Header]
+1=commonheaders.h
+2=resource.h
+3=sdk\m_cluiframes.h
+4=sdk\m_metacontacts.h
+5=sdk\m_updater.h
+6=m_gender.h
+[Resource]
+1=gender.rc
+[Other]
+1=docs\gender-readme.txt
+2=docs\gender-translate.txt
+[History]
+options.cpp,3791
+docs\gender-readme.txt,905
+main.cpp,9679
diff --git a/gender/Makefile b/gender/Makefile
new file mode 100644
index 0000000..b6bb5c1
--- /dev/null
+++ b/gender/Makefile
@@ -0,0 +1,125 @@
+#################################################################
+## This Makefile Exported by MinGW Developer Studio
+## Copyright (c) 2002-2004 by Parinya Thipchart
+#################################################################
+
+ifneq (,$(findstring Release, $(CFG)))
+ override CFG = Release
+else
+ override CFG = Debug
+endif
+
+PROJECT = Gender
+CC = "C:\MinGWStudio\MinGW\bin\g++.exe"
+
+WINDRES = "$(COMPILER_BIN)windres.exe"
+ifeq ($(CFG),Debug)
+ OBJ_DIR = Debug
+ OUTPUT_DIR = Debug
+ TARGET = Gender.a
+ C_INCLUDE_DIRS = -I"G:/Install/Internet/Miranda/SVN/plugins"
+ C_PREPROC =
+ CFLAGS = -pipe -Wall -g2 -Os -frtti -fexceptions
+ RC_INCLUDE_DIRS =
+ RC_PREPROC =
+ RCFLAGS =
+ LIB_DIRS =
+ LIBS =
+ LDFLAGS = -pipe -shared -Wl,--output-def,"$(OBJ_DIR)\Gender.def",--out-implib,"$(OBJ_DIR)\libGender.dll.a"
+endif
+
+ifeq ($(CFG),Release)
+ OBJ_DIR = Release
+ OUTPUT_DIR = Release
+ TARGET = Gender.dll
+ C_INCLUDE_DIRS = -I"G:/Install/Internet/Miranda/SVN/include"
+ C_PREPROC =
+ CFLAGS = -pipe -fweb -frename-registers -Os -Wall -g0 -Os -fno-rtti -fno-exceptions
+ RC_INCLUDE_DIRS =
+ RC_PREPROC =
+ RCFLAGS =
+ LIB_DIRS =
+ LIBS =
+ LDFLAGS = -pipe -shared -Wl,--output-def,"$(OBJ_DIR)\Gender.def",--out-implib,"$(OBJ_DIR)\libGender.dll.a" -s
+endif
+
+ifeq ($(OS),Windows_NT)
+ NULL =
+else
+ NULL = nul
+endif
+
+SRC_OBJS = \
+ $(OBJ_DIR)/main.o \
+ $(OBJ_DIR)/options.o
+
+RSRC_OBJS = \
+ $(OBJ_DIR)/gender.res
+
+define build_target
+@echo Linking...
+@$(CC) -o "$(OUTPUT_DIR)\$(TARGET)" $(SRC_OBJS) $(RSRC_OBJS) $(LIB_DIRS) $(LIBS) $(LDFLAGS)
+endef
+
+define compile_resource
+@echo Compiling $<
+@$(WINDRES) $(RCFLAGS) $(RC_PREPROC) $(RC_INCLUDE_DIRS) -O COFF -i "$<" -o "$@"
+endef
+
+define compile_source
+@echo Compiling $<
+@$(CC) $(CFLAGS) $(C_PREPROC) $(C_INCLUDE_DIRS) -c "$<" -o "$@"
+endef
+
+.PHONY: print_header directories
+
+$(TARGET): print_header directories $(RSRC_OBJS) $(SRC_OBJS)
+ $(build_target)
+
+.PHONY: clean cleanall
+
+cleanall:
+ @echo Deleting intermediate files for 'Gender - $(CFG)'
+ -@del $(OBJ_DIR)\*.o
+ -@del $(OBJ_DIR)\*.res
+ -@del "$(OUTPUT_DIR)\$(TARGET)"
+ -@del "$(OBJ_DIR)\$(PROJECT).def"
+ -@del "$(OBJ_DIR)\lib$(PROJECT).dll.a"
+ -@rmdir "$(OUTPUT_DIR)"
+
+clean:
+ @echo Deleting intermediate files for 'Gender - $(CFG)'
+ -@del $(OBJ_DIR)\*.o
+ -@del $(OBJ_DIR)\*.res
+
+print_header:
+ @echo ----------Configuration: Gender - $(CFG)----------
+
+directories:
+ -@if not exist "$(OUTPUT_DIR)\$(NULL)" mkdir "$(OUTPUT_DIR)"
+ -@if not exist "$(OBJ_DIR)\$(NULL)" mkdir "$(OBJ_DIR)"
+
+$(OBJ_DIR)/gender.res: gender.rc \
+resource.h \
+icons/male.ico \
+icons/female.ico
+ $(compile_resource)
+
+$(OBJ_DIR)/main.o: main.cpp \
+commonheaders.h \
+resource.h \
+sdk/m_genmenu.h \
+sdk/m_cluiframes.h \
+sdk/m_icolib.h \
+sdk/m_updater.h
+ $(compile_source)
+
+$(OBJ_DIR)/options.o: options.cpp \
+commonheaders.h \
+resource.h \
+sdk/m_genmenu.h \
+sdk/m_cluiframes.h \
+sdk/m_icolib.h \
+sdk/m_updater.h
+ $(compile_source)
+
diff --git a/gender/commonheaders.h b/gender/commonheaders.h
new file mode 100644
index 0000000..0359824
--- /dev/null
+++ b/gender/commonheaders.h
@@ -0,0 +1,63 @@
+/*
+ Show Contact Gender plugin for Miranda-IM (www.miranda-im.org)
+ (c) 2006-2011 by Thief
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ 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
+
+ File name : $URL: http://svn.miranda.im/mainrepo/gender/trunk/commonheaders.h $
+ Revision : $Rev: 1687 $
+ Last change on : $Date: 2011-01-22 18:44:21 +0200 (Сб, 22 янв 2011) $
+ Last change by : $Author: Thief $
+
+*/
+
+#ifndef COMMHEADERS_H
+#define COMMHEADERS_H
+
+#include <stdio.h> //needed by m_utils.h
+#include <stddef.h> // needed by m_icolib.h > r9256
+
+#include <windows.h>
+#include <commctrl.h>
+
+//Miranda API headers
+#include <newpluginapi.h>
+#include <m_database.h>
+#include <m_system.h>
+#include <m_protocols.h>
+#include <m_protosvc.h>
+#include <m_utils.h>
+#include <m_clist.h>
+#include <m_options.h>
+#include <m_langpack.h>
+#include <m_genmenu.h>
+#include <m_icolib.h>
+#include <m_cluiframes.h>
+
+//Gender SDK
+#include "sdk/m_gender.h"
+
+//Resources
+#include "resource.h"
+
+//external SDK headers
+#include "sdk/m_updater.h"
+#include "sdk/m_metacontacts.h"
+#include "sdk/m_extraicons.h"
+
+static const int DefaultSlot = EXTRA_ICON_ADV2;
+#define MODULENAME "Gender"
+
+#endif //COMMHEADERS_H
diff --git a/gender/docs/gender-readme.txt b/gender/docs/gender-readme.txt
new file mode 100644
index 0000000..9b61305
--- /dev/null
+++ b/gender/docs/gender-readme.txt
@@ -0,0 +1,62 @@
+Gender plugin for Miranda IM (http://miranda-im.org)
+Homepage: http://thief.miranda.im
+Version: 0.0.2.1 (c) 2006-2011 Thief
+Idea by nile, icons by a0x
+
+This plugin shows gender icon in contact list. Nothing more ;)
+
+Changes:
+
+v0.0.2.1
++ 64bit build
++ internal unicode support
+- removed old PLUGININFO support
+
+v0.0.2.0
++ added support for extraicons service plugin
+
+v0.0.1.9
+* gender key is now written to "UserInfo" module instead of protocol (the key doesn't get deleted on info update) (ticket #32)
++ option to draw an icon when no gender info found (ticket #33)
+* look up for gender key in "UserInfo" module and then in protocol
+* other small fixes
+
+v0.0.1.8
+- some changes to icons handling, now Miranda 0.7 is required
++ added possibility to disable contact list icon
+* fixed service function
+
+v0.0.1.7
+- version bump (to allow update from 0.0.1.6 previously released as beta)
+
+v0.0.1.6
++ metacontacts support (thanks sje for clearing things out)
++ added a service for retrieving gender icon for a contact
+
+v0.0.1.5
+* changed icons - now using cute icons by a0x (thanks!)
+
+v0.0.1.4
++ added uuid (FB1C17E0-77FC-45A7-9C8B-E2BEF4F56B28) and MIID_GENDER interface for Miranda 0.8.x compatibility
+* make menu subitem checked when gender key is found
+
+v0.0.1.3
+! addons release
+* hide menu items for chatrooms and non-IM protocols (like weather, etc)
+* icons changes in icolib reflect menuitems icons
++ option to disable menu items
+
+v0.0.1.2
++ plugin now checks "UserInfo" module if gender key was not found in protocol module (FR by BraVo123)
+- MinGW build
+
+v0.0.1.1
++ menuitems to set gender (FR by Shaggoth)
++ langpack and readme
+Happy New Year! :)
+
+v0.0.1.0
+- initial release
+
+Plugin is released under GPL licence.
+http://www.gnu.org/copyleft/gpl.html \ No newline at end of file
diff --git a/gender/docs/gender-translate.txt b/gender/docs/gender-translate.txt
new file mode 100644
index 0000000..b2f31b9
--- /dev/null
+++ b/gender/docs/gender-translate.txt
@@ -0,0 +1,24 @@
+[Gender]
+[Male]
+[Female]
+[Undefined]
+[Set Gender]
+[Set Male]
+[Set Female]
+[Set Undefined]
+[Plugin settings]
+[Use]
+[slot to draw the icon]
+[Email]
+[Protocol]
+[SMS]
+[Advanced 1]
+[Advanced 2]
+[Web]
+[Client]
+[Advanced 3]
+[Advanced 4]
+[Advanced 5]
+[Enable menu items]
+[No info]
+[Draw an icon when gender info not found] \ No newline at end of file
diff --git a/gender/gender.rc b/gender/gender.rc
new file mode 100644
index 0000000..651f86b
--- /dev/null
+++ b/gender/gender.rc
@@ -0,0 +1,129 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Ukrainian resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_UKR)
+#ifdef _WIN32
+LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
+#pragma code_page(1251)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_MALE ICON "icons\\male.ico"
+IDI_FEMALE ICON "icons\\female.ico"
+IDI_UNDEF ICON "icons\\gender.ico"
+#endif // Ukrainian resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_GENDER_OPT DIALOGEX 0, 0, 314, 240
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ COMBOBOX IDC_ADVICON,95,102,78,81,CBS_DROPDOWNLIST | WS_VSCROLL |
+ WS_TABSTOP,WS_EX_CLIENTEDGE
+ GROUPBOX "Plugin settings",IDC_STATIC,46,78,222,100
+ RTEXT "Use",IDC_USE_L,56,104,33,12
+ LTEXT "slot to draw the icon",IDC_SLOT_L,179,104,76,17
+ CONTROL "Enable menu items",IDC_MENUITEMS,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,76,122,167,12
+ LTEXT "Note: if you still don't see the icons try changing icon slot. Perhaps its used by some other plugin.",
+ IDC_NOTE_L,53,152,200,18
+ CONTROL "Draw an icon when gender info not found",
+ IDC_DRAWUNDEFICON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
+ 76,138,167,12
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_GENDER_OPT, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 307
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 233
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/gender/gender.sln b/gender/gender.sln
new file mode 100644
index 0000000..815ba0c
--- /dev/null
+++ b/gender/gender.sln
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gender2", "gender.vcproj", "{9DF8913A-99A3-40D2-86FE-585EBDDCABB2}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Debug.ActiveCfg = Debug|Win32
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Debug.Build.0 = Debug|Win32
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Release.ActiveCfg = Release|Win32
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/gender/gender.vcproj b/gender/gender.vcproj
new file mode 100644
index 0000000..835e528
--- /dev/null
+++ b/gender/gender.vcproj
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="gender"
+ ProjectGUID="{9DF8913A-99A3-40D2-86FE-585EBDDCABB2}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;GENDER2_EXPORTS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/gender2.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/gender2.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/gender2.lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GENDER2_EXPORTS"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/gender.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="FALSE"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)/gender.lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\main.cpp">
+ </File>
+ <File
+ RelativePath=".\options.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath=".\commonheaders.h">
+ </File>
+ <File
+ RelativePath=".\sdk\m_cluiframes.h">
+ </File>
+ <File
+ RelativePath=".\m_gender.h">
+ </File>
+ <File
+ RelativePath=".\sdk\m_metacontacts.h">
+ </File>
+ <File
+ RelativePath=".\sdk\m_updater.h">
+ </File>
+ <File
+ RelativePath=".\resource.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ <File
+ RelativePath=".\icons\choose.ico">
+ </File>
+ <File
+ RelativePath=".\icons\female.ico">
+ </File>
+ <File
+ RelativePath=".\gender.rc">
+ </File>
+ <File
+ RelativePath=".\icons\male.ico">
+ </File>
+ </Filter>
+ <Filter
+ Name="Docs"
+ Filter="">
+ <File
+ RelativePath=".\docs\gender-readme.txt">
+ </File>
+ <File
+ RelativePath=".\docs\gender-translate.txt">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/gender/gender_10.sln b/gender/gender_10.sln
new file mode 100644
index 0000000..238e9b5
--- /dev/null
+++ b/gender/gender_10.sln
@@ -0,0 +1,31 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gender_10", "gender_10.vcxproj", "{9DF8913A-99A3-40D2-86FE-585EBDDCABB2}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release Unicode|Win32 = Release Unicode|Win32
+ Release Unicode|x64 = Release Unicode|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Debug|Win32.Build.0 = Debug|Win32
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Debug|x64.ActiveCfg = Debug|x64
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Debug|x64.Build.0 = Debug|x64
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Release Unicode|x64.Build.0 = Release Unicode|x64
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Release|Win32.ActiveCfg = Release|Win32
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Release|Win32.Build.0 = Release|Win32
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Release|x64.ActiveCfg = Release|x64
+ {9DF8913A-99A3-40D2-86FE-585EBDDCABB2}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/gender/gender_10.suo b/gender/gender_10.suo
new file mode 100644
index 0000000..dd0a1f4
--- /dev/null
+++ b/gender/gender_10.suo
Binary files differ
diff --git a/gender/gender_10.vcxproj b/gender/gender_10.vcxproj
new file mode 100644
index 0000000..ce930c6
--- /dev/null
+++ b/gender/gender_10.vcxproj
@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Unicode|Win32">
+ <Configuration>Release Unicode</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Unicode|x64">
+ <Configuration>Release Unicode</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{9DF8913A-99A3-40D2-86FE-585EBDDCABB2}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Release\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">false</LinkIncremental>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">D:\Sources\miranda9_trunk\miranda\include;$(IncludePath)</IncludePath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>MinSpace</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;GENDER2_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)gender2.pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)gender2.lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>MinSpace</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;GENDER2_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)gender2.pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)gender2.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MinSpace</Optimization>
+ <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GENDER2_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)gender.dll</OutputFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(OutDir)gender.lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">
+ <ClCompile>
+ <Optimization>MinSpace</Optimization>
+ <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GENDER2_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(OutDir)gender.lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MinSpace</Optimization>
+ <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GENDER2_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)gender.dll</OutputFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(OutDir)gender.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">
+ <ClCompile>
+ <Optimization>MinSpace</Optimization>
+ <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;GENDER2_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)gender.dll</OutputFile>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(OutDir)gender.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ <ClCompile Include="options.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="commonheaders.h" />
+ <ClInclude Include="m_gender.h" />
+ <ClInclude Include="sdk\m_metacontacts.h" />
+ <ClInclude Include="sdk\m_updater.h" />
+ <ClInclude Include="resource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="icons\choose.ico" />
+ <None Include="icons\female.ico" />
+ <None Include="icons\male.ico" />
+ <None Include="docs\gender-readme.txt" />
+ <None Include="docs\gender-translate.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="gender.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/gender/gender_10.vcxproj.user b/gender/gender_10.vcxproj.user
new file mode 100644
index 0000000..695b5c7
--- /dev/null
+++ b/gender/gender_10.vcxproj.user
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+</Project> \ No newline at end of file
diff --git a/gender/icons/female.ico b/gender/icons/female.ico
new file mode 100644
index 0000000..fe1cbd2
--- /dev/null
+++ b/gender/icons/female.ico
Binary files differ
diff --git a/gender/icons/gender.ico b/gender/icons/gender.ico
new file mode 100644
index 0000000..930c342
--- /dev/null
+++ b/gender/icons/gender.ico
Binary files differ
diff --git a/gender/icons/male.ico b/gender/icons/male.ico
new file mode 100644
index 0000000..ebd0420
--- /dev/null
+++ b/gender/icons/male.ico
Binary files differ
diff --git a/gender/main.cpp b/gender/main.cpp
new file mode 100644
index 0000000..c11060a
--- /dev/null
+++ b/gender/main.cpp
@@ -0,0 +1,474 @@
+/*
+ Show Contact Gender plugin for Miranda-IM (www.miranda-im.org)
+ (c) 2006-2011 by Thief
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ 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
+
+ File name : $URL: http://svn.miranda.im/mainrepo/gender/trunk/main.cpp $
+ Revision : $Rev: 1688 $
+ Last change on : $Date: 2011-01-22 19:44:43 +0200 (Сб, 22 янв 2011) $
+ Last change by : $Author: Thief $
+
+*/
+
+#include "commonheaders.h"
+
+HINSTANCE g_hInst;
+PLUGINLINK *pluginLink;
+static HANDLE hHookModulesLoaded = NULL, hSystemOKToExit = NULL, hOptInitialise = NULL, hIcoLibIconsChanged = NULL;
+static HANDLE hHookExtraIconsRebuild = NULL, hHookExtraIconsApply = NULL, hContactMenu = NULL;
+static HANDLE hContactMenuMale = NULL, hContactMenuFemale = NULL, hContactMenuNotDef = NULL, hHookPrebuildContactMenu = NULL;
+static HANDLE hSetMale = NULL, hSetFemale = NULL, hSetUndef = NULL, hGenderGetIcon = NULL;
+
+HANDLE g_hExtraIcon = NULL;
+HANDLE g_hIconMale, g_hIconFemale, g_hIconMenu;
+IconExtraColumn g_IECMale = {0};
+IconExtraColumn g_IECFemale = {0};
+IconExtraColumn g_IECUndef = {0};
+IconExtraColumn g_IECClear = {0};
+
+int clistIcon = 0; // Icon slot to use
+byte bEnableClistIcon = 1; // do we need clist icon?
+byte bDrawNoGenderIcon = 0; // enable icon when no info?
+byte bContactMenuItems = 1; // do we need a contact menu items?
+byte bMetaAvail = 0; // metacontacts installed?
+
+extern int onOptInitialise(WPARAM wParam, LPARAM lParam);
+
+PLUGININFOEX pluginInfo={
+sizeof(PLUGININFOEX),
+#ifdef WIN64
+ "Show Contact Gender (x64)",
+#else
+ "Show Contact Gender",
+#endif
+ PLUGIN_MAKE_VERSION(0,0,2,1),
+ "Shows contacts gender as an icon in contact list",
+ "Thief, idea by nile, icons by a0x",
+ "thief@miranda.im",
+ "2006-2011 Alexander Turyak",
+ "http://thief.miranda.im/",
+ UNICODE_AWARE,
+ 0, //doesn't replace anything built-in
+#ifdef WIN64
+ { 0x3a99592e, 0x20d5, 0x4b72, { 0xa5, 0x96, 0xe6, 0x7d, 0xd7, 0x13, 0xde, 0xfb } } // {3A99592E-20D5-4B72-A596-E67DD713DEFB}
+#else
+ {0xfb1c17e0, 0x77fc, 0x45a7, {0x9c, 0x8b, 0xe2, 0xbe, 0xf4, 0xf5, 0x6b, 0x28}} /* FB1C17E0-77FC-45A7-9C8B-E2BEF4F56B28 */
+#endif
+};
+
+extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+{
+ g_hInst = hinstDLL;
+ return TRUE;
+}
+
+/* 0FF3991A-5505-479D-A2E0-53DD31C6DFA7 */
+#define MIID_GENDER {0x0ff3991a, 0x5505, 0x479d, {0xa2, 0xe0, 0x53, 0xdd, 0x31, 0xc6, 0xdf, 0xa7}}
+
+extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+{
+ static const MUUID interfaces[] = {MIID_GENDER, MIID_LAST};
+ return interfaces;
+}
+
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ return &pluginInfo;
+}
+
+void setIcon(HANDLE hContact, unsigned int gender)
+{
+ if (g_hExtraIcon != NULL)
+ {
+ char *ico;
+ switch (gender)
+ {
+ case 77: ico = "male_icon"; break;
+ case 70: ico = "female_icon"; break;
+ default: ico = (bDrawNoGenderIcon ? "menu_icon" : NULL); break;
+ }
+ ExtraIcon_SetIcon(g_hExtraIcon, hContact, ico);
+ }
+ else
+ {
+ IconExtraColumn *col;
+ switch (gender)
+ {
+ case 77: col = &g_IECMale; break;
+ case 70: col = &g_IECFemale; break;
+ default: col = (bDrawNoGenderIcon ? &g_IECUndef : &g_IECClear); break;
+ }
+ CallService(MS_CLIST_EXTRA_SET_ICON, (WPARAM)hContact, (LPARAM)col);
+ }
+}
+
+int onExtraImageApplying(WPARAM wParam, LPARAM lParam)
+{
+ if (g_hExtraIcon == NULL && !bEnableClistIcon) return 0;
+
+ HANDLE hContact = (HANDLE)wParam;
+ if (bMetaAvail)
+ {
+ HANDLE hMetacontact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, wParam, 0);
+ if (hMetacontact != NULL) hContact = hMetacontact;
+ }
+
+ char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
+ if (!proto) return 0;
+
+ if (DBGetContactSettingByte((HANDLE)wParam, proto, "ChatRoom", 0)) return 0;
+
+ unsigned int gender = DBGetContactSettingByte(hContact, "UserInfo", "Gender", DBGetContactSettingByte(hContact, proto, "Gender", 0));
+
+ setIcon(hContact, gender);
+ if ((HANDLE)wParam != hContact)
+ setIcon((HANDLE)wParam, gender);
+
+ return 0;
+}
+
+int onExtraImageListRebuild(WPARAM wParam, LPARAM lParam)
+{
+ g_IECMale.cbSize = sizeof(IconExtraColumn);
+ g_IECMale.ColumnType = clistIcon;
+ g_IECFemale.cbSize = sizeof(IconExtraColumn);
+ g_IECFemale.ColumnType = clistIcon;
+ g_IECUndef.cbSize = sizeof(IconExtraColumn);
+ g_IECUndef.ColumnType = clistIcon;
+
+ if (ServiceExists(MS_CLIST_EXTRA_ADD_ICON))
+ {
+ if(hIcoLibIconsChanged)
+ {
+ g_IECMale.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_hIconMale), (LPARAM)0);
+ g_IECFemale.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_hIconFemale), (LPARAM)0);
+ g_IECUndef.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_hIconMenu), (LPARAM)0);
+ }
+ }
+
+ return 0;
+}
+
+// Returns gender icon for specific contact
+INT_PTR GetIcon(WPARAM wParam, LPARAM lParam)
+{
+ char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
+ unsigned short gender = DBGetContactSettingByte((HANDLE)wParam, "UserInfo", "Gender", DBGetContactSettingByte((HANDLE)wParam, proto, "Gender", 0));
+
+ if (gender > 0)
+ {
+ if (gender == 77) return CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_hIconMale);
+ else if (gender == 70) return CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_hIconFemale);
+ }
+
+ return 0;
+}
+
+int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam)
+{
+ char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
+
+ if (!proto) return 0;
+
+ CLISTMENUITEM mi = {0};
+ mi.cbSize = sizeof(CLISTMENUITEM);
+
+
+ if (DBGetContactSettingByte((HANDLE)wParam, proto, "ChatRoom", 0) || !(CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND))
+ mi.flags = CMIM_FLAGS | CMIF_HIDDEN;
+ else
+ mi.flags = CMIM_FLAGS;
+
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hContactMenu, (LPARAM)&mi);
+
+ unsigned short gender = DBGetContactSettingByte((HANDLE)wParam, proto, "Gender", DBGetContactSettingByte((HANDLE)wParam, "UserInfo", "Gender", 0));
+
+ CLISTMENUITEM mitem = {0};
+ mitem.cbSize = sizeof(CLISTMENUITEM);
+ mitem.flags = CMIM_FLAGS;
+
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hContactMenuMale, (LPARAM)&mitem);
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hContactMenuFemale, (LPARAM)&mitem);
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hContactMenuNotDef, (LPARAM)&mitem);
+
+ mitem.flags = CMIM_FLAGS | CMIF_CHECKED;
+
+ switch (gender)
+ {
+ case 77:
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hContactMenuMale, (LPARAM)&mitem);
+ break;
+ case 70:
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hContactMenuFemale, (LPARAM)&mitem);
+ break;
+ case 0:
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hContactMenuNotDef, (LPARAM)&mitem);
+ break;
+ }
+
+ return 0;
+}
+
+void setGender(HANDLE hContact, unsigned int gender)
+{
+ DBWriteContactSettingByte(hContact, "UserInfo", "Gender", gender);
+ setIcon(hContact, gender);
+
+ int metasnum = (bMetaAvail ? CallService(MS_MC_GETNUMCONTACTS,(WPARAM)hContact,0) : 0);
+ for(int i=0; i<metasnum; i++)
+ {
+ HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, i);
+ DBWriteContactSettingByte(hSubContact, "UserInfo", "Gender", gender);
+ setIcon(hSubContact, gender);
+ }
+}
+
+INT_PTR onSetMale(WPARAM wParam,LPARAM lParam)
+{
+ setGender((HANDLE)wParam, 77);
+ return 0;
+}
+
+INT_PTR onSetFemale(WPARAM wParam,LPARAM lParam)
+{
+ setGender((HANDLE)wParam, 70);
+ return 0;
+}
+
+INT_PTR onSetUndef(WPARAM wParam,LPARAM lParam)
+{
+ DBDeleteContactSetting((HANDLE)wParam, "UserInfo", "Gender");
+ onExtraImageApplying(wParam, 0);
+
+ int metasnum = (bMetaAvail ? CallService(MS_MC_GETNUMCONTACTS,wParam,0) : 0);
+ for(int i=0; i<metasnum; i++)
+ {
+ HANDLE hContact = (HANDLE)CallService(MS_MC_GETSUBCONTACT, wParam, i);
+ DBDeleteContactSetting(hContact, "UserInfo", "Gender");
+ onExtraImageApplying((WPARAM)hContact, 0);
+ }
+
+ return 0;
+}
+
+int onModulesLoaded(WPARAM wParam,LPARAM lParam)
+{
+ hOptInitialise = HookEvent(ME_OPT_INITIALISE, onOptInitialise);
+ if (bContactMenuItems) hHookPrebuildContactMenu = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, onPrebuildContactMenu);
+ bMetaAvail = (ServiceExists(MS_MC_GETMETACONTACT) != 0);
+
+ //IcoLib support
+ if(ServiceExists(MS_SKIN2_ADDICON))
+ {
+ SKINICONDESC sid = {0};
+ sid.cbSize = SKINICONDESC_SIZE;
+ sid.flags = SIDF_ALL_TCHAR;
+ sid.ptszSection = LPGENT("Gender");
+ TCHAR szFile[MAX_PATH];
+ GetModuleFileName(g_hInst, szFile, MAX_PATH);
+ sid.ptszDefaultFile = szFile;
+
+ sid.ptszDescription = LPGENT("Male");
+ sid.pszName = "male_icon";
+ sid.iDefaultIndex = -IDI_MALE;
+ g_hIconMale = (HANDLE)CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+
+ sid.ptszDescription = LPGENT("Female");
+ sid.pszName = "female_icon";
+ sid.iDefaultIndex = -IDI_FEMALE;
+ g_hIconFemale = (HANDLE)CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+
+ sid.ptszDescription = LPGENT("No info");
+ sid.pszName = "menu_icon";
+ sid.iDefaultIndex = -IDI_UNDEF;
+ g_hIconMenu = (HANDLE)CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+
+ hIcoLibIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, onExtraImageListRebuild);
+ }
+
+ g_hExtraIcon = ExtraIcon_Register("gender", "Gender", "menu_icon");
+ if (g_hExtraIcon != NULL)
+ {
+ HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ while (hContact != NULL)
+ {
+ onExtraImageApplying((WPARAM) hContact, 0);
+
+ hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ }
+ }
+ else
+ {
+ hHookExtraIconsRebuild = HookEvent(ME_CLIST_EXTRA_LIST_REBUILD, onExtraImageListRebuild);
+ hHookExtraIconsApply = HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, onExtraImageApplying);
+
+ onExtraImageListRebuild(0,0);
+ }
+
+ // Adding menu items, submenu even if clist supports that
+ if (bContactMenuItems)
+ {
+ if(ServiceExists(MS_CLIST_ADDSUBGROUPMENUITEM))
+ {
+ CLISTMENUITEM mi = {0};
+ mi.cbSize = sizeof(CLISTMENUITEM);
+ mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB | CMIF_TCHAR;
+ mi.icolibItem = g_hIconMenu;
+ mi.pszPopupName = (char*)-1;
+ mi.position = 203;
+ mi.ptszName = LPGENT("Set Gender");
+ mi.pszService = NULL;
+ hContactMenu = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mi);
+
+ mi.flags = CMIF_CHILDPOPUP | CMIF_ICONFROMICOLIB | CMIF_TCHAR;
+ mi.position = 1001;
+ mi.pszPopupName = (char*)hContactMenu;
+
+ mi.ptszName = LPGENT("Male");
+ mi.icolibItem = g_hIconMale;
+ mi.pszService = "Gender/MenuItemSetMale";
+ hContactMenuMale = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mi);
+
+ mi.ptszName = LPGENT("Female");
+ mi.icolibItem = g_hIconFemale;
+ mi.pszService = "Gender/MenuItemSetFemale";
+ hContactMenuFemale = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mi);
+
+ mi.ptszName = LPGENT("Undefined");
+ mi.hIcon = NULL;
+ mi.pszService = "Gender/MenuItemSetUndef";
+ hContactMenuNotDef = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mi);
+ }
+ else
+ {
+ CLISTMENUITEM mimale = {0};
+ mimale.cbSize = sizeof(CLISTMENUITEM);
+ mimale.flags = CMIF_ICONFROMICOLIB | CMIF_TCHAR;
+ mimale.position = 1001;
+ mimale.ptszName = LPGENT("Set Male");
+ mimale.icolibItem = g_hIconMale;
+ mimale.pszService = "Gender/MenuItemSetMale";
+ hContactMenuMale = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mimale);
+
+ CLISTMENUITEM mifemale = {0};
+ mifemale.cbSize = sizeof(CLISTMENUITEM);
+ mifemale.flags = CMIF_ICONFROMICOLIB | CMIF_TCHAR;
+ mifemale.position = 1002;
+ mifemale.ptszName = LPGENT("Set Female");
+ mifemale.icolibItem = g_hIconFemale;
+ mifemale.pszService = "Gender/MenuItemSetFemale";
+ hContactMenuFemale = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mifemale);
+
+ CLISTMENUITEM miundef = {0};
+ miundef.cbSize = sizeof(CLISTMENUITEM);
+ miundef.flags = CMIF_TCHAR;
+ miundef.position = 1003;
+ miundef.ptszName = LPGENT("Set Undefined");
+ miundef.pszService = "Gender/MenuItemSetUndef";
+ miundef.hIcon = NULL;
+ hContactMenuNotDef = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &miundef);
+ }
+ }
+
+ // Updater support
+ if (ServiceExists(MS_UPDATE_REGISTER))
+ {
+ Update update = {0};
+ char szVersion[16];
+
+ update.cbSize = sizeof(Update);
+
+ update.szComponentName = pluginInfo.shortName;
+ update.pbVersion = (BYTE *)CreateVersionStringPluginEx(&pluginInfo, szVersion);
+ update.cpbVersion = strlen((char *)update.pbVersion);
+
+ update.szUpdateURL = UPDATER_AUTOREGISTER;
+
+#ifndef WIN64
+ // these are the three lines that matter - the archive, the page containing the version string, and the text (or data)
+ // before the version that we use to locate it on the page
+ // (note that if the update URL and the version URL point to standard file listing entries, the backend xml
+ // data will be used to check for updates rather than the actual web page - this is not true for beta urls)
+ update.szBetaUpdateURL = "http://thief.miranda.im/gender.zip";
+ update.szBetaVersionURL = "http://thief.miranda.im/updater/gender_version.txt";
+ update.szBetaChangelogURL = "http://thief.miranda.im";
+ update.pbBetaVersionPrefix = (BYTE *)"Gender ";
+
+ update.cpbBetaVersionPrefix = strlen((char *)update.pbBetaVersionPrefix);
+#endif
+
+ CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
+ }
+
+ return 0;
+}
+
+int onSystemOKToExit(WPARAM wParam,LPARAM lParam)
+{
+ UnhookEvent(hHookModulesLoaded);
+ UnhookEvent(hHookExtraIconsRebuild);
+ UnhookEvent(hHookExtraIconsApply);
+ UnhookEvent(hHookPrebuildContactMenu);
+ UnhookEvent(hOptInitialise);
+ UnhookEvent(hSystemOKToExit);
+ if (hIcoLibIconsChanged) UnhookEvent(hIcoLibIconsChanged);
+
+
+ DestroyServiceFunction(hSetMale);
+ DestroyServiceFunction(hSetFemale);
+ DestroyServiceFunction(hSetUndef);
+ DestroyServiceFunction(hGenderGetIcon);
+
+ if (hIcoLibIconsChanged)
+ {
+ CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)"menu_icon");
+ CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)"male_icon");
+ CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)"female_icon");
+ }
+
+ return 0;
+}
+
+extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
+{
+ pluginLink = link;
+
+ hHookModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, onModulesLoaded);
+ hSystemOKToExit = HookEvent(ME_SYSTEM_OKTOEXIT,onSystemOKToExit);
+
+ bEnableClistIcon = DBGetContactSettingByte(NULL, MODULENAME, "ClistIcon", 1);
+ bContactMenuItems = DBGetContactSettingByte(NULL, MODULENAME, "MenuItems", 1);
+ bDrawNoGenderIcon = DBGetContactSettingByte(NULL, MODULENAME, "NoGenderIcon", 0);
+
+
+ hSetMale = CreateServiceFunction("Gender/MenuItemSetMale", onSetMale);
+ hSetFemale = CreateServiceFunction("Gender/MenuItemSetFemale", onSetFemale);
+ hSetUndef = CreateServiceFunction("Gender/MenuItemSetUndef", onSetUndef);
+
+ clistIcon = DBGetContactSettingByte(NULL, MODULENAME, "AdvancedIcon", DefaultSlot);
+ g_IECClear.cbSize = sizeof(IconExtraColumn);
+ g_IECClear.ColumnType = clistIcon;
+ g_IECClear.hImage = (HANDLE) -1;
+
+ hGenderGetIcon = CreateServiceFunction(MS_GENDER_GETICON, GetIcon);
+
+ return 0;
+}
+
+extern "C" int __declspec(dllexport) Unload(void)
+{
+ return 0;
+}
diff --git a/gender/options.cpp b/gender/options.cpp
new file mode 100644
index 0000000..32d919c
--- /dev/null
+++ b/gender/options.cpp
@@ -0,0 +1,167 @@
+/*
+ Show Contact Gender plugin for Miranda-IM (www.miranda-im.org)
+ (c) 2006-2011 by Thief
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ 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
+
+ File name : $URL: http://svn.miranda.im/mainrepo/gender/trunk/options.cpp $
+ Revision : $Rev: 1687 $
+ Last change on : $Date: 2011-01-22 18:44:21 +0200 (Сб, 22 янв 2011) $
+ Last change by : $Author: Thief $
+
+*/
+
+#include "commonheaders.h"
+
+extern HINSTANCE g_hInst;
+extern int onExtraImageApplying(WPARAM wParam, LPARAM lParam);
+extern int onExtraImageListRebuild(WPARAM wParam, LPARAM lParam);
+extern IconExtraColumn g_IECClear;
+extern int clistIcon;
+extern HANDLE g_hExtraIcon;
+extern byte bContactMenuItems, bEnableClistIcon, bDrawNoGenderIcon;
+const TCHAR *szAdvancedIcons[] = {LPGENT("Email"), LPGENT("Protocol"), LPGENT("SMS"), LPGENT("Advanced 1"), LPGENT("Advanced 2"), LPGENT("Web"), LPGENT("Client"), LPGENT("Advanced 3"), LPGENT("Advanced 4"), LPGENT("Advanced 5")};
+const int cAdvancedIcons = sizeof(szAdvancedIcons) / sizeof(szAdvancedIcons[0]);
+
+INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ static int bInitializing = 0;
+ switch (msg)
+ {
+ case WM_INITDIALOG:
+ {
+ TranslateDialogDefault(hwndDlg);
+ bInitializing = 1;
+ if (g_hExtraIcon == NULL)
+ {
+ SendMessage(GetDlgItem(hwndDlg, IDC_ADVICON), CB_ADDSTRING, 0, (LPARAM) TranslateT("Disabled"));
+ for (int i = 0; i < cAdvancedIcons; i++)
+ {
+ SendMessage(GetDlgItem(hwndDlg, IDC_ADVICON), CB_ADDSTRING, 0, (LPARAM) TranslateTS(szAdvancedIcons[i]));
+ }
+
+ if (bEnableClistIcon)
+ SendMessage(GetDlgItem(hwndDlg, IDC_ADVICON), CB_SETCURSEL, clistIcon, 0);
+ else
+ SendMessage(GetDlgItem(hwndDlg, IDC_ADVICON), CB_SETCURSEL, 0, 0);
+ }
+ else
+ {
+ ShowWindow(GetDlgItem(hwndDlg, IDC_USE_L), SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_ADVICON), SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_SLOT_L), SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_NOTE_L), SW_HIDE);
+ }
+ CheckDlgButton(hwndDlg, IDC_MENUITEMS, DBGetContactSettingByte(NULL, MODULENAME, "MenuItems", 1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DRAWUNDEFICON, bDrawNoGenderIcon ? BST_CHECKED : BST_UNCHECKED);
+
+ bInitializing = 0;
+ return TRUE;
+ }
+
+ case WM_COMMAND:
+ {
+ switch (LOWORD(wParam)) {
+ case IDC_ADVICON:
+ {
+ if ((HIWORD(wParam) == EN_CHANGE) && (!bInitializing) || (HIWORD(wParam) == CBN_SELENDOK))
+ {
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ }
+ }
+ break;
+ case IDC_MENUITEMS:
+ case IDC_DRAWUNDEFICON:
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ }
+ }
+ break;
+
+ case WM_NOTIFY:
+ {
+ if (((LPNMHDR)lParam)->idFrom == 0)
+ switch (((LPNMHDR)lParam)->code)
+ {
+ case PSN_APPLY:
+ {
+ HANDLE hContact;
+
+ bDrawNoGenderIcon = IsDlgButtonChecked(hwndDlg, IDC_DRAWUNDEFICON);
+
+ if (g_hExtraIcon == NULL)
+ {
+ clistIcon = SendMessage(GetDlgItem(hwndDlg, IDC_ADVICON), CB_GETCURSEL, 0, 0);
+ DBWriteContactSettingByte(NULL, MODULENAME, "AdvancedIcon", clistIcon);
+
+ if (bEnableClistIcon)
+ {
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ while (hContact)
+ {
+ CallService(MS_CLIST_EXTRA_SET_ICON, (WPARAM)hContact, (LPARAM)&g_IECClear);
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ }
+ }
+
+ bEnableClistIcon = (clistIcon != 0);
+
+ if (bEnableClistIcon)
+ {
+ g_IECClear.ColumnType = clistIcon;
+ onExtraImageListRebuild(0,0);
+ }
+ }
+
+ if (g_hExtraIcon != NULL || bEnableClistIcon)
+ {
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ while (hContact)
+ {
+ onExtraImageApplying((WPARAM)hContact,0);
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ }
+ }
+
+ DBWriteContactSettingByte(NULL, MODULENAME, "ClistIcon", bEnableClistIcon);
+ DBWriteContactSettingByte(NULL, MODULENAME, "NoGenderIcon", bDrawNoGenderIcon);
+ DBWriteContactSettingByte(NULL, MODULENAME, "MenuItems", IsDlgButtonChecked(hwndDlg, IDC_MENUITEMS));
+ }
+ return TRUE;
+ }
+ }
+
+ case WM_DESTROY:
+ break;
+ }
+ return FALSE;
+}
+
+int onOptInitialise(WPARAM wParam, LPARAM lParam)
+{
+ OPTIONSDIALOGPAGE odp;
+ ZeroMemory(&odp, sizeof(odp));
+ odp.cbSize = sizeof(odp);
+ odp.position = 0;
+ odp.hInstance = g_hInst;
+ odp.ptszGroup = LPGENT("Plugins");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_GENDER_OPT);
+ odp.ptszTitle = LPGENT("Gender");
+ odp.pfnDlgProc = DlgProcOptions;
+ odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
+ CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+
+ return 0;
+}
diff --git a/gender/resource.h b/gender/resource.h
new file mode 100644
index 0000000..8ea2786
--- /dev/null
+++ b/gender/resource.h
@@ -0,0 +1,25 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by gender.rc
+//
+#define IDD_GENDER_OPT 9
+#define IDI_MALE 101
+#define IDI_FEMALE 102
+#define IDI_UNDEF 103
+#define IDC_ADVICON 1001
+#define IDC_MENUITEMS 1002
+#define IDC_DRAWUNDEFICON 1003
+#define IDC_USE_L 1004
+#define IDC_SLOT_L 1005
+#define IDC_NOTE_L 1006
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 104
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1007
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/gender/sdk/m_extraicons.h b/gender/sdk/m_extraicons.h
new file mode 100644
index 0000000..1e86cb1
--- /dev/null
+++ b/gender/sdk/m_extraicons.h
@@ -0,0 +1,182 @@
+/*
+ Copyright (C) 2009 Ricardo Pescuma Domenecci
+
+ This is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this file; see the file license.txt. If
+ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __M_EXTRAICONS_H__
+#define __M_EXTRAICONS_H__
+
+
+/*
+
+There is 2 ways of registering with Extra Icons service:
+
+1. Using callbacks
+ This works similar to clist API. When you register you provide 2 callbacks, one to rebuild the icons
+and one to apply the icons for a contact.
+ In the RebuildIcons callback, all icons that will be used have to be registered calling
+MS_CLIST_EXTRA_ADD_ICON service. The value returned by this service has to be stored and used in the
+apply icons.
+ The ApplyIcons callback will be called for all the needed contacts. Inside it, you must call
+MS_EXTRAICON_SET_ICON to set the icon for the contact, sending the value returned by MS_CLIST_EXTRA_ADD_ICON
+as the hImage.
+
+2. Using icolib
+ In this case no callback is needed and the plugin just need to call MS_EXTRAICON_SET_ICON passing the
+icolib name in icoName when needed. If your plugin can have extra icons on startup, remember to do a loop
+over all contacts to set the initial icon.
+
+
+To register a new extra icon, you have to call MS_EXTRAICON_REGISTER passing the needed atributes.
+
+*/
+
+#define MIID_EXTRAICONSSERVICE { 0x62d80749, 0xf169, 0x4592, { 0xb4, 0x4d, 0x3d, 0xd6, 0xde, 0x9d, 0x50, 0xc5 } }
+
+
+#define EXTRAICON_TYPE_CALLBACK 0 // Similar to old clist callbacks, it fires 2 notifications
+#define EXTRAICON_TYPE_ICOLIB 1 // This extra icon will use only icons registered with icolib. No callbacks
+ // needed. Just call MS_EXTRAICON_SET_ICON passing the name of the extraicon to set one.
+
+
+typedef struct {
+ int cbSize;
+ int type; // One of EXTRAICON_TYPE_*
+ const char *name; // Internal name. More than one plugin can register extra icons with the same name
+ // if both have the same type. In this case, both will be handled as one.
+ // If the types are different the second one will be denied.
+ const char *description; // [Translated by plugin] Description to be used in GUI
+ const char *descIcon; // [Optional] Name of an icon registered with icolib to be used in GUI.
+
+ // If type == EXTRAICON_TYPE_CALLBACK this two must be set
+
+ // Callback to add icons to clist, calling MS_CLIST_EXTRA_ADD_ICON
+ // wParam=lParam=0
+ MIRANDAHOOK RebuildIcons;
+
+ // Callback to set the icon to clist, calling MS_CLIST_EXTRA_SET_ICON or MS_EXTRAICON_SET_ICON
+ // wParam = HANDLE hContact
+ // lParam = 0
+ MIRANDAHOOK ApplyIcon;
+
+ // Other optional callbacks
+
+ // [Optional] Callback called when extra icon was clicked
+ // wParam = HANDLE hContact
+ // lParam = int slot
+ // param = onClickParam
+ MIRANDAHOOKPARAM OnClick;
+
+ LPARAM onClickParam;
+
+} EXTRAICON_INFO;
+
+
+// Register an extra icon
+// wParam = (EXTRAICON_INFO *) Extra icon info
+// lParam = 0
+// Return: (HANDLE) id of extra icon on success, 0 on error
+#define MS_EXTRAICON_REGISTER "ExtraIcon/Register"
+
+
+typedef struct {
+ int cbSize;
+ HANDLE hExtraIcon; // Value returned by MS_EXTRAICON_REGISTER
+ HANDLE hContact; // Contact to set the extra icon
+ union { // The icon to be set. This depends on the type of the extra icon:
+ HANDLE hImage; // Value returned by MS_CLIST_EXTRA_ADD_ICON (if EXTRAICON_TYPE_CALLBACK)
+ const char *icoName; // Name of the icon registered with icolib (if EXTRAICON_TYPE_ICOLIB)
+ };
+} EXTRAICON;
+
+// Set an extra icon icon
+// wParam = (EXTRAICON *) Extra icon
+// Return: 0 on success
+#define MS_EXTRAICON_SET_ICON "ExtraIcon/SetIcon"
+
+
+
+#ifndef _NO_WRAPPERS
+#ifdef __cplusplus
+
+static HANDLE ExtraIcon_Register(const char *name, const char *description, const char *descIcon,
+ MIRANDAHOOK RebuildIcons,
+ MIRANDAHOOK ApplyIcon,
+ MIRANDAHOOKPARAM OnClick = NULL, LPARAM onClickParam = 0)
+{
+ if (!ServiceExists(MS_EXTRAICON_REGISTER))
+ return NULL;
+
+ EXTRAICON_INFO ei = {0};
+ ei.cbSize = sizeof(ei);
+ ei.type = EXTRAICON_TYPE_CALLBACK;
+ ei.name = name;
+ ei.description = description;
+ ei.descIcon = descIcon;
+ ei.RebuildIcons = RebuildIcons;
+ ei.ApplyIcon = ApplyIcon;
+ ei.OnClick = OnClick;
+ ei.onClickParam = onClickParam;
+
+ return (HANDLE) CallService(MS_EXTRAICON_REGISTER, (WPARAM) &ei, 0);
+}
+
+static HANDLE ExtraIcon_Register(const char *name, const char *description, const char *descIcon = NULL,
+ MIRANDAHOOKPARAM OnClick = NULL, LPARAM onClickParam = 0)
+{
+ if (!ServiceExists(MS_EXTRAICON_REGISTER))
+ return NULL;
+
+ EXTRAICON_INFO ei = {0};
+ ei.cbSize = sizeof(ei);
+ ei.type = EXTRAICON_TYPE_ICOLIB;
+ ei.name = name;
+ ei.description = description;
+ ei.descIcon = descIcon;
+ ei.OnClick = OnClick;
+ ei.onClickParam = onClickParam;
+
+ return (HANDLE) CallService(MS_EXTRAICON_REGISTER, (WPARAM) &ei, 0);
+}
+
+static int ExtraIcon_SetIcon(HANDLE hExtraIcon, HANDLE hContact, HANDLE hImage)
+{
+ EXTRAICON ei = {0};
+ ei.cbSize = sizeof(ei);
+ ei.hExtraIcon = hExtraIcon;
+ ei.hContact = hContact;
+ ei.hImage = hImage;
+
+ return CallService(MS_EXTRAICON_SET_ICON, (WPARAM) &ei, 0);
+}
+
+static int ExtraIcon_SetIcon(HANDLE hExtraIcon, HANDLE hContact, const char *icoName)
+{
+ EXTRAICON ei = {0};
+ ei.cbSize = sizeof(ei);
+ ei.hExtraIcon = hExtraIcon;
+ ei.hContact = hContact;
+ ei.icoName = icoName;
+
+ return CallService(MS_EXTRAICON_SET_ICON, (WPARAM) &ei, 0);
+}
+
+#endif
+#endif
+
+
+#endif // __M_EXTRAICONS_H__
diff --git a/gender/sdk/m_gender.h b/gender/sdk/m_gender.h
new file mode 100644
index 0000000..9882425
--- /dev/null
+++ b/gender/sdk/m_gender.h
@@ -0,0 +1,30 @@
+/*
+ Show Contact Gender plugin for Miranda-IM (www.miranda-im.org)
+ (c) 2006-2007 by Thief
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ 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
+
+ File name : $URL: http://svn.miranda.im/mainrepo/gender/trunk/m_gender.h $
+ Revision : $Rev: 957 $
+ Last change on : $Date: 2007-10-19 13:46:08 +0300 (Пт, 19 окт 2007) $
+ Last change by : $Author: Thief $
+
+*/
+
+// Returns gender icon for specific contact
+// wParam = hContact
+// lParam = 0
+// return = HICON
+#define MS_GENDER_GETICON "Gender/GenderGetIcon"
diff --git a/gender/sdk/m_metacontacts.h b/gender/sdk/m_metacontacts.h
new file mode 100644
index 0000000..9f348bd
--- /dev/null
+++ b/gender/sdk/m_metacontacts.h
@@ -0,0 +1,166 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2004 Universite Louis PASTEUR, STRASBOURG.
+Copyright 2004 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+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.
+*/
+
+#ifndef M_METACONTACTS_H__
+#define M_METACONTACTS_H__ 1
+
+#ifndef MIID_METACONTACTS
+#define MIID_METACONTACTS {0xc0325019, 0xc1a7, 0x40f5, { 0x83, 0x65, 0x4f, 0x46, 0xbe, 0x21, 0x86, 0x3e}}
+#endif
+
+//get the handle for a contact's parent metacontact
+//wParam=(HANDLE)hSubContact
+//lParam=0
+//returns a handle to the parent metacontact, or null if this contact is not a subcontact
+#define MS_MC_GETMETACONTACT "MetaContacts/GetMeta"
+
+//gets the handle for the default contact
+//wParam=(HANDLE)hMetaContact
+//lParam=0
+//returns a handle to the default contact, or null on failure
+#define MS_MC_GETDEFAULTCONTACT "MetaContacts/GetDefault"
+
+//gets the contact number for the default contact
+//wParam=(HANDLE)hMetaContact
+//lParam=0
+//returns a DWORD contact number, or -1 on failure
+#define MS_MC_GETDEFAULTCONTACTNUM "MetaContacts/GetDefaultNum"
+
+//gets the handle for the 'most online' contact
+//wParam=(HANDLE)hMetaContact
+//lParam=0
+//returns a handle to the 'most online' contact
+#define MS_MC_GETMOSTONLINECONTACT "MetaContacts/GetMostOnline"
+
+//gets the number of subcontacts for a metacontact
+//wParam=(HANDLE)hMetaContact
+//lParam=0
+//returns a DWORD representing the number of subcontacts for the given metacontact
+#define MS_MC_GETNUMCONTACTS "MetaContacts/GetNumContacts"
+
+//gets the handle of a subcontact, using the subcontact's number
+//wParam=(HANDLE)hMetaContact
+//lParam=(DWORD)contact number
+//returns a handle to the specified subcontact
+#define MS_MC_GETSUBCONTACT "MetaContacts/GetSubContact"
+
+//sets the default contact, using the subcontact's contact number
+//wParam=(HANDLE)hMetaContact
+//lParam=(DWORD)contact number
+//returns 0 on success
+#define MS_MC_SETDEFAULTCONTACTNUM "MetaContacts/SetDefault"
+
+//sets the default contact, using the subcontact's handle
+//wParam=(HANDLE)hMetaContact
+//lParam=(HANDLE)hSubcontact
+//returns 0 on success
+#define MS_MC_SETDEFAULTCONTACT "MetaContacts/SetDefaultByHandle"
+
+//forces the metacontact to send using a specific subcontact, using the subcontact's contact number
+//wParam=(HANDLE)hMetaContact
+//lParam=(DWORD)contact number
+//returns 0 on success
+#define MS_MC_FORCESENDCONTACTNUM "MetaContacts/ForceSendContact"
+
+//forces the metacontact to send using a specific subcontact, using the subcontact's handle
+//wParam=(HANDLE)hMetaContact
+//lParam=(HANDLE)hSubcontact
+//returns 0 on success (will fail if 'force default' is in effect)
+#define MS_MC_FORCESENDCONTACT "MetaContacts/ForceSendContactByHandle"
+
+//'unforces' the metacontact to send using a specific subcontact
+//wParam=(HANDLE)hMetaContact
+//lParam=0
+//returns 0 on success (will fail if 'force default' is in effect)
+#define MS_MC_UNFORCESENDCONTACT "MetaContacts/UnforceSendContact"
+
+//'forces' or 'unforces' (i.e. toggles) the metacontact to send using it's default contact
+// overrides (and clears) 'force send' above, and will even force use of offline contacts
+// will send ME_MC_FORCESEND or ME_MC_UNFORCESEND event
+//wParam=(HANDLE)hMetaContact
+//lParam=0
+//returns 1(true) or 0(false) representing new state of 'force default'
+#define MS_MC_FORCEDEFAULT "MetaContacts/ForceSendDefault"
+
+// method to get state of 'force' for a metacontact
+// wParam=(HANDLE)hMetaContact
+// lParam= (DWORD)&contact_number or NULL
+//
+// if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to,
+// or if none is in force, the value (DWORD)-1 will be copied
+// (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above)
+#define MS_MC_GETFORCESTATE "MetaContacts/GetForceState"
+
+// fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set)
+// wParam=(HANDLE)hMetaContact
+// lParam=(HANDLE)hDefaultContact
+#define ME_MC_DEFAULTTCHANGED "MetaContacts/DefaultChanged"
+
+// fired when a metacontact's subcontacts change (fired upon creation of metacontact, when contacts are added or removed, and when
+// contacts are reordered) - a signal to re-read metacontact data
+// wParam=(HANDLE)hMetaContact
+// lParam=0
+#define ME_MC_SUBCONTACTSCHANGED "MetaContacts/SubcontactsChanged"
+
+// fired when a metacontact is forced to send using a specific subcontact
+// wParam=(HANDLE)hMetaContact
+// lParam=(HANDLE)hForceContact
+#define ME_MC_FORCESEND "MetaContacts/ForceSend"
+
+// fired when a metacontact is 'unforced' to send using a specific subcontact
+// wParam=(HANDLE)hMetaContact
+// lParam=0
+#define ME_MC_UNFORCESEND "MetaContacts/UnforceSend"
+
+// method to get protocol name - used to be sure you're dealing with a "real" metacontacts plugin :)
+// wParam=lParam=0
+#define MS_MC_GETPROTOCOLNAME "MetaContacts/GetProtoName"
+
+
+// added 0.9.5.0 (22/3/05)
+// wParam=(HANDLE)hContact
+// lParam=0
+// convert a given contact into a metacontact
+#define MS_MC_CONVERTTOMETA "MetaContacts/ConvertToMetacontact"
+
+// added 0.9.5.0 (22/3/05)
+// wParam=(HANDLE)hContact
+// lParam=(HANDLE)hMeta
+// add an existing contact to a metacontact
+#define MS_MC_ADDTOMETA "MetaContacts/AddToMetacontact"
+
+// added 0.9.5.0 (22/3/05)
+// wParam=0
+// lParam=(HANDLE)hContact
+// remove a contact from a metacontact
+#define MS_MC_REMOVEFROMMETA "MetaContacts/RemoveFromMetacontact"
+
+
+// added 0.9.13.2 (6/10/05)
+// wParam=(BOOL)disable
+// lParam=0
+// enable/disable the 'hidden group hack' - for clists that support subcontact hiding using 'IsSubcontact' setting
+// should be called once in the clist 'onmodulesloaded' event handler (which, since it's loaded after the db, will be called
+// before the metacontact onmodulesloaded handler where the subcontact hiding is usually done)
+#define MS_MC_DISABLEHIDDENGROUP "MetaContacts/DisableHiddenGroup"
+
+#endif
diff --git a/gender/sdk/m_updater.h b/gender/sdk/m_updater.h
new file mode 100644
index 0000000..488d372
--- /dev/null
+++ b/gender/sdk/m_updater.h
@@ -0,0 +1,150 @@
+#ifndef _M_UPDATER_H
+#define _M_UPDATER_H
+
+// NOTES:
+// - For langpack updates, include a string of the following format in the langpack text file:
+// ";FLID: <file listing name> <version>"
+// version must be four numbers seperated by '.', in the range 0-255 inclusive
+// - Updater will disable plugins that are downloaded but were not active prior to the update (this is so that, if an archive contains e.g. ansi and
+// unicode versions, the correct plugin will be the only one active after the new version is installed)...so if you add a support plugin, you may need
+// to install an ini file to make the plugin activate when miranda restarts after the update
+// - Updater will replace all dlls that have the same internal shortName as a downloaded update dll (this is so that msn1.dll and msn2.dll, for example,
+// will both be updated) - so if you have a unicode and a non-unicode version of a plugin in your archive, you should make the internal names different (which will break automatic
+// updates from the file listing if there is only one file listing entry for both versions, unless you use the 'MS_UPDATE_REGISTER' service below)
+// - Updater will install all files in the root of the archive into the plugins folder, except for langpack files that contain the FLID string which go into the root folder (same
+// folder as miranda32.exe)...all folders in the archive will also be copied to miranda's root folder, and their contents transferred into the new folders. The only exception is a
+// special folder called 'root_files' - if there is a folder by that name in the archive, it's contents will also be copied into miranda's root folder - this is intended to be used
+// to install additional dlls etc that a plugin may require)
+
+// if you set Update.szUpdateURL to the following value when registering, as well as setting your beta site and version data,
+// Updater will ignore szVersionURL and pbVersionPrefix, and attempt to find the file listing URL's from the backend XML data.
+// for this to work, the plugin name in pluginInfo.shortName must match the file listing exactly (except for case)
+#define UPDATER_AUTOREGISTER "UpdaterAUTOREGISTER"
+// Updater will also use the backend xml data if you provide URL's that reference the miranda file listing for updates (so you can use that method
+// if e.g. your plugin shortName does not match the file listing) - it will grab the file listing id from the end of these URLs
+
+typedef struct Update_tag {
+ int cbSize;
+ char *szComponentName; // component name as it will appear in the UI (will be translated before displaying)
+
+ char *szVersionURL; // URL where the current version can be found (NULL to disable)
+ BYTE *pbVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
+ // (note that this URL could point at a binary file - dunno why, but it could :)
+ int cpbVersionPrefix; // number of bytes pointed to by pbVersionPrefix
+ char *szUpdateURL; // URL where dll/zip is located
+ // set to UPDATER_AUTOREGISTER if you want Updater to find the file listing URLs (ensure plugin shortName matches file listing!)
+
+ char *szBetaVersionURL; // URL where the beta version can be found (NULL to disable betas)
+ BYTE *pbBetaVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
+ int cpbBetaVersionPrefix; // number of bytes pointed to by pbVersionPrefix
+ char *szBetaUpdateURL; // URL where dll/zip is located
+
+ BYTE *pbVersion; // bytes of current version, used for comparison with those in VersionURL
+ int cpbVersion; // number of bytes pointed to by pbVersion
+
+ char *szBetaChangelogURL; // url for displaying changelog for beta versions
+} Update;
+
+// register a comonent with Updater
+//
+// wparam = 0
+// lparam = (LPARAM)&Update
+#define MS_UPDATE_REGISTER "Update/Register"
+
+// utility functions to create a version string from a DWORD or from pluginInfo
+// point buf at a buffer at least 16 chars wide - but note the version string returned may be shorter
+//
+__inline static char *CreateVersionString(DWORD version, char *buf) {
+ mir_snprintf(buf, 16, "%d.%d.%d.%d", (version >> 24) & 0xFF, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
+ return buf;
+}
+
+__inline static char *CreateVersionStringPlugin(PLUGININFO *pluginInfo, char *buf) {
+ return CreateVersionString(pluginInfo->version, buf);
+}
+
+__inline static char *CreateVersionStringPluginEx(PLUGININFOEX *pluginInfo, char *buf) {
+ return CreateVersionString(pluginInfo->version, buf);
+}
+
+
+// register the 'easy' way - use this method if you have no beta URL and the plugin is on the miranda file listing
+// NOTE: the plugin version string on the file listing must be the string version of the version in pluginInfo (i.e. 0.0.0.1,
+// four numbers between 0 and 255 inclusivem, so no letters, brackets, etc.)
+//
+// wParam = (int)fileID - this is the file ID from the file listing (i.e. the number at the end of the download link)
+// lParam = (PLUGININFO*)&pluginInfo
+#define MS_UPDATE_REGISTERFL "Update/RegisterFL"
+
+// this function can be used to 'unregister' components - useful for plugins that register non-plugin/langpack components and
+// may need to change those components on the fly
+// lParam = (char *)szComponentName
+#define MS_UPDATE_UNREGISTER "Update/Unregister"
+
+// this event is fired when the startup process is complete, but NOT if a restart is imminent
+// it is designed for status managment plugins to use as a trigger for beggining their own startup process
+// wParam = lParam = 0 (unused)
+// (added in version 0.1.6.0)
+#define ME_UPDATE_STARTUPDONE "Update/StartupDone"
+
+// this service can be used to enable/disable Updater's global status control
+// it can be called from the StartupDone event handler
+// wParam = (BOOL)enable
+// lParam = 0
+// (added in version 0.1.6.0)
+#define MS_UPDATE_ENABLESTATUSCONTROL "Update/EnableStatusControl"
+
+// An description of usage of the above service and event:
+// Say you are a status control plugin that normally sets protocol or global statuses in your ModulesLoaded event handler.
+// In order to make yourself 'Updater compatible', you would move the status control code from ModulesLoaded to another function,
+// say DoStartup. Then, in ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL service.
+// If it does not exist, call DoStartup. If it does exist, hook the ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may
+// also wish to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to disable Updater's own status control feature.
+
+// this service can be used to determine whether updates are possible for a component with the given name
+// wParam = 0
+// lParam = (char *)szComponentName
+// returns TRUE if updates are supported, FALSE otherwise
+#define MS_UPDATE_ISUPDATESUPPORTED "Update/IsUpdateSupported"
+
+#endif
+
+
+/////////////// Usage Example ///////////////
+
+#ifdef EXAMPLE_CODE
+
+// you need to #include "m_updater.h" and HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded) in your Load function...
+
+int OnModulesLoaded(WPARAM wParam, LPARAM lParam) {
+
+ Update update = {0}; // for c you'd use memset or ZeroMemory...
+ char szVersion[16];
+
+ update.cbSize = sizeof(Update);
+
+ update.szComponentName = pluginInfo.shortName;
+ update.pbVersion = (BYTE *)CreateVersionString(&pluginInfo, szVersion);
+ update.cpbVersion = strlen((char *)update.pbVersion);
+
+ // these are the three lines that matter - the archive, the page containing the version string, and the text (or data)
+ // before the version that we use to locate it on the page
+ // (note that if the update URL and the version URL point to standard file listing entries, the backend xml
+ // data will be used to check for updates rather than the actual web page - this is not true for beta urls)
+ update.szUpdateURL = "http://scottellis.com.au:81/test/updater.zip";
+ update.szVersionURL = "http://scottellis.com.au:81/test/updater_test.html";
+ update.pbVersionPrefix = (BYTE *)"Updater version ";
+
+ update.cpbVersionPrefix = strlen((char *)update.pbVersionPrefix);
+
+ // do the same for the beta versions of the above struct members if you wish to allow beta updates from another URL
+
+ CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
+
+ // Alternatively, to register a plugin with e.g. file ID 2254 on the file listing...
+ // CallService(MS_UPDATE_REGISTERFL, (WPARAM)2254, (LPARAM)&pluginInfo);
+
+ return 0;
+}
+
+#endif