diff options
author | George Hazan <ghazan@miranda.im> | 2018-10-18 21:20:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-10-18 21:20:04 +0300 |
commit | 589b7562b76ade5afb5e50e7eacf74782205c498 (patch) | |
tree | f59387de40a137f2de00bb6a39fac3913c19ee51 /plugins/Import/src/import.cpp | |
parent | fba89acdf4814afe7547fd3c24b428ab42aa0a81 (diff) |
the less WinAPI, the better
Diffstat (limited to 'plugins/Import/src/import.cpp')
-rw-r--r-- | plugins/Import/src/import.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 4b4d1e10d2..14f803d84f 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -22,8 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-#define SetProgress(n) SendMessage(hdlgProgress,PROGM_SETPROGRESS,n,0)
-
struct AccountMap
{
AccountMap(const char *_src, int _origIdx, const wchar_t *_srcName) :
@@ -73,24 +71,11 @@ static LIST<DBCachedContact> arMetas(10); /////////////////////////////////////////////////////////////////////////////////////////
// local data
-static HWND hdlgProgress;
static DWORD nDupes, nContactsCount, nMessagesCount, nGroupsCount, nSkippedEvents, nSkippedContacts;
static MDatabaseCommon *srcDb, *dstDb;
/////////////////////////////////////////////////////////////////////////////////////////
-void AddMessage(const wchar_t* fmt, ...)
-{
- va_list args;
- wchar_t msgBuf[4096];
- va_start(args, fmt);
- mir_vsnwprintf(msgBuf, TranslateW(fmt), args);
-
- SendMessage(hdlgProgress, PROGM_ADDMESSAGE, 0, (LPARAM)msgBuf);
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
static bool CompareDb(DBVARIANT &dbv1, DBVARIANT &dbv2)
{
if (dbv1.type == dbv2.type) {
@@ -1035,10 +1020,8 @@ static int CompareModules(const char *p1, const char *p2) return mir_strcmpi(p1, p2);
}
-void MirandaImport(HWND hdlg)
+void MirandaImport()
{
- hdlgProgress = hdlg;
-
if ((dstDb = (MDatabaseCommon*)db_get_current()) == nullptr) {
AddMessage(LPGENW("Error retrieving current profile, exiting."));
return;
|