summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-04-28 11:53:42 +0000
committermataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-04-28 11:53:42 +0000
commit09f4c381b77aa4e18436da31d9659d57bc18be39 (patch)
tree268fa18f90ccb34c27ee269526a77d884614c965
parentdb33a99e6cbf1542bcc0588ca1dc727a911bc31d (diff)
plugin updated
added partly jabber support git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@62 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
-rw-r--r--custom_status_list/Version.h28
-rw-r--r--custom_status_list/Version.rc38
-rw-r--r--custom_status_list/changelog.txt144
-rw-r--r--custom_status_list/cslist.c1246
-rw-r--r--custom_status_list/cslist.cpp1353
-rw-r--r--custom_status_list/cslist.dsp109
-rw-r--r--custom_status_list/cslist.dsw29
-rw-r--r--custom_status_list/cslist.h884
-rw-r--r--custom_status_list/cslist.optbin48640 -> 0 bytes
-rw-r--r--custom_status_list/cslist.plg36
-rw-r--r--custom_status_list/cslist.rc233
-rw-r--r--custom_status_list/cslist.sln23
-rw-r--r--custom_status_list/cslist.vcproj415
-rw-r--r--custom_status_list/cslist.vcxproj213
-rw-r--r--custom_status_list/cslist_10.vcxproj279
-rw-r--r--custom_status_list/cslist_10.vcxproj.filters (renamed from custom_status_list/cslist.vcxproj.filters)50
-rw-r--r--custom_status_list/cslist_9.vcproj320
-rw-r--r--custom_status_list/legacy.h87
-rw-r--r--custom_status_list/res/close.ico (renamed from custom_status_list/res/nochng.ico)bin2550 -> 2550 bytes
-rw-r--r--custom_status_list/res/cslist.icobin0 -> 6830 bytes
-rw-r--r--custom_status_list/res/favourite.ico (renamed from custom_status_list/res/fav.ico)bin2550 -> 2550 bytes
-rw-r--r--custom_status_list/res/filter.icobin0 -> 2550 bytes
-rw-r--r--custom_status_list/res/global.icobin0 -> 2550 bytes
-rw-r--r--custom_status_list/res/main.icobin2550 -> 0 bytes
-rw-r--r--custom_status_list/res/undo.icobin0 -> 2550 bytes
-rw-r--r--custom_status_list/res/unset.ico (renamed from custom_status_list/res/clear.ico)bin2550 -> 2550 bytes
-rw-r--r--custom_status_list/res/watch.icobin2550 -> 0 bytes
-rw-r--r--custom_status_list/resource.h95
-rw-r--r--custom_status_list/strpos.h84
29 files changed, 3111 insertions, 2555 deletions
diff --git a/custom_status_list/Version.h b/custom_status_list/Version.h
new file mode 100644
index 0000000..dbf672a
--- /dev/null
+++ b/custom_status_list/Version.h
@@ -0,0 +1,28 @@
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 1
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 5
+
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+#define __FILEVERSION_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
+
+#define __STRINGIFY_IMPL(x) #x
+#define __STRINGIFY(x) __STRINGIFY_IMPL(x)
+#define __VERSION_STRING __STRINGIFY(__FILEVERSION_DOTS)
+
+#ifdef _UNICODE
+#if defined(WIN64) || defined(_WIN64)
+ #define __PLUGIN_NAME "Custom Status List (Unicode x64) mod"
+#else
+ #define __PLUGIN_NAME "Custom Status List (Unicode) mod"
+#endif
+#else
+ #define __PLUGIN_NAME "Custom Status List mod"
+#endif
+#define __INTERNAL_NAME "CSList"
+#define __FILENAME "CSList.dll"
+#define __DESCRIPTION "This plugin offers simple management functions to keep your extra statuses on one place."
+#define __AUTHOR "Mataes, jarvis"
+#define __AUTHOREMAIL "mataes2007@gmail.com"
+#define __AUTHORWEB "http://mataes.googlecode.com/svn/Miranda/Plugins/Cslist/"
+#define __COPYRIGHT "© 2011-10 Mataes, 2009-2007 jarvis"
diff --git a/custom_status_list/Version.rc b/custom_status_list/Version.rc
new file mode 100644
index 0000000..e637f0c
--- /dev/null
+++ b/custom_status_list/Version.rc
@@ -0,0 +1,38 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "afxres.h"
+#include "version.h"
+
+#ifdef _WIN32
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+#endif //_WIN32
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION __FILEVERSION_STRING
+ PRODUCTVERSION __FILEVERSION_STRING
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x0L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004b0"
+ BEGIN
+ VALUE "FileDescription", __DESCRIPTION
+ VALUE "InternalName", __PLUGIN_NAME
+ VALUE "LegalCopyright", __COPYRIGHT
+ VALUE "OriginalFilename", __FILENAME
+ VALUE "ProductName", __PLUGIN_NAME
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1200
+ END
+END
diff --git a/custom_status_list/changelog.txt b/custom_status_list/changelog.txt
new file mode 100644
index 0000000..a40a767
--- /dev/null
+++ b/custom_status_list/changelog.txt
@@ -0,0 +1,144 @@
+
+ TODO
+ ----
+ - all TODOs listed in this source x)
+ - feature requests maybe :)
+ ! settings changes
+ - mid-range rewrite
+ - force-replacing of Custom Status UI
+
+ MAYBE-TODO
+ ----------
+
+ NOT-TODO
+ --------
+ - setting Away/NA/DND/Occ - there are already many status managers :)
+ - watching statuses set by x-status menu
+
+ 0.1.0.4 - Twix Fix
+ -------
+ - Fixed showing menu items when not applicable
+ - Fixed toggling of controls when list item is removed
+ - Returned "Undo" function
+ - Returned "Import" function
+ - Returned multi-account functionality
+ - Added item focus selection & focus when added, modified or favourite-toggled
+ - "Inactive" focus fix
+ - Fixed occasional crash when trying to open multiple dialogs
+ - Fixed showing "Empty list" message when list is empty and undoing something from DB, not showing when undoing something with nothing in DB or showing message after importing into an empty list
+
+ 0.1.0.3 - What's your favourite?
+ -------
+ - Bugfixes
+
+ 0.1.0.1 - After storm
+ -------
+ - Favourites
+ - Virtualized structure
+ - Code refactorization
+ - Duplicities detection (partial)
+ - Saving window position
+
+ 0.0.0.20 - calm before the storm Ox)
+ --------
+ - some corrections of working with strings (ANSI/Unicode <-> TCHAR)
+ - simplified loading of list items :)
+ - the Options button replaced by the Undo button
+
+ 0.0.0.19 - enjoy multi'ing, baby :)
+ --------
+ - status is changing on all ICQ based accounts/protos
+ - when dialog is opened, and user tryes to open another one, forgotten dialog is brought to front instead
+ - menu placement optimalization
+ - removed old nasty GOTO because of double-clicking the list x)
+ - active checking of input data length during editing custom status
+ - optimalizations in translations
+ - support for Variables plugin
+ - other enhancements related to the possibility of using multiple ICQ accounts
+
+ 0.0.0.18 - fixing trip :)
+ --------
+ - icon selector shows only icons, that are supported by installed ICQ plugin
+ - fixed memory leak and possible crash when modifying status and then importing 0 DB entries (helpItem not nulled)
+ - merged Add/Modify processes together :)
+ - Unicode build, finally :)
+
+ 0.0.0.17 - I become to be useful :)
+ --------
+ - CSList menu item can be placed elsewhere, also instead of Xstatus menu (currently ICQ eternity/PlusPlus++ mod only)
+ - importing statuses from database (ICQ key)
+ - list sorting (Procedure + calls)
+ - dialog openable only once :)
+ - new icons by inducti0n :)
+ - no more infinite width when adding x-message
+ - new Options dialog
+
+ 0.0.0.16 - rework
+ --------
+ - code redesigned
+ - fix for Windows Vista crash (free) and ANSI Windows crash (init extended controls)
+ - preimplementation for new features that will come (favourites, ...)
+
+ 0.0.0.15 - make me nice
+ --------
+ - stage 1 of code revision
+ - Options dialog (in development) :)
+ - IcoLib group renamed to CSLIST_MODULE_LONG_NAME
+ - status titles in Add/Modify ComboBox were strangely corrected x)
+ - possibility to turn off "Release Notes" dialog
+
+ 0.0.0.14 - will you use me? :)
+ --------
+ - new lines in message input creatable via Enter
+ - NULLED XSTATUS now available :)
+
+ 0.0.0.13 - oooops x))
+ --------
+ - hotfix for Miranda cores < 0.7
+ - CSList appears in Main Menu
+ - fixed icons not loaded when IcoLib is missing
+
+ 0.0.0.12 - goin' my way now x)
+ --------
+ - DB saving method/format slightly modified
+ [+] multi-line messages now working
+ [-] LOST compatibility with HANAX's plugin (but is auto-imported if exists)
+ NOTE: I think "importing-only" of older releases will stay,
+ I have many Feature Requests that would need changing
+ DB format anyway, so this problem looks solved x)
+ - "Release notes" dialog on first run
+ - Updater support
+
+ 0.0.0.11 - will this work? x)
+ --------
+ - some similar procedures merged together :P
+ - another procedures more generalized 8)
+ - separated Add/Modify dialog finally in use :)
+ [+] solves some bahaviour problems x)
+
+ 0.0.0.10 - ohhh, basics ]:)
+ --------
+ - icons support - complete xstatus service :)
+ [+] no more static angry ;) :D
+ - iconized buttons - supporting IcoLib :)
+ - better method for DB entry format - old was little.."dizzy" x) :D
+ - TEMPORARILY DISABLED modifying of items - needs some fixes x))
+
+ 0.0.0.9 - working a little? O:)
+ -------
+ - enhanced List Control behaviour (selecting, deselecting, editation, adding)
+ - LOADING from + SAVING to DB!
+ [+] my parser is also compatible with HANAX plugin's DB entries ;)
+
+ 0.0.0.8 - behaviour testing :o)
+ -------
+ - setting status by double-clicking list item
+ - much better procedures, debugging, better exceptions, dialog behaviour
+
+ 0.0.0.7 - crash testing :o)
+ -------
+ - basic functions coding
+
+ 0.0.0.6 - resource testing
+ -------
+ - basic resources modeling
diff --git a/custom_status_list/cslist.c b/custom_status_list/cslist.c
deleted file mode 100644
index 6a1bb84..0000000
--- a/custom_status_list/cslist.c
+++ /dev/null
@@ -1,1246 +0,0 @@
-/* ########################################################################## 80
-
- Custom Status List
- __________________
-
- Custom Status List plugin for Miranda-IM (www.miranda-im.org)
- Follower of Custom Status History List by HANAX
- Copyright 2006,2007 HANAX
- Copyright 2007,2008 jarvis
-
- 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$
- Revision : $Rev$
- Last change on : $Date$
- Last change by : $Author$
-
- ----------------------------------------------------------------------------
-
-
- DESCRIPTION:
-
- Offers List of your Custom Statuses.
-
- ----------------------------------------------------------------------------
-
-
- HISTORY:
-
- TODO
- ----
- - duplicities detection (during Import, adding, ..)
- - stage 2 of code revision
- - save window positions
- - resetting custom status on when selected users log in
- - exactly, CSList-like system
- - optionally set Away/NA/DND/Occ
- - saving dialog positions
- - all TODOs listed in this source x)
- - feature requests maybe ..
-
- 0.0.0.18 - fixing trip :)
- --------
- - icon selector shows only icons, that are supported by installed ICQ plugin
- - fixed memory leak and possible crash when modifying status and then importing 0 DB entries (helpItem not nulled)
- - merged Add/Modify processes together :)
- - Unicode build, finally :)
-
- 0.0.0.17 - I become to be useful :)
- --------
- - CSList menu item can be placed elsewhere, also instead of Xstatus menu (currently ICQ eternity/PlusPlus++ mod only)
- - importing statuses from database (ICQ key)
- - list sorting (Procedure + calls)
- - dialog openable only once :)
- - new icons by inducti0n :)
- - no more infinite width when adding x-message
- - new Options dialog
-
- 0.0.0.16 - rework
- --------
- - code redesigned
- - fix for Windows Vista crash (free) and ANSI Windows crash (init extended controls)
- - preimplementation for new features that will come (favourites, ...)
-
- 0.0.0.15 - make me nice
- --------
- - stage 1 of code revision
- - Options dialog (in development) :)
- - IcoLib group renamed to CSLIST_MODULE_LONG_NAME
- - status titles in Add/Modify ComboBox were strangely corrected x)
- - possibility to turn off "Release Notes" dialog
-
- 0.0.0.14 - will you use me? :)
- --------
- - new lines in message input creatable via Enter
- - NULLED XSTATUS now available :)
-
- 0.0.0.13 - oooops x))
- --------
- - hotfix for Miranda cores < 0.7
- - CSList appears in Main Menu
- - fixed icons not loaded when IcoLib is missing
-
- 0.0.0.12 - goin' my way now x)
- --------
- - DB saving method/format slightly modified
- [+] multi-line messages now working
- [-] LOST compatibility with HANAX's plugin (but is auto-imported if exists)
- NOTE: I think "importing-only" of older releases will stay,
- I have many Feature Requests that would need changing
- DB format anyway, so this problem looks solved x)
- - "Release notes" dialog on first run
- - Updater support
-
- 0.0.0.11 - will this work? x)
- --------
- - some similar procedures merged together :P
- - another procedures more generalized 8)
- - separated Add/Modify dialog finally in use :)
- [+] solves some bahaviour problems x)
-
- 0.0.0.10 - ohhh, basics ]:)
- --------
- - icons support - complete xstatus service :)
- [+] no more static angry ;) :D
- - iconized buttons - supporting IcoLib :)
- - better method for DB entry format - old was little.."dizzy" x) :D
- - TEMPORARILY DISABLED modifying of items - needs some fixes x))
-
- 0.0.0.9 - working a little? O:)
- -------
- - enhanced List Control behaviour (selecting, deselecting, editation, adding)
- - LOADING from + SAVING to DB!
- [+] my parser is also compatible with HANAX plugin's DB entries ;)
-
- 0.0.0.8 - behaviour testing :o)
- -------
- - setting status by double-clicking list item
- - much better procedures, debugging, better exceptions, dialog behaviour
-
- 0.0.0.7 - crash testing :o)
- -------
- - basic functions coding
-
- 0.0.0.6 - resource testing
- -------
- - basic resources modeling
-
-
-// ############################ INCLUDES & DEFINITIONS ###################### */
-
-#include "cslist.h"
-
-
-// ############################### MAIN ########################################
-
-BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) {
- hInst = hinstDLL;
- return TRUE;
-}
-
-
-// ########################### MIM MENU COMMAND ################################
-
-static int PluginMenuCommand( WPARAM wParam, LPARAM lParam ) {
- if ( !opened )
- DialogBox( hInst, MAKEINTRESOURCE( IDD_CSLIST ), NULL, ( DLGPROC )CSListProc );
- else if ( opened == 1 )
- {
- opened++;
- MessageBox( NULL, L"Some instance of Custom Status List is already opened.", L"Custom Status List", MB_OK );
- opened--;
- }
- return 0;
-}
-
-
-// ############################# PLUGIN INFO ###################################
-
-__declspec( dllexport ) PLUGININFOEX* MirandaPluginInfoEx( DWORD mirandaVersion ) {
- gMirandaVersion = mirandaVersion;
- return &pluginInfoEx;
-}
-
-__declspec( dllexport ) PLUGININFO* MirandaPluginInfo( DWORD mirandaVersion ) {
- gMirandaVersion = mirandaVersion;
- return &pluginInfo;
-}
-
-
-// ############################# INTERFACES ####################################
-
-__declspec( dllexport ) const MUUID* MirandaPluginInterfaces( void ) {
- return interfaces;
-}
-
-
-// ############################### LOADER ######################################
-
-int __declspec( dllexport ) Load( PLUGINLINK *link ) {
- pluginLink = link;
-
- { // are we running under Unicode core?
- char szVer[MAX_PATH];
-
- CallService( MS_SYSTEM_GETVERSIONTEXT, MAX_PATH, ( LPARAM )szVer );
- _strlwr( szVer ); // make sure it is lowercase
- gbUnicodeCore = ( strstr( szVer, "unicode" ) != NULL );
- if ( !gbUnicodeCore )
- {
- pluginInfoEx.flags = 0;
- pluginInfo.flags = 0;
- }
- }
-
- hSvcShowList = CreateServiceFunction( MS_CSLIST_SHOWLIST, PluginMenuCommand );
-
- cslist_init_icons();
-
- if ( DBGetContactSettingByte( NULL, "ICQ", "XStatusEnabled", 1 ) )
- { // if xstatuses are enabled, declare, if we can use status menu or main menu only
- if ( bStatusMenu = ServiceExists( MS_CLIST_ADDSTATUSMENUITEM ) )
- hHookMenuBuild = HookEvent( ME_CLIST_PREBUILDSTATUSMENU, cslist_init_menu_item );
- else
- cslist_init_menu_item( 0, 0 );
- }
-
- hHookOnPluginsLoaded = HookEvent( ME_SYSTEM_MODULESLOADED, onPluginsLoaded );
- hHookOnOptionsInit = HookEvent( ME_OPT_INITIALISE, onOptionsInit );
- { // Katy's easter-egg :))
- hHookOnKatynkaIsLoggedIn = HookEvent( ME_DB_CONTACT_SETTINGCHANGED, cslist_KatysEasterEgg );
- }
- { // fix for ANSI Windows - Add and Modify dialogs not loaded when clicking - troubles with not loaded ComboBoxEx
- INITCOMMONCONTROLSEX icc;
- icc.dwSize = sizeof( icc );
- icc.dwICC = ICC_USEREX_CLASSES;
- InitCommonControlsEx( &icc );
- }
- return 0;
-}
-
-
-// ############################## UNLOADER #####################################
-
-int __declspec( dllexport ) Unload( void ) {
- int i;
- // unhooking, unservicing & unhandling
- UnhookEvent( hHookMenuBuild );
- UnhookEvent( hHookOnPluginsLoaded );
- UnhookEvent( hHookOnOptionsInit );
- UnhookEvent( hHookOnKatynkaIsLoggedIn );
- DestroyServiceFunction( hSvcShowList );
- for ( i = 0; i < SIZEOF( cslforms ); i++ )
- cslforms[i].hIcoLibItem = NULL;
- hList = NULL;
- hXCombo = NULL;
- hIml = NULL;
- hDlg = NULL;
- return 0;
-}
-
-
-// ############################# AFTER-LOADER ##################################
-
-static int onPluginsLoaded( WPARAM wparam, LPARAM lparam )
-{
- // updater section - needs optimalization x)
- if( ServiceExists( MS_UPDATE_REGISTER ) )
- {
- static Update upd = { 0 };
-
-//#if defined( _UNICODE )
- static char szCurrentVersion[30];
- static char *szVersionUrl = CSLIST_UPD_VERURL;
- static char *szUpdateUrl = CSLIST_UPD_UPDURL;
- // todo: complete FL updating
- static char *szFLVersionUrl = CSLIST_UPD_FLVERURL;
- static char *szFLUpdateurl = CSLIST_UPD_FLUPDURL;
-//#endif
- static char *szPrefix = CSLIST_UPD_SZPREFIX;
-
- upd.cbSize = sizeof( upd );
- upd.szComponentName = pluginInfo.shortName;
- if ( gMirandaVersion < PLUGIN_MAKE_VERSION( 0, 7, 0, 0 ) )
- upd.pbVersion = ( BYTE * )CreateVersionStringPlugin( ( PLUGININFO * )&pluginInfo, szCurrentVersion ); // updater support for < 0.7 core
- else
- upd.pbVersion = ( BYTE * )CreateVersionStringPluginEx( ( PLUGININFOEX * )&pluginInfoEx, szCurrentVersion );
- upd.cpbVersion = strlen( ( char * )upd.pbVersion );
- //upd.szVersionURL = szFLVersionUrl;
- //upd.szUpdateURL = szFLUpdateurl;
-//#if defined( _UNICODE )
- upd.pbVersionPrefix = ( BYTE * )CSLIST_UPD_SZPREFIX;
-//#endif
- upd.cpbVersionPrefix = strlen( ( char * )upd.pbVersionPrefix );
-
- upd.szBetaUpdateURL = szUpdateUrl;
- upd.szBetaVersionURL = szVersionUrl;
- upd.pbVersion = szCurrentVersion;
- upd.cpbVersion = lstrlenA( szCurrentVersion );
- upd.pbBetaVersionPrefix = ( BYTE * )szPrefix;
- upd.cpbBetaVersionPrefix = strlen( ( char * )upd.pbBetaVersionPrefix );
-
- CallService( MS_UPDATE_REGISTER, 0, ( LPARAM )&upd );
- }
- // 0.8+ hotkeys service
- if ( ServiceExists( MS_HOTKEY_REGISTER ) )
- {
- HOTKEYDESC hotkey = { 0 };
- hotkey.cbSize = sizeof( hotkey );
- hotkey.pszName = MS_CSLIST_SHOWLIST;
- hotkey.pszDescription = "Show Custom Status List";
- hotkey.pszSection = "Status";
- hotkey.pszService = MS_CSLIST_SHOWLIST;
- hotkey.DefHotKey = MAKEWORD( 'L', HOTKEYF_CONTROL | HOTKEYF_SHIFT );
- CallService( MS_HOTKEY_REGISTER, 0, ( LPARAM )&hotkey );
- }
- // modern toolbar
- if ( ServiceExists( MS_TB_ADDBUTTON ) )
- {
- TBButton button = { 0 };
- SKINICONDESC sid = { 0 };
- TCHAR szFile[MAX_PATH];
- GetModuleFileName( hInst, szFile, MAX_PATH );
-
- sid.cbSize = sizeof( sid );
- sid.flags = SIDF_ALL_TCHAR;
- sid.ptszSection = L"ToolBar";
- sid.ptszDefaultFile = ( TCHAR * )szFile;
- sid.cx = sid.cy = 16;
-
- sid.pszName = "CSList_TB_Icon";
- sid.ptszDescription = L"Custom Status List";
- sid.iDefaultIndex = -IDI_CSLIST;
- hMainIcon = CallService( MS_SKIN2_ADDICON, 0, ( LPARAM )&sid );
-
- button.cbSize = sizeof( button );
- button.pszButtonID = MS_CSLIST_SHOWLIST;
- button.pszTooltipUp = button.pszTooltipDn = button.pszButtonName = CSLIST_MODULE_LONG_NAME;
- button.pszServiceName = MS_CSLIST_SHOWLIST;
- button.defPos = 200;
- button.tbbFlags = TBBF_SHOWTOOLTIP | TBBF_VISIBLE;
- button.hPrimaryIconHandle = ( HANDLE )hMainIcon;
- button.hSecondaryIconHandle = button.hPrimaryIconHandle;
- CallService( MS_TB_ADDBUTTON, 0, ( LPARAM )&button );
- }
- // release notes dialog
- {
- int relnotes, showit;
- relnotes = DBGetContactSettingWord( NULL, CSLIST_MODULE_SHORT_NAME, "RelNotes", 0 );
- showit = DBGetContactSettingByte( NULL, CSLIST_MODULE_SHORT_NAME, "ShowRelNotes", 1 );
- if ( relnotes != CSLIST_RELNOTES && showit )
- DialogBox( hInst, MAKEINTRESOURCE(IDD_RELNOTES), NULL, ( DLGPROC )RelNotesProc );
- }
- { // take care of DB entries
- // not needed :) current structure allows to write them into DB when it's needed :)
- }
- return 0;
-}
-
-
-// ############################# OPTIONS LOADER ##############################
-
-int onOptionsInit( WPARAM wparam, LPARAM lparam )
-{
- OPTIONSDIALOGPAGE odp = { 0 };
-
- odp.cbSize = sizeof( odp );
- odp.position = 955000000;
- odp.hInstance = hInst;
- odp.pszTemplate = MAKEINTRESOURCEA( IDD_OPTIONS );
- odp.ptszTitle = TranslateTS( ( TCHAR * )CSLIST_MODULE_LONG_NAME );
- odp.pfnDlgProc = CSListOptionsProc;
- odp.ptszGroup = TranslateTS( ( TCHAR * )"Status" );
- odp.flags = ODPF_BOLDGROUPS;
-
- CallService( MS_OPT_ADDPAGE, wparam, ( LPARAM )&odp );
- return 0;
-}
-
-
-// #############################################################################
-// #############################################################################
-// #############################################################################
-// #############################################################################
-// ############################# MAIN PROCEDURE ################################
-// #############################################################################
-// #############################################################################
-// #############################################################################
-
-INT_PTR CALLBACK CSListProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
-{
- NMHDR* pnmh = 0;
- hDlg = hwndDlg;
- switch ( uMsg )
- {
- case WM_NOTIFY: // some notifying message is sent
- {
- if ( wParam == IDC_CSLIST ) {
- pnmh = ( NMHDR * )lParam; // TODO : optimize? maybe cleaner solution is possible (switching lParam)
- // ######################## DBLCLICKING THE LIST ###############################
- if ( pnmh->code == NM_DBLCLK ) {
- cslist_set_status( hwndDlg );
- //cslist_clear_selection();
- goto savenexit; // stick #1 - edit: not needed ;) so TODO
- // EndDialog( hwndDlg, LOWORD( wParam ) ); // OPTIONALLY: end dialog when ListItem is DblClk'd?
- }
- // #################### CLICKING TO SORT THE LIST ##############################
- else if ( pnmh->code == LVN_COLUMNCLICK && pnmh->idFrom == IDC_CSLIST ) {
- cslist_sort_list();
- }
- // ######################## CLICKING THE LIST ##################################
- else {
- iSelect = SendMessage( hList, LVM_GETNEXTITEM, -1, LVNI_FOCUSED | LVNI_SELECTED ); // set which row is selected (cannot be only focused, but fully selected - second param ;))
- if ( iSelect == -1 ) // if no selection
- flag = 0;
- else
- flag = 1;
- EnableWindow( GetDlgItem( hDlg, IDC_MODIFY ), flag );
- EnableWindow( GetDlgItem( hDlg, IDC_REMOVE ), flag );
- break;
- }
- }
- }
- break;
-// ################## INITIALIZING MAIN DIALOG #################################
- case WM_INITDIALOG:
- {
- int i;
- char szTemp[MAX_PATH + 128];
-
- opened = 1; // instance opened
- // ..................................................... creating the list
- hList = GetDlgItem( hwndDlg, IDC_CSLIST );
- memset( &LvCol, 0, sizeof( LvCol ) );
- hIml = ImageList_Create( 16, 16, IsWinVerXPPlus() ? ILC_COLOR32 | ILC_MASK : ILC_COLOR16 | ILC_MASK, 37, 1 );
- if ( hIml ) {
- for ( i = 0; i < 37; i++ )
- {
- null_snprintf( szTemp, sizeof( szTemp ), "%s_%s%d", "ICQ", "xstatus", i );
- ImageList_AddIcon( hIml, ( HANDLE )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szTemp ) );
- }
- ListView_SetImageList( hList, hIml, LVSIL_SMALL );
- }
- LvCol.mask = LVCF_TEXT | LVCF_FMT | LVCF_WIDTH | LVCF_SUBITEM;
- LvCol.fmt = LVCFMT_LEFT;
- LvCol.cx = 0x00;
- LvCol.pszText = L"";
- LvCol.cx = 0x16;
- //ListView_SetExtendedListViewStyle( hList, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_HEADERDRAGDROP );
- ListView_SetExtendedListViewStyleEx( hList, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_HEADERDRAGDROP | LVS_EX_INFOTIP );
- SendMessage( hList, LVM_INSERTCOLUMN , 0, ( LPARAM )&LvCol );
- LvCol.pszText = TranslateT( "Title" );
- LvCol.cx = 0x64;
- SendMessage( hList, LVM_INSERTCOLUMN, 1, ( LPARAM )&LvCol );
- LvCol.pszText = TranslateT( "Message" );
- LvCol.cx = 0xa8;
- SendMessage( hList, LVM_INSERTCOLUMN, 2, ( LPARAM )&LvCol );
- memset( &LvItem, 0, sizeof( LvItem ) );
-
- // ................................................ load + sort list items
- cslist_initialize_list_content( hwndDlg );
- cslist_sort_list();
-
- // ............................................. creating iconized buttons
- for ( i = 0; i < SIZEOF( cslforms ); i++ )
- {
- if ( cslforms[i].idc < 0 )
- continue;
- SendDlgItemMessage( hwndDlg, cslforms[i].idc, BM_SETIMAGE, IMAGE_ICON, ( LPARAM )LoadIconExEx( cslforms[i].iconIcoLib, cslforms[i].iconNoIcoLib ) );
- SendDlgItemMessage( hwndDlg, cslforms[i].idc, BUTTONSETASFLATBTN, 0, 0 ); //maybe set as BUTTONSETDEFAULT?
- SendDlgItemMessage( hwndDlg, cslforms[i].idc, BUTTONADDTOOLTIP, ( WPARAM )TranslateTS( cslforms[i].title ), BATF_TCHAR );
- }
- SetWindowText( hwndDlg, TranslateT( "Custom Status List" ) );
- }
- break;
-// ######################## COMMANDS ###########################################
- case WM_COMMAND:
- switch ( LOWORD( wParam ) )
- {
- //case IDC_CSLIST: TODO: deselection
-// ------------------------- EXITING THE LIST ----------------------------------
-savenexit: // stick #1
- case IDC_NOCHNG: // save, no status change and close
- case IDCANCEL: // save, no status change and close
- case IDOK: // not used
- case IDC_APPLY: // save, set selected and close
- case IDC_EXIT: // save, set nulled status and close
- if ( ( LOWORD( wParam ) ) == IDC_APPLY ) //set selected status
- cslist_set_status( hwndDlg );
- else if ( ( LOWORD( wParam ) ) == IDC_EXIT )
- { // set null status
- ICQ_CUSTOM_STATUS helpStatus;
- int icon = 0;
- char* title = "";
- char* message = "";
- helpStatus.cbSize = sizeof( ICQ_CUSTOM_STATUS );
- helpStatus.flags = CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE;
- helpStatus.status = &icon;
- helpStatus.ptszName = ( TCHAR * )title;
- helpStatus.ptszMessage = ( TCHAR * )message;
- CallService( PS_ICQ_SETCUSTOMSTATUSEX, 0, ( LPARAM )&helpStatus );
- }
- flag = 0;
- iSelect = -1;
- if ( bChanged ) cslist_save_list_content( hwndDlg );
- ListView_DeleteAllItems( hList );
- bChanged = 0;
- opened = 0; // closing instance
- EndDialog( hwndDlg, LOWORD( wParam ) );
- break;
-// -------------------------- OPTIONS BUTTON -----------------------------------
- case IDC_OPTS:
- DialogBox( hInst, MAKEINTRESOURCE( IDD_OPTIONS ), hwndDlg, ( DLGPROC )CSListOptionsProc );
- break;
-// --------------------- ADDING/MODIFYING ITEM --------------------------------
- case IDC_MODIFY:
- action = 1;
- case IDC_ADD:
- {
- DialogBox( hInst, MAKEINTRESOURCE( IDD_ADDMODIFY ), hwndDlg, ( DLGPROC )CSListAddModifyProc );
- if ( AMResult == 1 )
- {
- if ( action == 1 )
- {
- ModifiedPos = iSelect;
- cslist_modify_item();
- ModifiedPos = -1;
- }
- else
- {
- cslist_add_item();
- }
- AMResult = 0;
- bChanged = 1;
- }
- action = 0;
- cslist_clear_help_item();
- cslist_sort_list();
- }
- break;
-// ----------------- REMOVING ITEM FROM THE LIST -------------------------------
- case IDC_REMOVE:
- {
- cslist_remove_item();
- bChanged = 1;
- }
- break;
- case IDC_IMPORT:
- cslist_import_statuses_from_icq();
- break;
- }
- break;
- }
- return FALSE;
-}
-
-// #############################################################################
-// ########################### END OF MAIN PROCEDURE ###########################
-// #############################################################################
-// #############################################################################
-// ########################## ADD/MODIFY DLG PROCEDURE #########################
-// #############################################################################
-
-INT_PTR CALLBACK CSListAddModifyProc( HWND hwndAMDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
-{
- switch ( uMsg )
- {
- case WM_INITDIALOG:
- {
- // .........................................creating comboboxex for xicons
- // TODO: changing statics and dialog title in order of action :)
- int i, maxCount;
- if ( action ^ 1 ) // action == 1
- {
- SetWindowText( hwndAMDlg, TranslateT( "Add new item" ) );
- SetDlgItemText( hwndAMDlg, IDC_AM_OK, TranslateT( "Add" ) );
- }
- else
- {
- SetWindowText( hwndAMDlg, TranslateT( "Modify selected item" ) );
- SetDlgItemText( hwndAMDlg, IDC_AM_OK, TranslateT( "Modify" ) );
- }
- SetDlgItemText( hwndAMDlg, IDC_AM_CN, TranslateT( "Cancel" ) );
- SetDlgItemText( hwndAMDlg, IDC_ST_XICON, TranslateT( "Icon:" ) );
- SetDlgItemText( hwndAMDlg, IDC_ST_XTITLE, TranslateT( "Title:" ) );
- SetDlgItemText( hwndAMDlg, IDC_ST_XMESSAGE, TranslateT( "Message:" ) );
-
- hXCombo = GetDlgItem( hwndAMDlg, IDC_CB_ICON );
- SendMessage( hXCombo, CBEM_SETIMAGELIST, 0, ( LPARAM )hIml );
- ZeroMemory( &CbItem, sizeof( CbItem ) );
-
- if ( DBGetContactSettingByte( NULL, "ICQ", "NonStandartXstatus", 0 ) )
- maxCount = SIZEOF( xstatuses );
- else
- maxCount = 32;
- for ( i = 0; i < maxCount; i++ )
- {
- CbItem.mask = CBEIF_IMAGE | CBEIF_TEXT | CBEIF_SELECTEDIMAGE;
- CbItem.pszText = TranslateTS( xstatuses[i].xname );
- CbItem.iImage = i; // or xstatuses[i].xnum? x)
- CbItem.iItem = i;
- CbItem.iSelectedImage = i;
- SendMessage( hXCombo, CBEM_INSERTITEM, 0, ( LPARAM )&CbItem );
- }
- SendMessage( hXCombo, CB_SETCURSEL, 0, 0 ); // first zero sets selection to top
- if ( action == 1 ) // modifying
- {
- // get values from selection..
- LvItem.iItem = iSelect;
- LvItem.iSubItem = 0;
- ListView_GetItem( hList, &LvItem );
- ListView_GetItemText( hList, iSelect, 1, helpItem.ItemTitle, CSLIST_XTITLE_LIMIT );
- ListView_GetItemText( hList, iSelect, 2, helpItem.ItemMessage, CSLIST_XMESSAGE_LIMIT );
- // ..and send them to edit controls
- SendMessage( hXCombo, CB_SETCURSEL, LvItem.iImage, 0 );
- SetDlgItemText( hwndAMDlg, IDC_XTITLE, helpItem.ItemTitle );
- SetDlgItemText( hwndAMDlg, IDC_XMESSAGE, helpItem.ItemMessage );
- }
- }
- break;
- case WM_COMMAND:
- {
- switch ( LOWORD( wParam ) )
- {
- case IDC_XTITLE:
- if ( ( HIWORD( wParam ) == EN_CHANGE ) )
- {
- if ( GetWindowTextLength( GetDlgItem( hwndAMDlg, IDC_XTITLE ) ) > CSLIST_XTITLE_LIMIT )
- SendDlgItemMessage( hwndAMDlg, IDC_XTITLE, WM_APP, ( WPARAM )Translate( "Warning" ), ( LPARAM )Translate( "This field do not accept string longer than 64 characters. String will be truncated." ) );
- else
- SendDlgItemMessage( hwndAMDlg, IDC_XTITLE, WM_APP, 0, 0 );
- }
- break;
- case IDC_XMESSAGE:
- if ( ( HIWORD( wParam ) == EN_CHANGE ) )
- {
- if ( GetWindowTextLength( GetDlgItem( hwndAMDlg, IDC_XMESSAGE ) ) > CSLIST_XMESSAGE_LIMIT )
- SendDlgItemMessage( hwndAMDlg, IDC_XMESSAGE, WM_APP, ( WPARAM )Translate( "Warning" ), ( LPARAM )Translate( "This field do not accept string longer than 2048 characters. String will be truncated." ) );
- else
- SendDlgItemMessage( hwndAMDlg, IDC_XMESSAGE, WM_APP, 0, 0 );
- }
- break;
- case IDOK:
- case IDC_AM_OK:
- cslist_AM_set_help_item( hwndAMDlg );
- AMResult = 1;
- EndDialog( hwndAMDlg, LOWORD( wParam ) );
- break;
- case IDCANCEL:
- case IDC_AM_CN:
- AMResult = 0;
- EndDialog( hwndAMDlg, LOWORD( wParam ) );
- break;
- }
- }
- break;
- }
- return FALSE;
-}
-
-
-// #############################################################################
-// ####################### END OF ADD/MODIFY DLG PROCEDURE #####################
-// #############################################################################
-// ############################ OPTIONS DLG PROCEDURE ##########################
-// #############################################################################
-
-BOOL CALLBACK CSListOptionsProc( HWND hwndOptsDlg, UINT msg, WPARAM wparam, LPARAM lparam )
-{
- // WORD flags = DBGetContactSettingWord( NULL, MODULENAME, "flags", default_flags );
- // EnableWindow( GetDlgItem( hwndOptsDlg, IDC_PLACE_GLOBAL ), 1 );
- // IsDlgButtonChecked( hwndRNDlg, IDC_SHOWIT )
- // CheckDlgButton(hwndDlg, IDC_META, DBGetContactSettingByte(NULL,"CLC","Meta",SETTING_USEMETAICON_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); /// by FYR
-
- switch ( msg )
- {
- case WM_INITDIALOG:
- {
- int hideCS = DBGetContactSettingByte( NULL, CSLIST_MODULE_SHORT_NAME, "hideCS", 0 );
- int place = DBGetContactSettingByte( NULL, CSLIST_MODULE_SHORT_NAME, "placement", 11 );
- CheckDlgButton( hwndOptsDlg, IDC_HIDE_CSMENU, hideCS ? BST_CHECKED : BST_UNCHECKED );
- switch ( place ) {
- case 0:
- case 1:
- case 11:
- case 12:
- CheckDlgButton( hwndOptsDlg, IDC_PLACE_GLOBAL, 1 );
- EnableWindow( GetDlgItem( hwndOptsDlg, IDC_PLACE_GLOBAL_TOP ), 1 );
- EnableWindow( GetDlgItem( hwndOptsDlg, IDC_PLACE_GLOBAL_BOTTOM ), 1 );
- break;
- case 2:
- CheckDlgButton( hwndOptsDlg, IDC_PLACE_ICQ_STATUS, 1 );
- break;
- case 3:
- CheckDlgButton( hwndOptsDlg, IDC_PLACE_MAIN, 1 );
- break;
- }
- switch ( place ) {
- case 0:
- case 1:
- case 11 :
- CheckDlgButton( hwndOptsDlg, IDC_PLACE_GLOBAL_TOP, 1 );
- break;
- case 12 :
- CheckDlgButton( hwndOptsDlg, IDC_PLACE_GLOBAL_BOTTOM, 1 );
- break;
- }
- }
- break;
-
- case WM_COMMAND:
- {
- switch ( LOWORD( wparam ) )
- {
- case IDC_PLACE_GLOBAL:
- EnableWindow( GetDlgItem( hwndOptsDlg, IDC_PLACE_GLOBAL_TOP ), 1 );
- EnableWindow( GetDlgItem( hwndOptsDlg, IDC_PLACE_GLOBAL_BOTTOM ), 1 );
- break;
- case IDC_PLACE_ICQ_STATUS:
- case IDC_PLACE_MAIN:
- EnableWindow( GetDlgItem( hwndOptsDlg, IDC_PLACE_GLOBAL_TOP ), 0 );
- EnableWindow( GetDlgItem( hwndOptsDlg, IDC_PLACE_GLOBAL_BOTTOM ), 0 );
- break;
- case IDOK:
- case IDCANCEL:
- {
- int place, hideCS;
- hideCS = IsDlgButtonChecked( hwndOptsDlg, IDC_HIDE_CSMENU );
- DBWriteContactSettingByte( NULL, CSLIST_MODULE_SHORT_NAME, "hideCS", hideCS );
- if( IsDlgButtonChecked( hwndOptsDlg, IDC_PLACE_GLOBAL ) )
- {
- if ( IsDlgButtonChecked( hwndOptsDlg, IDC_PLACE_GLOBAL_TOP ) )
- place = 11;
- else if ( IsDlgButtonChecked( hwndOptsDlg, IDC_PLACE_GLOBAL_BOTTOM ) )
- place = 12;
- else
- place = 11;
- }
- else if ( IsDlgButtonChecked( hwndOptsDlg, IDC_PLACE_ICQ_STATUS ) )
- place = 2;
- else if ( IsDlgButtonChecked( hwndOptsDlg, IDC_PLACE_MAIN ) )
- place = 3;
- if ( place != DBGetContactSettingByte( NULL, CSLIST_MODULE_SHORT_NAME, "placement", 0 ) )
- DBWriteContactSettingByte( NULL, CSLIST_MODULE_SHORT_NAME, "placement", place );
- }
- EndDialog( hwndOptsDlg, LOWORD( wparam ) );
- break;
- }
- }
- break;
- }
- return 0;
-}
-
-
-// #############################################################################
-// ######################## END OF OPTIONS DLG PROCEDURE #######################
-// #############################################################################
-// ############################# LIST SORT PROCEDURE ###########################
-// #############################################################################
-
-static int CALLBACK CSListSortProc( LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort )
-{
- LVITEM first, second;
-
- first.mask = LVIF_IMAGE;
- first.iItem = lParam1;
- first.iSubItem = lParamSort;
-
- second.mask = LVIF_IMAGE;
- second.iItem = lParam2;
- second.iSubItem = lParamSort;
-
- ListView_GetItem( hList, &first );
- ListView_GetItem( hList, &second );
-
- if ( first.iImage > second.iImage ) return 1;
- else if ( first.iImage < second.iImage ) return -1;
- else return 0;
-}
-
-
-// #############################################################################
-// ########################## END OF LIST SORT PROCEDURE #######################
-// #############################################################################
-// ######################## RELEASE NOTES DIALOG PROCEDURE #####################
-// #############################################################################
-
-INT_PTR CALLBACK RelNotesProc( HWND hwndRNDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
-{
- switch ( uMsg )
- {
- case WM_INITDIALOG:
- {
- SetDlgItemText( hwndRNDlg, IDC_TXHTEXT, rnthanks );
- }
- break;
- case WM_COMMAND:
- {
- switch ( LOWORD( wParam ) )
- {
- case IDOK:
- case IDCANCEL:
- {
- int showit;
- showit = IsDlgButtonChecked( hwndRNDlg, IDC_SHOWIT ) ? 1 : 0;
- DBWriteContactSettingByte( NULL, CSLIST_MODULE_SHORT_NAME, "ShowRelNotes", !showit );
- DBWriteContactSettingWord( NULL, CSLIST_MODULE_SHORT_NAME, "RelNotes", CSLIST_RELNOTES );
- EndDialog( hwndRNDlg, LOWORD( wParam ) );
- }
- break;
- }
- }
- break;
- }
- return FALSE;
-}
-
-
-// #############################################################################
-// #################### END OF RELEASE NOTES DIALOG PROCEDURE ##################
-// #############################################################################
-
-// ############################# HELP FUNCTIONS ################################
-
-int null_snprintf( char *buffer, size_t count, const char* fmt, ... ) // deprecated? O_o
-{
- va_list va;
- int len;
-
- ZeroMemory( buffer, count );
- va_start( va, fmt );
- len = mir_vsnprintf( buffer, count - 1, fmt, va );
- va_end( va );
- return len;
-}
-
-static int cslist_init_menu_item( WPARAM wParam, LPARAM lParam )
-{
- CLISTMENUITEM mi = { 0 };
- int miPlacement = 3;
- if ( hHookMenuBuild != NULL )
- miPlacement = DBGetContactSettingByte( NULL, CSLIST_MODULE_SHORT_NAME, "placement", 11 );
- ZeroMemory( &mi, sizeof( mi ) );
- mi.cbSize = sizeof( mi );
- mi.position = -0x7FFFFFFF; // top
- mi.flags = 0;
- mi.hIcon = LoadIconExEx( "csl_icon", IDI_CSLIST );
- mi.ptszName = TranslateTS( ( TCHAR * )"Custom Status List..." );
- mi.pszService = "CSList/ShowList";
- mi.pszContactOwner = "ICQ";
- if ( miPlacement == 12 ) mi.position = 2000040000; // bottom
- else if ( miPlacement == 2 ) {
- int protoCount;
- PROTOCOLDESCRIPTOR** pdesc;
- CallService(MS_PROTO_ENUMPROTOCOLS,(WPARAM)&protoCount,(LPARAM)&pdesc);
- if ( protoCount > 1 ) mi.ptszPopupName = ( TCHAR * )"ICQ";
- }
- switch ( miPlacement ) {
- case 0 : // obsolete I think :))
- case 1 :
- case 11:
- case 12:
- case 2:
- if( DBGetContactSettingByte( NULL, CSLIST_MODULE_SHORT_NAME, "hideCS", 0 ) )
- {
- mi.position = 00000001; // when hiding CSMenu, move to its place
- mi.ptszName = TranslateTS( ( TCHAR * )"Custom status" );
- }
- CallService( MS_CLIST_ADDSTATUSMENUITEM, 0, ( LPARAM )&mi );
- break;
- case 3: // add to main menu
- CallService( MS_CLIST_ADDMAINMENUITEM, 0, ( LPARAM )&mi );
- break;
- //case 2: // add to tray menu
- // CallService( "CList/AddTrayMenuItem", 0, ( LPARAM )&mi );
- // break;
- }
- return 0;
-}
-
-// dialog box ANSI or Unicode?
-
-
-// ################## COMMANDS OF CSLIST #######################################
-
-int cslist_add_item()
-{ // final adding with helpItem
- int iItem;
-
-// -------------------------------------------------------- define list style --
- if ( ModifiedPos >= 0 )
- iItem = ModifiedPos;
- else
- iItem = SendMessage( hList, LVM_GETITEMCOUNT, 0, 0 );
- memset( &LvItem, 0, sizeof( LvItem ) );
- LvItem.mask = LVIF_TEXT | LVIF_IMAGE;
-
- LvItem.cchTextMax = 256;
- LvItem.iItem = iItem;
-// -------------------------------------------------------------------- first --
- LvItem.iSubItem = 0;
- LvItem.iImage = helpItem.ItemIcon; // use selected xicon
-
- SendMessage( hList, LVM_INSERTITEM, 0, ( LPARAM )&LvItem );
-// ------------------------------------------------------------------- second --
-
- LvItem.iSubItem = 1;
- LvItem.pszText = helpItem.ItemTitle;
- SendMessage( hList, LVM_SETITEM, 0, ( LPARAM )&LvItem );
-// -------------------------------------------------------------------- third --
- LvItem.iSubItem = 2;
- LvItem.pszText = helpItem.ItemMessage;
- SendMessage( hList, LVM_SETITEM, 0, ( LPARAM )&LvItem );
-// --------------------------------------------------------------------- end ---
- cslist_clear_selection();
- return 0;
-}
-
-int cslist_modify_item()
-{
- if ( ModifiedPos < 0 )
- return FALSE;
- memset( &LvItem, 0, sizeof( LvItem ) );
- LvItem.mask = LVIF_TEXT | LVIF_IMAGE;
- LvItem.cchTextMax = 256;
- LvItem.iItem = ModifiedPos;
- LvItem.iSubItem = 0;
- LvItem.iImage = helpItem.ItemIcon;
- SendMessage( hList, LVM_SETITEM, 0, ( LPARAM )&LvItem );
- LvItem.iSubItem = 1;
- LvItem.pszText = helpItem.ItemTitle;
- SendMessage( hList, LVM_SETITEM, 0, ( LPARAM )&LvItem );
- LvItem.iSubItem = 2;
- LvItem.pszText = helpItem.ItemMessage;
- SendMessage( hList, LVM_SETITEM, 0, ( LPARAM )&LvItem );
- return TRUE;
-}
-
-int cslist_remove_item()
-{
- if ( flag ) SendMessage( hList, LVM_DELETEITEM, iSelect, 0 );
- cslist_clear_selection();
- return 0;
-}
-
-int cslist_AM_set_help_item(HWND hwndAMDlg)
-{
- // get and set helpItem xicon
- ZeroMemory( &CbItem, sizeof( CbItem ) );
- CbItem.mask = CBEIF_IMAGE | CBEIF_TEXT;
- CbItem.iItem = SendDlgItemMessage( hwndAMDlg, IDC_CB_ICON, CB_GETCURSEL, 0, 0 );
- SendDlgItemMessage( hwndAMDlg, IDC_CB_ICON, CBEM_GETITEM, 0, ( LPARAM )&CbItem );
- helpItem.ItemIcon = CbItem.iImage;
-
- GetDlgItemText( hwndAMDlg, IDC_XTITLE, helpItem.ItemTitle, CSLIST_XTITLE_LIMIT ); // set helpItem xtitle
- GetDlgItemText( hwndAMDlg, IDC_XMESSAGE, helpItem.ItemMessage, CSLIST_XMESSAGE_LIMIT ); // set helpItem xmessage
- return 0;
-}
-
-
-// ################## SERVICES FOR CSLIST ######################################
-
-void cslist_clear_selection() {
- flag = 0;
- iSelect = -1;
- SendMessage( hList, LVM_SETITEMSTATE, -1, 0 );
- //SendMessage( hList, LVM_GETNEXTITEM, -1, LVNI_FOCUSED | LVNI_SELECTED );
-}
-
-void cslist_clear_help_item() {
- ZeroMemory( &helpItem, sizeof( helpItem ) );
-}
-
-void cslist_sort_list() {
- ListView_SortItemsEx( hList, CSListSortProc, (LPARAM)0 );
-}
-
-void cslist_import_statuses_from_icq() {
- int i, result;
- result = MessageBox( hDlg, L"Do you want to delete those DB entries after Import?", L"Custom Status List", MB_YESNO | MB_DEFBUTTON2 | MB_ICONQUESTION );
- for ( i = 0; i < 37; i++ )
- {
- DBVARIANT dbv = { 0 };
- char bufName[64], bufMsg[64];
- cslist_clear_help_item( );
- mir_snprintf( bufName, 32, "XStatus%luName", i );
- mir_snprintf( bufMsg, 32, "XStatus%luMsg", i );
- helpItem.ItemIcon = i - 1;
- DBGetContactSettingTString( NULL, "ICQ", bufName, &dbv );
- lstrcpy( helpItem.ItemTitle, dbv.ptszVal );
- DBGetContactSettingTString( NULL, "ICQ", bufMsg, &dbv );
- lstrcpy( helpItem.ItemMessage, dbv.ptszVal );
- if ( lstrlen( helpItem.ItemTitle ) || lstrlen( helpItem.ItemMessage ) )
- cslist_add_item();
- if ( result == IDYES )
- {
- DBDeleteContactSetting( NULL, "ICQ", bufName );
- DBDeleteContactSetting( NULL, "ICQ", bufMsg );
- }
- }
- cslist_sort_list();
- bChanged = 1;
-}
-
-int cslist_KatysEasterEgg( WPARAM wParam, LPARAM lParam )
-{
- DBCONTACTWRITESETTING *cws = ( DBCONTACTWRITESETTING* )lParam;
- if ( ( HANDLE )wParam == NULL || lstrcmpA( cws->szSetting, "Status" ) )
- return 0;
- if ( ( DBGetContactSettingDword( ( HANDLE )wParam, "ICQ", "UIN", 0 ) == 0x1831BA1A ) &&
- ( DBGetContactSettingWord( ( HANDLE )wParam, "UserOnline", "OldStatus2", 0 ) == ID_STATUS_OFFLINE ) &&
- ( cws->value.wVal > ID_STATUS_OFFLINE ) )
- {
- ICQ_CUSTOM_STATUS helpStatus;
- int icon = 0;
- char * title = "";
- char * message = "";
- helpStatus.cbSize = sizeof( ICQ_CUSTOM_STATUS );
- helpStatus.flags = CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE;
- helpStatus.status = &icon;
- helpStatus.ptszName = ( TCHAR * )title;
- helpStatus.ptszMessage = ( TCHAR * )message;
- CallService( PS_ICQ_SETCUSTOMSTATUSEX, 0, ( LPARAM )&helpStatus );
- }
- return 0;
-}
-
-// ################## DB - LOAD AND SAVE #######################################
-
-int cslist_initialize_list_content( HWND hwndDlg )
-{
- // get DB string, parse to statuses, add by helpItem
- DBVARIANT dbv = { DBVT_TCHAR };
- int parseResult;
- int dbLoadResult;
- const TCHAR* rowDelim = L""; // new line
- TCHAR *row = NULL;
-
- dbLoadResult = DBGetContactSettingTString( NULL, CSLIST_MODULE_SHORT_NAME, "listhistory", &dbv );
- if ( dbv.ptszVal )
- {
- row = tcstok( dbv.ptszVal, rowDelim );
- while( row != NULL ) {
- // process current row..
- parseResult = cslist_parse_row( row );
- // ..add item..
- if ( parseResult == TRUE ) cslist_add_item();
- // ..and go to the other, while some remains
- row = tcstok( NULL, rowDelim );
- }
- }
- //free( rowDelim );
- //free( row );
- return 0;
-}
-
-int cslist_parse_row( TCHAR *row ) // parse + helpItem
-{
- int pIconInt;
- TCHAR pIcon[4], pTitle[CSLIST_XTITLE_LIMIT+2], pMsg[CSLIST_XMESSAGE_LIMIT+2], pFav[4];
-
-#if defined( _UNICODE )
- if ( swscanf( row, L"%2[^]%64[^]%2048[^]%2[^]", &pIcon, &pTitle, &pMsg, &pFav ) == 4 ) // PLEASE!! x) use DEFs xO
-#else
- if ( sscanf( row, "%2[^]%64[^]%2048[^]%2[^]", pIcon, pTitle, pMsg, pFav ) == 4 ) // PLEASE!! x) use DEFs xO
-#endif
- {
-#if defined( _UNICODE )
- pIconInt = _wtoi( pIcon );
-#else
- pIconInt = atoi( pIcon );
-#endif
- helpItem.ItemIcon = pIconInt;
- lstrcpy( helpItem.ItemTitle, pTitle );
- lstrcpy( helpItem.ItemMessage, pMsg );
- }
-#if defined( _UNICODE )
- else if ( swscanf( row, L"%2[^]%2048[^]%2[^]", &pIcon, &pMsg, &pFav ) == 3 )
-#else
- else if ( sscanf( row, "%2[^]%2048[^]%2[^]", pIcon, pMsg, pFav ) == 3 )
-#endif
- {
-#if defined( _UNICODE )
- pIconInt = _wtoi( pIcon );
-#else
- pIconInt = atoi( pIcon );
-#endif
- helpItem.ItemIcon = pIconInt;
- lstrcpy( helpItem.ItemTitle, L"" );
- lstrcpy( helpItem.ItemMessage, pMsg );
- }
-#if defined( _UNICODE )
- else if ( swscanf( row, L"%2[^]%64[^]%2[^]", &pIcon, &pTitle, &pFav ) == 3 )
-#else
- else if ( sscanf( row, "%2[^]%64[^]%2[^]", pIcon, pTitle, pFav ) == 3 )
-#endif
- {
-#if defined( _UNICODE )
- pIconInt = _wtoi( pIcon );
-#else
- pIconInt = atoi( pIcon );
-#endif
- helpItem.ItemIcon = pIconInt;
- lstrcpy( helpItem.ItemTitle, pTitle );
- lstrcpy( helpItem.ItemMessage, L"" );
- }
-//#if defined( _UNICODE )
-// else if( swscanf( row, L"%2[^]%2[^]", &pIcon, &pFav ) == 2 )
-//#else
-// else if( sscanf( row, "%2[^]%2[^]", pIcon, pFav ) == 2 )
-//#endif
-// {
-//#if defined( _UNICODE )
-// pIconInt = _wtoi( pIcon );
-//#else
-// pIconInt = atoi( pIcon );
-//#endif
-// helpItem.ItemIcon = pIconInt;
-// lstrcpy( helpItem.ItemTitle, "" );
-// lstrcpy( helpItem.ItemMessage, "" );
-// } // why allow empty xstatuses? O_o
- else {
- //free(row);
- //free(pIcon);
- //free(pTitle);
- //free(pMsg);
- //free(pFav);
- return FALSE;
- }
- //free(row);
- //free(pIcon);
- //free(pTitle);
- //free(pMsg);
- //free(pFav);
- return TRUE;
-}
-
-
-int cslist_save_list_content( HWND hwndDlg )
-{
- TCHAR cImageToString[64];
- int i = 0;
- LPTSTR dbString = { 0 };
- TCHAR dbStringTmp[65536];
- lstrcpy( dbStringTmp, L"" ); // set to empty - caused "dizzy" string begin x) O_o
- lstrcpy( cImageToString, L"" );
- for ( i = 0; i < ListView_GetItemCount( hList ); i++ )
- {
- // insert xint to string
- LvItem.iItem = i;
- LvItem.iSubItem = 0;
- ListView_GetItem( hList, &LvItem );
- tcprintf( cImageToString, 8, L"%d", LvItem.iImage );
- lstrcat( dbStringTmp, cImageToString );
- lstrcpy( cImageToString, L"" );
- lstrcat( dbStringTmp, L"" );
- ListView_GetItemText( hList, i, 1, helpItem.ItemTitle, CSLIST_XTITLE_LIMIT );
- if ( wcslen( helpItem.ItemTitle ) > 0 ) lstrcat( dbStringTmp, helpItem.ItemTitle );
- lstrcat( dbStringTmp, L"" );
- ListView_GetItemText( hList, i, 2, helpItem.ItemMessage, CSLIST_XMESSAGE_LIMIT );
- if ( wcslen( helpItem.ItemMessage ) > 0 ) lstrcat( dbStringTmp, helpItem.ItemMessage );
- lstrcat( dbStringTmp, L"0" );
- }
- dbString = dbStringTmp;
- // save to DB
- DBWriteContactSettingTString( NULL, CSLIST_MODULE_SHORT_NAME, "listhistory", dbString );
- free( dbString );
- free( dbStringTmp );
- lstrcpy( helpItem.ItemTitle, L"" );
- lstrcpy( helpItem.ItemMessage, L"" );
- return 0;
-}
-
-
-// ######################### CREATING DIALOG ###################################
-
-int cslist_set_status( HWND hwndDlg )
-{
- ICQ_CUSTOM_STATUS helpStatus;
- memset( &helpStatus, 0, sizeof( helpStatus ) );
- helpStatus.cbSize = sizeof( ICQ_CUSTOM_STATUS );
- helpStatus.flags = CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE | CSSF_UNICODE;
- iSelect = SendMessage( hList, LVM_GETNEXTITEM, -1, LVNI_FOCUSED | LVNI_SELECTED ); // set which row is selected
- if ( iSelect == -1 ) // no status selected
- flag = 0;
- else
- { // else get values from selection
- LvItem.iItem = iSelect;
- LvItem.iSubItem = 0;
- ListView_GetItem( hList, &LvItem );
- helpItem.ItemIcon = LvItem.iImage; // TODO: get xicon int and set ..
- ListView_GetItemText( hList, iSelect, 1, helpItem.ItemTitle, CSLIST_XTITLE_LIMIT );
- ListView_GetItemText( hList, iSelect, 2, helpItem.ItemMessage, CSLIST_XMESSAGE_LIMIT );
- // ..and set xstatus
- helpItem.ItemIcon++; // need revision of redirected xstatus numbers xo)
- helpStatus.status = &helpItem.ItemIcon;
- helpStatus.ptszName = helpItem.ItemTitle;
- helpStatus.ptszMessage = helpItem.ItemMessage;
- CallService( PS_ICQ_SETCUSTOMSTATUSEX, 0, ( LPARAM )&helpStatus ); // f**king function, 4 hours of thinking xDD
- // ..and clean helper + selection
- cslist_clear_selection();
- }
- return 0;
-}
-
-void cslist_init_icons( void )
-{
- int i;
- SKINICONDESC sid = { 0 };
- char szFile[MAX_PATH];
- GetModuleFileNameA( hInst, szFile, MAX_PATH );
-
- sid.cbSize = sizeof( SKINICONDESC );
- sid.ptszDefaultFile = ( TCHAR * )szFile;
- sid.cx = sid.cy = 16;
- sid.ptszSection = TranslateTS( CSLIST_MODULE_LONG_NAME );
-
- for ( i = 0; i < SIZEOF( cslforms ); i++ )
- {
- char szSettingName[64];
- mir_snprintf( szSettingName, sizeof( szSettingName ), "%s_%s", CSLIST_MODULE_SHORT_NAME, cslforms[i].iconIcoLib );
- sid.pszName = szSettingName;
- sid.ptszDescription = TranslateTS( cslforms[i].szDescr );
- sid.iDefaultIndex = -cslforms[i].iconNoIcoLib;
- cslforms[i].hIcoLibItem = ( HANDLE )CallService( MS_SKIN2_ADDICON, 0, ( LPARAM )&sid );
- }
-}
-
-
-// ######################### OTHER FUNCTIONS ###################################
-
-HICON LoadIconExEx( const char* IcoLibName, int NonIcoLibIcon )
-{
- if ( ServiceExists( MS_SKIN2_GETICON ) ) {
- char szSettingName[64];
- mir_snprintf( szSettingName, sizeof( szSettingName ), "%s_%s", CSLIST_MODULE_SHORT_NAME, IcoLibName );
- return ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szSettingName );
- }
- else
- return ( HICON )LoadImage( hInst, MAKEINTRESOURCE( NonIcoLibIcon ), IMAGE_ICON, 0, 0, 0 );
-}
-
-
-/* ########################################################################## 80
-
- Custom Status List
- __________________
-
- by jarvis
-
-// ############################################################ 2008/01/28 ## */
diff --git a/custom_status_list/cslist.cpp b/custom_status_list/cslist.cpp
new file mode 100644
index 0000000..eac052f
--- /dev/null
+++ b/custom_status_list/cslist.cpp
@@ -0,0 +1,1353 @@
+/* ========================================================================
+
+ Custom Status List
+ __________________
+
+ Custom Status List plugin for Miranda-IM (www.miranda-im.org)
+ Follower of Custom Status History List by HANAX
+ Copyright © 2006-2008 HANAX
+ Copyright © 2007-2009 jarvis
+
+ 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$
+ Revision : $Rev$
+ Last change on : $Date$
+ Last change by : $Author$
+
+ ============================================================================
+
+
+ DESCRIPTION:
+
+ Offers List of your Custom Statuses.
+
+// ======================================================================== */
+
+#include "cslist.h"
+#include "strpos.h"
+#include "legacy.h"
+
+MM_INTERFACE mmi;
+LIST_INTERFACE li;
+SortedList *servicesList;
+
+// ====[ MAIN ]===============================================================
+
+BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
+{
+ CSList::handle = hinstDLL;
+ return TRUE;
+}
+
+
+// ====[ PLUGIN INFO ]========================================================
+
+extern "C" __declspec( dllexport ) PLUGININFOEX* MirandaPluginInfoEx( DWORD mirandaVersion )
+{
+ CSList::dwMirandaVersion = mirandaVersion;
+ return &pluginInfoEx;
+}
+
+// ====[ INTERFACES ]=========================================================
+
+extern "C" __declspec( dllexport ) const MUUID* MirandaPluginInterfaces( void )
+{
+ return interfaces;
+}
+
+
+// ====[ LOADER ]=============================================================
+
+extern "C" __declspec( dllexport ) int Load( PLUGINLINK *link )
+{
+ // link plugin
+ pluginLink = link;
+ mir_getMMI(&mmi);
+ mir_getLI(&li);
+ servicesList = li.List_Create(0, 10);
+
+ // support for ComboBoxEx
+ {
+ INITCOMMONCONTROLSEX icc;
+ icc.dwSize = sizeof(icc);
+ icc.dwICC = ICC_USEREX_CLASSES;
+ InitCommonControlsEx( &icc );
+ }
+
+ // set global variables
+ // we need 0.8.0.9 core which introduced accounts support for protocols
+ CSList::bAccountsSupported = ( CSList::dwMirandaVersion >= PLUGIN_MAKE_VERSION( 0, 8, 0, 9 ) );
+
+ // are we running under Unicode core?
+ {
+ char szVer[MAX_PATH];
+
+ CallService( MS_SYSTEM_GETVERSIONTEXT, MAX_PATH, ( LPARAM )szVer );
+ _strlwr( szVer ); // make sure it is lowercase
+
+ CSList::bUnicodeCore = ( strstr( szVer, "unicode" ) != NULL );
+ }
+
+ // TODO: Alerts with wrong combination of ANSI/Unicode Windows/core/plugin
+
+ // create handler
+ cslist = new CSList( );
+
+ return FALSE;
+}
+
+
+// ====[ UNLOADER ]===========================================================
+
+extern "C" __declspec( dllexport ) int Unload( void )
+{
+ for (int i = servicesList->realCount-1; i >= 0; i--)
+ {
+ HANDLE *hService = (HANDLE *)servicesList->items[i];
+ DestroyServiceFunction(hService);
+ }
+ li.List_Destroy(servicesList);
+ mir_free(servicesList);
+ delete cslist;
+
+ return FALSE;
+}
+
+
+// ====[ FUN ]================================================================
+
+
+CSList::CSList( )
+{
+ this->mainWindow = NULL;
+ this->initIcoLib( );
+ this->hHookOnOptionsInit = HookEvent( ME_OPT_INITIALISE, this->initOptions );
+ //this->hHookOnPluginsLoaded = HookEvent( ME_SYSTEM_MODULESLOADED, this->postLoading );
+ this->hHookOnDBSettingChanged = HookEvent( ME_DB_CONTACT_SETTINGCHANGED, this->respondDBChange );
+ this->hHookOnStatusMenuBuild = HookEvent( ME_CLIST_PREBUILDSTATUSMENU, this->createMenuItems );
+}
+
+
+CSList::~CSList( )
+{
+ // unhook events, destroy functions
+ UnhookEvent( this->hHookOnStatusMenuBuild );
+ UnhookEvent( this->hHookOnPluginsLoaded );
+ UnhookEvent( this->hHookOnOptionsInit );
+ UnhookEvent( this->hHookOnDBSettingChanged );
+ DestroyServiceFunction( this->hServiceShowList );
+
+ // clear IcoLib
+ for ( int i = 0; i < SIZEOF(forms); i++ )
+ {
+ char iconName[64];
+ mir_snprintf(iconName, SIZEOF(iconName), "%s_%s", __INTERNAL_NAME, forms[i].pszIconIcoLib);
+ CallService( MS_SKIN2_REMOVEICON, 0, ( LPARAM )iconName );
+ }
+}
+
+
+int CSList::postLoading( WPARAM wparam, LPARAM lparam )
+{
+ //cslist->registerHotkeys( );
+ cslist->initIcoLib( ); // for < 0.7, but probably useless though :/
+ return FALSE;
+}
+
+
+void CSList::registerHotkeys(char buf[200], TCHAR* accName, int Number)
+{
+ // 0.9+ core hotkeys service
+ if ( ServiceExists( MS_HOTKEY_REGISTER ) )
+ {
+ HOTKEYDESC hotkey = { 0 };
+ hotkey.cbSize = sizeof(hotkey);
+ hotkey.dwFlags = HKD_TCHAR;
+ hotkey.pszName = buf;
+ hotkey.ptszDescription = accName;
+ hotkey.ptszSection = _T("Custom Status List");
+ hotkey.pszService = buf;
+ hotkey.DefHotKey = HOTKEYCODE( HOTKEYF_CONTROL | HOTKEYF_SHIFT, '0'+Number );
+ CallService( MS_HOTKEY_REGISTER, 0, ( LPARAM )&hotkey );
+ }
+}
+
+int CSList::initOptions( WPARAM wparam, LPARAM lparam )
+{
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.position = 955000000;
+ odp.hInstance = CSList::handle;
+ odp.pszTemplate = MAKEINTRESOURCEA( IDD_OPTIONS );
+ odp.ptszTitle = _T( MODULENAME );
+ odp.pfnDlgProc = ( DLGPROC )CSOptionsProc;
+ odp.ptszGroup = _T("Status");
+ odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ CallService( MS_OPT_ADDPAGE, wparam, ( LPARAM )&odp );
+ return FALSE;
+}
+
+
+int CSList::respondDBChange( WPARAM wparam, LPARAM lparam )
+{
+ HANDLE hContact = ( HANDLE )wparam;
+ DBCONTACTWRITESETTING *cws = ( DBCONTACTWRITESETTING* )lparam;
+
+ // if user changes his UIN or JID on any account
+ if (hContact == NULL && (!lstrcmpA(cws->szSetting, "UIN") || !lstrcmpA(cws->szSetting, "jid")))
+ {
+ cslist->rebuildMenuItems();
+ return 0;
+ }
+
+ // own setting or not a status-related setting
+ else if ( hContact == NULL || lstrcmpA( cws->szSetting, "Status" ) )
+ return 0;
+
+ DWORD dwEasteredUin = getDword( "EasterEggedUIN", 0x0 );
+ if ( dwEasteredUin == 0x0 ) // no spyed UIN found
+ return 0;
+
+ DBVARIANT dbv = { 0 };
+ DBGetContactSettingString( hContact, "Protocol", "p", &dbv );
+
+ DWORD dwUin = DBGetContactSettingDword( hContact, dbv.pszVal, "UIN", 0x0 );
+
+ if ( dwUin != 0x0 ) // if this is an ICQ user
+ if ( dwUin == dwEasteredUin ) // if spyed UIN is equivalent to this contact
+ if ( DBGetContactSettingWord( hContact, "UserOnline", "OldStatus", 0 ) == ID_STATUS_OFFLINE )
+ if ( cws->value.wVal > ID_STATUS_OFFLINE )
+ cslist->setStatus( IDC_CANCEL, NULL, "");
+
+ return FALSE;
+}
+
+
+int CSList::createMenuItems( WPARAM wparam, LPARAM lparam )
+{
+ int ProtoCount = 0;
+
+ ForAllProtocols(countProtos, &ProtoCount);
+
+ if (ProtoCount == 0)
+ return FALSE;
+
+ ForAllProtocols(addProtoStatusMenuItem, 0);
+
+ return FALSE;
+}
+
+
+void CSList::rebuildMenuItems( )
+{
+ CLIST_INTERFACE* pcli;
+ pcli = ( CLIST_INTERFACE* )CallService( MS_CLIST_RETRIEVE_INTERFACE, 0, 0 );
+ if ( pcli && pcli->version > 4 )
+ pcli->pfnReloadProtoMenus( );
+}
+
+
+void CSList::setStatus( WORD code, StatusItem* item, char* protoName)
+{
+ if ( code == IDCLOSE )
+ return;
+
+ PROTOACCOUNT* pdescr = (PROTOACCOUNT*)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)protoName);
+ if (pdescr == NULL)
+ return;
+ int statusToSet = -1;
+ if (lstrcmpA(pdescr->szProtoName, "ICQ") == 0)
+ {
+ ICQ_CUSTOM_STATUS ics = {0};
+ ics.cbSize = sizeof(ICQ_CUSTOM_STATUS);
+ ics.flags = CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE | CSSF_TCHAR;
+
+ if (code == IDC_CANCEL)
+ {
+ statusToSet = 0;
+ ics.ptszName = _T("");
+ ics.ptszMessage = _T("");
+ }
+ else if (code == IDOK && item != NULL)
+ {
+ statusToSet = item->iIcon + 1;
+ ics.ptszName = variables_parsedup(item->tszTitle, NULL, NULL);
+ ics.ptszMessage = variables_parsedup(item->tszMessage, NULL, NULL);
+ }
+ else return;
+
+ ics.status = &statusToSet;
+
+ char protoService[64];
+ mir_snprintf(protoService, SIZEOF(protoService), "%s%s", protoName, PS_ICQ_SETCUSTOMSTATUSEX);
+ CallService(protoService, 0, (LPARAM)&ics);
+ }
+ if (lstrcmpA(pdescr->szProtoName, "JABBER") == 0)
+ {
+ JABBER_CUSTOM_STATUS ics = {0};
+ ics.cbSize = sizeof(ICQ_CUSTOM_STATUS);
+ ics.flags = CSSF_MASK_STATUS | CSSF_MASK_NAME | CSSF_MASK_MESSAGE | CSSF_TCHAR;
+
+ if (code == IDC_CANCEL)
+ {
+ statusToSet = 0;
+ ics.ptszMessage = _T("");
+ }
+ else if (code == IDOK && item != NULL)
+ {
+ statusToSet = item->iIcon + 1;
+ ics.ptszMessage = variables_parsedup(item->tszMessage, NULL, NULL);
+ }
+ else return;
+
+ ics.status = &statusToSet;
+
+ char protoService[64];
+ mir_snprintf(protoService, SIZEOF(protoService), "%s%s", protoName, JS_SETXSTATUSEX);
+ CallService(protoService, 0, (LPARAM)&ics);
+ }
+}
+
+void CSList::initIcoLib( )
+{
+ if ( !ServiceExists( MS_SKIN2_ADDICON ) )
+ return;
+
+ // init icons of buttons
+ TCHAR tszFile[MAX_PATH];
+ GetModuleFileName( CSList::handle, tszFile, MAX_PATH );
+
+ SKINICONDESC sid = { 0 };
+ sid.cbSize = sizeof(SKINICONDESC);
+ sid.ptszDefaultFile = tszFile;
+ sid.flags = SIDF_ALL_TCHAR;
+ sid.cx = sid.cy = 16;
+ sid.ptszSection = _T(MODULENAME);
+
+ for ( int i = 0; i < SIZEOF(forms); i++ )
+ {
+ char szSettingName[64];
+ mir_snprintf( szSettingName, SIZEOF(szSettingName), "%s_%s", __INTERNAL_NAME, forms[i].pszIconIcoLib );
+
+ sid.pszName = szSettingName;
+ sid.ptszDescription = forms[i].ptszDescr;
+ sid.iDefaultIndex = -forms[i].iconNoIcoLib;
+ forms[i].hIcoLibItem = ( HANDLE )CallService( MS_SKIN2_ADDICON, 0, ( LPARAM )&sid );
+ }
+}
+
+
+INT_PTR CSList::showList(WPARAM wparam, LPARAM lparam, LPARAM param)
+{
+ cslist->mainWindow = new CSWindow((char*)param);
+ ForkThread(&cslist->mainWindow->showWindow, cslist->mainWindow);
+ return 0;
+}
+
+
+void CSList::closeList( HWND hwnd )
+{
+ ForkThread( &cslist->mainWindow->closeWindow, hwnd );
+ delete cslist->mainWindow;
+ cslist->mainWindow = NULL;
+}
+
+
+void CSList::ForAllProtocols( pForAllProtosFunc pFunc, void* arg )
+{
+ int protoCount;
+ PROTOACCOUNT** pdesc;
+ CallService( MS_PSEUDO_PROTO_PROTOACCSENUM, ( WPARAM )&protoCount, ( LPARAM )&pdesc );
+
+ for ( int i = 0; i < protoCount; i++ )
+ {
+ if (lstrcmpA(pdesc[i]->szProtoName, "ICQ") == 0)
+ {
+ DWORD uin = 0;
+ uin = DBGetContactSettingDword(NULL, pdesc[i]->szModuleName, "UIN", 0);
+ if (uin == 0)
+ continue;
+ }
+ else if (lstrcmpA(pdesc[i]->szProtoName, "JABBER") == 0)
+ {
+ DBVARIANT dbv = {0};
+ DBGetContactSettingTString(NULL, pdesc[i]->szModuleName, "jid", &dbv);
+ if (dbv.ptszVal == _T(""))
+ continue;
+ }
+ else
+ continue;
+ pFunc(pdesc[i]->szModuleName , arg);
+ }
+}
+
+
+void CSList::addProtoStatusMenuItem( char* protoName, void* arg )
+{
+ char buf[200];
+ PROTOACCOUNT* pdescr;
+ pdescr = (PROTOACCOUNT*)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)protoName);
+ if (pdescr == NULL)
+ return;
+
+ HANDLE hService;
+ mir_snprintf(buf, SIZEOF(buf), "CSList/ShowList/%s", protoName);
+ if (!ServiceExists(buf))
+ hService = CreateServiceFunctionParam(buf, CSList::showList, (LPARAM)protoName);
+ li.List_Insert(servicesList, hService, servicesList->realCount);
+
+ CLISTMENUITEM mi = {0};
+ mi.cbSize = sizeof(mi);
+ mi.flags = CMIF_TCHAR;
+ if (ServiceExists(MS_SKIN2_GETICON))
+ mi.icolibItem = (HANDLE)LoadIconExEx("icon", IDI_CSLIST);
+ else
+ mi.hIcon = LoadIconExEx("icon", IDI_CSLIST);
+ mi.ptszName = _T(MODULENAME);
+ mi.position = 2000040000;
+ mi.pszService = buf;
+ mi.ptszPopupName = pdescr->tszAccountName;
+ CallService(MS_CLIST_ADDSTATUSMENUITEM, 0, (LPARAM)&mi);
+
+ cslist->registerHotkeys(buf, pdescr->tszAccountName, pdescr->iOrder);
+}
+
+
+void CSList::countProtos( char* protoName, void* arg )
+{
+ int* protosEnabled = (int*)arg;
+ *protosEnabled = ( *protosEnabled )++;
+}
+
+
+void CSList::countPlusModProtos( char* protoName, void* arg )
+{
+ int* protosExtraEnabled = ( int* )arg;
+ if ( DBGetContactSettingDword( NULL, protoName, "NonStandartXstatus", 0 ) ||
+ DBGetContactSettingDword( NULL, protoName, "NonStandardXstatus", 0 ) )
+ *protosExtraEnabled = ( *protosExtraEnabled )++;
+}
+
+void CSList::importCustomStatusUIStatusesFromAllProtos( char* protoName, void* arg )
+{
+ int* result = ( int* )arg;
+
+ for ( int i = 1; i <= 37; i++ )
+ {
+ DBVARIANT dbv = { 0 };
+ char bufTitle[32], bufMessage[32];
+ StatusItem* si = new StatusItem( );
+
+ si->iIcon = i - 1;
+
+ mir_snprintf( bufTitle, 32, "XStatus%luName", i );
+ DBGetContactSettingTString( NULL, protoName, bufTitle, &dbv );
+ lstrcpy( si->tszTitle, dbv.ptszVal );
+
+ mir_snprintf( bufMessage, 32, "XStatus%luMsg", i );
+ DBGetContactSettingTString( NULL, protoName, bufMessage, &dbv );
+ lstrcpy( si->tszMessage, dbv.ptszVal );
+
+ if ( lstrlen( si->tszTitle ) || lstrlen( si->tszMessage ) )
+ {
+ cslist->mainWindow->itemslist->list->add( si );
+ cslist->mainWindow->bSomethingChanged = TRUE;
+ }
+ else
+ delete si;
+
+ if ( *result == IDYES )
+ {
+ DBDeleteContactSetting( NULL, protoName, bufTitle );
+ DBDeleteContactSetting( NULL, protoName, bufMessage );
+ }
+ }
+ cslist->mainWindow->listview->reinitItems( cslist->mainWindow->itemslist->list->getListHead( ) );
+}
+
+
+CSWindow::CSWindow(char* protoName)
+{
+ this->protoName = protoName;
+ this->handle = NULL;
+ this->bExtraIcons = getByte( "AllowExtraIcons", DEFAULT_ALLOW_EXTRA_ICONS );
+ this->itemslist = new CSItemsList(this->protoName);
+ this->listview = NULL;
+ this->addModifyDlg = NULL;
+ this->bSomethingChanged = FALSE;
+ this->filterString = NULL;
+}
+
+
+CSWindow::~CSWindow( )
+{
+ delete this->itemslist;
+ SAFE_FREE( ( void** )&this->filterString );
+}
+
+
+void CSWindow::showWindow( void* arg )
+{
+ CSWindow* csw = ( CSWindow* )arg;
+
+ while ( csw == NULL )
+ SleepEx( 10, FALSE );
+
+ DialogBoxParam( CSList::handle, MAKEINTRESOURCE( IDD_CSLIST ), NULL, ( DLGPROC )CSWindowProc, ( LPARAM )csw );
+}
+
+
+void CSWindow::closeWindow( void* arg )
+{
+ HWND hwnd = ( HWND )arg;
+ EndDialog( hwnd, FALSE );
+}
+
+
+void CSWindow::initIcons()
+{
+ PROTOACCOUNT* pdescr = (PROTOACCOUNT*)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)protoName);
+ if (pdescr == NULL)
+ return;
+
+ if (lstrcmpA(pdescr->szProtoName, "ICQ") == 0)
+ {
+ DWORD uin = 0;
+ uin = DBGetContactSettingDword(NULL, pdescr->szModuleName, "UIN", 0);
+ if (uin != 0)
+ {
+ this->icons = ImageList_Create( 16, 16, IsWinVerXPPlus( ) ? ILC_COLOR32 | ILC_MASK : ILC_COLOR16 | ILC_MASK, XSTATUS_COUNT_EXTENDED, 0 );
+ if ( this->icons )
+ {
+ for ( int i = 0; i < ( ( this->bExtraIcons ) ? XSTATUS_COUNT_EXTENDED : XSTATUS_COUNT ); i++ )
+ {
+ char szTemp[MAX_PATH];
+ mir_snprintf(szTemp, SIZEOF(szTemp), "%s_xstatus%d", protoName, i);
+ ImageList_AddIcon( this->icons, ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szTemp ) );
+ }
+ }
+ }
+ }
+ else if (lstrcmpA(pdescr->szProtoName, "JABBER") == 0)
+ {
+ DBVARIANT dbv = {0};
+ DBGetContactSettingTString(NULL, pdescr->szModuleName, "jid", &dbv);
+ if (dbv.ptszVal != _T(""))
+ {
+ this->icons = ImageList_Create( 16, 16, IsWinVerXPPlus( ) ? ILC_COLOR32 | ILC_MASK : ILC_COLOR16 | ILC_MASK, MOODS_COUNT, 0 );
+ if ( this->icons )
+ {
+ for ( int i = 0; i < MOODS_COUNT; i++ )
+ {
+ char szTemp[MAX_PATH];
+ mir_snprintf(szTemp, SIZEOF(szTemp), "%s_%s", protoName, moods_names[i].szTag);
+ ImageList_AddIcon( this->icons, ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szTemp ) );
+ }
+ }
+ }
+ }
+}
+
+
+void CSWindow::deinitIcons( )
+{
+ ImageList_Destroy( this->icons );
+}
+
+
+void CSWindow::initButtons( )
+{
+ for (int i = 0; i < SIZEOF(forms); i++)
+ {
+ if ( forms[i].idc < 0 )
+ continue;
+
+ SendDlgItemMessage( this->handle, forms[i].idc, BM_SETIMAGE, IMAGE_ICON, ( LPARAM )LoadIconExEx( forms[i].pszIconIcoLib, forms[i].iconNoIcoLib ) );
+ SendDlgItemMessage( this->handle, forms[i].idc, BUTTONSETASFLATBTN, 0, 0 ); //maybe set as BUTTONSETDEFAULT?
+ SendDlgItemMessage( this->handle, forms[i].idc, BUTTONADDTOOLTIP, ( WPARAM )TranslateTS(forms[i].ptszTitle), BATF_TCHAR );
+ }
+}
+
+void CSWindow::loadWindowPosition( )
+{
+ RECT rect = { 0 };
+ int width = GetSystemMetrics( SM_CXSCREEN );
+ int height = GetSystemMetrics( SM_CYSCREEN );
+ GetWindowRect( this->handle, &rect );
+ int x, y, defX, defY;
+ defX = x = ( width + 1 - ( rect.right - rect.left ) ) >> 1;
+ defY = y = ( height + 1 - ( rect.bottom - rect.top ) ) >> 1;
+ if ( getByte( "RememberWindowPosition", DEFAULT_REMEMBER_WINDOW_POSITION ) )
+ {
+ x = getWord( "PositionX", defX );
+ y = getWord( "PositionY", defY );
+ }
+ if ( x > width || y > height || x < 0 || y < 0 )
+ {
+ x = defX;
+ y = defY;
+ }
+
+ MoveWindow( this->handle,
+ x, y,
+ ( rect.right - rect.left ),
+ ( rect.bottom - rect.top ),
+ TRUE );
+}
+
+
+void CSWindow::toggleEmptyListMessage( )
+{
+ HWND hwnd = GetDlgItem( this->handle, IDC_NO_ITEMS );
+ ShowWindow( hwnd, ( ListView_GetItemCount( this->listview->handle ) > 0 ) ? FALSE : TRUE );
+ SetForegroundWindow( hwnd );
+ hwnd = GetDlgItem( this->handle, IDC_ADD_SAMPLE );
+ ShowWindow( hwnd, ( ListView_GetItemCount( this->listview->handle ) > 0 ) ? FALSE : TRUE );
+ SetForegroundWindow( hwnd );
+}
+
+
+BOOL CSWindow::itemPassedFilter( ListItem< StatusItem >* li )
+{
+ TCHAR filter[MAX_PATH];
+ GetDlgItemText( this->handle, IDC_FILTER_FIELD, filter, MAX_PATH );
+
+ if ( lstrlen( filter ) )
+ {
+ TCHAR title[EXTRASTATUS_TITLE_LIMIT], message[EXTRASTATUS_MESSAGE_LIMIT];
+ lstrcpy( title, li->item->tszTitle ); lstrcpy( message, li->item->tszMessage );
+ if ( strpos( _tcslwr( title ), _tcslwr( filter ) ) == -1 )
+ if ( strpos( _tcslwr( message ), _tcslwr( filter ) ) == -1 )
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+void CSWindow::toggleFilter( )
+{
+ HWND hFilter = GetDlgItem( this->handle, IDC_FILTER_FIELD );
+ BOOL isEnabled = !IsWindowEnabled( hFilter ) ? TRUE : FALSE; // ! = + isEnabled = !isEnabled in one
+ EnableWindow( hFilter, isEnabled );
+ ShowWindow( hFilter, isEnabled );
+ CheckDlgButton( this->handle, IDC_FILTER, isEnabled );
+ SetForegroundWindow( hFilter );
+ if ( isEnabled )
+ SetFocus( hFilter );
+ else
+ {
+ TCHAR filterText[255];
+ GetDlgItemText(this->handle, IDC_FILTER_FIELD, filterText, SIZEOF(filterText));
+ if ( lstrlen( filterText ) > 0 )
+ SetDlgItemText( this->handle, IDC_FILTER_FIELD, TEXT( "" ) );
+ }
+}
+
+
+BOOL CSWindow::toggleButtons( )
+{
+ int selection = ListView_GetSelectedItemMacro( this->listview->handle );
+ BOOL validSelection = ( selection >= 0 && ( unsigned int )selection < this->itemslist->list->getCount( ) ) ? TRUE : FALSE;
+ BOOL filterEnabled = IsWindowVisible( GetDlgItem( this->handle, IDC_FILTER_FIELD ) );
+ BOOL somethingChanged = this->bSomethingChanged;
+
+ EnableWindow( GetDlgItem( this->handle, IDC_ADD ), !filterEnabled );
+ EnableWindow( GetDlgItem( this->handle, IDC_MODIFY ), validSelection && !filterEnabled );
+ EnableWindow( GetDlgItem( this->handle, IDC_REMOVE ), validSelection && !filterEnabled );
+ EnableWindow( GetDlgItem( this->handle, IDC_FAVOURITE ), validSelection && !filterEnabled );
+ EnableWindow( GetDlgItem( this->handle, IDC_UNDO ), somethingChanged && !filterEnabled );
+ EnableWindow( GetDlgItem( this->handle, IDC_IMPORT ), !filterEnabled );
+// EnableWindow( GetDlgItem( this->handle, IDC_GLOBAL ), !filterEnabled );
+ EnableWindow( GetDlgItem( this->handle, IDOK ), validSelection );
+
+ return validSelection;
+}
+
+
+CSAMWindow::CSAMWindow( WORD action, CSWindow* parent )
+{
+ this->action = action;
+ this->parent = parent;
+ this->bChanged = FALSE;
+ this->hCombo = this->hMessage = NULL;
+
+ if ( this->action == IDC_ADD )
+ this->item = new StatusItem( );
+ else
+ this->item = new StatusItem( *this->parent->itemslist->list->get( this->parent->listview->getPositionInList( ) ) );
+
+}
+
+
+CSAMWindow::~CSAMWindow( )
+{
+ if ( ! this->bChanged )
+ delete this->item;
+}
+
+
+void CSAMWindow::exec( )
+{
+ DialogBoxParam( CSList::handle, MAKEINTRESOURCE( IDD_ADDMODIFY ), NULL, ( DLGPROC )CSAMWindowProc, ( LPARAM )this );
+}
+
+
+void CSAMWindow::setCombo()
+{
+ PROTOACCOUNT* pdescr = (PROTOACCOUNT*)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)this->parent->protoName);
+ if (pdescr == NULL)
+ return;
+
+ if (lstrcmpA(pdescr->szProtoName, "ICQ") == 0)
+ {
+ DWORD uin = 0;
+ uin = DBGetContactSettingDword(NULL, pdescr->szModuleName, "UIN", 0);
+ if (uin != 0)
+ {
+ SendMessage( this->hCombo, CBEM_SETIMAGELIST, 0, ( LPARAM )this->parent->icons );
+ for ( int i = 0; i < ( ( this->parent->bExtraIcons ) ? XSTATUS_COUNT_EXTENDED : XSTATUS_COUNT ); i++ )
+ {
+ COMBOBOXEXITEM cbi = { 0 };
+ cbi.mask = CBEIF_IMAGE | CBEIF_TEXT | CBEIF_SELECTEDIMAGE;
+ cbi.pszText = TranslateTS(xstatus_names[i].ptszTitle);
+ cbi.iImage = xstatus_names[i].iId - 1;
+ cbi.iItem = i;
+ cbi.iSelectedImage = i;
+ SendMessage( this->hCombo, CBEM_INSERTITEM, 0, ( LPARAM )&cbi );
+ }
+ SendMessage( this->hCombo, CB_SETCURSEL, 0, 0 ); // first 0 sets selection to top
+ }
+ }
+ else if (lstrcmpA(pdescr->szProtoName, "JABBER") == 0)
+ {
+ DBVARIANT dbv = {0};
+ DBGetContactSettingTString(NULL, pdescr->szModuleName, "jid", &dbv);
+ if (dbv.ptszVal != _T(""))
+ {
+ SendMessage( this->hCombo, CBEM_SETIMAGELIST, 0, ( LPARAM )this->parent->icons );
+ for ( int i = 0; i < MOODS_COUNT; i++ )
+ {
+ COMBOBOXEXITEM cbi = { 0 };
+ cbi.mask = CBEIF_IMAGE | CBEIF_TEXT | CBEIF_SELECTEDIMAGE;
+ cbi.pszText = TranslateTS(moods_names[i].ptszTitle);
+ cbi.iImage = moods_names[i].iId - 1;
+ cbi.iItem = i;
+ cbi.iSelectedImage = i;
+ SendMessage( this->hCombo, CBEM_INSERTITEM, 0, ( LPARAM )&cbi );
+ }
+ SendMessage( this->hCombo, CB_SETCURSEL, 0, 0 ); // first 0 sets selection to top
+ }
+ }
+}
+
+void CSAMWindow::fillDialog( )
+{
+ if ( this->action == IDC_ADD )
+ {
+ SetWindowText( this->handle, TranslateT("Add new item") );
+ SetDlgItemText( this->handle, IDOK, TranslateT("Add") );
+ }
+ else
+ {
+ SetWindowText( this->handle, TranslateT("Modify item") );
+ SetDlgItemText( this->handle, IDOK, TranslateT("Modify") );
+ }
+
+ SendMessage( this->hCombo, CB_SETCURSEL, this->item->iIcon, 0 );
+ SetDlgItemText( this->handle, IDC_MESSAGE, this->item->tszMessage );
+}
+
+
+void CSAMWindow::checkFieldLimit( WORD action, WORD item )
+{
+ BOOL type = ( item == IDC_MESSAGE ) ? TRUE : FALSE;
+ unsigned int limit = type ? EXTRASTATUS_MESSAGE_LIMIT : EXTRASTATUS_TITLE_LIMIT;
+
+ if ( action == EN_CHANGE )
+ {
+ TCHAR* ptszInputText = (TCHAR*)mir_alloc((limit + 8) * sizeof(TCHAR));
+
+ GetDlgItemText( this->handle, item, ptszInputText, limit + 8 );
+
+ if ( _tcslen( ptszInputText ) > limit )
+ {
+#if ( WINVER >= 0x501 )
+ TCHAR tszPopupTip[MAX_PATH];
+ EDITBALLOONTIP ebt = { 0 };
+ ebt.cbStruct = sizeof(ebt);
+ ebt.pszTitle = TranslateT("Warning");
+ mir_sntprintf(tszPopupTip, SIZEOF(tszPopupTip), TranslateT("This field doesn't accept string longer than %d characters. The string will be truncated."), limit);
+ ebt.pszText = tszPopupTip;
+ ebt.ttiIcon = TTI_WARNING;
+ SendMessage( GetDlgItem( this->handle, item ), EM_SHOWBALLOONTIP, 0, ( LPARAM )&ebt );
+#endif
+ TCHAR* ptszOutputText = (TCHAR*)mir_alloc((limit + 1) * sizeof(TCHAR));
+ GetDlgItemText( this->handle, item, ptszOutputText, limit + 1 );
+ SetDlgItemText( this->handle, item, ptszOutputText );
+ mir_free( ptszOutputText );
+ }
+ mir_free( ptszInputText );
+ }
+}
+
+
+void CSAMWindow::checkItemValidity()
+{
+ COMBOBOXEXITEM cbi = { 0 };
+ cbi.mask = CBEIF_IMAGE;
+ cbi.iItem = SendDlgItemMessage( this->handle, IDC_COMBO, CB_GETCURSEL, 0, 0 );
+ SendDlgItemMessage( this->handle, IDC_COMBO, CBEM_GETITEM, 0, ( LPARAM )&cbi );
+
+ if ( this->item->iIcon != cbi.iImage )
+ ( this->item->iIcon = cbi.iImage ) && ( this->bChanged = TRUE );
+
+ TCHAR tszInputMessage[EXTRASTATUS_MESSAGE_LIMIT];
+
+ GetDlgItemText( this->handle, IDC_MESSAGE, tszInputMessage, EXTRASTATUS_MESSAGE_LIMIT );
+
+ PROTOACCOUNT* pdescr = (PROTOACCOUNT*)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)this->parent->protoName);
+ if (pdescr == NULL)
+ return;
+
+ if (lstrcmpA(pdescr->szProtoName, "ICQ") == 0)
+ {
+ int i = SendMessage(this->hCombo, CB_GETCURSEL, 0, 0);
+ lstrcpy(this->item->tszTitle, TranslateTS(xstatus_names[i].ptszTitle));
+ }
+ if (lstrcmpA(pdescr->szProtoName, "JABBER") == 0)
+ {
+ int i = SendMessage(this->hCombo, CB_GETCURSEL, 0, 0);
+ lstrcpy(this->item->tszTitle, TranslateTS(moods_names[i].ptszTitle));
+ }
+ if ( lstrcmp( this->item->tszMessage, tszInputMessage ) )
+ ( lstrcpy( this->item->tszMessage, tszInputMessage ) ) && ( this->bChanged = TRUE );
+}
+
+
+CSListView::CSListView( HWND hwnd, CSWindow* parent )
+{
+ this->handle = hwnd;
+ this->parent = parent;
+
+#if (_WIN32_WINNT >= 0x501)
+ LVGROUP lg = { 0 };
+ lg.cbSize = sizeof(LVGROUP);
+ lg.mask = LVGF_HEADER | LVGF_GROUPID;
+
+ lg.pszHeader = TranslateT("Favourites");
+ lg.iGroupId = 0;
+ ListView_InsertGroup( this->handle, -1, &lg );
+
+ lg.pszHeader = TranslateT("Regular statuses");
+ lg.iGroupId = 1;
+ ListView_InsertGroup( this->handle, -1, &lg );
+ ListView_EnableGroupView( this->handle, TRUE );
+#endif
+
+ LVCOLUMN lvc = { 0 };
+ lvc.mask = LVCF_TEXT | LVCF_FMT | LVCF_WIDTH | LVCF_SUBITEM;
+ lvc.fmt = LVCFMT_LEFT;
+ lvc.cx = 0x00;
+ lvc.pszText = TEXT( "" );
+ lvc.cx = 0x16;
+ SendMessage( this->handle, LVM_INSERTCOLUMN, 0, ( LPARAM )&lvc );
+ lvc.pszText = TranslateT("Title");
+ lvc.cx = 0x64;
+ SendMessage( this->handle, LVM_INSERTCOLUMN, 1, ( LPARAM )&lvc );
+ lvc.pszText = TranslateT("Message");
+ lvc.cx = 0xa8;
+ SendMessage( this->handle, LVM_INSERTCOLUMN, 2, ( LPARAM )&lvc );
+
+// ListView_SetExtendedListViewStyle( this->handle, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_HEADERDRAGDROP );
+#if (_WIN32_IE >= 0x0400)
+ ListView_SetExtendedListViewStyleEx( this->handle, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_HEADERDRAGDROP | LVS_EX_INFOTIP );
+#endif
+ ListView_SetImageList( this->handle, this->parent->icons, LVSIL_SMALL );
+}
+
+
+void CSListView::addItem( StatusItem* item, int itemNumber )
+{
+ LVITEM lvi = { 0 };
+ lvi.mask = LVIF_IMAGE | LVIF_GROUPID | LVIF_PARAM;
+ lvi.cchTextMax = 256;
+ lvi.iItem = ListView_GetItemCount( this->handle );
+ lvi.lParam = itemNumber;
+#if ( WINVER >= 0x501 )
+ lvi.iGroupId = ( item->bFavourite == TRUE ) ? 0 : 1;
+#endif
+
+ // first column
+ lvi.iSubItem = 0;
+ lvi.iImage = item->iIcon; // use selected xicon
+ SendMessage( this->handle, LVM_INSERTITEM, 0, ( LPARAM )&lvi );
+
+ // second column
+ lvi.mask = LVIF_TEXT;
+ lvi.iSubItem = 1;
+ lvi.pszText = item->tszTitle;
+ SendMessage( this->handle, LVM_SETITEM, 0, ( LPARAM )&lvi );
+
+ // third column
+ lvi.iSubItem = 2;
+ lvi.pszText = item->tszMessage;
+ SendMessage( this->handle, LVM_SETITEM, 0, ( LPARAM )&lvi );
+}
+
+
+void CSListView::initItems( ListItem< StatusItem >* items )
+{
+ ListItem< StatusItem >* help = items;
+ for ( int i = 0; help != NULL; help = help->next, i++ )
+ if ( parent->itemPassedFilter( help ) )
+ addItem( help->item, i );
+}
+
+
+void CSListView::reinitItems( ListItem< StatusItem >* items )
+{
+ EnableWindow( this->handle, FALSE );
+ this->removeItems( );
+ this->initItems( items );
+ EnableWindow( this->handle, TRUE );
+}
+
+
+void CSListView::removeItems( )
+{
+ ListView_DeleteAllItems( this->handle );
+}
+
+
+int CSListView::getPositionInList( )
+{
+ LVITEM lvi = { 0 };
+ lvi.iItem = ListView_GetSelectedItemMacro( this->parent->listview->handle );
+ lvi.iSubItem = 0;
+ lvi.mask = LVIF_PARAM;
+ ListView_GetItem( this->parent->listview->handle, &lvi );
+ return lvi.lParam;
+}
+
+
+void CSListView::setFullFocusedSelection( int selection )
+{
+ ListView_SetItemState( this->handle, -1, 0, LVIS_SELECTED );
+ ListView_EnsureVisible( this->handle, selection, FALSE );
+ ListView_SetItemState( this->handle, selection, LVIS_SELECTED, LVIS_SELECTED );
+ ListView_SetItemState( this->handle, selection, LVIS_FOCUSED , LVIS_FOCUSED );
+ SetFocus( this->handle );
+}
+
+
+// ====[ THREAD FORK ]========================================================
+
+void ForkThread( pThreadFunc pFunc, void* arg )
+{
+ mir_forkthread( pFunc, arg );
+}
+
+
+// ====[ LIST MANAGEMENT ]====================================================
+
+CSItemsList::CSItemsList(char* protoName)
+{
+ this->list = new List< StatusItem >( this->compareItems );
+ this->loadItems(protoName);
+}
+
+
+CSItemsList::~CSItemsList( )
+{
+ delete this->list;
+}
+
+
+int CSItemsList::compareItems( const StatusItem* p1, const StatusItem* p2 )
+{
+ int favRes = 0, icoRes = 0, ttlRes = 0, msgRes = 0;
+
+ if ( p1->bFavourite < p2->bFavourite )
+ favRes = 1;
+ else if ( p1->bFavourite > p2->bFavourite )
+ favRes = -1;
+
+ int result;
+ if ( p1->iIcon > p2->iIcon )
+ icoRes = 1;
+ else if ( p1->iIcon < p2->iIcon )
+ icoRes = -1;
+
+ result = lstrcmp( p1->tszTitle, p2->tszTitle );
+ ttlRes = result;
+
+ result = lstrcmp( p1->tszMessage, p2->tszMessage );
+ msgRes = result;
+
+ if ( !icoRes && !ttlRes && !msgRes )
+ return 0;
+
+ if ( favRes != 0 )
+ return favRes;
+ if ( icoRes != 0 )
+ return icoRes;
+ if ( ttlRes != 0 )
+ return ttlRes;
+ if ( msgRes != 0 )
+ return msgRes;
+
+ return 0;
+}
+
+
+void CSItemsList::loadItems(char* protoName)
+{
+ char dbSetting[32];
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "%s_ItemsCount", protoName);
+ unsigned int itemsCount = getWord(dbSetting, DEFAULT_ITEMS_COUNT);
+
+ for (unsigned int i = 1; i <= itemsCount; i++)
+ {
+ StatusItem* item = new StatusItem();
+ DBVARIANT dbv = {DBVT_TCHAR};
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "%s_Item%dIcon", protoName, i);
+ item->iIcon = getByte(dbSetting, DEFAULT_ITEM_ICON);
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "%s_Item%dTitle", protoName, i);
+ getTString(dbSetting, &dbv);
+ lstrcpy(item->tszTitle, dbv.ptszVal);
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "%s_Item%dMessage", protoName, i);
+ getTString(dbSetting, &dbv);
+ lstrcpy(item->tszMessage, dbv.ptszVal);
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "%s_Item%dFavourite", protoName, i);
+ item->bFavourite = (BOOL)getByte(dbSetting, DEFAULT_ITEM_IS_FAVOURITE);
+ this->list->add(item);
+ }
+}
+
+
+void CSItemsList::saveItems(char* protoName)
+{
+ unsigned int i;
+ char dbSetting[32];
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "%s_ItemsCount", protoName);
+ unsigned int oldItemsCount = getWord(dbSetting, DEFAULT_ITEMS_COUNT);
+
+ for (i = 1; i <= this->list->getCount(); i++)
+ {
+ StatusItem* item = this->list->get( i - 1 );
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "%s_Item%dIcon", protoName, i);
+ setByte(dbSetting, item->iIcon);
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "%s_Item%dTitle", protoName, i);
+ setTString(dbSetting, item->tszTitle);
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "%s_Item%dMessage", protoName, i);
+ setTString(dbSetting, item->tszMessage);
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "%s_Item%dFavourite", protoName, i);
+ setByte(dbSetting, item->bFavourite);
+ }
+
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "%s_ItemsCount", protoName);
+ setWord(dbSetting, this->list->getCount());
+
+ for ( ; i <= oldItemsCount; i++)
+ {
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "%s_Item%dIcon", protoName, i);
+ deleteSetting(dbSetting);
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "%s_Item%dTitle", protoName, i);
+ deleteSetting(dbSetting);
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "%s_Item%dMessage", protoName, i);
+ deleteSetting(dbSetting);
+ mir_snprintf(dbSetting, SIZEOF(dbSetting), "%s_Item%dFavourite", protoName, i);
+ deleteSetting(dbSetting);
+ }
+}
+
+
+// ====[ PROCEDURES ]=========================================================
+
+INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam )
+{
+ CSWindow* csw = ( CSWindow* )GetWindowLongPtr( hwnd, GWLP_USERDATA );
+
+ switch ( message )
+ {
+
+ case WM_INITDIALOG:
+ csw = ( CSWindow* )lparam;
+ SetWindowLongPtr( hwnd, GWLP_USERDATA, lparam );
+ csw->handle = hwnd;
+ csw->initIcons();
+ csw->initButtons( );
+ csw->listview = new CSListView( GetDlgItem( hwnd, IDC_CSLIST ), csw );
+ csw->listview->initItems( csw->itemslist->list->getListHead( ) );
+ csw->toggleButtons( );
+ csw->toggleEmptyListMessage( );
+ csw->loadWindowPosition( );
+ SetWindowText(hwnd, TranslateT(MODULENAME));
+ TranslateDialogDefault(hwnd);
+ return TRUE;
+
+ case WM_COMMAND:
+ switch ( LOWORD( wparam ) )
+ {
+ case IDC_MODIFY:
+ case IDC_ADD:
+ csw->addModifyDlg = new CSAMWindow( LOWORD( wparam ), csw );
+ csw->addModifyDlg->exec( );
+ if ( csw->addModifyDlg->bChanged )
+ {
+ if ( LOWORD( wparam ) == IDC_MODIFY )
+ csw->itemslist->list->remove( csw->listview->getPositionInList( ) );
+
+ int selection = csw->itemslist->list->add( csw->addModifyDlg->item );
+ csw->bSomethingChanged = TRUE;
+ csw->listview->reinitItems( csw->itemslist->list->getListHead( ) );
+ csw->listview->setFullFocusedSelection( selection );
+ csw->toggleButtons( );
+ csw->toggleEmptyListMessage( );
+ }
+ delete csw->addModifyDlg;
+ break;
+
+ case IDC_REMOVE:
+ if ( getByte( "ConfirmDeletion", DEFAULT_PLUGIN_CONFIRM_ITEMS_DELETION ) )
+ if ( MessageBox( hwnd, TranslateT("Do you really want to delete selected item?"), TranslateT(MODULENAME), MB_YESNO | MB_DEFBUTTON2 | MB_ICONQUESTION ) == IDNO )
+ break;
+ csw->itemslist->list->remove( csw->listview->getPositionInList( ) );
+ csw->bSomethingChanged = TRUE;
+ csw->listview->reinitItems( csw->itemslist->list->getListHead( ) );
+ csw->toggleButtons( );
+ csw->toggleEmptyListMessage( );
+ break;
+
+ case IDC_FAVOURITE:
+ {
+ int selection = csw->listview->getPositionInList( );
+ StatusItem* f = new StatusItem( *csw->itemslist->list->get( selection ) );
+ f->bFavourite = ! f->bFavourite;
+ csw->itemslist->list->remove( selection );
+ selection = csw->itemslist->list->add( f );
+ csw->bSomethingChanged = TRUE;
+ csw->listview->reinitItems( csw->itemslist->list->getListHead( ) );
+ csw->listview->setFullFocusedSelection( selection );
+ csw->toggleButtons( );
+ }
+ break;
+
+ case IDC_UNDO:
+ {
+ csw->itemslist->list->destroy( );
+ csw->itemslist->loadItems(csw->protoName);
+ csw->bSomethingChanged = FALSE;
+ csw->listview->reinitItems( csw->itemslist->list->getListHead( ) );
+ csw->toggleButtons( );
+ csw->toggleEmptyListMessage( );
+ break;
+ }
+
+ case IDC_IMPORT:
+ {
+ int result = getByte( "DeleteAfterImport", DEFAULT_PLUGIN_DELETE_AFTER_IMPORT );
+ if ( result == TRUE )
+ result = IDYES;
+ else
+ {
+ result = MessageBox( hwnd, TranslateT("Do you want old database entries to be deleted after Import?"),
+ TranslateT(MODULENAME), MB_YESNOCANCEL | MB_DEFBUTTON2 | MB_ICONQUESTION );
+ if ( result == IDCANCEL ) break;
+ }
+
+ CSList::ForAllProtocols( CSList::importCustomStatusUIStatusesFromAllProtos, ( void* )&result );
+ csw->bSomethingChanged = TRUE;
+ csw->toggleButtons( );
+ csw->toggleEmptyListMessage( );
+ }
+ break;
+
+ case IDC_FILTER:
+ csw->toggleFilter( );
+ csw->toggleButtons( );
+ break;
+
+ case IDC_FILTER_FIELD:
+ if ( HIWORD( wparam ) == EN_CHANGE )
+ csw->listview->reinitItems( csw->itemslist->list->getListHead( ) );
+ break;
+
+ case IDCLOSE: // close and save, no custom status
+ case IDCANCEL: // close and save, no custom status
+ case IDC_CANCEL: // close and save, cancel custom status
+ case IDOK: // close and save, set selected custom status
+ if ( LOWORD( wparam ) == IDOK && csw->toggleButtons( ) )
+ cslist->setStatus(IDOK, csw->itemslist->list->get(csw->listview->getPositionInList()), csw->protoName);
+ if ( LOWORD( wparam ) == IDC_CANCEL )
+ cslist->setStatus(IDC_CANCEL, NULL, csw->protoName);
+ if ( csw->bSomethingChanged )
+ if (csw->itemslist!=NULL)
+ csw->itemslist->saveItems(csw->protoName);
+ csw->saveWindowPosition( csw->handle );
+ delete csw->listview;
+ csw->deinitIcons( );
+ cslist->closeList( hwnd );
+ break;
+
+ }
+ return FALSE;
+
+ case WM_NOTIFY:
+ if ( wparam == IDC_CSLIST )
+ {
+ NMHDR* pnmh = ( NMHDR* )lparam;
+ switch ( pnmh->code )
+ {
+
+ case NM_DBLCLK:
+ PostMessage( hwnd, WM_COMMAND, IDOK, 0L );
+ break;
+
+ case LVN_ITEMCHANGED:
+ case NM_CLICK:
+ csw->toggleButtons( );
+ break;
+
+ }
+ }
+ return FALSE;
+
+ case WM_CTLCOLORSTATIC:
+ SetTextColor( ( HDC )wparam, RGB( 174, 174, 174 ) );
+ if ( ( ( HWND )lparam == GetDlgItem( hwnd, IDC_NO_ITEMS ) ) ||
+ ( ( HWND )lparam == GetDlgItem( hwnd, IDC_ADD_SAMPLE ) ) )
+ return ( BOOL )GetStockObject( WHITE_BRUSH );
+ return FALSE;
+ }
+ return FALSE;
+}
+
+
+INT_PTR CALLBACK CSAMWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam )
+{
+ CSAMWindow* csamw = ( CSAMWindow* )GetWindowLongPtr( hwnd, GWLP_USERDATA );
+
+ switch ( message )
+ {
+
+ case WM_INITDIALOG:
+ {
+ csamw = ( CSAMWindow* )lparam;
+ SetWindowLongPtr( hwnd, GWLP_USERDATA, lparam );
+ csamw->handle = hwnd;
+ EnableWindow( csamw->parent->handle, FALSE );
+ csamw->hCombo = GetDlgItem( hwnd, IDC_COMBO );
+ csamw->hMessage = GetDlgItem( hwnd, IDC_MESSAGE );
+ csamw->setCombo();
+ csamw->fillDialog();
+ TranslateDialogDefault(hwnd);
+ }
+ break;
+
+ case WM_COMMAND:
+ switch ( LOWORD( wparam ) )
+ {
+ case IDC_MESSAGE:
+ csamw->checkFieldLimit( HIWORD( wparam ), LOWORD( wparam ) );
+ break;
+ case IDOK:
+ csamw->checkItemValidity( );
+ case IDCANCEL:
+ EnableWindow( csamw->parent->handle, TRUE );
+ EndDialog( hwnd, LOWORD( wparam ) );
+ break;
+
+ }
+ break;
+
+ }
+ return FALSE;
+}
+
+
+INT_PTR CALLBACK CSOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam )
+{
+ switch ( message )
+ {
+
+ case WM_INITDIALOG:
+ {
+ CheckDlgButton( hwnd, IDC_CONFIRM_DELETION,
+ getByte( "ConfirmDeletion", DEFAULT_PLUGIN_CONFIRM_ITEMS_DELETION ) ?
+ BST_CHECKED : BST_UNCHECKED );
+
+ CheckDlgButton( hwnd, IDC_DELETE_AFTER_IMPORT,
+ getByte( "DeleteAfterImport", DEFAULT_PLUGIN_DELETE_AFTER_IMPORT ) ?
+ BST_CHECKED : BST_UNCHECKED );
+
+ CheckDlgButton( hwnd, IDC_REMEMBER_POSITION,
+ getByte( "RememberWindowPosition", DEFAULT_REMEMBER_WINDOW_POSITION ) ?
+ BST_CHECKED : BST_UNCHECKED );
+
+ unsigned int protosExtraEnabled = 1;
+
+ CSList::ForAllProtocols( CSList::countPlusModProtos, ( void* )&protosExtraEnabled );
+
+ if ( protosExtraEnabled ) // some protocol(s) allow(s) use of extra icons
+ {
+ EnableWindow( GetDlgItem( hwnd, IDC_ALLOW_EXTRA_ICONS ), TRUE );
+ CheckDlgButton( hwnd, IDC_ALLOW_EXTRA_ICONS, getByte( "AllowExtraIcons",
+ DEFAULT_ALLOW_EXTRA_ICONS ) );
+ }
+
+ TranslateDialogDefault(hwnd);
+ }
+ return TRUE;
+
+ case WM_NOTIFY:
+ switch ( ( ( LPNMHDR )lparam )->code )
+ {
+
+ case PSN_APPLY:
+ {
+ setByte( "ConfirmDeletion", IsDlgButtonChecked( hwnd, IDC_CONFIRM_DELETION ) ? 1 : 0 );
+ setByte( "DeleteAfterImport", IsDlgButtonChecked( hwnd, IDC_DELETE_AFTER_IMPORT ) ? 1 : 0 );
+ setByte( "AllowExtraIcons", IsDlgButtonChecked( hwnd, IDC_ALLOW_EXTRA_ICONS ) ? 1 : 0 );
+ setByte( "RememberWindowPosition", IsDlgButtonChecked( hwnd, IDC_REMEMBER_POSITION ) ? 1 : 0 );
+
+ cslist->rebuildMenuItems( );
+ }
+ break;
+
+ }
+ return TRUE;
+
+ }
+ return FALSE;
+}
+
+
+// ====[ HELPERS ]============================================================
+
+HICON LoadIconExEx( const char* IcoLibName, int NonIcoLibIcon )
+{
+ if ( ServiceExists( MS_SKIN2_GETICON ) ) {
+ char szSettingName[64];
+ mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", __INTERNAL_NAME, IcoLibName);
+ return ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szSettingName );
+ }
+ else
+ return ( HICON )LoadImage( cslist->handle, MAKEINTRESOURCE( NonIcoLibIcon ), IMAGE_ICON, 0, 0, 0 );
+}
diff --git a/custom_status_list/cslist.dsp b/custom_status_list/cslist.dsp
deleted file mode 100644
index 277c030..0000000
--- a/custom_status_list/cslist.dsp
+++ /dev/null
@@ -1,109 +0,0 @@
-# Microsoft Developer Studio Project File - Name="cslist" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=CSLIST - WIN32 RELEASE
-!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 "cslist.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 "cslist.mak" CFG="CSLIST - WIN32 RELEASE"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "cslist - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-# 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 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CSLIST_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CSLIST_EXPORTS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x809 /d "NDEBUG"
-# ADD RSC /l 0x809 /i "../../include/" /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 /machine:I386 /out:"../../bin/release/plugins/cslist.dll"
-# Begin Target
-
-# Name "cslist - Win32 Release"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\cslist.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\cslist.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\resource.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\res\add.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\cancel.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\cslist.rc
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\delete.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\edit.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\follow_status_changes.ico
-# End Source File
-# Begin Source File
-
-SOURCE=.\res\ok.ico
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/custom_status_list/cslist.dsw b/custom_status_list/cslist.dsw
deleted file mode 100644
index ac3de9c..0000000
--- a/custom_status_list/cslist.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "cslist"=".\cslist.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/custom_status_list/cslist.h b/custom_status_list/cslist.h
index da3cc26..440981f 100644
--- a/custom_status_list/cslist.h
+++ b/custom_status_list/cslist.h
@@ -1,346 +1,690 @@
-// ############################ INCLUDES & DEFINITIONS #########################
+/* ========================================================================
+
+ Custom Status List
+ __________________
+
+ Custom Status List plugin for Miranda-IM (www.miranda-im.org)
+ Follower of Custom Status History List by HANAX
+ Copyright © 2006-2008 HANAX
+ Copyright © 2007-2009 jarvis
+
+ 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$
+ Revision : $Rev$
+ Last change on : $Date$
+ Last change by : $Author$
+
+ ============================================================================
+
+
+ DESCRIPTION:
+
+ Offers List of your Custom Statuses.
+
+ ============================================================================
+
+// ====[ INCLUDES AND DEFINITIONS ]======================================== */
#ifndef __CSLIST_H
#define __CSLIST_H 1
-#if defined( UNICODE ) && !defined( _UNICODE )
- #define _UNICODE
+#if defined UNICODE
+#define WINVER 0x501
+#define _WIN32_WINNT 0x501
+#define _WIN32_IE 0x600
+#else
+#define WINVER 0x400
+#define _WIN32_WINNT 0x400
+#define _WIN32_IE 0x400
+#define LVIF_GROUPID 0
#endif
+#define MIRANDA_VER 0x0900
+
+#pragma warning( disable: 4996 )
+#pragma comment( lib, "comctl32.lib" )
#include <windows.h>
-//#include <windef.h> // already in windows.h
-#include <stddef.h>
#include <commctrl.h>
-#if defined( _UNICODE )
- #include <string.h>
- #include <tchar.h>
- #include <win2k.h>
-#endif
+#include <tchar.h>
+#include <win2k.h>
#include <newpluginapi.h>
-#include <m_clist.h>
-#include <m_skin.h>
-#include <m_icolib.h>
#include <m_database.h>
-#include <m_system.h>
#include <m_utils.h>
-#include <m_updater.h>
#include <m_langpack.h>
-#include <m_button.h>
+#include <m_clist.h>
+#include <m_clistint.h>
+#include <m_genmenu.h>
+#include <m_skin.h>
+#include <m_icolib.h>
+#include <m_protocols.h>
+#include <m_protosvc.h>
+#include <m_icq.h>
+#include <m_jabber.h>
#include <m_options.h>
-#include <m_toolbar.h>
#include <m_hotkeys.h>
-#include <m_protocols.h>
-//#include <stdio.h>
+#include <m_variables.h>
+
+// ====[ BASIC DEFINITIONS ]==================================================
#include "resource.h"
+#include "version.h"
-#define MIID_STATUSLIST { 0x8b86253, 0xec6e, 0x4d09, { 0xb7, 0xa9, 0x64, 0xac, 0xdf, 0x6, 0x27, 0xb8 } }
+#define MODULENAME "Custom Status List"
-#define CSLIST_RELNOTES 19 // actual eternity relnotes
-#define CSLIST_TESTING "1"
-#define CSLIST_XTITLE_LIMIT 64 // limit of chars for x-status title
-#define CSLIST_XMESSAGE_LIMIT 2048 // limit of chars for x-status message
+// {C8CC7414-6507-4AF6-925A-83C1D2F7BE8C}
+#define PLUGIN_GUUID { 0xc8cc7414, 0x6507, 0x4af6, { 0x92, 0x5a, 0x83, 0xc1, 0xd2, 0xf7, 0xbe, 0x8c } }
-#define CSLIST_MODULE_LONG_NAME "Custom Status List"
-#define CSLIST_MODULE_SHORT_NAME "CSList"
+// ====[ LIMITS ]=============================================================
-// updater strings
+#define EXTRASTATUS_TITLE_LIMIT 64 // limit of chars for extra status title
+#define EXTRASTATUS_MESSAGE_LIMIT 2048 // limit of chars for extra status message
+#define XSTATUS_COUNT 32
+#define XSTATUS_COUNT_EXTENDED 37
+#define MOODS_COUNT 84
-#define CSLIST_UPD_VERURL "http://dev.mirandaim.ru/~jarvis/"
-#define CSLIST_UPD_UPDURL "http://mirandapack.ic.cz/eternity_plugins/cslist.zip"
-#define CSLIST_UPD_FLVERURL "http://addons.miranda-im.org/details.php?action=viewfile&id=3483"
-#define CSLIST_UPD_FLUPDURL "http://addons.miranda-im.org/feed.php?dlfile=3483"
-#define CSLIST_UPD_SZPREFIX "Custom Status List</a> "
+// ====[ SERVICES ]===========================================================
-// services
+#define MS_PSEUDO_PROTO_PROTOACCSENUM ( CSList::bAccountsSupported ? MS_PROTO_ENUMACCOUNTS : MS_PROTO_ENUMPROTOCOLS )
-#define MS_CLIST_ADDSTATUSMENUITEM "CList/AddStatusMenuItem"
-#define ME_CLIST_PREBUILDSTATUSMENU "CList/PreBuildStatusMenu"
-#define PS_ICQ_SETCUSTOMSTATUSEX "ICQ/SetXStatusEx"
-#define MS_CSLIST_SHOWLIST "CSList/ShowList"
+// ====[ DEFAULT DB VALUES ]==================================================
-// status flags
+#define DEFAULT_ICQ_XSTATUS_ENABLED 1
+#define DEFAULT_PLUGIN_SHOW_RELNOTES 0
+#define DEFAULT_PLUGIN_SHOW_NONSTANDARD_XSTATUSES 1
+#define DEFAULT_PLUGIN_CONFIRM_ITEMS_DELETION 1
+#define DEFAULT_PLUGIN_DELETE_AFTER_IMPORT 0
+#define DEFAULT_ITEMS_COUNT 0
+#define DEFAULT_ITEM_ICON 0
+#define DEFAULT_ITEM_IS_FAVOURITE 0
+#define DEFAULT_ALLOW_EXTRA_ICONS 1
+#define DEFAULT_REMEMBER_WINDOW_POSITION 1
-#define CSSF_MASK_STATUS 0x0001 // status member valid for set/get
-#define CSSF_MASK_NAME 0x0002 // pszName member valid for set/get
-#define CSSF_MASK_MESSAGE 0x0004 // pszMessage member valid for set/get
-#define CSSF_DISABLE_UI 0x0040 // disable default custom status UI, wParam = bEnable
-#define CSSF_DEFAULT_NAME 0x0080 // only with CSSF_MASK_NAME and get API to get default custom status name (wParam = status)
-#define CSSF_STATUSES_COUNT 0x0100 // returns number of custom statuses in wParam, only get API
-#define CSSF_STR_SIZES 0x0200 // returns sizes of custom status name & message (wParam & lParam members) in chars
-#if defined( _UNICODE )
- #define CSSF_UNICODE 0x1000 // strings are in Unicode
-#else
- #define CSSF_UNICODE 0x0000
-#endif
-#if defined( _UNICODE )
- #define tcstok( x, y ) wcstok( x, y )
- #define tcprintf( a, b, c, d ) swprintf( a, b, c, d )
-#else
- #define tcstok( x, y ) strtok( x, y )
- #define tcprintf( a, b, c, d ) sprintf( a, c, d )
+// ====[ FUNCTION MACROS ]====================================================
+
+// set which row is selected (cannot be only focused, but fully selected - second param ;))
+#define ListView_GetSelectedItemMacro( hwnd ) ListView_GetNextItem( hwnd, -1, LVNI_FOCUSED | LVNI_SELECTED );
+#ifndef ListView_SetSelectionMark
+ #define ListView_SetSelectionMark( x, y ) 0
#endif
-// win2k.h
-#define SIZEOF( x ) ( sizeof( x ) / sizeof( x[0] ) )
-#define IsWinVerXPPlus() ( LOBYTE( LOWORD( GetVersion( ) ) ) >= 5 && LOWORD( GetVersion( ) ) != 5 )
-
-
-// ################################## STRUCTURES ###############################
-
-// -------------------------- WORKING LIST ITEM STRUCTURE ----------------------
-
-typedef struct {
- int ItemIcon;
- TCHAR ItemTitle[CSLIST_XTITLE_LIMIT];
- TCHAR ItemMessage[CSLIST_XMESSAGE_LIMIT];
- BOOL ItemFavourite;
-} CSLISTSTATUSITEM;
-
-
-// -------------------------- ICQ CUSTOM STATUS STRUCTURE ----------------------
-
-typedef struct {
- int cbSize; // size of the structure
- int flags; // combination of CSSF_*
- int *status; // custom status id
- union {
- char *pszName; // buffer for custom status name
- TCHAR *ptszName;
- WCHAR *pwszName;
- };
- union {
- char *pszMessage; // buffer for custom status message
- TCHAR *ptszMessage;
- WCHAR *pwszMessage;
- };
- WPARAM *wParam; // extra params, see flags
- LPARAM *lParam;
-} ICQ_CUSTOM_STATUS;
-
-
-// ------------------------------ ICONS + BUTTONS ------------------------------
-
-static struct {
- int idc;
- TCHAR *title;
- TCHAR *szDescr;
- char *iconIcoLib;
- int iconNoIcoLib;
- HANDLE hIcoLibItem;
-} cslforms[] =
-{
- { -1, L"Main Menu" , ( TCHAR * )"Main Icon", "csl_icon", IDI_CSLIST, NULL },
- { IDC_ADD, L"Add new item", ( TCHAR * )"Add", "csl_add", IDI_ADD, NULL },
- { IDC_MODIFY, L"Modify selected item", ( TCHAR * )"Modify", "csl_modify", IDI_MODIFY, NULL },
- { IDC_REMOVE, L"Delete selected item", ( TCHAR * )"Remove", "csl_remove", IDI_REMOVE, NULL },
- { IDC_IMPORT, L"Import statuses from database", ( TCHAR * )"Import", "csl_import", IDI_IMPORT, NULL },
- { IDC_WATCH, L"Whether or not watch custom status changes and add them into list", ( TCHAR * )"Watch", "csl_watch", IDI_WATCH, NULL },
- { IDC_FAV, L"Set/unset current item as favorite", ( TCHAR * )"Favorite", "csl_fav", IDI_FAV, NULL },
- { IDC_OPTS, L"Options...", ( TCHAR * )"Options", "csl_opts", IDI_OPTIONS, NULL },
- { IDC_NOCHNG, L"Close without changing custom status", ( TCHAR * )"No change", "csl_nochng", IDI_NOCHNG, NULL },
- { IDC_APPLY, L"Set custom status to selected one and close", ( TCHAR * )"Set", "csl_apply", IDI_APPLY, NULL },
- { IDC_EXIT, L"Clear custom status (reset to None) and close", ( TCHAR * )"Clear", "csl_clear", IDI_CLEAR, NULL },
+#define getByte( setting, error ) DBGetContactSettingByte( NULL, __INTERNAL_NAME, setting, error )
+#define setByte( setting, value ) DBWriteContactSettingByte( NULL, __INTERNAL_NAME, setting, value )
+#define getWord( setting, error ) DBGetContactSettingWord( NULL, __INTERNAL_NAME, setting, error )
+#define setWord( setting, value ) DBWriteContactSettingWord( NULL, __INTERNAL_NAME, setting, value )
+#define getDword( setting, error ) DBGetContactSettingDword( NULL, __INTERNAL_NAME, setting, error )
+#define setDword( setting, value ) DBWriteContactSettingDword( NULL, __INTERNAL_NAME, setting, value )
+#define getTString( setting, dest ) DBGetContactSettingTString( NULL, __INTERNAL_NAME, setting, dest )
+#define setTString( setting, value ) DBWriteContactSettingTString( NULL, __INTERNAL_NAME, setting, value )
+#define deleteSetting( setting ) DBDeleteContactSetting( NULL, __INTERNAL_NAME, setting )
+
+// --
+typedef void (__cdecl *pForAllProtosFunc)( char*, void* );
+
+
+// ====[ STRUCTURES ]=========================================================
+
+struct StatusItem { // list item structure
+ int iIcon;
+ TCHAR tszTitle[EXTRASTATUS_TITLE_LIMIT];
+ TCHAR tszMessage[EXTRASTATUS_MESSAGE_LIMIT];
+ BOOL bFavourite;
+
+ StatusItem()
+ {
+ this->iIcon = 0;
+ lstrcpy(this->tszTitle, _T(""));
+ lstrcpy(this->tszMessage, _T(""));
+ this->bFavourite = FALSE;
+ }
+
+ StatusItem( const StatusItem& p )
+ {
+ this->iIcon = p.iIcon;
+ lstrcpy( this->tszTitle, p.tszTitle );
+ lstrcpy( this->tszMessage, p.tszMessage );
+ this->bFavourite = p.bFavourite;
+ }
+
+ ~StatusItem( )
+ {
+ }
};
+static struct CSForm { // icons + buttons
+ int idc;
+ TCHAR* ptszTitle;
+ TCHAR* ptszDescr;
+ char* pszIconIcoLib;
+ int iconNoIcoLib;
+ HANDLE hIcoLibItem;
+
+} forms[] = {
+
+ { -1, LPGENT( "Main Menu" ), LPGENT( "Main Icon" ), "icon", IDI_CSLIST, NULL },
+ { IDC_ADD, LPGENT( "Add new item" ), LPGENT( "Add" ), "add", IDI_ADD, NULL },
+ { IDC_MODIFY, LPGENT( "Modify selected item" ), LPGENT( "Modify" ), "modify", IDI_MODIFY, NULL },
+ { IDC_REMOVE, LPGENT( "Delete selected item" ), LPGENT( "Remove" ), "remove", IDI_REMOVE, NULL },
+ { IDC_FAVOURITE, LPGENT( "Set/unset current item as favorite" ), LPGENT( "Favourite" ), "favourite", IDI_FAVOURITE, NULL },
+ { IDC_UNDO, LPGENT( "Undo changes" ), LPGENT( "Undo changes" ), "undo", IDI_UNDO, NULL },
+ { IDC_IMPORT, LPGENT( "Import statuses from database" ), LPGENT( "Import" ), "import", IDI_IMPORT, NULL },
+ { IDC_FILTER, LPGENT( "Filter list" ), LPGENT( "Filter" ), "filter", IDI_FILTER, NULL },
+ { IDCLOSE, LPGENT( "Close without changing custom status" ), LPGENT( "No change" ), "nochng", IDI_CLOSE, NULL },
+ { IDC_CANCEL, LPGENT( "Clear custom status (reset to None) and close" ), LPGENT( "Clear" ), "clear", IDI_UNSET, NULL },
+ { IDOK, LPGENT( "Set custom status to selected one and close" ), LPGENT( "Set" ), "apply", IDI_APPLY, NULL },
+};
-// ----------------------- COMBOBOXEX XICONS STRUCTURE -------------------------
+static struct CSXstatus { // combobox xstatus icons
+ int iId;
+ TCHAR* ptszTitle;
+
+} xstatus_names[] = {
+
+ { 1, LPGENT( "Angry" ) },
+ { 2, LPGENT( "Taking a bath" ) },
+ { 3, LPGENT( "Tired" ) },
+ { 4, LPGENT( "Party" ) },
+ { 5, LPGENT( "Drinking beer" ) },
+ { 6, LPGENT( "Thinking" ) },
+ { 7, LPGENT( "Eating" ) },
+ { 8, LPGENT( "Watching TV" ) },
+ { 9, LPGENT( "Meeting" ) },
+ { 10, LPGENT( "Coffee" ) },
+ { 11, LPGENT( "Listening to music" ) },
+ { 12, LPGENT( "Business" ) },
+ { 13, LPGENT( "Shooting" ) },
+ { 14, LPGENT( "Having fun" ) },
+ { 15, LPGENT( "On the phone" ) },
+ { 16, LPGENT( "Gaming" ) },
+ { 17, LPGENT( "Studying" ) },
+ { 18, LPGENT( "Shopping" ) },
+ { 19, LPGENT( "Feeling sick" ) },
+ { 20, LPGENT( "Sleeping" ) },
+ { 21, LPGENT( "Surfing" ) },
+ { 22, LPGENT( "Browsing" ) },
+ { 23, LPGENT( "Working" ) },
+ { 24, LPGENT( "Typing" ) },
+ { 25, LPGENT( "Picnic" ) },
+ { 26, LPGENT( "PDA" ) },
+ { 27, LPGENT( "On the phone" ) },
+ { 28, LPGENT( "I'm high" ) },
+ { 29, LPGENT( "On WC" ) },
+ { 30, LPGENT( "To be or not to be" ) },
+ { 31, LPGENT( "Watching pro7 on TV" ) },
+ { 32, LPGENT( "Love" ) },
+ { 33, LPGENT( "Searching" ) },
+ { 34, LPGENT( "Amorous" ) }, // I don't understand why this falls when 2 same named items appear O_o
+ { 35, LPGENT( "Journal" ) }, // edit: ..and now I REALLY don't understand why it's working now x))
+ { 36, LPGENT( "Sex" ) },
+ { 37, LPGENT( "Smoking" ) }, // -||-
+};
-static struct
-{
- int xnum;
- TCHAR *xname;
-} xstatuses[] =
-{
- {1, _T("Angry")},
- {2, _T("Taking a bath")},
- {3, _T("Tired")},
- {4, _T("Party")},
- {5, _T("Drinking beer")},
- {6, _T("Thinking")},
- {7, _T("Eating")},
- {8, _T("Watching TV")},
- {9, _T("Meeting")},
- {10, _T("Coffee")},
- {11, _T("Listening to music")},
- {12, _T("Business")},
- {13, _T("Shooting")},
- {14, _T("Having fun")},
- {15, _T("On the phone")},
- {16, _T("Gaming")},
- {17, _T("Studying")},
- {18, _T("Shopping")},
- {19, _T("Feeling sick")},
- {20, _T("Sleeping")},
- {21, _T("Surfing")},
- {22, _T("Browsing")},
- {23, _T("Working")},
- {24, _T("Typing")},
- {25, _T("Picnic")},
- {26, _T("Cooking")},
- {27, _T("Smoking")},
- {28, _T("I'm High")},
- {29, _T("On WC")},
- {30, _T("To be or not to be")},
- {31, _T("Watching pro7 on TV")},
- {32, _T("Love")},
- {33, _T("Searching")},
- {34, _T("Love")}, // I don't understand why this falls when 2 same named items appear O_o
- {35, _T("Journal")}, // edit: ..and now I REALLY don't understand why it's working now x))
- {36, _T("Sex")},
- {37, _T("Smoking")}, // -||-
+static struct CSMoods { // combobox moods icons
+ int iId;
+ TCHAR* ptszTitle;
+ char* szTag;
+} moods_names[] = {
+ { 1, LPGENT("Afraid"), "afraid" },
+ { 2, LPGENT("Amazed"), "amazed" },
+ { 3, LPGENT("Amorous"), "amorous" },
+ { 4, LPGENT("Angry"), "angry" },
+ { 5, LPGENT("Annoyed"), "annoyed" },
+ { 6, LPGENT("Anxious"), "anxious" },
+ { 7, LPGENT("Aroused"), "aroused" },
+ { 8, LPGENT("Ashamed"), "ashamed" },
+ { 9, LPGENT("Bored"), "bored" },
+ { 10, LPGENT("Brave"), "brave" },
+ { 11, LPGENT("Calm"), "calm" },
+ { 12, LPGENT("Cautious"), "cautious" },
+ { 13, LPGENT("Cold"), "cold" },
+ { 14, LPGENT("Confident"), "confident" },
+ { 15, LPGENT("Confused"), "confused" },
+ { 16, LPGENT("Contemplative"),"contemplative" },
+ { 17, LPGENT("Contented"), "contented" },
+ { 18, LPGENT("Cranky"), "cranky" },
+ { 19, LPGENT("Crazy"), "crazy" },
+ { 20, LPGENT("Creative"), "creative" },
+ { 21, LPGENT("Curious"), "curious" },
+ { 22, LPGENT("Dejected"), "dejected" },
+ { 23, LPGENT("Depressed"), "depressed" },
+ { 24, LPGENT("Disappointed"), "disappointed" },
+ { 25, LPGENT("Disgusted"), "disgusted" },
+ { 26, LPGENT("Dismayed"), "dismayed" },
+ { 27, LPGENT("Distracted"), "distracted" },
+ { 28, LPGENT("Embarrassed"), "embarrassed" },
+ { 29, LPGENT("Envious"), "envious" },
+ { 30, LPGENT("Excited"), "excited" },
+ { 31, LPGENT("Flirtatious"), "flirtatious" },
+ { 32, LPGENT("Frustrated"), "frustrated" },
+ { 33, LPGENT("Grateful"), "grateful" },
+ { 34, LPGENT("Grieving"), "grieving" },
+ { 35, LPGENT("Grumpy"), "grumpy" },
+ { 36, LPGENT("Guilty"), "guilty" },
+ { 37, LPGENT("Happy"), "happy" },
+ { 38, LPGENT("Hopeful"), "hopeful" },
+ { 39, LPGENT("Hot"), "hot" },
+ { 40, LPGENT("Humbled"), "humbled" },
+ { 41, LPGENT("Humiliated"), "humiliated" },
+ { 42, LPGENT("Hungry"), "hungry" },
+ { 43, LPGENT("Hurt"), "hurt" },
+ { 44, LPGENT("Impressed"), "impressed" },
+ { 45, LPGENT("In awe"), "in_awe" },
+ { 46, LPGENT("In love"), "in_love" },
+ { 47, LPGENT("Indignant"), "indignant" },
+ { 48, LPGENT("Interested"), "interested" },
+ { 49, LPGENT("Intoxicated"), "intoxicated" },
+ { 50, LPGENT("Invincible"), "invincible" },
+ { 51, LPGENT("Jealous"), "jealous" },
+ { 52, LPGENT("Lonely"), "lonely" },
+ { 53, LPGENT("Lost"), "lost" },
+ { 54, LPGENT("Lucky"), "lucky" },
+ { 55, LPGENT("Mean"), "mean" },
+ { 56, LPGENT("Moody"), "moody" },
+ { 57, LPGENT("Nervous"), "nervous" },
+ { 58, LPGENT("Neutral"), "neutral" },
+ { 59, LPGENT("Offended"), "offended" },
+ { 60, LPGENT("Outraged"), "outraged" },
+ { 61, LPGENT("Playful"), "playful" },
+ { 62, LPGENT("Proud"), "proud" },
+ { 63, LPGENT("Relaxed"), "relaxed" },
+ { 64, LPGENT("Relieved"), "relieved" },
+ { 65, LPGENT("Remorseful"), "remorseful" },
+ { 66, LPGENT("Restless"), "restless" },
+ { 67, LPGENT("Sad"), "sad" },
+ { 68, LPGENT("Sarcastic"), "sarcastic" },
+ { 69, LPGENT("Satisfied"), "satisfied" },
+ { 70, LPGENT("Serious"), "serious" },
+ { 71, LPGENT("Shocked"), "shocked" },
+ { 72, LPGENT("Shy"), "shy" },
+ { 73, LPGENT("Sick"), "sick" },
+ { 74, LPGENT("Sleepy"), "sleepy" },
+ { 75, LPGENT("Spontaneous"), "spontaneous" },
+ { 76, LPGENT("Stressed"), "stressed" },
+ { 77, LPGENT("Strong"), "strong" },
+ { 78, LPGENT("Surprised"), "surprised" },
+ { 79, LPGENT("Thankful"), "thankful" },
+ { 80, LPGENT("Thirsty"), "thirsty" },
+ { 81, LPGENT("Tired"), "tired" },
+ { 82, LPGENT("Undefined"), "undefined" },
+ { 83, LPGENT("Weak"), "weak" },
+ { 84, LPGENT("Worried"), "worried" },
};
+// ====[ MY BITCHY LIST IMPLEMENTATION x)) ]==================================
+// TODO: Optimize it all x))
+template< class T > struct ListItem
+{
+ T* item;
+ ListItem* next;
+
+ ListItem( )
+ {
+ this->item = NULL;
+ this->next = NULL;
+ }
+
+ ~ListItem( )
+ {
+ delete this->item;
+ }
+
+ ListItem( StatusItem* si )
+ {
+ this->item = si;
+ this->next = NULL;
+ }
+
+ ListItem( const ListItem& p )
+ {
+ this->item = p.item;
+ this->next = NULL;
+ }
+};
-// ---------------------- LIST SORTING OPTIONS STRUCTURE -----------------------
-static struct
+template< class T > struct List
{
- int columnIndex;
- HWND listView;
- BOOL isOrderDesc;
-} sorting = {
- 0, NULL, FALSE
+private:
+ ListItem< T >* items;
+ unsigned int count;
+
+public:
+ typedef int ( *compareFunc )( const T* p1, const T* p2 );
+ compareFunc compare;
+
+ List( compareFunc compFnc )
+ {
+ this->items = NULL;
+ this->count = 0;
+ this->compare = compFnc;
+ }
+
+ ~List( )
+ {
+ this->destroy( );
+ }
+
+ ListItem< T >* getListHead( )
+ {
+ return items;
+ }
+
+ unsigned int getCount( )
+ {
+ return count;
+ }
+
+ int add( T* csi )
+ {
+ int position = 0;
+ ListItem< T >* item = new ListItem< T >( csi );
+ if ( this->items == NULL )
+ this->items = item;
+ else
+ {
+ ListItem< T >* help = item;
+ item->next = items;
+ while ( help->next != NULL )
+ {
+ int cmp = compare( item->item, help->next->item );
+ if ( cmp == 1 )
+ help = help->next;
+ else if ( cmp == 0 )
+ {
+ delete item;
+ return -1;
+ }
+ else
+ break;
+ position++;
+ }
+ if ( help != item )
+ {
+ item->next = help->next;
+ help->next = item;
+ }
+ else
+ items = item;
+ }
+ this->count++;
+ return position;
+ }
+
+ int remove( const unsigned int item )
+ {
+ int position = 0;
+ if ( item < 0 || item >= this->count )
+ return -1;
+
+ ListItem< T >* help = items;
+ ListItem< T >* removed;
+ if ( item == 0 )
+ {
+ items = items->next;
+ removed = help;
+ }
+ else
+ {
+ for ( unsigned int i = 0; i < item - 1; i++ )
+ {
+ help = help->next;
+ position++;
+ }
+ removed = help->next;
+ help->next = help->next->next;
+ }
+ delete removed;
+ this->count--;
+ return position;
+ }
+
+ T* get( const unsigned int item )
+ {
+ ListItem< T >* help = items;
+ for ( unsigned int i = 0; i < item; i++ )
+ help = help->next;
+ return help->item;
+ }
+
+ T* operator[]( const unsigned int item )
+ {
+ return get( item );
+ }
+
+ void destroy( )
+ {
+ while ( this->count > 0 )
+ this->remove( 0 );
+ }
};
-// ################################## GLOBALS ##################################
-HINSTANCE hInst = NULL;
-PLUGINLINK *pluginLink = NULL;
+// ====[ CLASSING -- FUNNY STUFF :) ]=========================================
-DWORD gMirandaVersion = 0x00000000;
-BYTE gbUnicodeCore;
+struct CSList;
+struct CSWindow;
+struct CSAMWindow;
+struct CSItemsList;
+struct CSListView;
-TCHAR *rnthanks = L"induction - for his cool iconset :)\r\nfaith_healer - moral support :]\r\nCriS - project hosting @ http://dev.mirandaim.ru/ \r\nRobyer, kaye_styles, dEMoniZaToR, Drugwash, FREAK_THEMIGHTY - useful hints ;)\r\nplugin users, of course :) for their tolerance x) ;)\r\nMiranda IM Project Team - for their work on the best Instant Messenger I ever known :)";
-TCHAR *rnchanges = L"";
+// --------
-int action = 0;
-int AMResult = 0;
-int ModifiedPos = -1;
-int opened = 0;
+struct CSListView
+{
+ HWND handle;
+ CSWindow* parent;
-static HWND hDlg = NULL; // Main Dialog handler
-static HWND hList = NULL; // List View handler
-HIMAGELIST hIml = NULL;
-HWND hXCombo = NULL;
-int hMainIcon = 0; // modern toolbar // TODO: is it needed?
-LVCOLUMN LvCol = { 0 }; // Make Coluom struct for ListView
-LVITEM LvItem = { 0 }; // ListView Item struct
-COMBOBOXEXITEM CbItem = { 0 };
-int iSelect = 0;
-int flag = 0;
-BOOL bChanged = 0;
-CSLISTSTATUSITEM helpItem = { 0 };
+ CSListView( HWND, CSWindow* );
-// hooks
-HANDLE hHookMenuBuild = NULL;
-HANDLE hHookOnPluginsLoaded = NULL;
-HANDLE hHookOnOptionsInit = NULL;
-HANDLE hHookOnKatynkaIsLoggedIn = NULL;
+ void addItem( StatusItem* item, int itemNumber );
+ void initItems( ListItem< StatusItem >* items );
+ void reinitItems( ListItem< StatusItem >* items );
+ void removeItems( );
+ int getPositionInList( );
+ void setFullFocusedSelection( int selection );
+};
-// services
-HANDLE hSvcShowList = NULL;
-BOOL bStatusMenu = FALSE;
+struct CSItemsList
+{
+ List< StatusItem >* list;
-PLUGININFOEX pluginInfoEx = {
- sizeof( PLUGININFOEX ),
- CSLIST_MODULE_LONG_NAME,
- PLUGIN_MAKE_VERSION( 0, 0, 0, 19 ),
- "Offers list of your Custom Statuses. [test build #"CSLIST_TESTING" "__DATE__" "__TIME__"]",
- "jarvis [eThEreAL] .., HANAX",
- "mike.taussick@seznam.cz",
- "© 2007-2008 eternity crew .., © 2006-2007 HANAX Software",
- "http://dev.mirandaim.ru/~jarvis/",
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
- // Generate your own unique id for your plugin.
- // Do not use this UUID!
- // Use uuidgen.exe to generate the uuuid
- {0x8b86253, 0xec6e, 0x4d09, { 0xb7, 0xa9, 0x64, 0xac, 0xdf, 0x6, 0x27, 0xb8 }} //{08B86253-EC6E-4d09-B7A9-64ACDF0627B8}
+ static int compareItems( const StatusItem* p1, const StatusItem* p2 );
+ void loadItems(char* protoName);
+ void saveItems(char* protoName);
+
+ CSItemsList(char* protoName);
+ ~CSItemsList();
};
-PLUGININFO pluginInfo = {
- sizeof( PLUGININFO ),
- CSLIST_MODULE_LONG_NAME,
- PLUGIN_MAKE_VERSION( 0, 0, 0, 19 ),
- "Offers list of your Custom Statuses. [test build #"CSLIST_TESTING" "__DATE__" "__TIME__"]",
- "jarvis [eThEreAL] .., HANAX",
- "mike.taussick@seznam.cz",
- "© 2007-2008 eternity crew .., © 2006-2007 HANAX Software",
- "http://dev.mirandaim.ru/~jarvis/",
- UNICODE_AWARE, //not transient
- 0
+
+struct CSAMWindow
+{
+ WORD action;
+ StatusItem* item;
+ CSWindow* parent;
+ BOOL bChanged;
+
+ HWND handle;
+ HWND hCombo;
+ HWND hMessage;
+
+ CSAMWindow( WORD action, CSWindow* parent );
+ ~CSAMWindow( );
+
+ void exec( );
+ void setCombo( );
+ void fillDialog( );
+ void checkFieldLimit( WORD action, WORD item );
+ void checkItemValidity();
};
-// ############################# INIT STUFF ####################################
-BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved );
-static int PluginMenuCommand( WPARAM wParam, LPARAM lParam );
+struct CSWindow
+{
+ HWND handle;
+ BOOL bExtraIcons;
+ CSItemsList* itemslist;
+ CSListView* listview;
+ CSAMWindow* addModifyDlg;
+ HIMAGELIST icons;
+ BOOL bSomethingChanged;
+ TCHAR* filterString;
+ char* protoName;
+ CSWindow(char* protoName);
+ ~CSWindow();
+
+ void initIcons( );
+ void deinitIcons( );
+ void initButtons( );
+ static void __cdecl showWindow( void* arg );
+ static void __cdecl closeWindow( void* arg );
+ void loadWindowPosition( );
+ BOOL toggleButtons( );
+ void toggleEmptyListMessage( );
+ void toggleFilter( );
+ BOOL itemPassedFilter( ListItem< StatusItem >* li );
+
+ void __inline saveWindowPosition( HWND hwnd )
+ {
+ if ( getByte( "RememberWindowPosition", DEFAULT_REMEMBER_WINDOW_POSITION ) == TRUE )
+ {
+ RECT rect = { 0 };
+ GetWindowRect( hwnd, &rect );
+ setWord( "PositionX", rect.left );
+ setWord( "PositionY", rect.top );
+ }
+ }
+};
-__declspec( dllexport ) PLUGININFOEX* MirandaPluginInfoEx( DWORD mirandaVersion );
-__declspec( dllexport ) PLUGININFO* MirandaPluginInfo( DWORD mirandaVersion );
-static const MUUID interfaces[] = { MIID_TESTPLUGIN, MIID_STATUSLIST, MIID_LAST };
-__declspec( dllexport ) const MUUID* MirandaPluginInterfaces( void );
+struct CSList
+{
+ // global variables
+ static HINSTANCE handle;
+ static DWORD dwMirandaVersion;
+ static BOOL bUnicodeCore;
+ static BOOL bAccountsSupported;
+
+ // class components
+ CSWindow* mainWindow;
+
+ // events
+ HANDLE hHookOnPluginsLoaded;
+ HANDLE hHookOnOptionsInit;
+ HANDLE hHookOnDBSettingChanged;
+ HANDLE hHookOnStatusMenuBuild;
+
+ // services
+ HANDLE hServiceShowList;
+
+ CSList( );
+ ~CSList( );
+
+ // event functions
+ static int postLoading( WPARAM, LPARAM );
+ static int initOptions( WPARAM, LPARAM );
+ static int respondDBChange( WPARAM, LPARAM );
+ static int createMenuItems( WPARAM, LPARAM );
+
+ // service functions
+ static INT_PTR __cdecl showList(WPARAM, LPARAM, LPARAM);
+ void closeList( HWND );
+
+ // protocols enumeration related functions
+ static void ForAllProtocols( pForAllProtosFunc pFunc, void* arg );
+ static void __cdecl addProtoStatusMenuItem( char* protoName, void* arg );
+ static void __cdecl countProtos( char* protoName, void* arg );
+ static void __cdecl countPlusModProtos( char* protoName, void* arg );
+ static void __cdecl importCustomStatusUIStatusesFromAllProtos( char* protoName, void* arg );
+
+ // other functions
+ void initIcoLib( );
+ void registerHotkeys(char buf[200], TCHAR* accName, int Number);
+ void rebuildMenuItems( );
+ void setStatus(WORD code, StatusItem* item, char* protoName);
+};
-int __declspec( dllexport ) Load( PLUGINLINK *link );
-int __declspec( dllexport ) Unload( void );
-static int onPluginsLoaded( WPARAM wparam, LPARAM lparam );
-int onOptionsInit( WPARAM wparam, LPARAM lparam );
+HINSTANCE CSList::handle = NULL;
+DWORD CSList::dwMirandaVersion = 0x00000000;
+BOOL CSList::bUnicodeCore = FALSE;
+BOOL CSList::bAccountsSupported = FALSE;
-// ############################### PROCEDURES ##################################
+// ====[ GLOBALS ]============================================================
-INT_PTR CALLBACK CSListProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
-INT_PTR CALLBACK CSListAddModifyProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
-BOOL CALLBACK CSListOptionsProc( HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam );
-static int CALLBACK CSListSortProc( LPARAM, LPARAM, LPARAM );
-INT_PTR CALLBACK RelNotesProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
+static const MUUID interfaces[] = { PLUGIN_GUUID, MIID_LAST };
-// ############################# HELP FUNCTIONS ################################
+PLUGINLINK* pluginLink = NULL;
+PLUGININFOEX pluginInfoEx = {
+ sizeof(PLUGININFOEX),
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
+ UNICODE_AWARE,
+ 0,
+ PLUGIN_GUUID
+};
-int null_snprintf( char*, size_t, const char*, ... );
-static int cslist_init_menu_item( WPARAM wParam, LPARAM lParam );
+CSList* cslist = NULL;
-// ################## COMMANDS OF CSLIST #######################################
-int cslist_add_item();
-int cslist_modify_item();
-int cslist_remove_item();
-int cslist_AM_set_help_item( HWND hwndAMDlg );
+// ====[ INIT STUFF ]=========================================================
-// ################## SERVICES FOR CSLIST ######################################
+BOOL WINAPI DllMain( HINSTANCE, DWORD, LPVOID );
-void cslist_clear_selection();
-void cslist_clear_help_item();
-void cslist_sort_list();
-void cslist_import_statuses_from_icq();
-int cslist_KatysEasterEgg( WPARAM, LPARAM );
+extern "C" __declspec( dllexport ) PLUGININFOEX* MirandaPluginInfoEx( DWORD );
+extern "C" __declspec( dllexport ) PLUGININFO* MirandaPluginInfo( DWORD );
+extern "C" __declspec( dllexport ) const MUUID* MirandaPluginInterfaces( void );
-// ################## DB - LOAD AND SAVE #######################################
+extern "C" __declspec( dllexport ) int Load( PLUGINLINK* );
+extern "C" __declspec( dllexport ) int Unload( void );
-int cslist_initialize_list_content( HWND hwndDlg );
-int cslist_parse_row( TCHAR *row );
-int cslist_save_list_content( HWND hwndDlg );
-// ######################### CREATING DIALOG ###################################
+// ====[ THREAD FORK ]========================================================
-int cslist_set_status( HWND hwndDlg );
-void cslist_init_icons( void );
+void ForkThread( pThreadFunc pFunc, void* arg );
-// ######################### OTHER FUNCTIONS ###################################
+// ====[ PROCEDURES ]=========================================================
-HICON LoadIconExEx( const char* IcoLibName, int NonIcoLibIcon );
-//void DBDeleteContactSetting( char Module[64], char Setting[64] );
+INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam );
+INT_PTR CALLBACK CSAMWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam );
+INT_PTR CALLBACK CSRNWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam );
+INT_PTR CALLBACK CSOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam );
-// ############################## EXTERNS ######################################
-//extern int mir_free( const int & );
-//extern int ImageList_AddIcon_IconLibLoaded( HIMAGELIST hIml, int iconId );
+// ====[ HELPERS ]============================================================
+
+HICON LoadIconExEx( const char*, int );
+
+void __fastcall SAFE_FREE(void** p)
+{
+ if (*p)
+ {
+ free(*p);
+ *p = NULL;
+ }
+}
-#pragma comment( lib, "comctl32.lib" )
-#endif /* __CSLIST_H */ \ No newline at end of file
+#endif /* __CSLIST_H */
diff --git a/custom_status_list/cslist.opt b/custom_status_list/cslist.opt
deleted file mode 100644
index 7812836..0000000
--- a/custom_status_list/cslist.opt
+++ /dev/null
Binary files differ
diff --git a/custom_status_list/cslist.plg b/custom_status_list/cslist.plg
deleted file mode 100644
index 890ea14..0000000
--- a/custom_status_list/cslist.plg
+++ /dev/null
@@ -1,36 +0,0 @@
-<html>
-<body>
-<pre>
-<h1>Build Log</h1>
-<h3>
---------------------Configuration: cslist - Win32 Release--------------------
-</h3>
-<h3>Command Lines</h3>
-Creating command line "rc.exe /l 0x809 /fo"Release/cslist.res" /i "../../include/" /d "NDEBUG" "D:\Sources\svn.miranda.im\custom_status_list\trunk\cslist.rc""
-Creating temporary file "C:\Temp\RSP41D9.tmp" with contents
-[
-/nologo /MT /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CSLIST_EXPORTS" /Fp"Release/cslist.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c
-"D:\Sources\svn.miranda.im\custom_status_list\trunk\cslist.c"
-]
-Creating command line "cl.exe @C:\Temp\RSP41D9.tmp"
-Creating temporary file "C:\Temp\RSP41DA.tmp" with contents
-[
-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 /incremental:no /pdb:"Release/cslist.pdb" /machine:I386 /out:"../../bin/release/plugins/cslist.dll" /implib:"Release/cslist.lib"
-.\Release\cslist.obj
-.\Release\cslist.res
-]
-Creating command line "link.exe @C:\Temp\RSP41DA.tmp"
-<h3>Output Window</h3>
-Compiling resources...
-Compiling...
-cslist.c
-D:\Sources\svn.miranda.im\custom_status_list\trunk\cslist.h(27) : fatal error C1083: Cannot open include file: 'm_updater.h': No such file or directory
-Error executing cl.exe.
-
-
-
-<h3>Results</h3>
-cslist.dll - 1 error(s), 0 warning(s)
-</pre>
-</body>
-</html>
diff --git a/custom_status_list/cslist.rc b/custom_status_list/cslist.rc
index f02fb44..de21946 100644
--- a/custom_status_list/cslist.rc
+++ b/custom_status_list/cslist.rc
@@ -13,105 +13,83 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
+// Àíãëèéñêèé (ÑØÀ) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
-#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_CSLIST ICON "res/cslist.ico"
+IDI_ADD ICON "res/add.ico"
+IDI_MODIFY ICON "res/modify.ico"
+IDI_REMOVE ICON "res/remove.ico"
+IDI_FAVOURITE ICON "res/favourite.ico"
+IDI_IMPORT ICON "res/import.ico"
+IDI_UNDO ICON "res/undo.ico"
+IDI_FILTER ICON "res/filter.ico"
+IDI_CLOSE ICON "res/close.ico"
+IDI_UNSET ICON "res/unset.ico"
+IDI_APPLY ICON "res/apply.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
-IDD_CSLIST DIALOGEX 0, 0, 210, 226
-STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION
+IDD_CSLIST DIALOGEX 0, 0, 214, 227
+STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Custom Status List"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- CONTROL "",IDC_CSLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,1,3,207,204
- CONTROL "A",IDC_ADD,"MButtonClass",WS_TABSTOP,2,210,16,14
- CONTROL "M",IDC_MODIFY,"MButtonClass",WS_TABSTOP,22,210,16,14
- CONTROL "D",IDC_REMOVE,"MButtonClass",WS_TABSTOP,42,210,16,14
- CONTROL "I",IDC_IMPORT,"MButtonClass",WS_TABSTOP,65,210,16,14
- CONTROL "W",IDC_WATCH,"MButtonClass",WS_DISABLED | WS_TABSTOP,85,210,16,14
- CONTROL "F",IDC_FAV,"MButtonClass",WS_DISABLED | WS_TABSTOP,105,210,16,14
- CONTROL "N",IDC_NOCHNG,"MButtonClass",WS_TABSTOP,152,210,16,14
- CONTROL "E",IDC_EXIT,"MButtonClass",WS_TABSTOP,172,210,16,14
- CONTROL "P",IDC_APPLY,"MButtonClass",WS_TABSTOP,192,210,16,14
- CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,146,211,1,13
- CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,61,211,1,13
- CONTROL "O",IDC_OPTS,"MButtonClass",WS_TABSTOP,125,210,16,14
+ CONTROL "",IDC_CSLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,3,3,207,204
+ CONTROL "A",IDC_ADD,"MButtonClass",WS_TABSTOP,3,210,16,14
+ CONTROL "M",IDC_MODIFY,"MButtonClass",WS_TABSTOP,23,210,16,14
+ CONTROL "D",IDC_REMOVE,"MButtonClass",WS_TABSTOP,43,210,16,14
+ CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,63,210,1,14
+ CONTROL "F",IDC_FAVOURITE,"MButtonClass",WS_TABSTOP,67,210,16,14
+ CONTROL "U",IDC_UNDO,"MButtonClass",WS_DISABLED | WS_TABSTOP,87,210,16,14
+ CONTROL "I",IDC_IMPORT,"MButtonClass",WS_TABSTOP,107,210,16,14
+ CONTROL "I",IDC_FILTER,"MButtonClass",WS_TABSTOP | 0x1000,127,210,16,14
+ EDITTEXT IDC_FILTER_FIELD,3,210,120,14,ES_AUTOHSCROLL | NOT WS_VISIBLE | WS_DISABLED
+ CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,147,210,1,14
+ CONTROL "N",IDCLOSE,"MButtonClass",WS_TABSTOP,153,210,16,14
+ CONTROL "C",IDC_CANCEL,"MButtonClass",WS_TABSTOP,173,210,16,14
+ CONTROL "O",IDOK,"MButtonClass",WS_TABSTOP,193,210,16,14
+ ICON IDI_ADD,IDC_ADD_SAMPLE,102,90,20,20,SS_REALSIZEIMAGE
+ CTEXT "No items available in the database.\nClick the Add button to define some.",IDC_NO_ITEMS,43,101,130,49,0,WS_EX_TRANSPARENT
END
-IDD_ADDMODIFY DIALOGEX 100, 100, 199, 121
+IDD_ADDMODIFY DIALOGEX 100, 100, 187, 90
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Add/Modify Custom Status"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- LTEXT "Icon:",IDC_ST_XICON,4,2,44,8
- CONTROL "",IDC_CB_ICON,"ComboBoxEx32",CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP,2,11,84,95
- LTEXT "Title:",IDC_ST_XTITLE,89,2,43,8
- EDITTEXT IDC_XTITLE,89,11,108,14,ES_AUTOHSCROLL
- LTEXT "Message:",IDC_ST_XMESSAGE,4,27,85,8
- EDITTEXT IDC_XMESSAGE,2,36,195,66,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL
- DEFPUSHBUTTON "Add/Modify",IDC_AM_OK,49,105,50,14
- PUSHBUTTON "Cancel",IDC_AM_CN,102,105,50,14
+ CONTROL "",IDC_COMBO,"ComboBoxEx32",CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP,6,5,175,107
+ EDITTEXT IDC_MESSAGE,6,21,175,50,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL
+ DEFPUSHBUTTON "Add/Modify",IDOK,6,74,104,14
+ PUSHBUTTON "Cancel",IDCANCEL,116,74,65,14
END
-IDD_RELNOTES DIALOGEX 0, 0, 192, 269
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Custom Status List Release Notes"
+IDD_OPTIONS DIALOGEX 0, 0, 300, 107
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_CLIPSIBLINGS
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- GROUPBOX "Latest Changes",IDC_RNCHNGS,4,104,184,83
- GROUPBOX "Notice",IDC_RNNOTICE,4,55,184,49
- GROUPBOX "Special Thanks",IDC_THX,4,189,184,58
- RTEXT "Plugin name:",IDC_RNPLGNM,7,4,53,8
- RTEXT "Version:",IDC_RNVER,7,14,53,8
- LTEXT "Custom Status List",IDC_RLNPLGNM2,66,4,98,8
- LTEXT "0.0.0.18 (Unicode)",IDC_RNVER2,66,14,95,8
- LTEXT "Plugin development is currently in Beta stage. It's not recommended to generally use, but stable enough for testing purposes. Stable release will be available as soon as possible ;)",IDC_STATIC,20,65,150,34
- RTEXT "Author:",IDC_RNAUTH,7,24,53,8
- LTEXT "jarvis (original idea by HANAX)",IDC_RNAUTH2,66,24,115,8
- RTEXT "Copyright:",IDC_RNCPR,7,34,53,8
- LTEXT "© 2007-8 eternity crew ..\n© 2006-7 HANAX Software",IDC_RNCPR2,66,34,115,18
- ICON IDI_ADD,IDC_RNCSICON,163,3,20,20
- EDITTEXT IDC_TXHTEXT,7,199,176,43,ES_MULTILINE | ES_READONLY | WS_VSCROLL
- CONTROL "Don't show this dialog again",IDC_SHOWIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,253,118,10
- DEFPUSHBUTTON "Close",IDOK,137,251,50,14
- CONTROL "Unicode build, finally :)",IDC_STATIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,119,155,10
- CONTROL "fixed memory leak and possible crash when modifying status and then importing 0 DB entries",IDC_STATIC,
- "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,17,158,155,26
- CONTROL "merged Add/Modify processes together :)",IDC_STATIC,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,129,155,10
- CONTROL "icon selector shows only icons, that are supported by installed ICQ plugin",IDC_STATIC,
- "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,17,139,155,18
-END
-
-IDD_OPTIONS DIALOGEX 0, 0, 172, 222
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Options"
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- GROUPBOX "Menu Item placement",IDC_PLACEMENT_OPTIONS,3,102,165,81
- CONTROL "Global Status Menu",IDC_PLACE_GLOBAL,"Button",BS_AUTORADIOBUTTON | WS_GROUP,11,115,119,10
- CONTROL "ICQ Status Menu",IDC_PLACE_ICQ_STATUS,"Button",BS_AUTORADIOBUTTON,11,147,125,10
- CONTROL "Main Menu",IDC_PLACE_MAIN,"Button",BS_AUTORADIOBUTTON,11,158,134,10
- CONTROL "Tray Menu",IDC_PLACE_TRAY,"Button",BS_AUTOCHECKBOX | WS_DISABLED,11,168,122,10
- CONTROL "At the top",IDC_PLACE_GLOBAL_TOP,"Button",BS_AUTORADIOBUTTON | WS_DISABLED | WS_GROUP,17,126,108,10
- CONTROL "At the bottom",IDC_PLACE_GLOBAL_BOTTOM,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,17,136,119,10
- CONTROL "Hide ""Custom status"" menu\n(ICQ eternity/PlusPlus++ Mod only, restart needed)",IDC_HIDE_CSMENU,
- "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,11,65,149,26
- GROUPBOX "List settings",IDC_LIST_SETTINGS,3,0,165,47
- DEFPUSHBUTTON "Save Options",IDOK,43,205,82,14
- CTEXT "Note: Some options will be applied after restart of Miranda IM",IDC_STATIC,11,185,144,15,WS_DISABLED
- CONTROL "Confirm deletion of items",IDC_DEL_CONFIRM,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,11,13,148,10
- CONTROL "Delete entries in ICQ Custom status menu after Import",IDC_DEL_AFTER_IMPORT,
- "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_DISABLED | WS_TABSTOP,11,24,153,16
- GROUPBOX "ICQ integration",IDC_ICQ_INTG,3,50,165,50
+ GROUPBOX "List settings",IDC_STATIC,4,4,292,73
+ CONTROL "Confirm deletion of items",IDC_CONFIRM_DELETION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,20,253,10
+ CONTROL "Delete entries in ICQ Custom status menu after Import",IDC_DELETE_AFTER_IMPORT,
+ "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,24,32,253,10
+ CONTROL "Allow extra ICQ Custom status items (ICQ Plus only)",IDC_ALLOW_EXTRA_ICONS,
+ "Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,24,44,253,10
+ CONTROL "Remember last window position",IDC_REMEMBER_POSITION,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,56,253,10
+ CTEXT "Note: Menu items are only visible when at least one ICQ account is properly set. Check if you have at least one account with UIN filled in.",IDC_STATIC,6,80,283,23
END
@@ -121,71 +99,49 @@ END
//
#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
+GUIDELINES DESIGNINFO
BEGIN
IDD_CSLIST, DIALOG
BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 202
- TOPMARGIN, 7
- BOTTOMMARGIN, 219
+ LEFTMARGIN, 3
+ RIGHTMARGIN, 210
+ VERTGUIDE, 23
+ VERTGUIDE, 43
+ VERTGUIDE, 67
+ VERTGUIDE, 87
+ VERTGUIDE, 107
+ VERTGUIDE, 127
+ VERTGUIDE, 153
+ VERTGUIDE, 173
+ VERTGUIDE, 193
+ TOPMARGIN, 3
+ BOTTOMMARGIN, 224
+ HORZGUIDE, 207
+ HORZGUIDE, 210
END
- IDD_RELNOTES, DIALOG
+ IDD_ADDMODIFY, DIALOG
BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 185
- TOPMARGIN, 7
- BOTTOMMARGIN, 262
+ LEFTMARGIN, 6
+ RIGHTMARGIN, 181
+ TOPMARGIN, 5
+ BOTTOMMARGIN, 88
END
IDD_OPTIONS, DIALOG
BEGIN
- VERTGUIDE, 11
+ LEFTMARGIN, 4
+ RIGHTMARGIN, 296
+ VERTGUIDE, 24
+ VERTGUIDE, 34
+ VERTGUIDE, 277
+ TOPMARGIN, 4
+ BOTTOMMARGIN, 103
END
END
#endif // APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,0,0,18
- PRODUCTVERSION 0,0,0,18
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "Comments", "Offers List of your Custom Statuses. All acclaims go to HANAX, original publisher and inventor of this idea."
- VALUE "FileDescription", "Custom Status List"
- VALUE "FileVersion", "0, 0, 0, 18"
- VALUE "InternalName", "cslist"
- VALUE "LegalCopyright", "© 2007-2008 eternity crew .., © 2006-2007 HANAX"
- VALUE "OriginalFilename", "cslist.dll"
- VALUE "ProductName", "Custom Status List"
- VALUE "ProductVersion", "0, 0, 0, 18"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
-
-
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
@@ -199,36 +155,17 @@ END
3 TEXTINCLUDE
BEGIN
- "\r\n"
+ "\r\0"
END
2 TEXTINCLUDE
BEGIN
- "#include ""afxres.h""\r\n"
+ "#include ""afxres.h""\r\0"
END
#endif // APSTUDIO_INVOKED
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_CSLIST ICON "res\\main.ico"
-IDI_ADD ICON "res\\add.ico"
-IDI_MODIFY ICON "res\\modify.ico"
-IDI_REMOVE ICON "res\\remove.ico"
-IDI_IMPORT ICON "res\\import.ico"
-IDI_WATCH ICON "res\\watch.ico"
-IDI_FAV ICON "res\\fav.ico"
-IDI_NOCHNG ICON "res\\nochng.ico"
-IDI_CLEAR ICON "res\\clear.ico"
-IDI_APPLY ICON "res\\apply.ico"
-IDI_OPTIONS ICON "res\\options.ico"
-#endif // English (U.S.) resources
+#endif // Àíãëèéñêèé (ÑØÀ) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/custom_status_list/cslist.sln b/custom_status_list/cslist.sln
deleted file mode 100644
index 7d0066c..0000000
--- a/custom_status_list/cslist.sln
+++ /dev/null
@@ -1,23 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual C++ Express 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "custom_status_list", "cslist.vcxproj", "{2AD2FF74-06E1-4BD8-984A-526F3C6315B3}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Release Unicode [Dynamic SSE2 Fast]|Win32 = Release Unicode [Dynamic SSE2 Fast]|Win32
- Release Unicode|Win32 = Release Unicode|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release Unicode [Dynamic SSE2 Fast]|Win32.ActiveCfg = Release Unicode [Dynamic SSE2 Fast]|Win32
- {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release Unicode [Dynamic SSE2 Fast]|Win32.Build.0 = Release Unicode [Dynamic SSE2 Fast]|Win32
- {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
- {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
- {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|Win32.ActiveCfg = Release|Win32
- {2AD2FF74-06E1-4BD8-984A-526F3C6315B3}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/custom_status_list/cslist.vcproj b/custom_status_list/cslist.vcproj
deleted file mode 100644
index 84824f8..0000000
--- a/custom_status_list/cslist.vcproj
+++ /dev/null
@@ -1,415 +0,0 @@
-<?xml version="1.0" encoding="windows-1250"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="custom_status_list"
- ProjectGUID="{2AD2FF74-06E1-4BD8-984A-526F3C6315B3}"
- RootNamespace="cslist"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release Unicode|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
- IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Release/cslist.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile=".\Release/cslist.pch"
- AssemblerListingLocation=".\Release/"
- ObjectFile=".\Release/"
- ProgramDataBaseFileName=".\Release/"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/cslist.dll"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- GenerateDebugInformation="false"
- ProgramDatabaseFile=".\Release/cslist.pdb"
- ImportLibrary=".\Release/cslist.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\Release/cslist.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Release/cslist.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="1"
- InlineFunctionExpansion="1"
- FavorSizeOrSpeed="2"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile=".\Release/cslist.pch"
- AssemblerListingLocation=".\Release/"
- ObjectFile=".\Release/"
- ProgramDataBaseFileName=".\Release/"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/cslist.dll"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- GenerateDebugInformation="false"
- ProgramDatabaseFile=".\Release/cslist.pdb"
- ImportLibrary=".\Release/cslist.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\Release/cslist.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release Unicode [Dynamic SSE2 Fast]|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\Release/cslist.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="../../include"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile=".\Release/cslist.pch"
- AssemblerListingLocation=".\Release/"
- ObjectFile=".\Release/"
- ProgramDataBaseFileName=".\Release/"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/cslist.dll"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- GenerateDebugInformation="false"
- ProgramDatabaseFile=".\Release/cslist.pdb"
- ImportLibrary=".\Release/cslist.lib"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- SuppressStartupBanner="true"
- OutputFile=".\Release/cslist.bsc"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="cslist.c"
- >
- <FileConfiguration
- Name="Release Unicode|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Unicode [Dynamic SSE2 Fast]|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath=".\cslist.h"
- >
- </File>
- <File
- RelativePath=".\resource.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
- >
- <File
- RelativePath=".\res\add.ico"
- >
- </File>
- <File
- RelativePath=".\res\apply.ico"
- >
- </File>
- <File
- RelativePath=".\res\clear.ico"
- >
- </File>
- <File
- RelativePath=".\cslist.rc"
- >
- </File>
- <File
- RelativePath=".\res\fav.ico"
- >
- </File>
- <File
- RelativePath=".\res\import.ico"
- >
- </File>
- <File
- RelativePath=".\res\main.ico"
- >
- </File>
- <File
- RelativePath=".\res\modify.ico"
- >
- </File>
- <File
- RelativePath=".\res\nochng.ico"
- >
- </File>
- <File
- RelativePath=".\res\options.ico"
- >
- </File>
- <File
- RelativePath=".\res\remove.ico"
- >
- </File>
- <File
- RelativePath=".\res\watch.ico"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/custom_status_list/cslist.vcxproj b/custom_status_list/cslist.vcxproj
deleted file mode 100644
index b872aa3..0000000
--- a/custom_status_list/cslist.vcxproj
+++ /dev/null
@@ -1,213 +0,0 @@
-<?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="Release Unicode [Dynamic SSE2 Fast]|Win32">
- <Configuration>Release Unicode [Dynamic SSE2 Fast]</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Unicode|Win32">
- <Configuration>Release Unicode</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>cslist</ProjectName>
- <ProjectGuid>{2AD2FF74-06E1-4BD8-984A-526F3C6315B3}</ProjectGuid>
- <RootNamespace>cslist</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode [Dynamic SSE2 Fast]|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode [Dynamic SSE2 Fast]|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </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" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </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" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode [Dynamic SSE2 Fast]|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode [Dynamic SSE2 Fast]|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Unicode [Dynamic SSE2 Fast]|Win32'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\Release/cslist.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>../../include;../ExternalApi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>false</GenerateDebugInformation>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\Release/cslist.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>MinSpace</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>../../include;../ExternalApi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeaderOutputFile>.\Release/cslist.pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
- <ObjectFileName>.\Release/</ObjectFileName>
- <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>false</GenerateDebugInformation>
- <ProgramDatabaseFile>.\Release/cslist.pdb</ProgramDatabaseFile>
- <ImportLibrary>.\Release/cslist.lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>.\Release/cslist.bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode [Dynamic SSE2 Fast]|Win32'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\Release/cslist.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>../../include;../ExternalApi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>false</GenerateDebugInformation>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="cslist.c">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode [Dynamic SSE2 Fast]|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode [Dynamic SSE2 Fast]|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="cslist.h" />
- <ClInclude Include="resource.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="res\add.ico" />
- <None Include="res\apply.ico" />
- <None Include="res\clear.ico" />
- <None Include="res\fav.ico" />
- <None Include="res\import.ico" />
- <None Include="res\main.ico" />
- <None Include="res\modify.ico" />
- <None Include="res\nochng.ico" />
- <None Include="res\options.ico" />
- <None Include="res\remove.ico" />
- <None Include="res\watch.ico" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="cslist.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/custom_status_list/cslist_10.vcxproj b/custom_status_list/cslist_10.vcxproj
new file mode 100644
index 0000000..3a0aaca
--- /dev/null
+++ b/custom_status_list/cslist_10.vcxproj
@@ -0,0 +1,279 @@
+<?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 Unicode|Win32">
+ <Configuration>Debug Unicode</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug Unicode|x64">
+ <Configuration>Debug Unicode</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>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>Cslist</ProjectName>
+ <ProjectGuid>{2AD2FF74-06E1-4BD8-984A-526F3C6315B3}</ProjectGuid>
+ <RootNamespace>cslist</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </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" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/cslist.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>
+ </PrecompiledHeaderOutputFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <ProgramDatabaseFile>
+ </ProgramDatabaseFile>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Release/cslist.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>
+ </PrecompiledHeaderOutputFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <ProgramDatabaseFile>
+ </ProgramDatabaseFile>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/cslist.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <PrecompiledHeaderOutputFile>
+ </PrecompiledHeaderOutputFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Release/cslist.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <PrecompiledHeaderOutputFile>
+ </PrecompiledHeaderOutputFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="cslist.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="cslist.h" />
+ <ClInclude Include="legacy.h" />
+ <ClInclude Include="strpos.h" />
+ <ClInclude Include="resource.h" />
+ <ClInclude Include="Version.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\add.ico" />
+ <None Include="res\apply.ico" />
+ <None Include="res\clear.ico" />
+ <None Include="res\close.ico" />
+ <None Include="res\cslist.ico" />
+ <None Include="res\fav.ico" />
+ <None Include="res\favourite.ico" />
+ <None Include="res\filter.ico" />
+ <None Include="res\global.ico" />
+ <None Include="res\import.ico" />
+ <None Include="res\main.ico" />
+ <None Include="res\modify.ico" />
+ <None Include="res\nochng.ico" />
+ <None Include="res\options.ico" />
+ <None Include="res\refresh.ico" />
+ <None Include="res\remove.ico" />
+ <None Include="res\undo.ico" />
+ <None Include="res\unset.ico" />
+ <None Include="res\watch.ico" />
+ <None Include="changelog.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="cslist.rc" />
+ <ResourceCompile Include="Version.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/custom_status_list/cslist.vcxproj.filters b/custom_status_list/cslist_10.vcxproj.filters
index 1972989..4f47bb6 100644
--- a/custom_status_list/cslist.vcxproj.filters
+++ b/custom_status_list/cslist_10.vcxproj.filters
@@ -2,20 +2,23 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
- <UniqueIdentifier>{6500573a-3334-47b6-a046-8b8d10ddf076}</UniqueIdentifier>
+ <UniqueIdentifier>{8dd75aec-9e99-4df2-9de1-7015fb55c28a}</UniqueIdentifier>
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
</Filter>
<Filter Include="Header Files">
- <UniqueIdentifier>{0b9b0ea6-1449-4473-a62c-a97543975df5}</UniqueIdentifier>
+ <UniqueIdentifier>{1370dfbb-66b8-4c0b-b76a-bd7aa558e483}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl</Extensions>
</Filter>
<Filter Include="Resource Files">
- <UniqueIdentifier>{988747e3-74b2-4aaa-8f88-ffe48242db16}</UniqueIdentifier>
+ <UniqueIdentifier>{0c22408f-3e3b-4310-970e-525e94308c9d}</UniqueIdentifier>
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
</Filter>
+ <Filter Include="Other">
+ <UniqueIdentifier>{072cb5e6-88d2-4b64-a2ee-b49ae44f8b49}</UniqueIdentifier>
+ </Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="cslist.c">
+ <ClCompile Include="cslist.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
@@ -23,7 +26,16 @@
<ClInclude Include="cslist.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="legacy.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="strpos.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
<ClInclude Include="resource.h">
+ <Filter>Resource Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Version.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
@@ -37,9 +49,24 @@
<None Include="res\clear.ico">
<Filter>Resource Files</Filter>
</None>
+ <None Include="res\close.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\cslist.ico">
+ <Filter>Resource Files</Filter>
+ </None>
<None Include="res\fav.ico">
<Filter>Resource Files</Filter>
</None>
+ <None Include="res\favourite.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\filter.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\global.ico">
+ <Filter>Resource Files</Filter>
+ </None>
<None Include="res\import.ico">
<Filter>Resource Files</Filter>
</None>
@@ -55,16 +82,31 @@
<None Include="res\options.ico">
<Filter>Resource Files</Filter>
</None>
+ <None Include="res\refresh.ico">
+ <Filter>Resource Files</Filter>
+ </None>
<None Include="res\remove.ico">
<Filter>Resource Files</Filter>
</None>
+ <None Include="res\undo.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\unset.ico">
+ <Filter>Resource Files</Filter>
+ </None>
<None Include="res\watch.ico">
<Filter>Resource Files</Filter>
</None>
+ <None Include="changelog.txt">
+ <Filter>Other</Filter>
+ </None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="cslist.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
+ <ResourceCompile Include="Version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/custom_status_list/cslist_9.vcproj b/custom_status_list/cslist_9.vcproj
new file mode 100644
index 0000000..041a941
--- /dev/null
+++ b/custom_status_list/cslist_9.vcproj
@@ -0,0 +1,320 @@
+<?xml version="1.0" encoding="windows-1250"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="Cslist"
+ ProjectGUID="{2AD2FF74-06E1-4BD8-984A-526F3C6315B3}"
+ RootNamespace="cslist"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(Configuration)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/cslist.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS"
+ StringPooling="true"
+ EnableFunctionLevelLinking="true"
+ PrecompiledHeaderFile=""
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ ProgramDatabaseFile=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(Configuration)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/cslist.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSLIST_EXPORTS"
+ StringPooling="true"
+ RuntimeLibrary="1"
+ EnableFunctionLevelLinking="true"
+ FloatingPointModel="2"
+ PrecompiledHeaderFile=""
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ GenerateDebugInformation="true"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\cslist.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\cslist.h"
+ >
+ </File>
+ <File
+ RelativePath=".\legacy.h"
+ >
+ </File>
+ <File
+ RelativePath=".\strpos.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath=".\res\add.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\apply.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\clear.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\close.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\cslist.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\cslist.rc"
+ >
+ </File>
+ <File
+ RelativePath=".\res\fav.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\favourite.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\filter.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\global.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\import.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\main.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\modify.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\nochng.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\options.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\refresh.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\remove.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\res\undo.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\unset.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\watch.ico"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Other"
+ >
+ <File
+ RelativePath=".\changelog.txt"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/custom_status_list/legacy.h b/custom_status_list/legacy.h
new file mode 100644
index 0000000..7139294
--- /dev/null
+++ b/custom_status_list/legacy.h
@@ -0,0 +1,87 @@
+/*
+
+ FILE INFO: Legacy functions of older Custom Status List versions
+
+*/
+
+int cslist_import_v2_status_items( );
+int cslist_parse_row( TCHAR *row, int ord );
+
+int cslist_import_v2_status_items( )
+{
+ // get DB string, parse to statuses, add by helpItem
+ DBVARIANT dbv = { DBVT_TCHAR };
+ int parseResult;
+ int dbLoadResult;
+ const TCHAR* rowDelim = _T( "" ); // new line
+ TCHAR *row = NULL;
+
+ dbLoadResult = getTString( "listhistory", &dbv );
+ if ( dbv.ptszVal )
+ {
+ int i = getByte( "ItemsCount", DEFAULT_ITEMS_COUNT );
+ row = _tcstok( dbv.ptszVal, rowDelim );
+ while( row != NULL ) {
+ i++;
+ // process current row..
+ parseResult = cslist_parse_row( row, i );
+ // ..and go to the other, while some remains
+ row = _tcstok( NULL, rowDelim );
+ }
+ setByte( "ItemsCount", i );
+ }
+ //free( rowDelim );
+ //free( row );
+ return 0;
+}
+
+int cslist_parse_row( TCHAR *row, int ord ) // parse + helpItem
+{
+ int pIconInt;
+ TCHAR pIcon[4], pTitle[EXTRASTATUS_TITLE_LIMIT+2], pMsg[EXTRASTATUS_MESSAGE_LIMIT+2], pFav[4];
+ TCHAR scanfFormat[64];
+
+ lstrcpy( pTitle, _T( "" ) );
+ lstrcpy( pMsg, _T( "" ) );
+
+ // database row format: "%2[^]%64[^]%2048[^]%2[^]"
+
+ mir_sntprintf(
+ scanfFormat,
+ sizeof( scanfFormat ),
+ _T( "%%%d[^]%%%d[^]%%%d[^]%%%d[^]" ), // %% makes %, %d makes number :)
+ 2,
+ EXTRASTATUS_TITLE_LIMIT,
+ EXTRASTATUS_MESSAGE_LIMIT,
+ 2
+ );
+
+ _tcscanf( row, scanfFormat, pIcon, pTitle, pMsg, pFav );
+
+ if ( lstrlen( pTitle ) + lstrlen( pMsg ) > 0 )
+ {
+ char dbSetting[32];
+ pIconInt = _ttoi( pIcon );
+ mir_snprintf( dbSetting, sizeof( dbSetting ), "Item%dIcon", ord );
+ setByte( dbSetting, pIconInt );
+ mir_snprintf( dbSetting, sizeof( dbSetting ), "Item%dTitle", ord );
+ setTString( dbSetting, pTitle );
+ mir_snprintf( dbSetting, sizeof( dbSetting ), "Item%dMessage", ord );
+ setTString( dbSetting, pMsg );
+ mir_snprintf( dbSetting, sizeof( dbSetting ), "Item%dFavourite", ord );
+ setByte( dbSetting, 0 );
+ }
+ else {
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
+void MessageBoxInt( int value1, int value2 )
+{
+ TCHAR buf1[64], buf2[64];
+ mir_sntprintf( buf1, SIZEOF( buf1 ), TEXT( "%d" ), value1 );
+ mir_sntprintf( buf2, SIZEOF( buf2 ), TEXT( "%d" ), value2 );
+ MessageBox( NULL, buf2, buf1, MB_OK );
+}
diff --git a/custom_status_list/res/nochng.ico b/custom_status_list/res/close.ico
index 0c7cf1e..0c7cf1e 100644
--- a/custom_status_list/res/nochng.ico
+++ b/custom_status_list/res/close.ico
Binary files differ
diff --git a/custom_status_list/res/cslist.ico b/custom_status_list/res/cslist.ico
new file mode 100644
index 0000000..c4d4af7
--- /dev/null
+++ b/custom_status_list/res/cslist.ico
Binary files differ
diff --git a/custom_status_list/res/fav.ico b/custom_status_list/res/favourite.ico
index 4fc2eb6..4fc2eb6 100644
--- a/custom_status_list/res/fav.ico
+++ b/custom_status_list/res/favourite.ico
Binary files differ
diff --git a/custom_status_list/res/filter.ico b/custom_status_list/res/filter.ico
new file mode 100644
index 0000000..01c82c6
--- /dev/null
+++ b/custom_status_list/res/filter.ico
Binary files differ
diff --git a/custom_status_list/res/global.ico b/custom_status_list/res/global.ico
new file mode 100644
index 0000000..8ab1e5d
--- /dev/null
+++ b/custom_status_list/res/global.ico
Binary files differ
diff --git a/custom_status_list/res/main.ico b/custom_status_list/res/main.ico
deleted file mode 100644
index ba883a2..0000000
--- a/custom_status_list/res/main.ico
+++ /dev/null
Binary files differ
diff --git a/custom_status_list/res/undo.ico b/custom_status_list/res/undo.ico
new file mode 100644
index 0000000..7033539
--- /dev/null
+++ b/custom_status_list/res/undo.ico
Binary files differ
diff --git a/custom_status_list/res/clear.ico b/custom_status_list/res/unset.ico
index 485ef78..485ef78 100644
--- a/custom_status_list/res/clear.ico
+++ b/custom_status_list/res/unset.ico
Binary files differ
diff --git a/custom_status_list/res/watch.ico b/custom_status_list/res/watch.ico
deleted file mode 100644
index 69fd3f6..0000000
--- a/custom_status_list/res/watch.ico
+++ /dev/null
Binary files differ
diff --git a/custom_status_list/resource.h b/custom_status_list/resource.h
index 6ded910..cec1647 100644
--- a/custom_status_list/resource.h
+++ b/custom_status_list/resource.h
@@ -2,77 +2,48 @@
// Microsoft Visual C++ generated include file.
// Used by cslist.rc
//
+#define IDCLOSE 8
+#define IDC_CANCEL 9
#define IDD_CSLIST 101
#define IDD_ADDMODIFY 102
#define IDD_OPTIONS 103
-#define IDD_RELNOTES 104
-#define IDI_CSLIST 105
-#define IDI_ADD 106
-#define IDI_MODIFY 107
-#define IDI_REMOVE 108
-#define IDI_WATCH 110
-#define IDI_FAV 111
-#define IDI_NOCHNG 112
-#define IDI_CLEAR 113
-#define IDI_APPLY 114
-#define IDI_OPTIONS 115
-#define IDI_IMPORT 119
+#define IDI_CSLIST 121
+#define IDI_ADD 122
+#define IDI_MODIFY 123
+#define IDI_REMOVE 124
+#define IDI_FAVOURITE 125
+#define IDI_UNDO 126
+#define IDI_GLOBAL 127
+#define IDI_FILTER 128
+#define IDI_CLOSE 129
+#define IDI_UNSET 130
+#define IDI_APPLY 131
+#define IDI_IMPORT 132
#define IDC_CSLIST 1001
-#define IDC_ADD 1002
-#define IDC_MODIFY 1003
-#define IDC_REMOVE 1004
-#define IDC_IMPORT 1005
-#define IDC_WATCH 1006
-#define IDC_FAV 1007
-#define IDC_NOCHNG 1008
-#define IDC_EXIT 1009
-#define IDC_APPLY 1010
-#define IDC_ST_XICON 1011
-#define IDC_CB_ICON 1012
-#define IDC_ST_XTITLE 1013
-#define IDC_XTITLE 1014
-#define IDC_ST_XMESSAGE 1015
-#define IDC_XMESSAGE 1016
-#define IDC_AM_OK 1017
-#define IDC_AM_CN 1018
-#define IDC_RNCHNGS 1019
-#define IDC_RNNOTICE 1020
-#define IDC_RNPLGNM 1021
-#define IDC_RLNPLGNM2 1022
-#define IDC_RNVER 1023
-#define IDC_RNVER2 1024
-#define IDC_RNAUTH 1025
-#define IDC_RNAUTH2 1026
-#define IDC_RNCPR 1027
-#define IDC_RNCPR2 1028
-#define IDC_RNVERSTICK 1029
-#define IDC_VERSTICK 1030
-#define IDC_RNCSICON 1031
-#define IDC_THX 1032
-#define IDC_TXHTEXT 1033
-#define IDC_SHOWIT 1034
-#define IDC_PLACEMENT_OPTIONS 1035
-#define IDC_PLACE_GLOBAL 1036
-#define IDC_PLACE_GLOBAL_TOP 1038
-#define IDC_PLACE_GLOBAL_BOTTOM 1039
-#define IDC_PLACE_ICQ_STATUS 1040
-#define IDC_PLACE_ICQ_REPLACE 1041
-#define IDC_HIDE_CSMENU 1041
-#define IDC_LIST_SETTINGS 1042
-#define IDC_PLACE_MAIN 1044
-#define IDC_PLACE_TRAY 1046
-#define IDC_DEL_CONFIRM 1047
-#define IDC_DEL_AFTER_IMPORT 1048
-#define IDC_ICQ_INTG 1049
-#define IDC_OPTS 1050
+#define IDC_FILTER_FIELD 1011
+#define IDC_ADD_SAMPLE 1012
+#define IDC_NO_ITEMS 1013
+#define IDC_ADD 1021
+#define IDC_MODIFY 1022
+#define IDC_REMOVE 1023
+#define IDC_FAVOURITE 1024
+#define IDC_UNDO 1025
+#define IDC_FILTER 1027
+#define IDC_COMBO 1041
+#define IDC_MESSAGE 1042
+#define IDC_CONFIRM_DELETION 1051
+#define IDC_DELETE_AFTER_IMPORT 1052
+#define IDC_IMPORT 1071
+#define IDC_ALLOW_EXTRA_ICONS 1204
+#define IDC_REMEMBER_POSITION 1207
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 116
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1053
+#define _APS_NEXT_RESOURCE_VALUE 104
+#define _APS_NEXT_COMMAND_VALUE 40003
+#define _APS_NEXT_CONTROL_VALUE 1209
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/custom_status_list/strpos.h b/custom_status_list/strpos.h
new file mode 100644
index 0000000..14ea88a
--- /dev/null
+++ b/custom_status_list/strpos.h
@@ -0,0 +1,84 @@
+/*
+ * strpos.c - Returns the offset of a string in a substring.
+ *
+ * Copyright (c) 2001, 2002 Andre Guibert de Bruet. <andre@siliconlandmark.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification, immediately at the beginning of the file.
+ * 2. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+/*
+ * You might want to place this next block in a header file somewhere:
+ */
+
+#ifndef UNICODE
+# define TCHAR char
+# define STRING char *
+#else
+# ifndef TCHAR
+# define TCHAR wchar_t
+# endif /* TCHAR */
+# define STRING wchar_t *
+#endif /* UNICODE */
+
+
+
+int strpos( STRING haystack, STRING needle )
+{
+ STRING pDest;
+ int position;
+
+#ifdef DEBUG_VERBOSE
+ TCHAR lpBuf[1024];
+#endif /* def DEBUG_VERBOSE */
+
+ #ifndef UNICODE
+ pDest = (STRING) strstr( haystack, needle );
+ #else
+ pDest = (STRING) wcsstr( haystack, needle );
+ #endif /* UNICODE */
+
+ if( pDest )
+ position = pDest - haystack;
+ else
+ {
+#ifdef DEBUG_VERBOSE
+# ifdef UNICODE
+ printf( L"strpos(): Could not find '%s' in '%s'.\tFAIL.", needle, haystack );
+# else
+ printf( "strpos(): Could not find '%s' in '%s'.\tFAIL.", needle, haystack );
+# endif /* def UNICODE */
+#endif /* def DEBUG_VERBOSE */
+ return -1;
+ }
+
+#ifdef DEBUG_VERBOSE
+# ifdef UNICODE
+ printf( L"strpos(): Found '%s' at position: %d.\t\tOK.", needle, position );
+# else
+ printf( "strpos(): Found '%s' at position: %d.\t\tOK.", needle, position );
+# endif /* def UNICODE */
+#endif /* def DEBUG_VERBOSE */
+
+ return position;
+}