diff options
Diffstat (limited to 'historylinklistplus')
-rw-r--r-- | historylinklistplus/Language.txt | 158 | ||||
-rw-r--r-- | historylinklistplus/language.h | 37 | ||||
-rw-r--r-- | historylinklistplus/linklist.c | 306 | ||||
-rw-r--r-- | historylinklistplus/linklist.h | 139 | ||||
-rw-r--r-- | historylinklistplus/linklist.ico | bin | 766 -> 0 bytes | |||
-rw-r--r-- | historylinklistplus/linklist.rc | 275 | ||||
-rw-r--r-- | historylinklistplus/linklist.sln | 38 | ||||
-rw-r--r-- | historylinklistplus/linklist.vcxproj | 513 | ||||
-rw-r--r-- | historylinklistplus/linklist.vcxproj.filters | 61 | ||||
-rw-r--r-- | historylinklistplus/linklist_dlg.c | 1002 | ||||
-rw-r--r-- | historylinklistplus/linklist_dlg.h | 29 | ||||
-rw-r--r-- | historylinklistplus/linklist_fct.c | 1360 | ||||
-rw-r--r-- | historylinklistplus/linklist_fct.h | 50 | ||||
-rw-r--r-- | historylinklistplus/resource.h | 72 | ||||
-rw-r--r-- | historylinklistplus/utils.c | 29 | ||||
-rw-r--r-- | historylinklistplus/utils.h | 25 |
16 files changed, 0 insertions, 4094 deletions
diff --git a/historylinklistplus/Language.txt b/historylinklistplus/Language.txt deleted file mode 100644 index b7662f1..0000000 --- a/historylinklistplus/Language.txt +++ /dev/null @@ -1,158 +0,0 @@ -; History Linklist Plus strings
-; History Linklist Plus Plugin for Miranda-IM
-; Date: 21 Dec 2010
-;
-; Language: German
-; Plugin Version: 0.0.0.1
-
-
-[Error]
-Fehler
-[Unable to load the Rich Edit control!]
-Rich Edit control konnte nicht geladen werden!
-[&Create Linklist]
-Linkliste erstellen
-[Linklist Plugin]
-Linklisten Plugin
-[History is empty!]
-Keine Nachrichten in der History!
-[Processing history...]
-History wird verarbeitet...
-[Processing list...]
-Liste wird verarbeitet...
-[Could not create window!]
-Fenster konnte nicht erzeugt werden!
-[Could not allocate memory!]
-Speicher konnte nicht belegt werden!
-[There are no links in history!]
-Die History enthält keine Links!
-[Matches for searchtext]
-Treffer für Suchtext
-[No messages found!\nPlease change current filter options.]
-Keine Nachrichten gefunden!\nBitte Filterregeln ändern.
-[Date]
-Datum
-[Miranda Linklist]
-Miranda Linkliste
-[Filter]
-Filter
-[none]
-keiner
-[mailaddresses]
-Mailadressen
-[URLs]
-URLs
-[incoming]
-eingehende
-[outgoing]
-ausgehende
-[search options]
-Suchoptionen
-
-;Menu
-;----
-[&About]
-Über
-[&Search]
-Suchen
-[&File]
-Datei
-[&Options]
-Optionen
-[&Clear Search Results]
-Suchergebnisse löschen
-[Message &Direction]
-Nachrichtenrichtung
-[&Incoming Messages Only]
-Nur eingehende Nachrichten
-[&Outgoing Messages Only]
-Nur ausgehende Nachrichten
-[Message &Type]
-Nachrichtenart
-[&Webaddresses Only]
-Nur Internetadressen
-[&Mail-Addresses Only]
-Nur E-Mail-Adressen
-[&Save]
-Speichern
-[&Close]
-Beenden
-
-;Popup Menu
-;----------
-[Copy to Clipboard]
-In Zwischenablage kopieren
-[Open]
-Öffnen
-[Open in new Window]
-In neuem Fenster öffnen
-[Show Message]
-Zeige Nachricht
-
-;Search Dialog
-;-------------
-[Search for:]
-Suchen nach:
-[Message direction]
-Nachrichtenrichtung
-[Message types]
-Nachrichtenarten
-[All directions]
-alle Richtungen
-[Incoming only]
-nur eingehende
-[Outgoing only]
-nur ausgehende
-[All types]
-alle Arten
-[Mail addresses only]
-nur Mailadressen
-[Web addresses only]
-nur Web-Adressen
-[Deep search]
-Genaue Suche
-[Search]
-Suchen
-[Close]
-Beenden
-
-;Options Dialog
-;--------------
-[Colour Select]
-Farbauswahl
-[Preview]
-Vorschau
-[Use Miranda Settings]
-Miranda Einstellungen verwenden
-[Plugin Default]
-Plugin Standard
-[Incoming messages]
-Eingehende Nachrichten
-[Outgoing messages]
-Ausgehende Nachrichten
-[Backgroundcolour]
-Hintergrundfarbe
-[Textcolour]
-Textfarbe
-[No Miranda Settings specified!]
-Keine Miranda Standardeinstellungen vorhanden!
-[General Settings]
-Allgemeine Einstellungen
-[Open links always in a new window]
-Links immer in neuem Fenster öffnen
-[Update list on new events]
-Liste automatisch aktualisieren
-[Show whole Message on 'mouse over' event]
-Ganze Nachricht bei Mauskontakt anzeigen
-[Save window position individually for each contact]
-Fensterposition individuell für jeden Kontakt speichern
-[Show...]
-Zeige...
-[Parting line]
-Trennlinie
-[Timestamp]
-Zeitstempel
-[Direction]
-Richtung
-[Type]
-Typ
diff --git a/historylinklistplus/language.h b/historylinklistplus/language.h deleted file mode 100644 index 92eb5a6..0000000 --- a/historylinklistplus/language.h +++ /dev/null @@ -1,37 +0,0 @@ -// History Linklist Plus
-// Copyright (C) 2010 Thomas Wendel, gureedo
-//
-// 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-#pragma once
-
-#ifndef _LANGUAGE_H
-#define _LANGUAGE_H
-
-#define TXT_PLUGINNAME "History Linklist"
-#define TXT_EMPTYHISTORY "History is empty!"
-#define TXT_ERROR "Error"
-#define TXT_INCOMING "incoming"
-#define TXT_OUTGOING "outgoing"
-#define TXT_FILTER "Filter"
-#define TXT_NOFILTER "no filter"
-#define TXT_URLSONLY "Web addresses only"
-#define TXT_MAILSONLY "Mail addresses only"
-#define TXT_SEARCH "Search"
-#define TXT_SEARCHFILTER "Search Filter"
-#define TXT_NOSETTING "no settings"
-#define TXT_DATE "Date"
-
-#endif // _LANGUAGE_H
\ No newline at end of file diff --git a/historylinklistplus/linklist.c b/historylinklistplus/linklist.c deleted file mode 100644 index f219e02..0000000 --- a/historylinklistplus/linklist.c +++ /dev/null @@ -1,306 +0,0 @@ -// History Linklist Plus
-// Copyright (C) 2010 Thomas Wendel, gureedo
-//
-// 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-#include <windows.h>
-#include "resource.h"
-#ifdef _DEBUG
-#include <crtdbg.h>
-#endif
-
-// Miranda SDK Includes
-#pragma warning(disable:4996)
-#pragma warning(disable:4100)
-#include <newpluginapi.h>
-#include <m_clist.h>
-#include <m_database.h>
-#include <m_utils.h>
-#include <m_langpack.h>
-#include <m_options.h>
-#pragma warning(default:4100)
-#pragma warning(default:4996)
-
-#include "linklist_dlg.h"
-#include "linklist_fct.h"
-#include "linklist.h"
-#include "language.h"
-
-#define MIID_LINKLIST { 0xc9c94733, 0xa054, 0x42b9, { 0x89, 0xcb, 0xb9, 0x71, 0x27, 0xa7, 0xa3, 0x43 } }
-
-// Global variables
-HINSTANCE hInst;
-HINSTANCE hRichEdit;
-PLUGINLINK *pluginLink;
-HANDLE hWindowList;
-HCURSOR splitCursor;
-
-PLUGININFOEX pluginInfo = {
- sizeof(PLUGININFOEX),
-#ifdef _WIN64
- "History Linklist Plus (x64, Unicode)",
-#else
-#ifdef _UNICODE
- "History Linklist Plus (Unicode)",
-#else
- "History Linklist Plus",
-#endif
-#endif
- PLUGIN_MAKE_VERSION(0,0,0,2),
- "Generates a list of extracted URIs from the history",
- "Thomas Wendel, gureedo",
- "gureedo@gmail.com",
- "© 2010-2011 gureedo",
- "http://www.miranda-im.org",
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
- #ifdef _UNICODE
- { 0xDA0B09F5, 0x9C66, 0x488C, { 0xAE, 0x37, 0x8A, 0x5F, 0x19, 0x1C, 0x90, 0x79 } }
- // {DA0B09F5-9C66-488C-AE37-8A5F191C9079}
- #else
- { 0x06F23FA4, 0xABD4, 0x41CA, { 0xAD, 0xFA, 0x7B, 0xE8, 0x69, 0xC0, 0x63, 0x5A } }
- // {06F23FA4-ABD4-41CA-ADFA-7BE869C0635A}
- #endif
-};
-
-static const MUUID interfaces[] = {MIID_LINKLIST, MIID_LAST};
-struct MM_INTERFACE mmi;
-
-// Functions
-
-__declspec(dllexport) const MUUID * MirandaPluginInterfaces(void)
-{
- return interfaces;
-}
-
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
-{
- UNREFERENCED_PARAMETER(lpvReserved);
-
- hInst = hinstDLL;
- // Load Rich Edit control
- if ( fdwReason == DLL_PROCESS_ATTACH || fdwReason == DLL_THREAD_ATTACH )
- {
- hRichEdit = LoadLibrary(_T("RICHED32.DLL"));
- if ( !hRichEdit )
- {
- // If Rich Edit DLL load fails, exit
- MessageBox(NULL, _T("Unable to load the Rich Edit control!"), _T("Error"), MB_OK | MB_ICONEXCLAMATION);
- return FALSE;
- }
-
-#ifdef DEBUG
- {
- int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
- flag |= _CRTDBG_LEAK_CHECK_DF|_CRTDBG_CHECK_ALWAYS_DF;
- _CrtSetDbgFlag(flag);
- }
-#endif
-
- DisableThreadLibraryCalls(hinstDLL);
- }
- if ( fdwReason == DLL_PROCESS_DETACH || fdwReason == DLL_THREAD_DETACH ) {
- FreeLibrary(hRichEdit);
- }
-
- return TRUE;
-}
-
-int __declspec(dllexport) Load(PLUGINLINK *link)
-{
- CLISTMENUITEM linklistmenuitem;
- WNDCLASS wndclass;
-
- pluginLink = link;
- CreateServiceFunction("Linklist/MenuCommand", LinkList_Main);
- ZeroMemory(&linklistmenuitem, sizeof(linklistmenuitem));
- linklistmenuitem.cbSize = sizeof(linklistmenuitem);
- linklistmenuitem.position = 0x00;
- linklistmenuitem.flags = CMIF_TCHAR;
- linklistmenuitem.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LINKLISTICON));
- linklistmenuitem.ptszName = LPGENT("&Create Linklist");
- linklistmenuitem.pszService = "Linklist/MenuCommand";
- CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&linklistmenuitem);
- hWindowList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
-
- wndclass.style = CS_HREDRAW | CS_VREDRAW;
- wndclass.lpfnWndProc = ProgressBarDlg;
- wndclass.cbClsExtra = 0;
- wndclass.cbWndExtra = 0;
- wndclass.hInstance = hInst;
- wndclass.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LINKLISTICON));
- wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
- wndclass.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
- wndclass.lpszClassName = _T("Progressbar");
- wndclass.lpszMenuName = NULL;
- RegisterClass(&wndclass);
-
- splitCursor = LoadCursor(NULL, IDC_SIZENS);
-
- mir_getMMI(&mmi);
-
- HookEvent(ME_OPT_INITIALISE, InitOptionsDlg);
- HookEvent(ME_DB_EVENT_ADDED, DBUpdate);
-
- return 0;
-}
-
-__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
-{
- UNREFERENCED_PARAMETER(mirandaVersion);
-
- return &pluginInfo;
-}
-
-int __declspec(dllexport) Unload(void)
-{
- UnhookEvent(ME_DB_EVENT_ADDED);
- DestroyCursor(splitCursor);
- return 0;
-}
-
-int InitOptionsDlg(WPARAM wParam, LPARAM lParam)
-{
- OPTIONSDIALOGPAGE optionsDialog;
- UNREFERENCED_PARAMETER(lParam);
-
- ZeroMemory(&optionsDialog, sizeof(OPTIONSDIALOGPAGE));
- optionsDialog.cbSize = sizeof(optionsDialog);
- optionsDialog.hInstance = hInst;
- optionsDialog.ptszGroup = LPGENT("History");
- optionsDialog.ptszTitle = LPGENT("History Linklist");
- optionsDialog.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_DLG);
- optionsDialog.pfnDlgProc = OptionsDlgProc;
- optionsDialog.expertOnlyControls = NULL;
- optionsDialog.nExpertOnlyControls = 0;
- optionsDialog.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&optionsDialog);
- return 0;
-}
-
-static INT_PTR LinkList_Main(WPARAM wParam,LPARAM lParam)
-{
- HANDLE hEvent;
- HANDLE hContact = (HANDLE)wParam;
- DBEVENTINFO dbe;
- HWND hWnd;
- HWND hWndProgress;
- HWND hWndMain;
-
- int histCount = 0;
- int actCount = 0;
-
- RECT DesktopRect;
- DIALOGPARAM *DlgParam;
- LISTELEMENT *listStart;
-
- UNREFERENCED_PARAMETER(lParam);
-
- listStart = (LISTELEMENT*)malloc(sizeof(LISTELEMENT));
- ZeroMemory(listStart, sizeof(LISTELEMENT));
-
- hWnd = WindowList_Find(hWindowList,hContact);
- if ( hWnd != NULL )
- {
- int len;
- SetForegroundWindow(hWnd);
- SetFocus(hWnd);
- len = GetWindowTextLength(GetDlgItem(hWnd, IDC_MAIN));
- PostMessage(GetDlgItem(hWnd, IDC_MAIN), EM_SETSEL, (WPARAM)len, (LPARAM)len);
- return 0;
- }
-
- hEvent = (HANDLE)CallService(MS_DB_EVENT_FINDFIRST, (WPARAM)hContact, 0);
- if ( hEvent == NULL )
- {
- MessageBox(NULL, TranslateT(TXT_EMPTYHISTORY), TranslateT(TXT_PLUGINNAME), MB_OK | MB_ICONINFORMATION );
- return 0;
- }
-
- histCount = CallService(MS_DB_EVENT_GETCOUNT, (WPARAM)hContact, 0);
- ZeroMemory(&dbe, sizeof(dbe));
- dbe.cbSize = sizeof(dbe);
- dbe.cbBlob = (int)CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hEvent, 0);
- dbe.pBlob = (PBYTE)malloc(dbe.cbBlob+1);
- CallService(MS_DB_EVENT_GET, (WPARAM)hEvent, (LPARAM)&dbe);
- dbe.pBlob[dbe.cbBlob] = 0;
-
- GetWindowRect(GetDesktopWindow(), &DesktopRect);
- hWndProgress = CreateWindow(_T("Progressbar"), TranslateT("Processing history..."), WS_OVERLAPPED, CW_USEDEFAULT, CW_USEDEFAULT, 350, 45, NULL, NULL, hInst, NULL);
- if ( hWndProgress == 0 )
- {
- free(dbe.pBlob);
- MessageBox(NULL, TranslateT("Could not create window!"), TranslateT("Error"), MB_OK | MB_ICONEXCLAMATION );
- return -1;
- }
- SetWindowPos(hWndProgress, HWND_TOP, (int)(DesktopRect.right*0.5)-175, (int)(DesktopRect.bottom*0.5)-22, 0, 0, SWP_NOSIZE);
- ShowWindow(hWndProgress, SW_SHOW);
- SetForegroundWindow(hWndProgress);
-
- while( 1 )
- {
- if ( dbe.eventType == EVENTTYPE_URL || dbe.eventType == EVENTTYPE_MESSAGE )
- {
- // Call function to find URIs
- if ( ExtractURI(&dbe, hEvent, listStart) < 0 )
- {
- free(dbe.pBlob);
- RemoveList(listStart);
- MessageBox(NULL, TranslateTS("Could not allocate memory!"), TranslateT("Error"), MB_OK | MB_ICONEXCLAMATION);
- return -1;
- }
- }
- actCount++;
- if( ((int)(((float)actCount/histCount)*100.00)) % 10 == 0 )
- SendMessage(hWndProgress, WM_COMMAND, 100, ((int)(((float)actCount/histCount)*100.00)));
-
- hEvent = (HANDLE)CallService(MS_DB_EVENT_FINDNEXT, (WPARAM)hEvent, 0);
- if ( hEvent == NULL )
- break;
-
- free(dbe.pBlob);
- dbe.cbBlob = (int)CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hEvent, 0);
- dbe.pBlob = (PBYTE)malloc(dbe.cbBlob+1);
- CallService(MS_DB_EVENT_GET, (WPARAM)hEvent, (LPARAM)&dbe);
- dbe.pBlob[dbe.cbBlob] = 0;
- }
- free(dbe.pBlob);
- SendMessage(hWndProgress, WM_CLOSE, 0, 0);
- if ( ListCount(listStart) <= 0 ) {
- RemoveList(listStart);
- MessageBox(NULL, TranslateT("There are no links in history!"), TranslateT(TXT_PLUGINNAME), MB_OK | MB_ICONINFORMATION);
- return 0;
- }
-
-
-
- DlgParam = (DIALOGPARAM*)malloc(sizeof(DIALOGPARAM));
- DlgParam->hContact = hContact;
- DlgParam->listStart = listStart;
- DlgParam->findMessage = 0;
- DlgParam->chrg.cpMax = -1;
- DlgParam->chrg.cpMin = -1;
-
- hWndMain = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_MAIN_DLG), NULL, MainDlgProc, (LPARAM)DlgParam);
- if ( hWndMain == 0 )
- {
- RemoveList(listStart);
- MessageBox(NULL, TranslateT("Could not create window!"), TranslateT("Error"), MB_OK | MB_ICONEXCLAMATION );
- return -1;
- }
-
- ShowWindow(hWndMain, SW_SHOW);
- return 0;
-}
diff --git a/historylinklistplus/linklist.h b/historylinklistplus/linklist.h deleted file mode 100644 index 297ee3f..0000000 --- a/historylinklistplus/linklist.h +++ /dev/null @@ -1,139 +0,0 @@ -// History Linklist Plus
-// Copyright (C) 2010 Thomas Wendel, gureedo
-//
-// 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-#pragma once
-
-#ifndef _LINKLIST_H
-#define _LINKLIST_H
-
-#include <richedit.h>
-
-// Filter Flags
-#define WLL_URL 0x01
-#define WLL_MAIL 0x02
-#define WLL_FILE 0x04
-#define WLL_IN 0x08
-#define WLL_OUT 0x10
-#define WLL_ALL (WLL_URL|WLL_MAIL|WLL_FILE|WLL_IN|WLL_OUT)
-#define SLL_DEEP 0x20
-
-// String length
-#define LINK_MAX 1024
-#define DIR_SIZE 6
-#define TYPE_SIZE 5
-#define DATE_SIZE 11
-#define TIME_SIZE 15
-
-// Link types
-#define LINK_UNKNOWN 0x00
-#define LINK_URL 0x01
-#define LINK_MAIL 0x02
-#define LINK_FILE 0x03
-
-// Directions
-#define DIRECTION_IN 1
-#define DIRECTION_OUT 2
-
-
-#define FILTERTEXT 125
-
-#define IN_COL_DEF 0x005050A0
-#define OUT_COL_DEF 0x00206020
-#define BG_COL_DEF 0x00EAFFFF
-#define TXT_COL_DEF 0x00000000
-
-#define LINKLIST_MODULE "HistoryLinklist"
-#define LINKLIST_IN_COL "InColour"
-#define LINKLIST_OUT_COL "OutColour"
-#define LINKLIST_BG_COL "BGColour"
-#define LINKLIST_TXT_COL "TxtColour"
-#define LINKLIST_USE_DEF "UseMirandaDefault"
-#define LINKLIST_OPEN_WINDOW "OpenNewWindow"
-#define LINKLIST_UPDATE_WINDOW "UpdateWindow"
-#define LINKLIST_MOUSE_EVENT "MessageView"
-#define LINKLIST_LEFT "WindowLeft"
-#define LINKLIST_RIGHT "WindowRight"
-#define LINKLIST_BOTTOM "WindowBottom"
-#define LINKLIST_TOP "WindowTop"
-#define LINKLIST_SPLITPOS "SplitterPos"
-#define LINKLIST_SAVESPECIAL "SavePosSpecial"
-#define LINKLIST_FIRST "FirstStartup"
-#define LINKLIST_SHOW_DATE "ShowDate"
-#define LINKLIST_SHOW_LINE "ShowLine"
-#define LINKLIST_SHOW_TIME "ShowTime"
-#define LINKLIST_SHOW_DIRECTION "ShowMessageDirection"
-#define LINKLIST_SHOW_TYPE "ShowMessageType"
-
-
-
-#define MAKE_TXT_COL(BGCol) ((DWORD)~BGCol & 0x00FFFFFF)
-
-#define DM_LINKSPLITTER WM_USER+99
-
-struct LISTELEMENT {
- BYTE direction;
- BYTE type;
- TCHAR date[DATE_SIZE];
- TCHAR time[TIME_SIZE];
- TCHAR link[LINK_MAX];
- HANDLE hEvent;
- int linePos;
- struct LISTELEMENT *nextElement;
-} ;
-
-typedef struct LISTELEMENT LISTELEMENT;
-
-// Dialogbox Parameter
-typedef struct{
- HANDLE hContact;
- LISTELEMENT *listStart;
- UINT findMessage;
- CHARRANGE chrg;
- int splitterPosNew;
- int splitterPosOld;
- SIZE minSize;
-} DIALOGPARAM;
-
-
-typedef struct{
- DWORD incoming;
- DWORD outgoing;
- DWORD background;
- DWORD text;
-} MYCOLOURSET;
-
-
-typedef struct{
- BYTE openNewWindow;
- BYTE updateWindow;
- BYTE mouseEvent;
- BYTE saveSpecial;
- BYTE showDate;
- BYTE showLine;
- BYTE showTime;
- BYTE showDirection;
- BYTE showType;
-}LISTOPTIONS;
-
-BOOL WINAPI DllMain(HINSTANCE ,DWORD ,LPVOID );
-int __declspec(dllexport) Load(PLUGINLINK*);
-__declspec(dllexport) PLUGININFO* MirandaPluginInfo(DWORD);
-int __declspec(dllexport) Unload(void);
-static INT_PTR LinkList_Main(WPARAM, LPARAM);
-int InitOptionsDlg(WPARAM, LPARAM);
-
-#endif //_LINKLIST_H
\ No newline at end of file diff --git a/historylinklistplus/linklist.ico b/historylinklistplus/linklist.ico Binary files differdeleted file mode 100644 index 43a005c..0000000 --- a/historylinklistplus/linklist.ico +++ /dev/null diff --git a/historylinklistplus/linklist.rc b/historylinklistplus/linklist.rc deleted file mode 100644 index 2c3d44b..0000000 --- a/historylinklistplus/linklist.rc +++ /dev/null @@ -1,275 +0,0 @@ -// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#define APSTUDIO_HIDDEN_SYMBOLS
-#include "windows.h"
-#undef APSTUDIO_HIDDEN_SYMBOLS
-#include "richedit.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Russian (Russia) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
-LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
-#pragma code_page(1251)
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,0
- PRODUCTVERSION 1,0,0,2
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "041904b0"
- BEGIN
- VALUE "FileDescription", "Plugin for Miranda IM"
- VALUE "FileVersion", "1.0.0.0"
- VALUE "LegalCopyright", "Copyright (C) 2010 Thomas Wendel, gureedo"
- VALUE "ProductName", "History Linklist Plus"
- VALUE "ProductVersion", "1.0.0.2"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x419, 1200
- END
-END
-
-#endif // Russian (Russia) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// German (Germany) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
-LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
-#pragma code_page(1252)
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "#include ""windows.h""\r\n"
- "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "#include ""richedit.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif // German (Germany) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// English (United States) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_SEARCH_DLG DIALOGEX 0, 0, 205, 103
-STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Search"
-FONT 8, "MS Sans Serif", 0, 0, 0x0
-BEGIN
- DEFPUSHBUTTON "Close",IDCLOSE,150,85,50,14
- EDITTEXT IDC_SEARCHSTRING,49,7,151,12,ES_AUTOHSCROLL
- LTEXT "Search for:",IDC_STATIC,8,8,39,9
- DEFPUSHBUTTON "Search",IDSEARCH,95,85,50,14
- GROUPBOX "Message direction",IDC_STATIC,4,26,92,46
- GROUPBOX "Message types",IDC_STATIC,102,26,98,47
- CONTROL "All directions",IDC_DIR_ALL,"Button",BS_AUTORADIOBUTTON | WS_GROUP,6,37,86,11
- CONTROL "Incoming only",IDC_DIR_IN,"Button",BS_AUTORADIOBUTTON,6,48,84,11
- CONTROL "Outgoing only",IDC_DIR_OUT,"Button",BS_AUTORADIOBUTTON,6,59,87,11
- CONTROL "All types",IDC_TYPE_ALL,"Button",BS_AUTORADIOBUTTON | WS_GROUP,104,38,89,10
- CONTROL "Mail addresses only",IDC_TYPE_MAIL,"Button",BS_AUTORADIOBUTTON,104,47,88,13
- CONTROL "Web addresses only",IDC_TYPE_WEB,"Button",BS_AUTORADIOBUTTON,104,58,89,13
- CONTROL "Deep search",IDC_WHOLE_MESSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,75,194,10
-END
-
-IDD_MAIN_DLG DIALOGEX 10, 10, 146, 52
-STYLE DS_SETFONT | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
-EXSTYLE WS_EX_CONTROLPARENT
-MENU IDR_MENU1
-FONT 8, "MS Sans Serif", 0, 0, 0x1
-BEGIN
- CONTROL "",IDC_MAIN,"RICHEDIT",TCS_HOTTRACK | TCS_VERTICAL | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,0,1,145,25
- LTEXT "Static",IDC_STATUS,0,42,145,10,SS_SUNKEN
- CONTROL "",IDC_MESSAGE,"RICHEDIT",TCS_HOTTRACK | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_VSCROLL | WS_TABSTOP,0,29,145,12
- CONTROL "",IDC_SPLITTER,"Static",SS_ENHMETAFILE,0,27,145,2
-END
-
-IDD_OPTIONS_DLG DIALOG 0, 0, 314, 240
-STYLE DS_SETFONT | WS_POPUP | WS_VISIBLE
-FONT 8, "MS Sans Serif"
-BEGIN
- GROUPBOX "Colour Select",IDC_STATIC,0,87,252,83
- LTEXT "Incoming messages",IDC_TXTIN,17,101,85,9
- PUSHBUTTON "Plugin Default",IDC_DEFAULT_IN,159,100,65,11
- GROUPBOX "Preview",IDC_STATIC,0,181,253,59
- LTEXT "Outgoing messages",IDC_TXTOUT,17,115,85,10
- LTEXT "Backgroundcolour",IDC_TXTBG,17,128,85,11
- PUSHBUTTON "Plugin Default",IDC_DEFAULT_OUT,159,113,65,11
- PUSHBUTTON "Plugin Default",IDC_DEFAULT_BG,159,126,65,11
- CONTROL "Use Miranda Settings",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,157,202,10
- CONTROL "",IDC_BACKGROUND,"ColourPicker",WS_TABSTOP,115,127,39,10
- CONTROL "",IDC_OUTGOING,"ColourPicker",WS_TABSTOP,115,114,39,10
- CONTROL "",IDC_INCOMING,"ColourPicker",WS_TABSTOP,115,101,39,10
- LTEXT "Textcolour",IDC_TXTTXT,18,141,85,11
- CONTROL "",IDC_TXT,"ColourPicker",WS_TABSTOP,115,140,39,10
- PUSHBUTTON "Plugin Default",IDC_DEFAULT_TXT,159,139,65,11
- CONTROL "",IDC_OPTIONS_RE,"RICHEDIT",TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED | WS_TABSTOP,5,191,242,44
- GROUPBOX "General Settings",IDC_STATIC,0,0,226,85
- CONTROL "Open links always in a new window",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,19,216,10
- CONTROL "Update list on new events",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,30,216,10
- CONTROL "Show whole Message on 'mouse over' event",IDC_CHECK4,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,41,216,10
- CONTROL "Save window position individually for each contact",IDC_CHECK5,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,53,217,10
- GROUPBOX "Show...",IDC_STATIC,227,0,86,85
- CONTROL "Date",IDC_CHECK6,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,232,13,78,10
- CONTROL "Parting line",IDC_CHECK7,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,232,24,78,10
- CONTROL "Timestamp",IDC_CHECK8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,232,35,78,10
- CONTROL "Direction",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,232,46,78,10
- CONTROL "Type",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,232,56,78,10
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_SEARCH_DLG, DIALOG
- BEGIN
- LEFTMARGIN, 4
- RIGHTMARGIN, 200
- TOPMARGIN, 1
- BOTTOMMARGIN, 99
- END
-
- IDD_MAIN_DLG, DIALOG
- BEGIN
- RIGHTMARGIN, 145
- TOPMARGIN, 1
- BOTTOMMARGIN, 51
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Menu
-//
-
-IDR_MENU1 MENU
-BEGIN
- POPUP "&File"
- BEGIN
- MENUITEM "&Save", IDM_SAVE
- MENUITEM SEPARATOR
- MENUITEM "&Close", IDM_CLOSE
- END
- POPUP "&Options"
- BEGIN
- POPUP "Message &Direction"
- BEGIN
- MENUITEM "&Outgoing Messages Only", IDM_DIR_OUT
- MENUITEM "&Incoming Messages Only", IDM_DIR_IN
- END
- MENUITEM SEPARATOR
- POPUP "Message &Type"
- BEGIN
- MENUITEM "&Webaddresses Only", IDM_TYPE_WEB
- MENUITEM "&Mail-Addresses Only", IDM_TYPE_MAIL
- END
- MENUITEM SEPARATOR
- MENUITEM "&Clear Search Results", IDM_CLEARSEARCH
- END
- MENUITEM "&Search", IDM_SEARCH
-END
-
-IDR_MENU2 MENU
-BEGIN
- POPUP "link"
- BEGIN
- MENUITEM "Open", IDM_LINK_OPEN
- MENUITEM "Open in new Window", IDM_LINK_OPENNEW
- MENUITEM "Copy to Clipboard", IDM_LINK_COPY
- MENUITEM "Show Message", IDM_SHOWMESSAGE
- END
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_LINKLISTICON ICON "linklist.ico"
-#endif // English (United States) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/historylinklistplus/linklist.sln b/historylinklistplus/linklist.sln deleted file mode 100644 index 735ab2d..0000000 --- a/historylinklistplus/linklist.sln +++ /dev/null @@ -1,38 +0,0 @@ -
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "linklist", "linklist.vcxproj", "{2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug Unicode|x32 = Debug Unicode|x32
- Debug Unicode|x64 = Debug Unicode|x64
- Debug|x32 = Debug|x32
- Debug|x64 = Debug|x64
- Release Unicode|x32 = Release Unicode|x32
- Release Unicode|x64 = Release Unicode|x64
- Release|x32 = Release|x32
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Debug Unicode|x32.ActiveCfg = Debug Unicode|Win32
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Debug Unicode|x32.Build.0 = Debug Unicode|Win32
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Debug Unicode|x64.Build.0 = Debug Unicode|x64
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Debug|x32.ActiveCfg = Debug|Win32
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Debug|x32.Build.0 = Debug|Win32
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Debug|x64.ActiveCfg = Debug|x64
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Debug|x64.Build.0 = Debug|x64
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Release Unicode|x32.ActiveCfg = Release Unicode|Win32
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Release Unicode|x32.Build.0 = Release Unicode|Win32
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Release Unicode|x64.Build.0 = Release Unicode|x64
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Release|x32.ActiveCfg = Release|Win32
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Release|x32.Build.0 = Release|Win32
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Release|x64.ActiveCfg = Release|x64
- {2F8A8F14-5758-4C59-F0B6-84C5A8D6A83F}.Release|x64.Build.0 = Release|x64
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/historylinklistplus/linklist.vcxproj b/historylinklistplus/linklist.vcxproj deleted file mode 100644 index 67d7ebf..0000000 --- a/historylinklistplus/linklist.vcxproj +++ /dev/null @@ -1,513 +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="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="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Unicode|Win32">
- <Configuration>Release Unicode</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Unicode|x64">
- <Configuration>Release Unicode</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <SccProjectName />
- <SccLocalPath />
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</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|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </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|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</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|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|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|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)'=='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|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>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <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 Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <LinkIncremental>false</LinkIncremental>
- <IntDir>$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">
- <OutDir>$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <LinkIncremental>false</LinkIncremental>
- <IntDir>$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>$(SolutionDir)\$(Configuration) $(Platform)/Plugins\</OutDir>
- <LinkIncremental>false</LinkIncremental>
- <IntDir>$(SolutionDir)\$(Configuration) $(Platform)/Obj/$(ProjectName)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">
- <OutDir>$(SolutionDir)\$(Configuration) $(Platform)/Plugins\</OutDir>
- <LinkIncremental>false</LinkIncremental>
- <IntDir>$(SolutionDir)\$(Configuration) $(Platform)/Obj/$(ProjectName)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <LinkIncremental>true</LinkIncremental>
- <IntDir>$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">
- <LinkIncremental>true</LinkIncremental>
- <OutDir>$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <IntDir>$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>$(SolutionDir)\$(Configuration) $(Platform)/Plugins\</OutDir>
- <RunCodeAnalysis>false</RunCodeAnalysis>
- <IntDir>$(SolutionDir)\$(Configuration) $(Platform)/Obj/$(ProjectName)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">
- <OutDir>$(SolutionDir)\$(Configuration) $(Platform)/Plugins\</OutDir>
- <RunCodeAnalysis>false</RunCodeAnalysis>
- <IntDir>$(SolutionDir)\$(Configuration) $(Platform)/Obj/$(ProjectName)\</IntDir>
- <LinkIncremental>true</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <StringPooling>true</StringPooling>
- <Optimization>Full</Optimization>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <WarningLevel>Level4</WarningLevel>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <OmitFramePointers>true</OmitFramePointers>
- <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
- <CompileAs>CompileAsC</CompileAs>
- </ClCompile>
- <Midl>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <TypeLibraryName>.\Release\linklist.tlb</TypeLibraryName>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <TargetEnvironment>Win32</TargetEnvironment>
- </Midl>
- <ResourceCompile>
- <Culture>0x0407</Culture>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Bscmake>
- <Link>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <LinkDLL>true</LinkDLL>
- <SubSystem>Windows</SubSystem>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <BaseAddress>
- </BaseAddress>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SetChecksum>true</SetChecksum>
- <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">
- <ClCompile>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <StringPooling>true</StringPooling>
- <Optimization>Full</Optimization>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <WarningLevel>Level4</WarningLevel>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <OmitFramePointers>true</OmitFramePointers>
- <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
- <CompileAs>CompileAsC</CompileAs>
- </ClCompile>
- <Midl>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <TypeLibraryName>.\Release\linklist.tlb</TypeLibraryName>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <TargetEnvironment>Win32</TargetEnvironment>
- </Midl>
- <ResourceCompile>
- <Culture>0x0407</Culture>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Bscmake>
- <Link>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <LinkDLL>true</LinkDLL>
- <SubSystem>Windows</SubSystem>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <BaseAddress>
- </BaseAddress>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SetChecksum>true</SetChecksum>
- <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <StringPooling>true</StringPooling>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <Optimization>Full</Optimization>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <WarningLevel>Level3</WarningLevel>
- <PreprocessorDefinitions>WIN32;_WIN64;NDEBUG;_WINDOWS;_USRDLL;LINKLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AssemblerListingLocation>.\Release\</AssemblerListingLocation>
- <BrowseInformation>true</BrowseInformation>
- <PrecompiledHeaderOutputFile>.\Release\linklist.pch</PrecompiledHeaderOutputFile>
- <ObjectFileName>.\Release\</ObjectFileName>
- <ProgramDataBaseFileName>.\Release\</ProgramDataBaseFileName>
- <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <OmitFramePointers>true</OmitFramePointers>
- <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </ClCompile>
- <Midl>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <TypeLibraryName>.\Release\linklist.tlb</TypeLibraryName>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- </Midl>
- <ResourceCompile>
- <Culture>0x0407</Culture>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Bscmake>
- <Link>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <LinkDLL>true</LinkDLL>
- <SubSystem>Console</SubSystem>
- <OutputFile>../MirandaTest/plugins/linklist.dll</OutputFile>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <BaseAddress>0x31020000</BaseAddress>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">
- <ClCompile>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <StringPooling>true</StringPooling>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <Optimization>Full</Optimization>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <WarningLevel>Level3</WarningLevel>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LINKLIST_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <OmitFramePointers>true</OmitFramePointers>
- <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
- <CompileAs>CompileAsC</CompileAs>
- </ClCompile>
- <Midl>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <TypeLibraryName>.\Release\linklist.tlb</TypeLibraryName>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- </Midl>
- <ResourceCompile>
- <Culture>0x0407</Culture>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Bscmake>
- <Link>
- <LinkDLL>true</LinkDLL>
- <SubSystem>Windows</SubSystem>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SetChecksum>true</SetChecksum>
- <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <InlineFunctionExpansion>Default</InlineFunctionExpansion>
- <FunctionLevelLinking>false</FunctionLevelLinking>
- <Optimization>Disabled</Optimization>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <WarningLevel>Level4</WarningLevel>
- <MinimalRebuild>true</MinimalRebuild>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <CompileAs>CompileAsC</CompileAs>
- </ClCompile>
- <Midl>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <TypeLibraryName>.\Debug\linklist.tlb</TypeLibraryName>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <TargetEnvironment>Win32</TargetEnvironment>
- </Midl>
- <ResourceCompile>
- <Culture>0x0407</Culture>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Bscmake>
- <Link>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <LinkDLL>true</LinkDLL>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <BaseAddress>
- </BaseAddress>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">
- <ClCompile>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <FunctionLevelLinking>false</FunctionLevelLinking>
- <Optimization>Disabled</Optimization>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <WarningLevel>Level4</WarningLevel>
- <MinimalRebuild>true</MinimalRebuild>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <CompileAs>CompileAsC</CompileAs>
- </ClCompile>
- <Midl>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <TypeLibraryName>.\Debug\linklist.tlb</TypeLibraryName>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <TargetEnvironment>Win32</TargetEnvironment>
- </Midl>
- <ResourceCompile>
- <Culture>0x0407</Culture>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Bscmake>
- <Link>
- <LinkDLL>true</LinkDLL>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <InlineFunctionExpansion>Default</InlineFunctionExpansion>
- <Optimization>Disabled</Optimization>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <PreprocessorDefinitions>WIN32;_WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <EnablePREfast>false</EnablePREfast>
- <MinimalRebuild>true</MinimalRebuild>
- </ClCompile>
- <Midl>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <TypeLibraryName>.\Debug\linklist.tlb</TypeLibraryName>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- </Midl>
- <ResourceCompile>
- <Culture>0x0407</Culture>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Bscmake>
- <Link>
- <LinkDLL>true</LinkDLL>
- <SubSystem>Windows</SubSystem>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <BaseAddress>
- </BaseAddress>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">
- <ClCompile>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <PreprocessorDefinitions>WIN32;_WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <EnablePREfast>false</EnablePREfast>
- <Optimization>Disabled</Optimization>
- <MinimalRebuild>true</MinimalRebuild>
- <CompileAs>CompileAsC</CompileAs>
- </ClCompile>
- <Midl>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <TypeLibraryName>.\Debug\linklist.tlb</TypeLibraryName>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- </Midl>
- <ResourceCompile>
- <Culture>0x0407</Culture>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </Bscmake>
- <Link>
- <LinkDLL>true</LinkDLL>
- <SubSystem>Windows</SubSystem>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <BaseAddress>
- </BaseAddress>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="linklist.c" />
- <ClCompile Include="linklist_dlg.c" />
- <ClCompile Include="linklist_fct.c" />
- <ClCompile Include="utils.c" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="language.h" />
- <ClInclude Include="linklist.h" />
- <ClInclude Include="linklist_dlg.h" />
- <ClInclude Include="linklist_fct.h" />
- <ClInclude Include="resource.h" />
- <ClInclude Include="utils.h" />
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="linklist.ico" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="linklist.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/historylinklistplus/linklist.vcxproj.filters b/historylinklistplus/linklist.vcxproj.filters deleted file mode 100644 index 9e8698f..0000000 --- a/historylinklistplus/linklist.vcxproj.filters +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Header Files">
- <UniqueIdentifier>{b513835e-8c78-44d9-a70f-009617185cda}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl</Extensions>
- </Filter>
- <Filter Include="Source Files">
- <UniqueIdentifier>{6f6d64ac-5d4c-4691-b0a0-4651c54d6f14}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
- </Filter>
- <Filter Include="Resources">
- <UniqueIdentifier>{699fb440-5ca0-4405-a37a-c18d0fa37251}</UniqueIdentifier>
- <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="linklist.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="linklist_dlg.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="utils.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="linklist_fct.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="linklist.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="linklist_dlg.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="linklist_fct.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="language.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="utils.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="linklist.rc">
- <Filter>Resources</Filter>
- </ResourceCompile>
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="linklist.ico">
- <Filter>Resources</Filter>
- </CustomBuild>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/historylinklistplus/linklist_dlg.c b/historylinklistplus/linklist_dlg.c deleted file mode 100644 index 3cd20ac..0000000 --- a/historylinklistplus/linklist_dlg.c +++ /dev/null @@ -1,1002 +0,0 @@ -// History Linklist Plus
-// Copyright (C) 2010 Thomas Wendel, gureedo
-//
-// 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-#include <windows.h>
-#include <commctrl.h>
-#include "resource.h"
-#ifdef _DEBUG
-#include <crtdbg.h>
-#endif
-
-// Miranda SDK Includes
-#pragma warning(disable:4996)
-#pragma warning(disable:4100)
-#include <newpluginapi.h>
-#include <m_clist.h>
-#include <m_database.h>
-#include <m_utils.h>
-#include <m_langpack.h>
-#pragma warning(default:4100)
-#pragma warning(default:4996)
-
-#include "linklist.h"
-#include "linklist_dlg.h"
-#include "linklist_fct.h"
-#include "language.h"
-
-extern HINSTANCE hInst;
-extern HANDLE hWindowList;
-extern PLUGININFO pluginInfo;
-extern HCURSOR splitCursor;
-
-MYCOLOURSET colourSet;
-WNDPROC wndSplitterProc;
-LISTOPTIONS options;
-/*
-MainDlgProc handles messages to the main dialog box
-*/
-INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
-{
- ENLINK* pENLink;
- DIALOGPARAM *DlgParam;
- HMENU listMenu = GetMenu(hDlg);
-
- DlgParam = (DIALOGPARAM *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
- switch ( msg )
- {
- case WM_INITDIALOG:
- {
- HANDLE hContact;
- TCHAR title[256];
- TCHAR filter[FILTERTEXT];
- RECT rc;
- POINT pt;
-
- SetWindowLongPtr(hDlg, GWLP_USERDATA, lParam);
- DlgParam = (DIALOGPARAM *)lParam;
- TranslateDialogDefault(hDlg);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)listMenu, 0);
-
- if ( DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, 0x00) == 0x00 )
- hContact = NULL;
- else
- hContact = DlgParam->hContact;
-
- if ( DBGetContactSettingByte(hContact, LINKLIST_MODULE, LINKLIST_FIRST, 0) == 0 )
- {
- // First use of this plugin! Set default size!
- DBWriteContactSettingDword(hContact, LINKLIST_MODULE, "LinklistWidth", 400);
- DBWriteContactSettingDword(hContact, LINKLIST_MODULE, "LinklistHeight", 450);
- DBWriteContactSettingDword(hContact, LINKLIST_MODULE, "LinklistX", 0);
- DBWriteContactSettingDword(hContact, LINKLIST_MODULE, "LinklistY", 0);
-
- DBWriteContactSettingByte(hContact, LINKLIST_MODULE, LINKLIST_FIRST, 1);
- }
-
- DlgParam->splitterPosNew = (int)DBGetContactSettingDword(hContact, LINKLIST_MODULE, LINKLIST_SPLITPOS, -1);
-
- GetWindowRect(GetDlgItem(hDlg, IDC_MAIN), &rc);
- DlgParam->minSize.cx = rc.right - rc.left;
- DlgParam->minSize.cy = rc.bottom - rc.top;
-
- GetWindowRect(GetDlgItem(hDlg, IDC_SPLITTER), &rc);
- pt.y = (rc.top + rc.bottom) / 2;
- pt.x = 0;
- ScreenToClient(hDlg, &pt);
-
- DlgParam->splitterPosOld = rc.bottom - 20 - pt.y;
- if(DlgParam->splitterPosNew == -1)
- DlgParam->splitterPosNew = DlgParam->splitterPosOld;
-
- Utils_RestoreWindowPosition(hDlg, hContact, LINKLIST_MODULE, "Linklist");
-
- SetClassLongPtr(hDlg, GCLP_HICON, (LONG_PTR)LoadIcon(hInst, MAKEINTRESOURCE(IDI_LINKLISTICON)));
- WindowList_Add(hWindowList, hDlg, DlgParam->hContact);
- mir_sntprintf(title, _countof(title), _T("%s [%s]"), TranslateT("Linklist Plugin"), (LPCTSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)DlgParam->hContact, GCDNF_TCHAR));
- SetWindowText(hDlg, title);
- GetFilterText(listMenu, filter, _countof(filter));
- SetDlgItemText(hDlg, IDC_STATUS, filter);
-
- wndSplitterProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hDlg, IDC_SPLITTER), GWLP_WNDPROC, (LONG_PTR)SplitterProc);
-
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETEVENTMASK, 0, (LPARAM)ENM_LINK );
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_AUTOURLDETECT, TRUE, 0 );
- // This is used in srmm... and I think he knew what he did... :)
- SendDlgItemMessage(hDlg, IDC_MAIN, EM_LIMITTEXT, (WPARAM)-1, 0);
-
- WriteLinkList( hDlg, WLL_ALL, (LISTELEMENT *)DlgParam->listStart, NULL, 0);
-
- return TRUE;
- }
-
- // open browser an load url if link is pressed
- // found at
- // http://www.tech-archive.net/Archive/Development/microsoft.public.win32.programmer.ui/2004-03/0133.html
- //
- // Popup menu on right mouse button is mainly taken from the miranda
- // send/receive messaging plugin.
- case WM_NOTIFY:
- {
- LPNMHDR lpNmhdr;
-
- lpNmhdr = (LPNMHDR)lParam;
- if ( lpNmhdr->code == EN_LINK )
- {
- LPTSTR link;
- char shEvent[10+1];
- BYTE openNewWindow, mouseEvent;
-
- ZeroMemory(shEvent, _countof(shEvent));
-
- pENLink = (ENLINK*)lpNmhdr;
-
- mouseEvent = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_MOUSE_EVENT, 0xFF);
-
- if ( pENLink->msg == WM_MOUSEMOVE && mouseEvent == 0x01 )
- {
- CopyMemory(&DlgParam->chrg, &pENLink->chrg, sizeof(CHARRANGE));
- SendDlgItemMessage(hDlg, IDC_MAIN, EM_EXSETSEL, 0, (LPARAM)&pENLink->chrg);
- WriteMessage(hDlg, DlgParam->listStart, SendDlgItemMessage(hDlg, IDC_MAIN, EM_LINEFROMCHAR, -1, 0));
- }
- else if ( pENLink->msg == WM_LBUTTONUP )
- {
- link = (LPTSTR)malloc( (pENLink->chrg.cpMax-pENLink->chrg.cpMin+2)*sizeof(TCHAR) );
- SendDlgItemMessage(hDlg, IDC_MAIN, EM_EXSETSEL, 0, (LPARAM)(&pENLink->chrg));
- SendDlgItemMessage(hDlg, IDC_MAIN, EM_GETSELTEXT, 0, (LPARAM)link);
-
- if ( _tcsstr(link, _T("mailto:")) != NULL )
- ShellExecute(HWND_TOP, NULL, link, NULL, NULL, SW_SHOWNORMAL);
- else
- {
- openNewWindow = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, 0xFF);
- if ( openNewWindow == 0xFF )
- openNewWindow = 0;
-
- CallService(MS_UTILS_OPENURL, openNewWindow, (LPARAM)link);
- }
- free(link);
- }
- else if ( pENLink->msg == WM_RBUTTONDOWN )
- {
- HMENU hPopup, hSubMenu;
- POINT pt;
- hPopup = LoadMenu(hInst, MAKEINTRESOURCE(IDR_MENU2));
- hSubMenu = GetSubMenu(hPopup, 0);
-
- // Disable Menuoption if "mouse over" events are active
- mouseEvent = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_MOUSE_EVENT, 0xFF);
- if (mouseEvent == 0x01 )
- EnableMenuItem(hSubMenu, IDM_SHOWMESSAGE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
-
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)hSubMenu, 0);
-
- link = (LPTSTR)malloc( (pENLink->chrg.cpMax-pENLink->chrg.cpMin+2)*sizeof(TCHAR) );
- SendDlgItemMessage(hDlg, IDC_MAIN, EM_EXSETSEL, 0, (LPARAM)(&(pENLink->chrg)));
- SendDlgItemMessage(hDlg, IDC_MAIN, EM_GETSELTEXT, 0, (LPARAM)link);
-
- pt.x = (short) LOWORD(((ENLINK *) lParam)->lParam);
- pt.y = (short) HIWORD(((ENLINK *) lParam)->lParam);
- ClientToScreen(((NMHDR *) lParam)->hwndFrom, &pt);
-
- switch ( TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hDlg, NULL) )
- {
- case IDM_LINK_OPEN:
- {
- if ( _tcsstr(link, _T("mailto:")) != NULL )
- ShellExecute(HWND_TOP, NULL, link, NULL, NULL, SW_SHOWNORMAL);
- else
- CallService(MS_UTILS_OPENURL, 0, (LPARAM)link);
-
- break;
- }
- case IDM_LINK_OPENNEW:
- {
- if ( _tcsstr(link, _T("mailto:")) != NULL )
- ShellExecute(HWND_TOP, NULL, link, NULL, NULL, SW_SHOWNORMAL);
- else
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)link);
-
- break;
- }
- case IDM_LINK_COPY:
- {
- size_t dataLen;
- HGLOBAL hData;
- if ( !OpenClipboard(hDlg) )
- break;
- EmptyClipboard();
-
- dataLen = (_tcslen(link)+1)*sizeof(TCHAR);
- hData = GlobalAlloc(GMEM_MOVEABLE, dataLen);
- _tcscpy_s((LPTSTR)GlobalLock(hData), dataLen/2, link);
- GlobalUnlock(hData);
- SetClipboardData(CF_TEXT, hData);
- CloseClipboard();
- break;
- }
- case IDM_SHOWMESSAGE:
- {
- WriteMessage(hDlg, DlgParam->listStart, SendDlgItemMessage(hDlg, IDC_MAIN, EM_LINEFROMCHAR, -1, 0));
- break;
- }
- }
- free(link);
- DestroyMenu(hPopup);
- }
- }
- break;
- }
-
- case WM_COMMAND:
- {
- TCHAR filter[40];
-
- // open Search Box
- if( wParam == IDM_SEARCH )
- {
-
- HWND hWndSearchDlg;
- if ( DlgParam != 0 )
- {
- hWndSearchDlg = CreateDialogParam( hInst, MAKEINTRESOURCE(IDD_SEARCH_DLG), hDlg, SearchDlgProc, (LPARAM)DlgParam);
- EnableMenuItem(listMenu, IDM_SEARCH, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
- ShowWindow(hWndSearchDlg, SW_SHOW);
- SetFocus(GetDlgItem(hWndSearchDlg, IDC_SEARCHSTRING));
- }
-
- break;
- }
- // clear search results
- else if ( wParam == IDM_CLEARSEARCH )
- {
- GetFilterText(listMenu, filter, _countof(filter));
- SetDlgItemText(hDlg, IDC_STATUS, filter);
- SetDlgItemText(hDlg, IDC_MAIN, _T(""));
- WriteLinkList( hDlg, GetFlags(listMenu), DlgParam->listStart, NULL, 0);
- }
- // save button
- else if ( wParam == IDM_SAVE )
- {
- SaveEditAsStream(hDlg);
- SetFocus(GetDlgItem( hDlg, IDC_MAIN ));
- break;
- }
- // Esc or Close pressed
- else if ( wParam == IDCANCEL || wParam == IDM_CLOSE )
- {
- SendMessage(hDlg, WM_CLOSE, 0, 0);
- break;
- }
-
- // view only incoming messages
- else if( wParam == IDM_DIR_IN )
- {
- GetFilterText(listMenu, filter, _countof(filter));
- SetDlgItemText(hDlg, IDC_STATUS, filter);
-
- // not possible if search dialog is open
- if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED) )
- {
- SetDlgItemText(hDlg, IDC_MAIN, _T(""));
-
- if ( GetMenuState(listMenu, IDM_DIR_IN, MF_BYCOMMAND) == MF_CHECKED )
- {
- CheckMenuItem(listMenu, IDM_DIR_IN, MF_UNCHECKED);
- WriteLinkList( hDlg, GetFlags(listMenu), DlgParam->listStart, NULL, 0);
- }
- else
- {
- CheckMenuItem(listMenu, IDM_DIR_IN, MF_CHECKED);
- CheckMenuItem(listMenu, IDM_DIR_OUT, MF_UNCHECKED);
- WriteLinkList( hDlg, GetFlags(listMenu), DlgParam->listStart, NULL, 0);
- }
-
- GetFilterText(GetMenu(hDlg), filter, _countof(filter));
- SetDlgItemText(hDlg, IDC_STATUS, filter);
- }
- break;
- }
-
- // view only outgoing messages
- else if ( wParam == IDM_DIR_OUT )
- {
- GetFilterText(listMenu, filter, _countof(filter));
- SetDlgItemText(hDlg, IDC_STATUS, filter);
-
- // not possible if search dialog is open
- if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED) )
- {
- SetDlgItemText(hDlg, IDC_MAIN, _T(""));
- if ( GetMenuState(listMenu, IDM_DIR_OUT, MF_BYCOMMAND) == MF_CHECKED )
- {
- CheckMenuItem(listMenu, IDM_DIR_OUT, MF_UNCHECKED);
- WriteLinkList( hDlg, GetFlags(listMenu), DlgParam->listStart, NULL, 0);
- }
- else
- {
- CheckMenuItem(listMenu, IDM_DIR_OUT, MF_CHECKED);
- CheckMenuItem(listMenu, IDM_DIR_IN, MF_UNCHECKED);
- WriteLinkList( hDlg, GetFlags(listMenu), DlgParam->listStart, NULL, 0);
- }
-
- GetFilterText(listMenu, filter, _countof(filter));
- SetDlgItemText(hDlg, IDC_STATUS, filter);
- }
- break;
- }
-
- // view only e-mailaddresses
- else if ( wParam == IDM_TYPE_WEB )
- {
- GetFilterText(listMenu, filter, _countof(filter));
- SetDlgItemText(hDlg, IDC_STATUS, filter);
-
- // not possible if search dialog is open
- if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED) )
- {
- SetDlgItemText(hDlg, IDC_MAIN, _T(""));
- if ( GetMenuState(listMenu, IDM_TYPE_WEB, MF_BYCOMMAND) == MF_CHECKED )
- {
- CheckMenuItem(listMenu, IDM_TYPE_WEB, MF_UNCHECKED);
- WriteLinkList( hDlg, GetFlags(listMenu), DlgParam->listStart, NULL, 0);
- }
- else
- {
- CheckMenuItem(listMenu, IDM_TYPE_WEB, MF_CHECKED);
- CheckMenuItem(listMenu, IDM_TYPE_MAIL, MF_UNCHECKED);
- WriteLinkList( hDlg, GetFlags(listMenu), DlgParam->listStart, NULL, 0);
- }
-
- GetFilterText(listMenu, filter, _countof(filter));
- SetDlgItemText(hDlg, IDC_STATUS, filter);
- }
- break;
- }
-
- // view only URLs
- else if ( wParam == IDM_TYPE_MAIL )
- {
- // not possible if search dialog is open
- if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED) )
- {
- SetDlgItemText(hDlg, IDC_MAIN, _T(""));
- if ( GetMenuState(listMenu, IDM_TYPE_MAIL, MF_BYCOMMAND) == MF_CHECKED )
- {
- CheckMenuItem(listMenu, IDM_TYPE_MAIL, MF_UNCHECKED);
- WriteLinkList( hDlg, GetFlags(listMenu), DlgParam->listStart, NULL, 0);
- }
- else
- {
- CheckMenuItem(listMenu, IDM_TYPE_MAIL, MF_CHECKED);
- CheckMenuItem(listMenu, IDM_TYPE_WEB, MF_UNCHECKED);
- WriteLinkList( hDlg, GetFlags(listMenu), DlgParam->listStart, NULL, 0);
- }
-
- GetFilterText(listMenu, filter, _countof(filter));
- SetDlgItemText(hDlg, IDC_STATUS, filter);
- }
- break;
- }
-
-
- break;
- }
-
- // Taken from srmm.
- // Btw: The longer I searched the source of this plugin
- // to learn how things work, the more I became a fan of
- // the programmer!
- case WM_GETMINMAXINFO:
- {
- MINMAXINFO *mmi = (MINMAXINFO *)lParam;
- RECT rcWindow, rcMain;
- GetWindowRect(hDlg, &rcWindow);
- GetWindowRect(GetDlgItem(hDlg, IDC_MAIN), &rcMain);
- mmi->ptMinTrackSize.x = rcWindow.right - rcWindow.left - ((rcMain.right - rcMain.left) - DlgParam->minSize.cx);
- mmi->ptMinTrackSize.y = rcWindow.bottom - rcWindow.top - ((rcMain.bottom - rcMain.top) - DlgParam->minSize.cy);
- return 0;
- }
-
- case WM_SIZE:
- {
- UTILRESIZEDIALOG urd = {0};
-
- urd.cbSize = sizeof(urd);
- urd.hwndDlg = hDlg;
- urd.hInstance = hInst;
- urd.lpTemplate = MAKEINTRESOURCEA(IDD_MAIN_DLG);
- urd.pfnResizer = LinklistResizer;
- urd.lParam = (LPARAM)DlgParam;
- CallService(MS_UTILS_RESIZEDIALOG, 0, (LPARAM)&urd);
-
- // To get some scrollbars if needed...
- RedrawWindow(GetDlgItem(hDlg, IDC_MAIN), NULL, NULL, RDW_INVALIDATE);
- RedrawWindow(GetDlgItem(hDlg, IDC_MESSAGE), NULL, NULL, RDW_INVALIDATE);
- break;
- }
-
- case DM_LINKSPLITTER:
- {
- POINT pt;
- RECT rc;
- int splitPosOld;
-
- GetClientRect(hDlg, &rc);
- pt.x = 0;
- pt.y = wParam;
- ScreenToClient(hDlg, &pt);
-
- splitPosOld = DlgParam->splitterPosNew;
- DlgParam->splitterPosNew = rc.bottom - pt.y;
-
- GetWindowRect(GetDlgItem(hDlg, IDC_MESSAGE), &rc);
- if (rc.bottom - rc.top + (DlgParam->splitterPosNew - splitPosOld) < 0)
- DlgParam->splitterPosNew = splitPosOld + 0 - (rc.bottom - rc.top);
-
- GetWindowRect(GetDlgItem(hDlg, IDC_MAIN), &rc);
- if (rc.bottom - rc.top - (DlgParam->splitterPosNew - splitPosOld) < DlgParam->minSize.cy)
- DlgParam->splitterPosNew = splitPosOld - DlgParam->minSize.cy + (rc.bottom - rc.top);
-
- SendMessage(hDlg, WM_SIZE, 0, 0);
- break;
- }
-
- case WM_CLOSE:
- {
- DestroyWindow(hDlg);
- break;
- }
-
- case WM_DESTROY:
- {
- HANDLE hContact;
- if ( DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, 0x00) == 0x00 )
- hContact = NULL;
- else
- hContact = DlgParam->hContact;
- Utils_SaveWindowPosition(hDlg, hContact, LINKLIST_MODULE, "Linklist");
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_SPLITPOS, DlgParam->splitterPosNew);
- RemoveList(DlgParam->listStart);
- free(DlgParam);
- // Remove entry from Window list
- WindowList_Remove(hWindowList, hDlg);
- break;
- }
-
- }
- return FALSE;
-}
-
-/*
-This function handles the search dialog messages
-*/
-INT_PTR WINAPI SearchDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
-{
- HWND hListDlg;
- DIALOGPARAM *DlgParam;
-
- DlgParam = (DIALOGPARAM *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
- switch( msg )
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hDlg);
- SetWindowLongPtr(hDlg, GWLP_USERDATA, (LPARAM)lParam);
- SetWindowText(hDlg, TranslateT(TXT_SEARCH));
- SendDlgItemMessage(hDlg, IDC_DIR_ALL, BM_SETCHECK, BST_CHECKED, 0);
- SendDlgItemMessage(hDlg, IDC_TYPE_ALL, BM_SETCHECK, BST_CHECKED, 0);
- return TRUE;
- }
- case WM_COMMAND:
- {
- HWND hWndMain;
- hWndMain = WindowList_Find(hWindowList,DlgParam->hContact);
-
- if ( wParam == IDCLOSE || wParam == IDCANCEL )
- {
- HMENU listMenu = GetMenu(hWndMain);
- EnableMenuItem(listMenu, 101, MF_BYCOMMAND | MF_ENABLED);
- DestroyWindow(hDlg);
- return TRUE;
- }
- else if ( wParam == IDSEARCH )
- {
- BYTE flags = 0x00;
- TCHAR filter[FILTERTEXT];
- LPTSTR buffer;
- int length;
-
- hListDlg = WindowList_Find(hWindowList, DlgParam->hContact);
- if ( hListDlg )
- {
- SetDlgItemText(hListDlg, IDC_MAIN, _T(""));
-
- if ( SendDlgItemMessage(hDlg, IDC_TYPE_WEB, BM_GETCHECK, 0, 0) == BST_UNCHECKED )
- flags = flags | WLL_MAIL;
-
- if ( SendDlgItemMessage(hDlg, IDC_TYPE_MAIL, BM_GETCHECK, 0, 0) == BST_UNCHECKED )
- flags = flags | WLL_URL;
-
- if ( SendDlgItemMessage(hDlg, IDC_DIR_IN, BM_GETCHECK, 0, 0) == BST_UNCHECKED )
- flags = flags | WLL_OUT;
-
- if ( SendDlgItemMessage(hDlg, IDC_DIR_OUT, BM_GETCHECK, 0, 0) == BST_UNCHECKED )
- flags = flags | WLL_IN;
-
- if ( SendDlgItemMessage(hDlg, IDC_WHOLE_MESSAGE, BM_GETCHECK, 0, 0) == BST_CHECKED )
- flags = flags | SLL_DEEP;
-
- length = GetWindowTextLength(GetDlgItem(hDlg, IDC_SEARCHSTRING))+1;
- buffer = (LPTSTR)malloc( length*sizeof(TCHAR) );
- GetDlgItemText(hDlg, IDC_SEARCHSTRING, buffer, length);
- WriteLinkList(hListDlg, flags, DlgParam->listStart, buffer, 0);
- free(buffer);
-
- mir_sntprintf(filter, _countof(filter), _T("%s: %s"), TranslateT(TXT_FILTER), TranslateT(TXT_SEARCHFILTER));
- SetDlgItemText(hWndMain, IDC_STATUS, filter);
- }
- break;
- }
- }
- }
- return FALSE;
-}
-
-
-/*
-This function handles the options dialog messages
-*/
-INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
-{
- BYTE useDefault;
- int mCol;
-
- switch(message)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hDlg);
- useDefault = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0xFF);
- if ( useDefault == 0x01 )
- {
- mCol = GetMirandaColour(&colourSet);
- if(mCol == 0)
- {
- SendDlgItemMessage(hDlg, IDC_CHECK1, BM_SETCHECK, BST_CHECKED, 0);
- EnableWindow(GetDlgItem(hDlg, IDC_INCOMING), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_OUTGOING), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_BACKGROUND), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_TXT), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_DEFAULT_IN), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_DEFAULT_OUT), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_DEFAULT_BG), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_DEFAULT_TXT), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_TXTIN), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_TXTOUT), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_TXTBG), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_TXTTXT), FALSE);
- }
- else
- useDefault = 0x00;
-
- }
- if (useDefault == 0x00 )
- {
- GetDBColour(&colourSet);
- SendDlgItemMessage(hDlg, IDC_CHECK1, BM_SETCHECK, BST_UNCHECKED, 0);
- SendDlgItemMessage(hDlg, IDC_INCOMING, CPM_SETCOLOUR, 0, colourSet.incoming);
- SendDlgItemMessage(hDlg, IDC_OUTGOING, CPM_SETCOLOUR, 0, colourSet.outgoing);
- SendDlgItemMessage(hDlg, IDC_BACKGROUND, CPM_SETCOLOUR, 0, colourSet.background);
- SendDlgItemMessage(hDlg, IDC_TXT, CPM_SETCOLOUR, 0, colourSet.text);
- }
-
- //Shifted to the end of this function
- //WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text);
-
- // Init variables with current values from DB
- GetListOptions(&options);
-
- if(options.openNewWindow == 0x00)
- SendDlgItemMessage(hDlg, IDC_CHECK2, BM_SETCHECK, BST_UNCHECKED, 0);
- if(options.openNewWindow == 0x01)
- SendDlgItemMessage(hDlg, IDC_CHECK2, BM_SETCHECK, BST_CHECKED, 0);
-
- if(options.updateWindow == 0x00)
- SendDlgItemMessage(hDlg, IDC_CHECK3, BM_SETCHECK, BST_UNCHECKED, 0);
- if(options.updateWindow == 0x01)
- SendDlgItemMessage(hDlg, IDC_CHECK3, BM_SETCHECK, BST_CHECKED, 0);
-
- if(options.mouseEvent == 0x00)
- SendDlgItemMessage(hDlg, IDC_CHECK4, BM_SETCHECK, BST_UNCHECKED, 0);
- if(options.mouseEvent == 0x01)
- SendDlgItemMessage(hDlg, IDC_CHECK4, BM_SETCHECK, BST_CHECKED, 0);
-
- if(options.saveSpecial == 0x00)
- SendDlgItemMessage(hDlg, IDC_CHECK5, BM_SETCHECK, BST_UNCHECKED, 0);
- if(options.saveSpecial == 0x01)
- SendDlgItemMessage(hDlg, IDC_CHECK5, BM_SETCHECK, BST_CHECKED, 0);
-
- if(options.showDate == 0x00)
- SendDlgItemMessage(hDlg, IDC_CHECK6, BM_SETCHECK, BST_UNCHECKED, 0);
- if(options.showDate == 0x01)
- SendDlgItemMessage(hDlg, IDC_CHECK6, BM_SETCHECK, BST_CHECKED, 0);
-
- if(options.showLine == 0x00)
- SendDlgItemMessage(hDlg, IDC_CHECK7, BM_SETCHECK, BST_UNCHECKED, 0);
- if(options.showLine == 0x01)
- SendDlgItemMessage(hDlg, IDC_CHECK7, BM_SETCHECK, BST_CHECKED, 0);
-
- if(options.showTime == 0x00)
- SendDlgItemMessage(hDlg, IDC_CHECK8, BM_SETCHECK, BST_UNCHECKED, 0);
- if(options.showTime == 0x01)
- SendDlgItemMessage(hDlg, IDC_CHECK8, BM_SETCHECK, BST_CHECKED, 0);
-
- if(options.showDirection == 0x00)
- SendDlgItemMessage(hDlg, IDC_CHECK9, BM_SETCHECK, BST_UNCHECKED, 0);
- if(options.showDirection == 0x01)
- SendDlgItemMessage(hDlg, IDC_CHECK9, BM_SETCHECK, BST_CHECKED, 0);
-
- if(options.showType == 0x00)
- SendDlgItemMessage(hDlg, IDC_CHECK10, BM_SETCHECK, BST_UNCHECKED, 0);
- if(options.showType == 0x01)
- SendDlgItemMessage(hDlg, IDC_CHECK10, BM_SETCHECK, BST_CHECKED, 0);
-
- // Write example window
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
-
- return TRUE;
- }
- case WM_COMMAND:
- {
- if ( LOWORD(wParam) == IDC_DEFAULT_IN )
- {
- colourSet.incoming = IN_COL_DEF;
- SendDlgItemMessage(hDlg, IDC_INCOMING, CPM_SETCOLOUR, 0, colourSet.incoming);
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- break;
- }
- if ( LOWORD(wParam) == IDC_DEFAULT_OUT )
- {
- colourSet.outgoing = OUT_COL_DEF;
- SendDlgItemMessage(hDlg, IDC_OUTGOING, CPM_SETCOLOUR, 0, colourSet.outgoing);
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- break;
- }
- if ( LOWORD(wParam) == IDC_DEFAULT_BG )
- {
- colourSet.background = BG_COL_DEF;
- SendDlgItemMessage(hDlg, IDC_BACKGROUND, CPM_SETCOLOUR, 0, colourSet.background);
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- break;
- }
- if ( LOWORD(wParam) == IDC_DEFAULT_TXT )
- {
- colourSet.text = TXT_COL_DEF;
- SendDlgItemMessage(hDlg, IDC_TXT, CPM_SETCOLOUR, 0, colourSet.text);
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- break;
- }
- if ( LOWORD(wParam) == IDC_INCOMING )
- {
- colourSet.incoming = SendDlgItemMessage(hDlg, IDC_INCOMING, CPM_GETCOLOUR, 0, 0);
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- break;
- }
- if ( LOWORD(wParam) == IDC_OUTGOING )
- {
- colourSet.outgoing = SendDlgItemMessage(hDlg, IDC_OUTGOING, CPM_GETCOLOUR, 0, 0);
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- break;
- }
- if ( LOWORD(wParam) == IDC_BACKGROUND )
- {
- colourSet.background = SendDlgItemMessage(hDlg, IDC_BACKGROUND, CPM_GETCOLOUR, 0, 0);
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- break;
- }
- if ( LOWORD(wParam) == IDC_TXT )
- {
- colourSet.text = SendDlgItemMessage(hDlg, IDC_TXT, CPM_GETCOLOUR, 0, 0);
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- break;
- }
- if ( LOWORD(wParam) == IDC_CHECK1 )
- {
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- if ( SendDlgItemMessage(hDlg, IDC_CHECK1, BM_GETCHECK, 0, 0) == BST_UNCHECKED )
- {
- EnableWindow(GetDlgItem(hDlg, IDC_INCOMING), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_OUTGOING), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_BACKGROUND), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_TXT), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_DEFAULT_IN), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_DEFAULT_OUT), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_DEFAULT_BG), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_DEFAULT_TXT), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_TXTIN), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_TXTOUT), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_TXTBG), TRUE);
- EnableWindow(GetDlgItem(hDlg, IDC_TXTTXT), TRUE);
- GetDBColour(&colourSet);
- SendDlgItemMessage(hDlg, IDC_INCOMING, CPM_SETCOLOUR, 0, colourSet.incoming);
- SendDlgItemMessage(hDlg, IDC_OUTGOING, CPM_SETCOLOUR, 0, colourSet.outgoing);
- SendDlgItemMessage(hDlg, IDC_BACKGROUND, CPM_SETCOLOUR, 0, colourSet.background);
- SendDlgItemMessage(hDlg, IDC_TXT, CPM_SETCOLOUR, 0, colourSet.text);
- }
- else
- {
- mCol = GetMirandaColour(&colourSet);
- if(mCol == 1)
- {
- MessageBox(NULL, TranslateT(TXT_NOSETTING), TranslateT(TXT_ERROR), MB_OK | MB_ICONEXCLAMATION);
- SendDlgItemMessage(hDlg, IDC_CHECK1, BM_SETCHECK, BST_UNCHECKED, 0);
- break;
- }
- else
- {
- EnableWindow(GetDlgItem(hDlg, IDC_INCOMING), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_OUTGOING), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_BACKGROUND), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_TXT), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_DEFAULT_IN), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_DEFAULT_OUT), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_DEFAULT_BG), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_DEFAULT_TXT), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_TXTIN), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_TXTOUT), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_TXTBG), FALSE);
- EnableWindow(GetDlgItem(hDlg, IDC_TXTTXT), FALSE);
- }
- }
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
- break;
- }
-
- if ( wParam == IDC_CHECK2 )
- {
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- if ( SendDlgItemMessage(hDlg, IDC_CHECK2, BM_GETCHECK, 0, 0) == BST_UNCHECKED )
- options.openNewWindow = 0;
- else
- options.openNewWindow = 1;
-
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
-
- break;
- }
- if ( wParam == IDC_CHECK3 )
- {
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- if ( SendDlgItemMessage(hDlg, IDC_CHECK3, BM_GETCHECK, 0, 0) == BST_UNCHECKED )
- options.updateWindow = 0;
- else
- options.updateWindow = 1;
-
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
-
- break;
- }
-
- if ( wParam == IDC_CHECK4 )
- {
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- if ( SendDlgItemMessage(hDlg, IDC_CHECK4, BM_GETCHECK, 0, 0) == BST_UNCHECKED )
- options.mouseEvent = 0;
- else
- options.mouseEvent = 1;
-
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
-
- break;
- }
-
- if ( wParam == IDC_CHECK5 )
- {
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- if(SendDlgItemMessage(hDlg, IDC_CHECK5, BM_GETCHECK, 0, 0) == BST_UNCHECKED)
- options.saveSpecial = 0;
- else
- options.saveSpecial = 1;
-
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
-
- break;
- }
-
- if ( wParam == IDC_CHECK6 )
- {
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- if(SendDlgItemMessage(hDlg, IDC_CHECK6, BM_GETCHECK, 0, 0) == BST_UNCHECKED)
- options.showDate = 0;
- else
- options.showDate = 1;
-
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
-
- break;
- }
-
- if ( wParam == IDC_CHECK7 )
- {
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- if(SendDlgItemMessage(hDlg, IDC_CHECK7, BM_GETCHECK, 0, 0) == BST_UNCHECKED)
- options.showLine = 0;
- else
- options.showLine = 1;
-
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
-
- break;
- }
-
- if ( wParam == IDC_CHECK8 )
- {
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- if(SendDlgItemMessage(hDlg, IDC_CHECK8, BM_GETCHECK, 0, 0) == BST_UNCHECKED)
- options.showTime = 0;
- else
- options.showTime = 1;
-
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
- //DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TIME, 0x01);
-
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
- break;
- }
-
- if ( wParam == IDC_CHECK9 )
- {
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- if(SendDlgItemMessage(hDlg, IDC_CHECK9, BM_GETCHECK, 0, 0) == BST_UNCHECKED)
- options.showDirection = 0;
- else
- options.showDirection = 1;
-
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
- //DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DIRECTION, 0x01);
-
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
- break;
- }
-
- if ( wParam == IDC_CHECK10 )
- {
- SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
- if(SendDlgItemMessage(hDlg, IDC_CHECK10, BM_GETCHECK, 0, 0) == BST_UNCHECKED)
- options.showType = 0;
- else
- options.showType = 1;
-
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
- //DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TYPE, 0x01);
-
- WriteOptionExample(hDlg, colourSet.incoming, colourSet.outgoing, colourSet.background, colourSet.text, &options);
- break;
- }
-
- }
-
- case WM_NOTIFY:
- {
- if ( ((LPNMHDR)lParam)->code == PSN_APPLY )
- {
- // Write Settings to Database
- if ( SendDlgItemMessage(hDlg, IDC_CHECK1, BM_GETCHECK, 0, 0) == BST_CHECKED )
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x01);
- else
- {
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x00);
- colourSet.incoming = SendDlgItemMessage(hDlg, IDC_INCOMING, CPM_GETCOLOUR, 0, 0);
- colourSet.outgoing = SendDlgItemMessage(hDlg, IDC_OUTGOING, CPM_GETCOLOUR, 0, 0);
- colourSet.background = SendDlgItemMessage(hDlg, IDC_BACKGROUND, CPM_GETCOLOUR, 0, 0);
- colourSet.text = SendDlgItemMessage(hDlg, IDC_TXT, CPM_GETCOLOUR, 0, 0);
- SetDBColour(&colourSet);
- }
-
- SetListOptions(&options);
-
- // Write temporary values to Database
-
-
-
-
- }
- }
- }
- return FALSE;
-}
-
-
-/*
-Progressbar
-*/
-LRESULT CALLBACK ProgressBarDlg(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
- static HWND hwndBN_OK, hwndBN_Cancel, hwndEdit, hwndPB;
- static int cxChar, cyChar;
-
- switch ( message )
- {
- case WM_CREATE:
- {
- cxChar = LOWORD(GetDialogBaseUnits());
- cyChar = HIWORD(GetDialogBaseUnits());
- InitCommonControls();
- hwndPB = CreateWindowEx(0, PROGRESS_CLASS, _T(""), WS_CHILD | WS_VISIBLE, 0, 2, 343, 17, hwnd, NULL, hInst, NULL);
- SendMessage(hwndPB, PBM_SETRANGE, 0, MAKELPARAM (0, 100));
- return 0;
- }
- case WM_COMMAND:
- {
- if ( wParam == 100 )
- SendMessage(hwndPB, PBM_SETPOS, (WPARAM)lParam, 0);
- return 0;
- }
- case WM_DESTROY:
- return 0;
- }
- return DefWindowProc(hwnd, message, wParam, lParam);
-}
-
-
-
-/*
-Splitter function.
-Taken from srmm-plugin....
-*/
-LRESULT CALLBACK SplitterProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch(msg)
- {
- case WM_NCHITTEST:
- return HTCLIENT;
-
- case WM_SETCURSOR:
- {
- RECT rc;
- GetClientRect(hWnd, &rc);
- SetCursor(splitCursor);
- return TRUE;
- }
-
- case WM_LBUTTONDOWN:
- SetCapture(hWnd);
- return 0;
-
- case WM_MOUSEMOVE:
- if ( GetCapture() == hWnd )
- {
- RECT rc;
- GetClientRect(hWnd, &rc);
- SendMessage( GetParent(hWnd), DM_LINKSPLITTER, (WPARAM)(HIWORD(GetMessagePos()) + rc.bottom / 2), (LPARAM)hWnd);
- }
- return 0;
-
- case WM_LBUTTONUP:
- ReleaseCapture();
- return 0;
- }
- return CallWindowProc(wndSplitterProc, hWnd, msg, wParam, lParam);
-}
\ No newline at end of file diff --git a/historylinklistplus/linklist_dlg.h b/historylinklistplus/linklist_dlg.h deleted file mode 100644 index 9fe31f7..0000000 --- a/historylinklistplus/linklist_dlg.h +++ /dev/null @@ -1,29 +0,0 @@ -// History Linklist Plus
-// Copyright (C) 2010 Thomas Wendel, gureedo
-//
-// 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-#pragma once
-
-#ifndef _LINKLIST_DLG_H
-#define _LINKLIST_DLG_H
-
-INT_PTR WINAPI MainDlgProc( HWND, UINT, WPARAM, LPARAM );
-LRESULT CALLBACK ProgressBarDlg(HWND, UINT, WPARAM, LPARAM);
-INT_PTR WINAPI SearchDlgProc( HWND, UINT, WPARAM, LPARAM );
-INT_PTR CALLBACK OptionsDlgProc(HWND, UINT, WPARAM, LPARAM );
-LRESULT CALLBACK SplitterProc(HWND, UINT, WPARAM, LPARAM);
-
-#endif //_LINKLIST_DLG_H
\ No newline at end of file diff --git a/historylinklistplus/linklist_fct.c b/historylinklistplus/linklist_fct.c deleted file mode 100644 index 3c95874..0000000 --- a/historylinklistplus/linklist_fct.c +++ /dev/null @@ -1,1360 +0,0 @@ -// History Linklist Plus
-// Copyright (C) 2010 Thomas Wendel, gureedo
-//
-// 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-#include <windows.h>
-#include "resource.h"
-#ifdef _DEBUG
-#include <crtdbg.h>
-#endif
-
-// Miranda SDK Includes
-#pragma warning(disable:4996)
-#pragma warning(disable:4100)
-#include <newpluginapi.h>
-#include <m_clist.h>
-#include <m_database.h>
-#include <m_utils.h>
-#include <m_langpack.h>
-#pragma warning(default:4100)
-#pragma warning(default:4996)
-
-#include "linklist.h"
-#include "linklist_fct.h"
-#include "language.h"
-#include "utils.h"
-
-
-extern HINSTANCE hInst;
-extern HANDLE hWindowList;
-
-/*
-The hyperlink detection in this function is taken from the
-Miranda core. It looks a bit sophisticated. I'd made a few
-changes but I didn't really understand what these guys did!
-Great job! It works! ;-)
-*/
-int ExtractURI(DBEVENTINFO *dbei, HANDLE hEvent, LISTELEMENT *listStart)
-{
- int wordStart,i,iLastAlphaNum, linkFound=0;
- int charCount=0,cpLastAlphaNum=0,cpWordStart;
- LPCTSTR msg;
- LPTSTR word, wordsearch, date_ptr, time_ptr;
- static LPCTSTR hyperlinkPrefixes[] = {
- _T("http://"),_T("ftp://"),_T("https://"),_T("mailto:"),_T("www."),_T("ftp."),
- _T("icq#"),_T("gopher://"),_T("news://"),_T("file://"),_T("\\\\")
- };
- static LPCTSTR hyperlinkSubstrings[] = {
- _T(".com/"),_T(".net/"),_T(".org/"),_T(".co.uk"),_T(".ru")
- };
- DBTIMETOSTRINGT dbtimestring;
- LISTELEMENT *newElement, *actualElement;
- TCHAR templink[LINK_MAX+1];
- TCHAR dbdate[DATE_SIZE + TIME_SIZE];
- BYTE type = LINK_UNKNOWN;
- int direction;
- TCHAR date[DATE_SIZE+1];
- TCHAR time[TIME_SIZE+1];
- TCHAR link[LINK_MAX+1];
-
- if ( listStart == NULL )
- return -1;
-
- ZeroMemory(link, _countof(link)*sizeof(TCHAR));
- ZeroMemory(date, _countof(date)*sizeof(TCHAR));
- ZeroMemory(time, _countof(time)*sizeof(TCHAR));
-
- msg = DbGetEventTextT(dbei, CP_ACP);
- for ( i=0; msg[i]; )
- {
- //hyperlinks are delimited by: <non-alphanumeric>"hyperlink"<whitespace>
- //then all punctuation is stripped from the end of "hyperlink"
- iLastAlphaNum = 0;
- while ( msg[i] && !_istalnum(msg[i]) )
- {
- // support for files
- if ( (msg[i]==_T('\\')) && (msg[i+1]==_T('\\')) && (_istalnum(msg[i+2])) )
- {
- break;
- }
-#ifndef _UNICODE
- if(IsDBCSLeadByte(msg[i]) && msg[i+1]) i++;
-#endif
- i++;
- if ( msg[i] != _T('\n') ) charCount++;
- }
- if ( msg[i] == _T('\0') ) break;
-
- cpWordStart = charCount;
- wordStart = i;
-
- while ( msg[i] && !_istspace(msg[i]) )
- {
-#ifndef _UNICODE
- if ( IsDBCSLeadByte(msg[i] ) && msg[i+1]) i++;
- else
-#endif
- if ( _istalnum(msg[i]) || msg[i]==_T('/') )
- {
- cpLastAlphaNum = charCount;
- iLastAlphaNum = i;
- }
- charCount++;
- i++;
- }
-
- charCount = cpLastAlphaNum+1;
- i = iLastAlphaNum+1;
-
- if ( i-wordStart >= 7 )
- {
- int j, isLink = 0, wordlen;
-
- wordlen = i-wordStart+1;
- word = (LPTSTR)malloc(wordlen*sizeof(TCHAR));
- wordsearch = (LPTSTR)malloc(wordlen*sizeof(TCHAR));
-
- _tcsncpy_s(word, wordlen, msg+wordStart, wordlen-1);
- _tcsncpy_s(wordsearch, wordlen, msg+wordStart, wordlen-1);
- CharLower(wordsearch);
-
- for ( j=0; j<_countof(hyperlinkPrefixes); j++ )
- {
- if ( !_tcsncmp(wordsearch, hyperlinkPrefixes[j], _tcslen(hyperlinkPrefixes[j])) )
- {
- isLink = 1;
- break;
- }
- }
-
- if ( !isLink ) {
- for( j=0; j<_countof(hyperlinkSubstrings); j++ )
- {
- if ( _tcsstr(wordsearch+1,hyperlinkSubstrings[j]) )
- {
- isLink = 1;
- break;
- }
- }
- }
-
- if ( _tcschr(wordsearch,_T('@')) && _tcschr(wordsearch,_T('.')) && !_tcschr(wordsearch,_T(':')) && !_tcschr(wordsearch,_T('/')) )
- {
- isLink = 1; //e-mail addresses
- type = LINK_MAIL;
- }
- else if( isLink ) {
- type = LINK_URL;
- }
-
- if ( isLink && ( (i-wordStart+1) <= (int)(LINK_MAX - _mstrlen(_T("http://")))) )
- {
- LPTSTR tok_ctx;
-
- if( (_tcsstr(wordsearch, _T("www.")) != NULL) && (_tcsstr(wordsearch, _T("http://")) == NULL) )
- {
- _tcsncpy_s(link, _countof(link), _T("http://"), _mstrlen(_T("http://")));
- // Link longer than defined max -> cut link to max
- if( (i-wordStart+1) > (int)(LINK_MAX-_mstrlen(_T("http://"))) )
- _tcsncpy_s(link + _mstrlen(_T("http://")), _countof(link), word, LINK_MAX - _mstrlen(_T("http://")));
- else
- _tcsncpy_s(link + _mstrlen(_T("http://")), _countof(link), word, i-wordStart+1);
- }
- else
- {
- size_t link_size;
- if ( (i-wordStart+1) > LINK_MAX )
- link_size = LINK_MAX;
- else
- link_size = i-wordStart+1;
- _tcsncpy_s(link, _countof(link), word, link_size);
- }
-
- dbtimestring.szFormat = _T("d-t");
- dbtimestring.szDest = dbdate;
- dbtimestring.cbDest = _countof(dbdate);
- CallService(MS_DB_TIME_TIMESTAMPTOSTRINGT,(WPARAM)dbei->timestamp, (LPARAM)&dbtimestring);
- date_ptr = _tcstok_s(dbdate, _T("-"), &tok_ctx);
- time_ptr = _tcstok_s(NULL, _T("-"), &tok_ctx);
- _tcsncpy_s(date, _countof(date), date_ptr, DATE_SIZE);
- _tcsncpy_s(time, _countof(time), time_ptr, TIME_SIZE);
- // Prevent overflow
- date[DATE_SIZE] = _T('\0');
- time[TIME_SIZE] = _T('\0');
-
- if ( dbei->flags & DBEF_SENT ) {
- direction = DIRECTION_OUT;
- } else {
- direction = DIRECTION_IN;
- }
-
- if ( type == LINK_MAIL && _tcsstr(link, _T("mailto:")) == NULL )
- {
- _tcscpy_s(templink, _countof(templink), link);
- _tcscpy_s(link, _countof(link), _T("mailto:"));
- _tcsncpy_s(link + _mstrlen(_T("mailto:")), _countof(link), templink, LINK_MAX-_mstrlen(_T("mailto:")));
- }
-
- // Add new Element to list:
- newElement = (LISTELEMENT*)malloc(sizeof(LISTELEMENT));
- if ( newElement == NULL )
- return -1;
-
- ZeroMemory(newElement, sizeof(LISTELEMENT));
- newElement->direction = direction;
- newElement->type = type;
- _tcscpy_s(newElement->date, _countof(newElement->date), date);
- _tcscpy_s(newElement->time, _countof(newElement->time), time);
- _tcscpy_s(newElement->link, _countof(newElement->link), link);
- newElement->hEvent = hEvent;
-
- actualElement = listStart;
- while ( actualElement->nextElement != NULL )
- {
- actualElement = actualElement->nextElement;
- }
-
- actualElement->nextElement = newElement;
- linkFound++;
- }
- free(word);
- free(wordsearch);
- }
- }
-
- mir_free((void*)msg);
-
- return linkFound;
-}
-
-
-/*
-Remove the linked list an free memory
-*/
-int RemoveList(LISTELEMENT *listStart)
-{
- LISTELEMENT *actualElement, *tempElement;
-
- if ( listStart == NULL )
- return -1;
-
- actualElement = listStart->nextElement;
- while ( actualElement != NULL )
- {
- tempElement = actualElement->nextElement;
- free(actualElement);
- actualElement = tempElement;
- }
- free(listStart);
- return 0;
-}
-
-
-/*
-Count the elements of the list
-*/
-int ListCount(LISTELEMENT *listStart)
-{
- LISTELEMENT *actualElement;
- int count = 0;
-
- if ( listStart == NULL )
- return -1;
-
- actualElement = listStart->nextElement;
- while ( actualElement != NULL )
- {
- count++;
- actualElement = actualElement->nextElement;
- }
- return count;
-}
-
-
-/*
-Fill the richedit field with informations ;-)
-
-Special thanks to MatriX for his help with the cursor postion!
-*/
-void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searchString, int append)
-{
- CHARFORMAT2 cf;
- PARAFORMAT2 pf;
- HWND hwndProgress = NULL;
- RECT DesktopRect;
- MYCOLOURSET colourSet;
- TCHAR textLine[LINK_MAX + DIR_SIZE + TIME_SIZE + TYPE_SIZE + 6];
- TCHAR searchText[320];
- TCHAR lastDate[11] = {0};
- TCHAR filter1, filter2, filter3;
- size_t lineLen, listCount=0, realListCount=0, actCount=0, len, appCount = 0;
- int linePos = -1;
- LISTELEMENT *actualElement;
- LISTOPTIONS options;
- CHARRANGE sel;
- GETTEXTLENGTHEX gtl;
- DBEVENTINFO dbe;
-
- GetListInfo(params, listStart, searchString, &lineLen, &listCount, &realListCount);
- GetColour(&colourSet);
- GetListOptions(&options);
-
- if ( append == 0 )
- ShowWindow(GetDlgItem(hDlg, IDC_MAIN), SW_HIDE);
-
- if ( (append > 0) && (GetMenuState(GetMenu(hDlg), IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED) )
- return;
-
- if ( GetDlgItem(hDlg, IDC_MAIN) && GetDlgItem(hDlg, IDC_MESSAGE) )
- {
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETEVENTMASK, 0, (LPARAM)(ENM_LINK) );
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_AUTOURLDETECT, TRUE, 0 );
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETBKGNDCOLOR, FALSE, colourSet.background);
-
- ZeroMemory(&cf, sizeof(cf));
- cf.cbSize = sizeof(cf);
- cf.dwMask = CFM_COLOR;
- cf.crTextColor = colourSet.text;
- SendDlgItemMessage( hDlg, IDC_MESSAGE, EM_SETCHARFORMAT, SCF_SELECTION|SCF_WORD, (LPARAM)&cf);
- SendDlgItemMessage( hDlg, IDC_MESSAGE, EM_AUTOURLDETECT, TRUE, 0 );
- SendDlgItemMessage( hDlg, IDC_MESSAGE, EM_SETBKGNDCOLOR, FALSE, colourSet.background);
-
- if ( append == 0 )
- {
- ClearLinePos(listStart);
-
- // How to set RTF colour, font, etc.... found at
- // http://www.winehq.com/hypermail/wine-devel/2004/08/0608.html
- ZeroMemory(&pf, sizeof(pf) );
- pf.cbSize = sizeof(pf);
- pf.dwMask = PFM_ALIGNMENT;
- pf.wAlignment = PFA_LEFT;
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETPARAFORMAT, FALSE, (LPARAM) &pf);
-
- if ( searchString != NULL )
- {
- ZeroMemory( &cf, sizeof(cf) );
- cf.cbSize = sizeof(cf);
- cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_FACE | CFM_COLOR;
- cf.dwEffects = CFE_BOLD;
- cf.crTextColor = colourSet.text;
- _tcscpy_s(cf.szFaceName, _countof(cf.szFaceName), _T("Arial"));
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
-
- ZeroMemory(searchText, _countof(searchText)*sizeof(TCHAR));
- mir_sntprintf(searchText, _countof(searchText), _T("%s '%s': %d\n\n"), TranslateT("Matches for searchtext"), searchString, listCount);
- SendDlgItemMessage(hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)searchText);
- linePos += 2;
- }
-
- ZeroMemory(&cf, sizeof(cf) );
- cf.cbSize = sizeof(cf);
- cf.dwMask = CFM_FACE | CFM_BOLD;
- _tcscpy_s(cf.szFaceName, _countof(cf.szFaceName), _T("Courier"));
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM)&cf);
- }
-
- actualElement = listStart->nextElement;
-
- if ( append > 0 )
- {
- linePos = GetLastLinePos(listStart);
-
- if((realListCount - append) == 1)
- _tcscpy_s(lastDate, _countof(lastDate), actualElement->date);
-
- for(appCount = 1; appCount <= (realListCount - append); appCount++)
- {
- actualElement = actualElement->nextElement;
- if(appCount == (realListCount - append - 1))
- _tcscpy_s(lastDate, _countof(lastDate), actualElement->date);
- }
- gtl.flags = GTL_PRECISE;
- gtl.codepage = CP_ACP;
- sel.cpMin = sel.cpMax = SendMessage(GetDlgItem(hDlg, IDC_MAIN), EM_GETTEXTLENGTHEX, (WPARAM)>l, 0);
- SendMessage(GetDlgItem(hDlg, IDC_MAIN), EM_EXSETSEL, 0, (LPARAM) &sel);
- }
-
- if ( append == 0 )
- {
- // Create Progressbar
- GetWindowRect(GetDesktopWindow(), &DesktopRect);
- hwndProgress = CreateWindow(_T("Progressbar"), TranslateT("Processing list..."), WS_OVERLAPPED, CW_USEDEFAULT, CW_USEDEFAULT, 350, 45, NULL, NULL, hInst, NULL);
- SetWindowPos(hwndProgress,HWND_TOP,(int)(DesktopRect.right*0.5)-175,(int)(DesktopRect.bottom*0.5)-22,0,0,SWP_NOSIZE);
-
- if ( hwndProgress != NULL )
- {
- ShowWindow(hwndProgress, SW_SHOW);
- SetForegroundWindow(hwndProgress);
- }
- }
-
- while ( actualElement != NULL )
- {
- filter1 = 0;
- filter2 = 0;
- filter3 = 0;
-
- if ( (params & WLL_IN) && (actualElement->direction == DIRECTION_IN) )
- filter1 = 1;
- else if( (params & WLL_OUT) && (actualElement->direction == DIRECTION_OUT) )
- filter1 = 1;
-
- if ( (params & WLL_MAIL) && (actualElement->type == LINK_MAIL) )
- filter2 = 1;
- else if ( (params & WLL_URL) && (actualElement->type == LINK_URL) )
- filter2 = 1;
- else if ( (params & WLL_FILE) && (actualElement->type == LINK_FILE) )
- filter2 = 1;
-
-
- if ( searchString != NULL )
- {
- if ( params & SLL_DEEP )
- {
- // Perform deep scan
- if ( actualElement->hEvent != NULL )
- {
- LPCTSTR msg;
- dbe.cbSize = sizeof(dbe);
- dbe.cbBlob = (int)CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)actualElement->hEvent, 0);
- dbe.pBlob = (PBYTE)malloc(dbe.cbBlob+1);
- CallService(MS_DB_EVENT_GET, (WPARAM)actualElement->hEvent, (LPARAM)&dbe);
- dbe.pBlob[dbe.cbBlob] = 0;
- msg = DbGetEventTextT(&dbe, CP_ACP);
- if( _tcsstr(msg, searchString) )
- filter3 = 1;
-
- free(dbe.pBlob);
- mir_free((void*)msg);
- }
- else
- filter3 = 0;
- }
- else
- {
- if ( _tcsstr(actualElement->link, searchString) )
- filter3 = 1;
- }
- }
- else
- filter3 = 1;
-
- if ( (filter1 == 1) && (filter2 == 1) && (filter3 == 1) )
- {
- LPCTSTR type;
-
- if ( _tcscmp(actualElement->date, lastDate) != 0 )
- {
- ZeroMemory(&cf, sizeof(cf));
- cf.cbSize = sizeof(cf);
- cf.dwMask = CFM_COLOR;
- cf.crTextColor = colourSet.text;
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM)&cf);
- if ( options.showLine != 0 )
- DrawLine(hDlg, lineLen);
- ZeroMemory(&cf, sizeof(cf));
- cf.cbSize = sizeof(cf);
- cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_FACE;
- cf.dwEffects = CFE_BOLD;
- _tcscpy_s(cf.szFaceName, _countof(cf.szFaceName), _T("Arial"));
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
- if ( options.showDate != 0 )
- {
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM) actualElement->date);
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM) _T("\n\n"));
- linePos += 3;
- }
- _tcscpy_s(lastDate, _countof(lastDate), actualElement->date);
- ZeroMemory( &cf, sizeof(cf));
- cf.cbSize = sizeof cf;
- cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_UNDERLINE | CFM_FACE;
- _tcscpy_s(cf.szFaceName, _countof(cf.szFaceName), _T("Courier"));
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
- }
- ZeroMemory( &cf, sizeof(cf) );
- cf.cbSize = sizeof(cf);
- cf.dwMask = CFM_COLOR;
-
- if ( actualElement->direction == DIRECTION_OUT )
- {
- cf.crTextColor = colourSet.incoming;
- }
- else
- cf.crTextColor = colourSet.outgoing;
-
- switch( actualElement->type ) {
- case LINK_MAIL:
- type = _T("[mail]");
- break;
- case LINK_URL:
- type = _T("[URL ]");
- break;
- case LINK_FILE:
- type = _T("[file]");
- break;
- default:
- type = _T("[UNK ]");
- }
-
- mir_sntprintf(textLine, _countof(textLine), _T("%s%s%s%s%s%s%s\n"),
- options.showDirection ? (actualElement->direction==DIRECTION_IN?_T("[in ]"):_T("[out]")) : _T(""),
- options.showDirection? _T(" ") : _T(""),
- options.showType ? type : _T(""),
- options.showType ? _T(" ") : _T(""),
- options.showTime ? actualElement->time : _T(""),
- options.showTime ? _T(" ") : _T(""),
- actualElement->link);
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf);
- SendDlgItemMessage(hDlg, IDC_MAIN, EM_REPLACESEL, FALSE,(LPARAM)textLine);
- linePos++;
- actualElement->linePos = linePos;
- actCount++;
- if( hwndProgress && ( ((int)(((float)actCount/listCount)*100.00)) % 10 == 0 ) )
- SendMessage(hwndProgress, WM_COMMAND, 100,((int)(((float)actCount/listCount)*100.00)));
-
- }
- actualElement = actualElement->nextElement;
- }
- if ( listCount > 0 )
- {
- if((actCount < listCount) && (append == 0) && (options.showLine != 0))
- DrawLine(hDlg, lineLen);
- }
- else if ( searchString == NULL )
- {
- ZeroMemory( &cf, sizeof(cf) );
- cf.cbSize = sizeof(cf);
- cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_FACE;
- cf.dwEffects = CFE_BOLD;
- _tcscpy_s(cf.szFaceName, _countof(cf.szFaceName), _T("Arial"));
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)TranslateT("No messages found!\nPlease change current filter options."));
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)_T("\n"));
- }
-
- }
- if ( append == 0 )
- {
- SendMessage(hwndProgress, WM_CLOSE, 0, 0);
- ShowWindow(GetDlgItem(hDlg, IDC_MAIN), SW_SHOW);
- }
-
- PostMessage(GetDlgItem(hDlg, IDC_MAIN), WM_VSCROLL, MAKEWPARAM(SB_BOTTOM, 0), 0);
- len = GetWindowTextLength(GetDlgItem(hDlg, IDC_MAIN));
- PostMessage(GetDlgItem(hDlg, IDC_MAIN), EM_SETSEL, len, len);
-}
-
-
-/*
-Output some example text to the options dialog
-*/
-int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD BGColourSel, DWORD TxtColourSel, LISTOPTIONS *options)
-{
- CHARFORMAT cf;
- PARAFORMAT pf;
-
- ZeroMemory(&pf, sizeof(pf));
- pf.cbSize = sizeof(pf);
- pf.dwMask = PFM_ALIGNMENT;
- pf.wAlignment = PFA_LEFT;
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETPARAFORMAT, FALSE, (LPARAM)&pf);
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETEVENTMASK, 0, (LPARAM)(ENM_LINK));
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_AUTOURLDETECT, TRUE, 0);
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETBKGNDCOLOR, FALSE, BGColourSel);
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, WM_SETTEXT , 0, (LPARAM)NULL);
-
- ZeroMemory(&cf, sizeof(cf));
- cf.cbSize = sizeof(cf);
- cf.dwMask = CFM_FACE | CFM_BOLD | CFM_ITALIC | CFM_COLOR;
- _tcscpy_s(cf.szFaceName, _countof(cf.szFaceName), _T("Courier"));
- cf.crTextColor = TxtColourSel;
- SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
- if ( options->showLine == 1 )
- SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("___________________________________________\n"));
- else
- SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("\n"));
-
- ZeroMemory(&cf, sizeof(cf));
- cf.cbSize = sizeof(cf);
- cf.dwMask = CFM_BOLD | CFM_FACE | CFM_COLOR;
- cf.dwEffects = CFE_BOLD;
- _tcscpy_s(cf.szFaceName, _countof(cf.szFaceName), _T("Arial"));
- cf.crTextColor = TxtColourSel;
- SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
-
- if(options->showDate == 1)
- SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)TranslateT(TXT_DATE));
-
- SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM) _T("\n"));
-
- ZeroMemory(&cf, sizeof(cf));
- cf.cbSize = sizeof(cf);
- cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_UNDERLINE | CFM_FACE;
- _tcscpy_s(cf.szFaceName, _countof(cf.szFaceName), _T("Courier"));
- SendDlgItemMessage( hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
-
- // incoming
- ZeroMemory(&cf, sizeof(cf));
- cf.cbSize = sizeof(cf);
- cf.dwMask = CFM_COLOR | CFM_FACE;
- cf.crTextColor = InColourSel;
- _tcscpy_s(cf.szFaceName, _countof(cf.szFaceName), _T("Courier"));
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM)&cf );
-
- if ( options->showDirection == 1 )
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("\n[in ] "));
- else
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("\n"));
-
- if ( options->showType == 1 )
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("URL "));
- else
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T(""));
-
- if ( options->showTime == 1 )
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("08:15 http://www.miranda-im.org\n"));
- else
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("http://www.miranda-im.org\n"));
-
- // outgoing
- ZeroMemory( &cf, sizeof(cf));
- cf.cbSize = sizeof(cf);
- cf.dwMask = CFM_COLOR | CFM_FACE;
- cf.crTextColor = OutColourSel;
- _tcscpy_s(cf.szFaceName, _countof(cf.szFaceName), _T("Courier"));
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM)&cf);
-
-
- if ( options->showDirection == 1 )
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("[out] "));
- else
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T(""));
-
- if(options->showType == 1)
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("URL "));
- else
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T(""));
-
- if(options->showTime == 1)
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("08:16 http://www.miranda-im.org\n"));
- else
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_REPLACESEL, FALSE, (LPARAM)_T("http://www.miranda-im.org\n"));
-
- return 0;
-}
-
-
-/*
-Write Message to window
-*/
-void WriteMessage(HWND hDlg, LISTELEMENT *listStart, int actLinePos)
-{
- LISTELEMENT *actualElement;
- HANDLE hEvent;
- DBEVENTINFO dbe;
-
- actualElement = listStart->nextElement;
- while ( actualElement != NULL )
- {
- if ( actualElement->linePos == actLinePos )
- {
- hEvent = actualElement->hEvent;
- if (hEvent != NULL )
- {
- LPCTSTR msg;
- dbe.cbSize = sizeof(dbe);
- dbe.cbBlob = (int)CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hEvent, 0);
- dbe.pBlob = (PBYTE)malloc(dbe.cbBlob+1);
- CallService(MS_DB_EVENT_GET,(WPARAM)hEvent,(LPARAM)&dbe);
- dbe.pBlob[dbe.cbBlob] = 0;
- msg = DbGetEventTextT(&dbe, CP_ACP);
- SendDlgItemMessage(hDlg, IDC_MESSAGE, WM_SETTEXT , 0, (LPARAM)NULL);
- SendDlgItemMessage(hDlg, IDC_MESSAGE, EM_REPLACESEL, FALSE, (LPARAM)msg);
- mir_free((void*)msg);
- free(dbe.pBlob);
- }
- break;
- }
- actualElement = actualElement->nextElement;
- }
-}
-
-/*
-Little helper functions to get the actual state of
-user options.
-*/
-BYTE GetFlags(HMENU listMenu)
-{
- BYTE returnflags = 0x00;
-
- if ( GetMenuState(listMenu, IDM_TYPE_WEB, MF_BYCOMMAND) == MF_UNCHECKED )
- returnflags = returnflags | WLL_MAIL;
-
- if ( GetMenuState(listMenu, IDM_TYPE_MAIL, MF_BYCOMMAND) == MF_UNCHECKED )
- returnflags = returnflags | WLL_URL;
-
- if ( GetMenuState(listMenu, IDM_DIR_IN, MF_BYCOMMAND) == MF_UNCHECKED )
- returnflags = returnflags | WLL_OUT;
-
- if ( GetMenuState(listMenu, IDM_DIR_OUT, MF_BYCOMMAND) == MF_UNCHECKED )
- returnflags = returnflags | WLL_IN;
-
- return returnflags;
-}
-
-void GetFilterText(HMENU listMenu, LPTSTR filter, size_t max_len)
-{
-
- if ( GetMenuState(listMenu, IDM_TYPE_WEB, MF_BYCOMMAND) == MF_CHECKED )
- {
- if ( GetMenuState(listMenu, IDM_DIR_IN, MF_BYCOMMAND) == MF_CHECKED )
- {
- //incoming URLs
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TranslateT(TXT_FILTER), TranslateT(TXT_INCOMING), TranslateT(TXT_URLSONLY));
- }
- else if ( GetMenuState(listMenu, IDM_DIR_OUT, MF_BYCOMMAND) == MF_CHECKED )
- {
- //outgoing URLs
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TranslateT(TXT_FILTER), TranslateT(TXT_OUTGOING), TranslateT(TXT_URLSONLY));
- }
- else
- {
- // both directions (URL)
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TranslateT(TXT_FILTER), "", TranslateT(TXT_URLSONLY));
- }
- }
- else if ( GetMenuState(listMenu, IDM_TYPE_MAIL, MF_BYCOMMAND) == MF_CHECKED )
- {
- if ( GetMenuState(listMenu, IDM_DIR_IN, MF_BYCOMMAND) == MF_CHECKED )
- {
- //incoming mail
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TranslateT(TXT_FILTER), TranslateT(TXT_INCOMING), TranslateT(TXT_MAILSONLY));
- }
- else if ( GetMenuState(listMenu, IDM_DIR_OUT, MF_BYCOMMAND) == MF_CHECKED )
- {
- //outgoing mail
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TranslateT(TXT_FILTER), TranslateT(TXT_OUTGOING), TranslateT(TXT_MAILSONLY));
- }
- else
- {
- // both directions (mail)
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TranslateT(TXT_FILTER), "", TranslateT(TXT_MAILSONLY));
- }
- }
- else
- {
- if ( GetMenuState(listMenu, IDM_DIR_IN, MF_BYCOMMAND) == MF_CHECKED )
- {
- //incoming (both)
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TranslateT(TXT_FILTER), TranslateT(TXT_INCOMING), "");
- }
- else if ( GetMenuState(listMenu, IDM_DIR_OUT, MF_BYCOMMAND) == MF_CHECKED )
- {
- //outgoing (both)
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TranslateT(TXT_FILTER), TranslateT(TXT_OUTGOING), "");
- }
- else
- {
- // no filter
- mir_sntprintf(filter, max_len, _T("%s: %s %s"), TranslateT(TXT_FILTER), TranslateT(TXT_NOFILTER), "");
- }
- }
-}
-
-
-/*
-Little helper function to draw a horizontal line
-*/
-void DrawLine(HWND hDlg, size_t lineLen)
-{
- TCHAR line[LINK_MAX + 18];
- size_t i;
- for (i=0; (i<lineLen+18)&&(i<LINK_MAX+18); i++ )
- {
- line[i] = _T('_');
- }
- line[lineLen+18] = _T('\0');
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)line);
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_REPLACESEL, FALSE, (LPARAM)_T("\n"));
- return;
-}
-
-
-/*
-Little helper function to get informations about the linked list, such as number of links, etc
-*/
-void GetListInfo(BYTE params, LISTELEMENT *listStart, LPCTSTR searchString, size_t *maxLen, size_t *elementCount, size_t *realElementCount)
-{
- size_t tempLen;
- LISTELEMENT *actualElement;
- char filter1, filter2, filter3;
- DBEVENTINFO dbe;
-
- *maxLen = 0;
- *elementCount = 0;
- *realElementCount = 0;
- actualElement = listStart->nextElement;
-
- while ( actualElement != NULL )
- {
- (*realElementCount)++;
-
- filter1 = 0;
- filter2 = 0;
- filter3 = 0;
-
- if ( (params & WLL_IN) && (actualElement->direction == DIRECTION_IN) )
- filter1 = 1;
- else if ( (params & WLL_OUT) && (actualElement->direction == DIRECTION_OUT) )
- filter1 = 1;
-
- if ( (params & WLL_MAIL) && (actualElement->type == LINK_MAIL) )
- filter2 = 1;
- else if ( (params & WLL_URL) && (actualElement->type == LINK_URL) )
- filter2 = 1;
-
- if ( searchString != NULL )
- {
- if ( params & SLL_DEEP )
- {
- // Perform deep scan
- if ( actualElement->hEvent != NULL )
- {
- dbe.cbSize = sizeof(dbe);
- dbe.pBlob = NULL;
- dbe.cbBlob = (int)CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)actualElement->hEvent, 0);
- dbe.pBlob = (PBYTE)malloc(dbe.cbBlob+1);
- CallService(MS_DB_EVENT_GET, (WPARAM)actualElement->hEvent, (LPARAM)&dbe);
- dbe.pBlob[dbe.cbBlob] = 0;
- if ( _tcsstr((LPTSTR)dbe.pBlob, searchString) )
- filter3 = 1;
-
- free(dbe.pBlob);
- }
- else
- filter3 = 0;
- }
- else
- {
- if(_tcsstr(actualElement->link, searchString))
- filter3 = 1;
- }
- }
- else
- filter3 = 1;
-
- if((filter1 == 1) && (filter2 == 1) && (filter3 == 1))
- {
- (*elementCount)++;
-
- tempLen = _tcslen(actualElement->link);
- if(*maxLen < tempLen)
- *maxLen = tempLen;
- }
- actualElement = actualElement->nextElement;
- }
- return;
-}
-
-
-
-void GetListOptions(LISTOPTIONS *options)
-{
-
- options->openNewWindow = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, 0xFF);
- if(options->openNewWindow == 0xFF)
- {
- // No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, 0x00);
- options->openNewWindow = 0x00;
- }
-
-
- options->updateWindow = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0xFF);
- if(options->updateWindow == 0xFF)
- {
- // No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0x00);
- options->updateWindow = 0x00;
- }
-
- options->mouseEvent = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_MOUSE_EVENT, 0xFF);
- if(options->mouseEvent == 0xFF)
- {
- // No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_MOUSE_EVENT, 0x00);
- options->mouseEvent = 0x00;
- }
-
- options->saveSpecial = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, 0xFF);
- if(options->saveSpecial == 0xFF)
- {
- // No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, 0x00);
- options->saveSpecial = 0x00;
- }
-
-
- options->showDate = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DATE, 0xFF);
- if(options->showDate == 0xFF)
- {
- // No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DATE, 0x01);
- options->showDate = 0x01;
- }
-
- options->showLine = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_LINE, 0xFF);
- if(options->showLine == 0xFF)
- {
- // No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_LINE, 0x01);
- options->showLine = 0x01;
- }
-
- options->showTime = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TIME, 0xFF);
- if(options->showTime == 0xFF)
- {
- // No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TIME, 0x01);
- options->showTime = 0x01;
- }
-
- options->showDirection = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DIRECTION, 0xFF);
- if(options->showDirection == 0xFF)
- {
- // No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DIRECTION, 0x01);
- options->showDirection = 0x01;
- }
-
- options->showType = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TYPE, 0xFF);
- if(options->showType == 0xFF)
- {
- // No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TYPE, 0x01);
- options->showType = 0x01;
- }
-
- return;
-}
-
-void SetListOptions(LISTOPTIONS *options)
-{
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, options->openNewWindow);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, options->updateWindow);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_MOUSE_EVENT, options->mouseEvent);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, options->saveSpecial);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DATE, options->showDate);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_LINE, options->showLine);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TIME, options->showTime);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_DIRECTION, options->showDirection);
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_SHOW_TYPE, options->showType);
-}
-
-/*
-Clear temporary stored Linenumbers in List
-*/
-void ClearLinePos(LISTELEMENT *listStart)
-{
- LISTELEMENT *actualElement;
-
- if ( listStart == NULL )
- return;
-
- actualElement = listStart->nextElement;
- while ( actualElement != NULL )
- {
- actualElement->linePos = -1;
- actualElement = actualElement->nextElement;
- }
-}
-
-int GetLastLinePos(LISTELEMENT *listStart)
-{
- LISTELEMENT *actualElement;
- int maxPos = -1;
-
- if ( listStart == NULL )
- return -1;
-
- actualElement = listStart->nextElement;
- while ( actualElement != NULL )
- {
- if ( actualElement->linePos > maxPos )
- maxPos = actualElement->linePos;
-
- actualElement = actualElement->nextElement;
- }
- return maxPos;
-}
-
-/*
-Read current coloursettings from the database
-*/
-void GetColour(MYCOLOURSET *colourSet)
-{
- DWORD colour;
- BYTE useDefault;
-
- useDefault = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0xFF);
- if ( useDefault == 0xFF )
- {
- // No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x01);
- useDefault = 0x01;
- }
-
- if ( useDefault == 0x01 )
- {
- // Use Miranda-IM Default colours
- // CHANGED AT MIRANDA 0.4!!!!
- // Use SRMM... if it is not there try SRMsg (older Miranda Versions)
- colour = DBGetContactSettingDword(NULL, "SRMM", "SRMFont1Col", 0xFF000000);
- if ( colour != 0xFF000000 )
- colourSet->incoming = colour;
- else
- {
- colour = DBGetContactSettingDword(NULL, "SRMsg", "Font3Col", 0xFF000000);
- if ( colour != 0xFF000000 )
- colourSet->incoming = colour;
- else
- {
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x00);
- useDefault = 0x00;
- }
- }
-
- // SRMM
- colour = DBGetContactSettingDword(NULL, "SRMM", "SRMFont0Col", 0xFF000000);
- if ( colour != 0xFF000000 )
- colourSet->outgoing = colour;
- else
- {
- // SRMsg
- colour = DBGetContactSettingDword(NULL, "SRMsg", "Font0Col", 0xFF000000);
- if ( colour != 0xFF000000 )
- colourSet->outgoing = colour;
- else
- {
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x00);
- useDefault = 0x00;
- }
- }
-
- // SRMM
- colour = DBGetContactSettingDword(NULL, "SRMM", "BkgColour", 0xFF000000);
- if ( colour != 0xFF000000 )
- colourSet->background = colour;
- else
- {
- // SRMsg
- colour = DBGetContactSettingDword(NULL, "SRMsg", "BkgColour", 0xFF000000);
- if ( colour != 0xFF000000 )
- colourSet->background = colour;
- else
- {
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x00);
- useDefault = 0x00;
- }
- }
- colourSet->text = MAKE_TXT_COL(colourSet->background);
- }
-
- if ( useDefault == 0x00 )
- {
- // Use Plugin user defined or default colours
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_IN_COL, 0xFF000000);
- if ( colour != 0xFF000000 )
- colourSet->incoming = colour;
- else
- colourSet->incoming = IN_COL_DEF;
-
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_OUT_COL, 0xFF000000);
- if ( colour != 0xFF000000 )
- colourSet->outgoing = colour;
- else
- colourSet->outgoing = OUT_COL_DEF;
-
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_BG_COL, 0xFF000000);
- if ( colour != 0xFF000000 )
- colourSet->background = colour;
- else
- colourSet->background = BG_COL_DEF;
-
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_TXT_COL, 0xFF000000);
- if ( colour != 0xFF000000 )
- colourSet->text = colour;
- else
- colourSet->text = TXT_COL_DEF;
- }
-}
-
-/*
-Read current coloursettings from the database and set default values
-if entry does not exist.
-*/
-void GetDBColour(MYCOLOURSET *colourSet)
-{
- DWORD colour;
-
- // Use Plugin user defined or default colours
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_IN_COL, 0xFF000000);
- if(colour != 0xFF000000)
- colourSet->incoming = colour;
- else
- {
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_IN_COL, IN_COL_DEF);
- colourSet->incoming = IN_COL_DEF;
- }
-
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_OUT_COL, 0xFF000000);
- if(colour != 0xFF000000)
- colourSet->outgoing = colour;
- else
- {
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_OUT_COL, OUT_COL_DEF);
- colourSet->outgoing = OUT_COL_DEF;
- }
-
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_BG_COL, 0xFF000000);
- if(colour != 0xFF000000)
- colourSet->background = colour;
- else
- {
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_BG_COL, BG_COL_DEF);
- colourSet->background = BG_COL_DEF;
- }
-
- colour = DBGetContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_TXT_COL, 0xFF000000);
- if(colour != 0xFF000000)
- colourSet->text = colour;
- else
- {
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_TXT_COL, TXT_COL_DEF);
- colourSet->text = TXT_COL_DEF;
- }
-}
-
-/*
-Read current coloursettings from the database (Miranda settings)
-*/
-int GetMirandaColour(MYCOLOURSET *colourSet)
-{
- DWORD colour;
-
- // Use Miranda-IM Default colours
- // Try SRMM (Miranda 0.4) .... or SRMsg... for older versions
- colour = DBGetContactSettingDword(NULL, "SRMM", "SRMFont1Col", 0xFF000000);
- if(colour != 0xFF000000)
- colourSet->incoming = colour;
- else
- {
- colour = DBGetContactSettingDword(NULL, "SRMsg", "Font3Col", 0xFF000000);
- if(colour != 0xFF000000)
- colourSet->incoming = colour;
- else
- return 1;
- }
-
-
- colour = DBGetContactSettingDword(NULL, "SRMM", "SRMFont0Col", 0xFF000000);
- if(colour != 0xFF000000)
- colourSet->outgoing = colour;
- else
- {
- colour = DBGetContactSettingDword(NULL, "SRMsg", "Font0Col", 0xFF000000);
- if(colour != 0xFF000000)
- colourSet->outgoing = colour;
- else
- return 1;
- }
-
- colour = DBGetContactSettingDword(NULL, "SRMM", "BkgColour", 0xFF000000);
- if(colour != 0xFF000000)
- colourSet->background = colour;
- else
- {
- colour = DBGetContactSettingDword(NULL, "SRMsg", "BkgColour", 0xFF000000);
- if(colour != 0xFF000000)
- colourSet->background = colour;
- else
- return 1;
- }
-
- colourSet->text = MAKE_TXT_COL(colourSet->background);
- return 0;
-}
-
-
-/*
-Write user defined colours to the database
-*/
-void SetDBColour(MYCOLOURSET *colourSet)
-{
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_IN_COL, colourSet->incoming);
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_OUT_COL, colourSet->outgoing);
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_BG_COL, colourSet->background);
- DBWriteContactSettingDword(NULL, LINKLIST_MODULE, LINKLIST_TXT_COL, colourSet->text);
-}
-
-BYTE GetUpdateSetting(void)
-{
- BYTE updateWindow;
-
- updateWindow = DBGetContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0xFF);
- if ( updateWindow == 0xFF )
- {
- // No DB entry for this Plugin
- DBWriteContactSettingByte(NULL, LINKLIST_MODULE, LINKLIST_UPDATE_WINDOW, 0x00);
- return 0;
- }
- if ( updateWindow == 0x00 )
- return 0;
- else
- return 1;
-}
-
-/*
-Special thanks to Tobi H.!
-This function is derived from his Wordlookup Plugin
-*/
-int DBUpdate(WPARAM wParam, LPARAM lParam)
-{
- HANDLE hEvent=(HANDLE)lParam;
- HWND hDlg = WindowList_Find(hWindowList, (HANDLE)wParam);
- DBEVENTINFO dbe;
- DIALOGPARAM *DlgParam;
- HMENU listMenu = GetMenu(hDlg);
- int linkNum = 0;
-
- DlgParam = (DIALOGPARAM *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
-
- if(GetUpdateSetting() != 1)
- return 0;
-
- if(hDlg)
- {
- ZeroMemory(&dbe, sizeof(dbe));
- dbe.cbSize = sizeof(dbe);
-
- dbe.cbBlob = (int)CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hEvent, 0);
- dbe.pBlob = (PBYTE)malloc((size_t)dbe.cbBlob+1);
- CallService(MS_DB_EVENT_GET, (WPARAM)hEvent, (LPARAM)&dbe);
-
- if ( (dbe.eventType == EVENTTYPE_URL) || (dbe.eventType == EVENTTYPE_MESSAGE) )
- {
- // Call function to find URIs
- linkNum = ExtractURI(&dbe, hEvent, DlgParam->listStart);
- if ( linkNum > 0 )
- WriteLinkList(hDlg, GetFlags(listMenu), DlgParam->listStart, NULL, linkNum);
- }
- free(dbe.pBlob);
- }
- return 0;
-}
-
-
-/*
-Little resize helper
-*/
-int LinklistResizer(HWND hDlg, LPARAM lParam, UTILRESIZECONTROL *urc)
-{
- DIALOGPARAM *DlgParam = (DIALOGPARAM*)lParam;
- UNREFERENCED_PARAMETER(hDlg);
-
- switch(urc->wId)
- {
- case IDC_MAIN:
- urc->rcItem.bottom -= DlgParam->splitterPosNew - DlgParam->splitterPosOld;
- return RD_ANCHORX_WIDTH|RD_ANCHORY_HEIGHT;
-
- case IDC_MESSAGE:
- urc->rcItem.top -= DlgParam->splitterPosNew - DlgParam->splitterPosOld;
- return RD_ANCHORX_WIDTH|RD_ANCHORY_BOTTOM;
-
- case IDC_STATUS:
- return RD_ANCHORX_WIDTH|RD_ANCHORY_BOTTOM;
-
- case IDC_SPLITTER:
- urc->rcItem.top -= DlgParam->splitterPosNew - DlgParam->splitterPosOld;
- urc->rcItem.bottom -= DlgParam->splitterPosNew - DlgParam->splitterPosOld;
- return RD_ANCHORX_WIDTH|RD_ANCHORY_BOTTOM;
- }
-
- return RD_ANCHORX_LEFT|RD_ANCHORY_TOP;
-}
-
-
-/*
-Next both functions are taken from a example projekt, found at
-http://www.programmersheaven.com/zone15/cat236/2405.htm
-The author is unknown, but this peace of code made my work much easier!
-*/
-BOOL SaveEditAsStream( HWND hDlg )
-{
- EDITSTREAM es;
- LONG lOut;
- OPENFILENAME ofn;
- HANDLE hFile;
- TCHAR szFilename[MAX_PATH];
-
- // Initialize filename field
- _tcscpy_s(szFilename, _countof(szFilename), _T("*.rtf"));
- // Fill in OPENFILENAME struct
- ZeroMemory(&ofn, sizeof(OPENFILENAME));
- ofn.lStructSize = sizeof(OPENFILENAME);
- ofn.hwndOwner = hDlg;
- ofn.lpstrFilter = _T("RTF File\0*.rtf\0All Files\0*.*\0\0");
- ofn.lpstrFile = szFilename;
- ofn.nMaxFile = _countof(szFilename);
- ofn.lpstrTitle = _T("Save RTF File");
- ofn.Flags = OFN_OVERWRITEPROMPT;
- // Get a filename or quit
- if( ! GetSaveFileName( &ofn ) )
- return FALSE;
- // Create the specified file
- hFile = CreateFile( szFilename, GENERIC_WRITE, 0, NULL,
- CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL );
- // Quit if file creation fails
- if( hFile == INVALID_HANDLE_VALUE )
- return FALSE;
- // Pass file handle to callback
- // so the callback can do the file write
- es.dwCookie = (DWORD_PTR)hFile;
- es.dwError = 0;
- es.pfnCallback = (EDITSTREAMCALLBACK)RTFSaveStreamCallback;
- // Start the callback proc
- lOut = SendDlgItemMessage( hDlg, IDC_MAIN, EM_STREAMOUT, SF_RTF, (LPARAM)&es );
- // Close file handle and exit
- CloseHandle(hFile);
- return TRUE;
-}
-
-DWORD CALLBACK RTFSaveStreamCallback(DWORD_PTR dwCookie, LPBYTE lpBuffer, LONG lSize, LONG *plRead)
-{
- // Sanity check...exit if nothing passed
- if( ! lSize )
- return 1;
- // Initialize "amount read" variable for WriteFile()
- *plRead = 0;
- // dwCookie is the file handle
- WriteFile( (HANDLE)dwCookie, lpBuffer, lSize, (LPDWORD)plRead, NULL );
- // Continue, if needed
- return 0;
-}
-
-
diff --git a/historylinklistplus/linklist_fct.h b/historylinklistplus/linklist_fct.h deleted file mode 100644 index 1a9b191..0000000 --- a/historylinklistplus/linklist_fct.h +++ /dev/null @@ -1,50 +0,0 @@ -// History Linklist Plus
-// Copyright (C) 2010 Thomas Wendel, gureedo
-//
-// 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-#pragma once
-
-#ifndef _LINKLIST_FCT_H
-#define _LINKLIST_FCT_H
-
-#include "linklist.h"
-
-int ExtractURI(DBEVENTINFO*, HANDLE, LISTELEMENT*);
-int RemoveList(LISTELEMENT*);
-int ListCount(LISTELEMENT*);
-void DrawLine(HWND, size_t);
-BYTE GetFlags(HMENU);
-void GetFilterText(HMENU, LPTSTR, size_t);
-void GetListInfo(BYTE, LISTELEMENT*, LPCTSTR, size_t*, size_t*, size_t*);
-void GetListOptions(LISTOPTIONS*);
-void SetListOptions(LISTOPTIONS*);
-void ClearLinePos(LISTELEMENT*);
-int GetLastLinePos(LISTELEMENT*);
-void WriteLinkList(HWND, BYTE, LISTELEMENT*, LPCTSTR, int);
-int WriteOptionExample(HWND, DWORD, DWORD, DWORD, DWORD, LISTOPTIONS*);
-void WriteMessage(HWND, LISTELEMENT*, int);
-void GetColour(MYCOLOURSET*);
-void GetDBColour(MYCOLOURSET*);
-void SetDBColour(MYCOLOURSET*);
-int GetMirandaColour(MYCOLOURSET*);
-BYTE GetUpdateSetting(void);
-int DBUpdate(WPARAM, LPARAM);
-int LinklistResizer(HWND,LPARAM,UTILRESIZECONTROL*);
-// RTF Save functions
-BOOL SaveEditAsStream( HWND );
-DWORD CALLBACK RTFSaveStreamCallback( DWORD_PTR, LPBYTE, LONG, LONG * );
-
-#endif //_LINKLIST_FCT_H
\ No newline at end of file diff --git a/historylinklistplus/resource.h b/historylinklistplus/resource.h deleted file mode 100644 index 740b3d8..0000000 --- a/historylinklistplus/resource.h +++ /dev/null @@ -1,72 +0,0 @@ -//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by linklist.rc
-//
-#define IDC_MAIN 100
-#define IDR_MENU1 101
-#define IDM_SEARCH 101
-#define IDC_MESSAGE 101
-#define IDM_SAVE 102
-#define IDM_CLOSE 103
-#define IDM_DIR_IN 105
-#define IDM_DIR_OUT 106
-#define IDM_TYPE_MAIL 108
-#define IDD_OPTIONS_DLG 108
-#define IDM_TYPE_WEB 109
-#define IDR_MENU2 110
-#define IDI_LINKLISTICON 300
-#define IDC_SEARCHSTRING 400
-#define IDSEARCH 401
-#define IDC_DIR_IN 402
-#define IDC_DIR_OUT 403
-#define IDC_TYPE_MAIL 404
-#define IDC_TYPE_WEB 405
-#define IDC_DIR_ALL 410
-#define IDC_TYPE_ALL 411
-#define IDC_OPTIONS_ALT 1023
-#define IDC_DEFAULT_IN 1024
-#define IDC_TXTIN 1026
-#define IDC_TXTOUT 1027
-#define IDC_TXTBG 1028
-#define IDC_TXTTXT 1029
-#define IDC_DEFAULT_OUT 1031
-#define IDC_DEFAULT_BG 1032
-#define IDC_DEFAULT_TXT 1033
-#define IDC_CHECK1 1034
-#define IDC_BACKGROUND 1039
-#define IDC_OUTGOING 1040
-#define IDC_INCOMING 1041
-#define IDC_TXT 1042
-#define IDC_OPTIONS_RE 1043
-#define IDC_CHECK2 1046
-#define IDC_CHECK3 1047
-#define IDC_STATUS 1047
-#define IDC_CHECK4 1048
-#define IDC_WHOLE_MESSAGE 1049
-#define IDC_CHECK5 1049
-#define IDC_SPLITTER 1051
-#define IDC_CHECK6 1052
-#define IDC_CHECK7 1053
-#define IDC_CHECK8 1054
-#define IDC_CHECK9 1055
-#define IDC_CHECK10 1056
-#define IDD_MAIN_DLG 10000
-#define IDD_SEARCH_DLG 11001
-#define IDM_CLEARSEARCH 40009
-#define IDM_LINK_OPEN 40010
-#define IDM_LINK_OPENNEW 40011
-#define IDM_LINK_COPY 40012
-#define IDM_SHOWMESSAGE 40013
-#define IDC_STATIC -1
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NO_MFC 1
-#define _APS_NEXT_RESOURCE_VALUE 112
-#define _APS_NEXT_COMMAND_VALUE 40015
-#define _APS_NEXT_CONTROL_VALUE 1052
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/historylinklistplus/utils.c b/historylinklistplus/utils.c deleted file mode 100644 index e21f75e..0000000 --- a/historylinklistplus/utils.c +++ /dev/null @@ -1,29 +0,0 @@ -// History Linklist Plus
-// Copyright (C) 2010 Thomas Wendel, gureedo
-//
-// 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-
-#include <windows.h>
-
-// Miranda SDK Includes
-#pragma warning(disable:4996)
-#pragma warning(disable:4100)
-#include <newpluginapi.h>
-#include <m_database.h>
-#pragma warning(default:4100)
-#pragma warning(default:4996)
-
-#include "utils.h"
diff --git a/historylinklistplus/utils.h b/historylinklistplus/utils.h deleted file mode 100644 index 5338981..0000000 --- a/historylinklistplus/utils.h +++ /dev/null @@ -1,25 +0,0 @@ -// History Linklist Plus
-// Copyright (C) 2010 Thomas Wendel, gureedo
-//
-// 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-#pragma once
-
-#ifndef _UTILS_H_
-#define _UTILS_H_
-
-#define _mstrlen(x) (_countof(x)-1)
-
-#endif // _UTILS_H_
\ No newline at end of file |