summaryrefslogtreecommitdiff
path: root/plugins/HistoryLinkListPlus/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/HistoryLinkListPlus/src')
-rw-r--r--plugins/HistoryLinkListPlus/src/Version.h14
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist.cpp16
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist.h79
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist_dlg.cpp20
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist_fct.cpp45
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist_fct.h2
-rw-r--r--plugins/HistoryLinkListPlus/src/stdafx.cpp18
-rw-r--r--plugins/HistoryLinkListPlus/src/utils.cpp29
-rw-r--r--plugins/HistoryLinkListPlus/src/utils.h25
9 files changed, 92 insertions, 156 deletions
diff --git a/plugins/HistoryLinkListPlus/src/Version.h b/plugins/HistoryLinkListPlus/src/Version.h
new file mode 100644
index 0000000000..fa68a3d3ce
--- /dev/null
+++ b/plugins/HistoryLinkListPlus/src/Version.h
@@ -0,0 +1,14 @@
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 0
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 2
+
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+
+#define __PLUGIN_NAME "History linklist plus"
+#define __FILENAME "LinkList.dll"
+#define __DESCRIPTION "Generates a list of extracted URIs from the history."
+#define __AUTHOR "Thomas Wendel, gureedo"
+#define __AUTHOREMAIL "gureedo@gmail.com"
+#define __AUTHORWEB "http://miranda-ng.org/"
+#define __COPYRIGHT "© 2010-2011 gureedo"
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp
index d087998374..47b9ecc859 100644
--- a/plugins/HistoryLinkListPlus/src/linklist.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist.cpp
@@ -27,16 +27,16 @@ int hLangpack;
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
- "History Linklist Plus",
- 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://miranda-ng.org/",
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
UNICODE_AWARE,
// {DA0B09F5-9C66-488C-AE37-8A5F191C9079}
- { 0xDA0B09F5, 0x9C66, 0x488C, { 0xAE, 0x37, 0x8A, 0x5F, 0x19, 0x1C, 0x90, 0x79 } }
+ {0xDA0B09F5, 0x9C66, 0x488C, {0xAE, 0x37, 0x8A, 0x5F, 0x19, 0x1C, 0x90, 0x79}}
};
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
diff --git a/plugins/HistoryLinkListPlus/src/linklist.h b/plugins/HistoryLinkListPlus/src/linklist.h
index 17cc63e9c9..10fd507975 100644
--- a/plugins/HistoryLinkListPlus/src/linklist.h
+++ b/plugins/HistoryLinkListPlus/src/linklist.h
@@ -21,23 +21,23 @@
#define _LINKLIST_H
#define _CRT_SECURE_NO_WARNINGS
+
#include <windows.h>
-#ifdef _DEBUG
-#include <crtdbg.h>
-#endif
#include <richedit.h>
+#include <commctrl.h>
-// Miranda SDK Includes
#include <newpluginapi.h>
#include <m_clist.h>
#include <m_database.h>
-#include <m_utils.h>
#include <m_langpack.h>
+#include <win2k.h>
#include <m_options.h>
-#include "resource.h"
-#include "linklist_dlg.h"
#include "language.h"
+#include "linklist_dlg.h"
+#include "resource.h"
+#include "Version.h"
+
// Filter Flags
#define WLL_URL 0x01
@@ -73,6 +73,38 @@
#define BG_COL_DEF 0x00EAFFFF
#define TXT_COL_DEF 0x00000000
+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{
+ BYTE openNewWindow;
+ BYTE updateWindow;
+ BYTE mouseEvent;
+ BYTE saveSpecial;
+ BYTE showDate;
+ BYTE showLine;
+ BYTE showTime;
+ BYTE showDirection;
+ BYTE showType;
+}LISTOPTIONS;
+
+typedef struct{
+ DWORD incoming;
+ DWORD outgoing;
+ DWORD background;
+ DWORD text;
+} MYCOLOURSET;
+
+#include "linklist_fct.h"
+
#define LINKLIST_MODULE "HistoryLinklist"
#define LINKLIST_IN_COL "InColour"
#define LINKLIST_OUT_COL "OutColour"
@@ -96,22 +128,11 @@
#define LINKLIST_SHOW_TYPE "ShowMessageType"
-
+#define _mstrlen(x) (_countof(x)-1)
#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
@@ -126,26 +147,6 @@ typedef struct{
} 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;
-
static INT_PTR LinkList_Main(WPARAM, LPARAM);
int InitOptionsDlg(WPARAM, LPARAM);
int DBUpdate(WPARAM, LPARAM);
diff --git a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp
index 66892ef692..c5b6a145b2 100644
--- a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp
@@ -15,28 +15,8 @@
// 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;
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
index 508ea89e0a..eb2e0ea98a 100644
--- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
@@ -15,29 +15,8 @@
// 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 <win2k.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;
@@ -1320,18 +1299,18 @@ BOOL SaveEditAsStream( HWND hDlg )
// 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;
- TCHAR temp[MAX_PATH];
- mir_sntprintf(temp, SIZEOF(temp), _T("%s (*.rtf)%c*.rtf%c%s (*.*)%c*.*%c%c"), TranslateT("RTF file"), 0, 0, TranslateT("All files"), 0, 0, 0);
- ofn.lpstrFilter = temp;
- ofn.lpstrFile = szFilename;
- ofn.nMaxFile = _countof(szFilename);
- ofn.lpstrTitle = TranslateT("Save RTF File");
- ofn.Flags = OFN_OVERWRITEPROMPT;
- // Get a filename or quit
- if ( ! GetSaveFileName( &ofn ))
+ ZeroMemory(&ofn, sizeof(OPENFILENAME));
+ ofn.lStructSize = sizeof(OPENFILENAME);
+ ofn.hwndOwner = hDlg;
+ TCHAR temp[MAX_PATH];
+ mir_sntprintf(temp, SIZEOF(temp), _T("%s (*.rtf)%c*.rtf%c%s (*.*)%c*.*%c%c"), TranslateT("RTF file"), 0, 0, TranslateT("All files"), 0, 0, 0);
+ ofn.lpstrFilter = temp;
+ ofn.lpstrFile = szFilename;
+ ofn.nMaxFile = _countof(szFilename);
+ ofn.lpstrTitle = TranslateT("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,
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.h b/plugins/HistoryLinkListPlus/src/linklist_fct.h
index b29c8f82db..62b7bbc087 100644
--- a/plugins/HistoryLinkListPlus/src/linklist_fct.h
+++ b/plugins/HistoryLinkListPlus/src/linklist_fct.h
@@ -20,8 +20,6 @@
#ifndef _LINKLIST_FCT_H
#define _LINKLIST_FCT_H
-#include "linklist.h"
-
void DrawLine(HWND, size_t);
BYTE GetFlags(HMENU);
void GetFilterText(HMENU, LPTSTR, size_t);
diff --git a/plugins/HistoryLinkListPlus/src/stdafx.cpp b/plugins/HistoryLinkListPlus/src/stdafx.cpp
new file mode 100644
index 0000000000..c75ef98345
--- /dev/null
+++ b/plugins/HistoryLinkListPlus/src/stdafx.cpp
@@ -0,0 +1,18 @@
+/*
+Copyright (C) 2012-13 Miranda NG Project (http://miranda-ng.org)
+
+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 version 2
+of the License.
+
+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, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "linklist.h" \ No newline at end of file
diff --git a/plugins/HistoryLinkListPlus/src/utils.cpp b/plugins/HistoryLinkListPlus/src/utils.cpp
deleted file mode 100644
index e21f75ee89..0000000000
--- a/plugins/HistoryLinkListPlus/src/utils.cpp
+++ /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/plugins/HistoryLinkListPlus/src/utils.h b/plugins/HistoryLinkListPlus/src/utils.h
deleted file mode 100644
index 5338981bd0..0000000000
--- a/plugins/HistoryLinkListPlus/src/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