summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-19 14:10:37 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-19 14:10:37 +0300
commite7ca07ff3871bb91337f50adce8274f0eee43f26 (patch)
tree797ccbadd7699905e8fac8a5c0fbe1ed07a185a3
parent12c0a01bc1826949fa9e146b668a400cab679a63 (diff)
merge with master till
fixes #1368 (Hide dbx_mmap from profile manager)
-rw-r--r--include/m_db_int.h1
-rw-r--r--plugins/AVS/src/poll.cpp1
-rw-r--r--plugins/CloudFile/src/cloud_file.cpp3
-rw-r--r--plugins/Dbx_mdbx/src/init.cpp2
-rw-r--r--src/core/stdmsg/res/resource.rc2
-rw-r--r--src/mir_app/res/resource.rc3
-rw-r--r--src/mir_app/src/CMPluginBase.cpp2
-rw-r--r--src/mir_app/src/database.cpp2
-rw-r--r--src/mir_app/src/miranda.h2
-rw-r--r--src/mir_app/src/profilemanager.cpp3
-rw-r--r--src/mir_core/src/langpack.cpp6
-rw-r--r--src/mir_core/src/miranda.h2
12 files changed, 14 insertions, 15 deletions
diff --git a/include/m_db_int.h b/include/m_db_int.h
index d53fc6b2bd..f32439c213 100644
--- a/include/m_db_int.h
+++ b/include/m_db_int.h
@@ -191,6 +191,7 @@ public:
#define EMKPRF_CREATEFAILED 1 // for some reason CreateFile() didnt like something
#define MDB_CAPS_COMPACT 0x0001 // database can be compacted
+#define MDB_CAPS_CREATE 0x0002 // new database can be created
struct DATABASELINK
{
diff --git a/plugins/AVS/src/poll.cpp b/plugins/AVS/src/poll.cpp
index 60f9480438..c004765f03 100644
--- a/plugins/AVS/src/poll.cpp
+++ b/plugins/AVS/src/poll.cpp
@@ -42,7 +42,6 @@ ACKRESULT_STATUS. This thread only requests the avatar (and maybe add it to the
static void RequestThread(void *vParam);
-extern HANDLE hShutdownEvent;
extern void MakePathRelative(MCONTACT hContact, wchar_t *path);
int Proto_GetDelayAfterFail(const char *proto);
BOOL Proto_IsFetchingWhenProtoNotVisibleAllowed(const char *proto);
diff --git a/plugins/CloudFile/src/cloud_file.cpp b/plugins/CloudFile/src/cloud_file.cpp
index 2c019cbd96..13ba742690 100644
--- a/plugins/CloudFile/src/cloud_file.cpp
+++ b/plugins/CloudFile/src/cloud_file.cpp
@@ -3,8 +3,7 @@
CCloudService::CCloudService(const char *protoName, const wchar_t *userName)
: PROTO<CCloudService>(protoName, userName)
{
- MUUID muidLast = MIID_LAST;
- m_hLangpack = GetPluginLangId(muidLast, 0);
+ m_hLangpack = GetPluginLangId(MIID_LAST, 0);
NETLIBUSER nlu = {};
nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
diff --git a/plugins/Dbx_mdbx/src/init.cpp b/plugins/Dbx_mdbx/src/init.cpp
index 2500cd30ad..9b3c38d17e 100644
--- a/plugins/Dbx_mdbx/src/init.cpp
+++ b/plugins/Dbx_mdbx/src/init.cpp
@@ -93,7 +93,7 @@ static MDatabaseCommon* loadDatabase(const TCHAR *profile, BOOL bReadOnly)
static DATABASELINK dblink =
{
- MDB_CAPS_COMPACT,
+ MDB_CAPS_COMPACT | MDB_CAPS_CREATE,
"dbx_mdbx",
L"MDBX database driver",
makeDatabase,
diff --git a/src/core/stdmsg/res/resource.rc b/src/core/stdmsg/res/resource.rc
index 9acdd24f88..78770d7b6a 100644
--- a/src/core/stdmsg/res/resource.rc
+++ b/src/core/stdmsg/res/resource.rc
@@ -61,7 +61,7 @@ BEGIN
CONTROL "Send message on double 'Enter'",IDC_SENDONDBLENTER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,148,166,149,10
CONTROL "Send message on 'Enter'",IDC_SENDONENTER,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,148,179,152,10
- CONTROL "Send message on 'Ctrl-Enter'",IDC_SENDONCTRLENTER, "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,148,192,152,10
+ CONTROL "Send message on 'Ctrl+Enter'",IDC_SENDONCTRLENTER, "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,148,192,152,10
LTEXT "Show warning when message has not been received after",IDC_STATIC,8,208,211,8
EDITTEXT IDC_SECONDS,223,206,25,12,ES_AUTOHSCROLL
diff --git a/src/mir_app/res/resource.rc b/src/mir_app/res/resource.rc
index c3130cb271..cc030252d6 100644
--- a/src/mir_app/res/resource.rc
+++ b/src/mir_app/res/resource.rc
@@ -387,9 +387,8 @@ BEGIN
LTEXT "Profile",IDC_STATIC,20,23,38,9
LTEXT "e.g., Workplace",IDC_STATIC,62,35,77,9
LTEXT "You can select a different database driver from the default, it may offer more features or abilities, if in doubt use the default.",IDC_STATIC,4,46,207,24
- LTEXT "e.g., dbx mmap",IDC_STATIC,62,91,84,11
LTEXT "Driver",IDC_STATIC,20,77,37,9
- LTEXT "Problem: Unable to find any database drivers, this means you cannot create a new profile, you need to get dbx_mmap.dll",IDC_NODBDRIVERS,4,104,203,22,NOT WS_VISIBLE
+ LTEXT "Problem: Unable to find any database drivers, this means you cannot create a new profile, you need to get dbx_mdbx.dll",IDC_NODBDRIVERS,4,104,203,22,NOT WS_VISIBLE
END
IDD_OPT_PLUGINS DIALOGEX 0, 0, 315, 252
diff --git a/src/mir_app/src/CMPluginBase.cpp b/src/mir_app/src/CMPluginBase.cpp
index e30fdb3320..6a52664e89 100644
--- a/src/mir_app/src/CMPluginBase.cpp
+++ b/src/mir_app/src/CMPluginBase.cpp
@@ -40,7 +40,7 @@ CMPluginBase::~CMPluginBase()
void CMPluginBase::tryOpenLog()
{
wchar_t path[MAX_PATH];
- mir_snwprintf(path, L"%s\\%s.txt", VARSW(L"%miranda_logpath%"), m_szModuleName);
+ mir_snwprintf(path, L"%s\\%S.txt", VARSW(L"%miranda_logpath%"), m_szModuleName);
m_hLogger = mir_createLog(m_szModuleName, nullptr, path, 0);
}
diff --git a/src/mir_app/src/database.cpp b/src/mir_app/src/database.cpp
index 62b070129e..12de009718 100644
--- a/src/mir_app/src/database.cpp
+++ b/src/mir_app/src/database.cpp
@@ -464,7 +464,7 @@ int findMirandaForProfile(wchar_t *szProfile)
return x.found;
}
-static wchar_t tszNoDrivers[] = LPGENW("Miranda is unable to open '%s' because you do not have any profile plugins installed.\nYou need to install dbx_mmap.dll");
+static wchar_t tszNoDrivers[] = LPGENW("Miranda is unable to open '%s' because you do not have any profile plugins installed.\nYou need to install dbx_mdbx.dll");
static wchar_t tszUnknownFormat[] = LPGENW("Miranda was unable to open '%s', it's in an unknown format.");
static wchar_t tszProfileLocked[] = LPGENW("Miranda was unable to open '%s'\nIt's inaccessible or used by other application or Miranda instance");
static wchar_t tszNoSuitableDriver[] = LPGENW("Miranda was unable to open '%s'\nThere is no suitable database driver installed");
diff --git a/src/mir_app/src/miranda.h b/src/mir_app/src/miranda.h
index 645fd36013..660b85474e 100644
--- a/src/mir_app/src/miranda.h
+++ b/src/mir_app/src/miranda.h
@@ -199,6 +199,6 @@ MBaseProto* Proto_GetProto(const char *szProtoName);
extern "C"
{
- MIR_CORE_DLL(int) Langpack_MarkPluginLoaded(PLUGININFOEX* pInfo);
+ MIR_CORE_DLL(int) Langpack_MarkPluginLoaded(const MUUID &uuid);
MIR_CORE_DLL(int) GetSubscribersCount(struct THook *hHook);
};
diff --git a/src/mir_app/src/profilemanager.cpp b/src/mir_app/src/profilemanager.cpp
index 07ae55e4a1..21bf6fa990 100644
--- a/src/mir_app/src/profilemanager.cpp
+++ b/src/mir_app/src/profilemanager.cpp
@@ -149,7 +149,8 @@ public:
}
else {
for (auto &p : arDbPlugins)
- m_driverList.AddString(TranslateW(p->szFullName), (LPARAM)p);
+ if (p->capabilities & MDB_CAPS_CREATE)
+ m_driverList.AddString(TranslateW(p->szFullName), (LPARAM)p);
}
// default item
diff --git a/src/mir_core/src/langpack.cpp b/src/mir_core/src/langpack.cpp
index 7de71d4739..ffe7fd40f7 100644
--- a/src/mir_core/src/langpack.cpp
+++ b/src/mir_core/src/langpack.cpp
@@ -586,9 +586,9 @@ MIR_CORE_DLL(MUUID*) Langpack_LookupUuid(WPARAM wParam)
return (idx > 0 && idx <= lMuuids.getCount()) ? lMuuids[idx - 1] : nullptr;
}
-MIR_CORE_DLL(int) Langpack_MarkPluginLoaded(PLUGININFOEX *pInfo)
+MIR_CORE_DLL(int) Langpack_MarkPluginLoaded(const MUUID &uuid)
{
- int idx = lMuuids.getIndex(&pInfo->uuid);
+ int idx = lMuuids.getIndex((MUUID*)&uuid);
if (idx == -1)
return 0;
@@ -686,7 +686,7 @@ void GetDefaultLang()
MIR_CORE_DLL(void) mir_getLP(const PLUGININFOEX *pInfo, int *_hLang)
{
if (_hLang && pInfo)
- *(int*)_hLang = GetPluginLangId(pInfo->uuid, Langpack_MarkPluginLoaded((PLUGININFOEX*)pInfo));
+ *(int*)_hLang = GetPluginLangId(pInfo->uuid, Langpack_MarkPluginLoaded(pInfo->uuid));
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/mir_core/src/miranda.h b/src/mir_core/src/miranda.h
index cca2148589..0509a9cd41 100644
--- a/src/mir_core/src/miranda.h
+++ b/src/mir_core/src/miranda.h
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern "C"
{
- MIR_CORE_DLL(int) Langpack_MarkPluginLoaded(PLUGININFOEX* pInfo);
+ MIR_CORE_DLL(int) Langpack_MarkPluginLoaded(const MUUID &uuid);
MIR_CORE_DLL(MUUID*) Langpack_LookupUuid(WPARAM wParam);
};