summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/DbEditorPP/src')
-rw-r--r--plugins/DbEditorPP/src/deletemodule.cpp2
-rw-r--r--plugins/DbEditorPP/src/findwindow.cpp4
-rw-r--r--plugins/DbEditorPP/src/main.cpp31
-rw-r--r--plugins/DbEditorPP/src/main_window.cpp50
-rw-r--r--plugins/DbEditorPP/src/moduletree.cpp8
-rw-r--r--plugins/DbEditorPP/src/options.cpp22
-rw-r--r--plugins/DbEditorPP/src/settinglist.cpp2
-rw-r--r--plugins/DbEditorPP/src/stdafx.h8
-rw-r--r--plugins/DbEditorPP/src/watchedvars.cpp10
9 files changed, 72 insertions, 65 deletions
diff --git a/plugins/DbEditorPP/src/deletemodule.cpp b/plugins/DbEditorPP/src/deletemodule.cpp
index dd2758f3e5..dcc3e6463b 100644
--- a/plugins/DbEditorPP/src/deletemodule.cpp
+++ b/plugins/DbEditorPP/src/deletemodule.cpp
@@ -8,7 +8,7 @@ int deleteModule(MCONTACT hContact, const char *module, int confirm)
if (!module || IsModuleEmpty(hContact, module))
return 0;
- if (confirm && db_get_b(NULL, modname, "WarnOnDelete", 1)) {
+ if (confirm && db_get_b(NULL, MODULENAME, "WarnOnDelete", 1)) {
wchar_t text[MSG_SIZE];
mir_snwprintf(text, TranslateT("Are you sure you want to delete module \"%s\"?"), _A2T(module));
if (dlg(text, MB_YESNO | MB_ICONEXCLAMATION) == IDNO)
diff --git a/plugins/DbEditorPP/src/findwindow.cpp b/plugins/DbEditorPP/src/findwindow.cpp
index 508a9fe727..8f80063be5 100644
--- a/plugins/DbEditorPP/src/findwindow.cpp
+++ b/plugins/DbEditorPP/src/findwindow.cpp
@@ -85,7 +85,7 @@ INT_PTR CALLBACK FindWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
TranslateDialogDefault(hwnd);
ListView_SetExtendedListViewStyle(GetDlgItem(hwnd, IDC_LIST), 32 | LVS_EX_LABELTIP); // LVS_EX_GRIDLINES
loadListSettings(GetDlgItem(hwnd, IDC_LIST), csResultList);
- Utils_RestoreWindowPositionNoMove(hwnd, NULL, modname, "Search_");
+ Utils_RestoreWindowPositionNoMove(hwnd, NULL, MODULENAME, "Search_");
return TRUE;
case WM_COMMAND:
@@ -214,7 +214,7 @@ INT_PTR CALLBACK FindWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
case WM_DESTROY:
ListView_DeleteAllItems(GetDlgItem(hwnd, IDC_LIST));
saveListSettings(GetDlgItem(hwnd, IDC_LIST), csResultList);
- Utils_SaveWindowPosition(hwnd, NULL, modname, "Search_");
+ Utils_SaveWindowPosition(hwnd, NULL, MODULENAME, "Search_");
break;
}
return 0;
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp
index a91fa47d94..55052a7592 100644
--- a/plugins/DbEditorPP/src/main.cpp
+++ b/plugins/DbEditorPP/src/main.cpp
@@ -16,9 +16,8 @@ extern HWND hwnd2watchedVarsWindow;
#pragma comment(lib, "shlwapi.lib")
-//========================
+/////////////////////////////////////////////////////////////////////////////////////////
// MirandaPluginInfo
-//========================
PLUGININFOEX pluginInfoEx =
{
@@ -34,15 +33,23 @@ PLUGININFOEX pluginInfoEx =
{ 0xa8a417ef, 0x7aa, 0x4f37, { 0x86, 0x9f, 0x7b, 0xfd, 0x74, 0x88, 0x65, 0x34 } }
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
return &pluginInfoEx;
}
+/////////////////////////////////////////////////////////////////////////////////////////
// we implement service mode interface
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SERVICEMODE, MIID_LAST };
-int DBSettingChanged(WPARAM hContact, LPARAM lParam)
+/////////////////////////////////////////////////////////////////////////////////////////
+
+static int DBSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam;
@@ -95,7 +102,7 @@ static int OnTTBLoaded(WPARAM, LPARAM)
return 0;
}
-int ModulesLoaded(WPARAM, LPARAM)
+static int ModulesLoaded(WPARAM, LPARAM)
{
IcoLibRegister();
@@ -126,7 +133,7 @@ int ModulesLoaded(WPARAM, LPARAM)
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT | HOTKEYF_EXT, 'D');
Hotkey_Register(&hkd);
- g_bUsePopups = db_get_b(NULL, modname, "UsePopUps", 0) != 0;
+ g_bUsePopups = db_get_b(NULL, MODULENAME, "UsePopUps", 0) != 0;
// Load the name order
for (int i = 0; i < NAMEORDERCOUNT; i++)
@@ -145,14 +152,14 @@ int ModulesLoaded(WPARAM, LPARAM)
return 0;
}
-int PreShutdown(WPARAM, LPARAM)
+static int PreShutdown(WPARAM, LPARAM)
{
if (hwnd2watchedVarsWindow) DestroyWindow(hwnd2watchedVarsWindow);
if (hwnd2mainWindow) DestroyWindow(hwnd2mainWindow);
return 0;
}
-INT_PTR ServiceMode(WPARAM, LPARAM)
+static INT_PTR ServiceMode(WPARAM, LPARAM)
{
g_bServiceMode = true;
@@ -162,7 +169,7 @@ INT_PTR ServiceMode(WPARAM, LPARAM)
return SERVICE_ONLYDB; // load database and then call us
}
-INT_PTR ImportFromFile(WPARAM wParam, LPARAM lParam)
+static INT_PTR ImportFromFile(WPARAM wParam, LPARAM lParam)
{
ImportSettingsFromFileMenuItem(wParam, (char *)lParam);
return 0;
@@ -196,13 +203,15 @@ extern "C" __declspec(dllexport) int Load(void)
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) int Unload(void)
{
freeAllWatches();
return 0;
}
-// ======================================================================================================================
+/////////////////////////////////////////////////////////////////////////////////////////
char *StringFromBlob(BYTE *blob, WORD len)
{
@@ -516,7 +525,7 @@ void loadListSettings(HWND hwnd, ColumnsSettings *cs)
int i = 0;
while (cs[i].name) {
sLC.pszText = TranslateW(cs[i].name);
- sLC.cx = db_get_w(NULL, modname, cs[i].dbname, cs[i].defsize);
+ sLC.cx = db_get_w(NULL, MODULENAME, cs[i].dbname, cs[i].defsize);
ListView_InsertColumn(hwnd, cs[i].index, &sLC);
i++;
}
@@ -531,7 +540,7 @@ void saveListSettings(HWND hwnd, ColumnsSettings *cs)
while (cs[i].name) {
if (ListView_GetColumn(hwnd, cs[i].index, &sLC)) {
mir_snprintf(tmp, cs[i].dbname, i);
- db_set_w(NULL, modname, tmp, (WORD)sLC.cx);
+ db_set_w(NULL, MODULENAME, tmp, (WORD)sLC.cx);
}
i++;
}
diff --git a/plugins/DbEditorPP/src/main_window.cpp b/plugins/DbEditorPP/src/main_window.cpp
index cb5c21a393..1dedfec9d5 100644
--- a/plugins/DbEditorPP/src/main_window.cpp
+++ b/plugins/DbEditorPP/src/main_window.cpp
@@ -213,7 +213,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
SetWindowText(hwnd, TranslateT("Database Editor++"));
// setup the splitter
- SetWindowLongPtr(GetDlgItem(hwnd, IDC_SPLITTER), GWLP_USERDATA, (LONG_PTR)db_get_w(NULL, modname, "Splitter", 200));
+ SetWindowLongPtr(GetDlgItem(hwnd, IDC_SPLITTER), GWLP_USERDATA, (LONG_PTR)db_get_w(NULL, MODULENAME, "Splitter", 200));
SendMessage(hwnd, GC_SPLITTERMOVED, 0, 0);
mir_subclassWindow(GetDlgItem(hwnd, IDC_SPLITTER), SplitterSubclassProc);
@@ -232,30 +232,30 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
for (int i = 0; i < 6; i++)
TranslateMenu(GetSubMenu(hMenu, i));
- Utils_RestoreWindowPosition(hwnd, NULL, modname, "Main_");
- if (db_get_b(NULL, modname, "Maximized", 0))
+ Utils_RestoreWindowPosition(hwnd, NULL, MODULENAME, "Main_");
+ if (db_get_b(NULL, MODULENAME, "Maximized", 0))
ShowWindow(hwnd, SW_SHOWMAXIMIZED);
- g_Inline = !db_get_b(NULL, modname, "DontAllowInLineEdit", 1);
+ g_Inline = !db_get_b(NULL, MODULENAME, "DontAllowInLineEdit", 1);
CheckMenuItem(GetSubMenu(hMenu, 5), MENU_INLINE_EDIT, MF_BYCOMMAND | (g_Inline ? MF_CHECKED : MF_UNCHECKED));
g_Mode = MODE_ALL;
CheckMenuItem(GetSubMenu(hMenu, 5), MENU_FILTER_ALL, MF_BYCOMMAND | MF_CHECKED);
- g_Hex = db_get_b(NULL, modname, "HexMode", 0);
+ g_Hex = db_get_b(NULL, MODULENAME, "HexMode", 0);
CheckMenuItem(GetSubMenu(hMenu, 5), MENU_BYTE_HEX, MF_BYCOMMAND | ((g_Hex & HEX_BYTE) ? MF_CHECKED : MF_UNCHECKED));
CheckMenuItem(GetSubMenu(hMenu, 5), MENU_WORD_HEX, MF_BYCOMMAND | ((g_Hex & HEX_WORD) ? MF_CHECKED : MF_UNCHECKED));
CheckMenuItem(GetSubMenu(hMenu, 5), MENU_DWORD_HEX, MF_BYCOMMAND | ((g_Hex & HEX_DWORD) ? MF_CHECKED : MF_UNCHECKED));
- CheckMenuItem(GetSubMenu(GetMenu(hwnd), 5), MENU_SAVE_POSITION, MF_BYCOMMAND | (db_get_b(NULL, modname, "RestoreOnOpen", 1) ? MF_CHECKED : MF_UNCHECKED));
+ CheckMenuItem(GetSubMenu(GetMenu(hwnd), 5), MENU_SAVE_POSITION, MF_BYCOMMAND | (db_get_b(NULL, MODULENAME, "RestoreOnOpen", 1) ? MF_CHECKED : MF_UNCHECKED));
- g_Order = db_get_b(NULL, modname, "SortMode", 1);
+ g_Order = db_get_b(NULL, MODULENAME, "SortMode", 1);
CheckMenuItem(GetSubMenu(GetMenu(hwnd), 5), MENU_SORT_ORDER, MF_BYCOMMAND | (g_Order ? MF_CHECKED : MF_UNCHECKED));
int restore;
if (hRestore)
restore = 3;
- else if (db_get_b(NULL, modname, "RestoreOnOpen", 1))
+ else if (db_get_b(NULL, MODULENAME, "RestoreOnOpen", 1))
restore = 2;
else
restore = 0;
@@ -283,7 +283,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
if (splitterPos > rc2.right - rc2.left - 150)
splitterPos = rc2.right - rc2.left - 150;
SetWindowLongPtr(GetDlgItem(hwnd, IDC_SPLITTER), GWLP_USERDATA, splitterPos);
- db_set_w(NULL, modname, "Splitter", (WORD)splitterPos);
+ db_set_w(NULL, MODULENAME, "Splitter", (WORD)splitterPos);
}
PostMessage(hwnd, WM_SIZE, 0, 0);
}
@@ -304,7 +304,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
break;
case WM_DESTROY: // free our shit!
- if (db_get_b(NULL, modname, "RestoreOnOpen", 1)) {
+ if (db_get_b(NULL, MODULENAME, "RestoreOnOpen", 1)) {
HTREEITEM item;
if (item = TreeView_GetSelection(hwnd2Tree)) {
@@ -322,16 +322,16 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
type = mtis->type;
}
- db_set_dw(NULL, modname, "LastContact", hContact);
+ db_set_dw(NULL, MODULENAME, "LastContact", hContact);
if (type == CONTACT)
- db_set_s(NULL, modname, "LastModule", "");
+ db_set_s(NULL, MODULENAME, "LastModule", "");
else
- db_set_s(NULL, modname, "LastModule", _T2A(text));
+ db_set_s(NULL, MODULENAME, "LastModule", _T2A(text));
}
else {
- db_unset(NULL, modname, "LastContact");
- db_unset(NULL, modname, "LastModule");
+ db_unset(NULL, MODULENAME, "LastContact");
+ db_unset(NULL, MODULENAME, "LastModule");
}
int pos = ListView_GetSelectionMark(hwnd2List);
@@ -339,28 +339,28 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
if (pos != -1) {
char data[FLD_SIZE];
ListView_GetItemTextA(hwnd2List, pos, 0, data, _countof(data));
- db_set_s(NULL, modname, "LastSetting", data);
+ db_set_s(NULL, MODULENAME, "LastSetting", data);
}
else
- db_unset(NULL, modname, "LastSetting");
+ db_unset(NULL, MODULENAME, "LastSetting");
}
}
- db_set_b(NULL, modname, "HexMode", (byte)g_Hex);
- db_set_b(NULL, modname, "SortMode", (byte)g_Order);
- db_set_b(NULL, modname, "DontAllowInLineEdit", (byte)!g_Inline);
+ db_set_b(NULL, MODULENAME, "HexMode", (byte)g_Hex);
+ db_set_b(NULL, MODULENAME, "SortMode", (byte)g_Order);
+ db_set_b(NULL, MODULENAME, "DontAllowInLineEdit", (byte)!g_Inline);
{
WINDOWPLACEMENT wp;
wp.length = sizeof(WINDOWPLACEMENT);
GetWindowPlacement(hwnd, &wp);
if (wp.flags == WPF_RESTORETOMAXIMIZED) {
- db_set_b(NULL, modname, "Maximized", 1);
+ db_set_b(NULL, MODULENAME, "Maximized", 1);
ShowWindow(hwnd, SW_SHOWNOACTIVATE);
}
- else db_set_b(NULL, modname, "Maximized", 0);
+ else db_set_b(NULL, MODULENAME, "Maximized", 0);
- Utils_SaveWindowPosition(hwnd, NULL, modname, "Main_");
+ Utils_SaveWindowPosition(hwnd, NULL, MODULENAME, "Main_");
ShowWindow(hwnd, SW_HIDE);
}
@@ -491,9 +491,9 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
break;
case MENU_SAVE_POSITION:
{
- BOOL save = !db_get_b(NULL, modname, "RestoreOnOpen", 1);
+ BOOL save = !db_get_b(NULL, MODULENAME, "RestoreOnOpen", 1);
CheckMenuItem(GetSubMenu(GetMenu(hwnd), 5), MENU_SAVE_POSITION, MF_BYCOMMAND | (save ? MF_CHECKED : MF_UNCHECKED));
- db_set_b(NULL, modname, "RestoreOnOpen", (byte)save);
+ db_set_b(NULL, MODULENAME, "RestoreOnOpen", (byte)save);
}
break;
case MENU_INLINE_EDIT:
diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp
index b9dde4ac32..3d3b15d5db 100644
--- a/plugins/DbEditorPP/src/moduletree.cpp
+++ b/plugins/DbEditorPP/src/moduletree.cpp
@@ -340,11 +340,11 @@ void __cdecl PopulateModuleTreeThreadFunc(LPVOID param)
break;
case 2: // restore saved
- if (GetValueA(NULL, modname, "LastModule", SelectedModule, _countof(SelectedModule))) {
- hSelectedContact = db_get_dw(NULL, modname, "LastContact", INVALID_CONTACT_ID);
+ if (GetValueA(NULL, MODULENAME, "LastModule", SelectedModule, _countof(SelectedModule))) {
+ hSelectedContact = db_get_dw(NULL, MODULENAME, "LastContact", INVALID_CONTACT_ID);
if (hSelectedContact != INVALID_CONTACT_ID)
Select = 1;
- GetValueA(NULL, modname, "LastSetting", SelectedSetting, _countof(SelectedSetting));
+ GetValueA(NULL, MODULENAME, "LastSetting", SelectedSetting, _countof(SelectedSetting));
}
break;
@@ -403,7 +403,7 @@ void __cdecl PopulateModuleTreeThreadFunc(LPVOID param)
insertItem(hContact, module->name, contact);
}
- if (db_get_b(NULL, modname, "ExpandSettingsOnOpen", 0))
+ if (db_get_b(NULL, MODULENAME, "ExpandSettingsOnOpen", 0))
TreeView_Expand(hwnd2Tree, contact, TVE_EXPAND);
if (Select && hSelectedContact == NULL) {
diff --git a/plugins/DbEditorPP/src/options.cpp b/plugins/DbEditorPP/src/options.cpp
index 29e45ad00f..7b2b6297c1 100644
--- a/plugins/DbEditorPP/src/options.cpp
+++ b/plugins/DbEditorPP/src/options.cpp
@@ -6,12 +6,12 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
switch (msg) {
case WM_INITDIALOG:
bInitDone = false;
- CheckDlgButton(hwnd, IDC_EXPANDSETTINGS, db_get_b(NULL, modname, "ExpandSettingsOnOpen", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwnd, IDC_RESTORESETTINGS, db_get_b(NULL, modname, "RestoreOnOpen", 1) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwnd, IDC_WARNONDEL, db_get_b(NULL, modname, "WarnOnDelete", 1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_EXPANDSETTINGS, db_get_b(NULL, MODULENAME, "ExpandSettingsOnOpen", 0) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_RESTORESETTINGS, db_get_b(NULL, MODULENAME, "RestoreOnOpen", 1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_WARNONDEL, db_get_b(NULL, MODULENAME, "WarnOnDelete", 1) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwnd, IDC_POPUPS, g_bUsePopups ? BST_CHECKED : BST_UNCHECKED);
- SetDlgItemInt(hwnd, IDC_POPUPTIMEOUT, db_get_w(NULL, modname, "PopupDelay", 4), 0);
- SendDlgItemMessage(hwnd, IDC_COLOUR, CPM_SETCOLOUR, 0, (LPARAM)db_get_dw(NULL, modname, "PopupColour", RGB(255, 0, 0)));
+ SetDlgItemInt(hwnd, IDC_POPUPTIMEOUT, db_get_w(NULL, MODULENAME, "PopupDelay", 4), 0);
+ SendDlgItemMessage(hwnd, IDC_COLOUR, CPM_SETCOLOUR, 0, (LPARAM)db_get_dw(NULL, MODULENAME, "PopupColour", RGB(255, 0, 0)));
TranslateDialogDefault(hwnd);
bInitDone = true;
return TRUE;
@@ -38,13 +38,13 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- db_set_b(NULL, modname, "ExpandSettingsOnOpen", (BYTE)IsDlgButtonChecked(hwnd, IDC_EXPANDSETTINGS));
- db_set_b(NULL, modname, "RestoreOnOpen", (BYTE)IsDlgButtonChecked(hwnd, IDC_RESTORESETTINGS));
- db_set_b(NULL, modname, "WarnOnDelete", (BYTE)IsDlgButtonChecked(hwnd, IDC_WARNONDEL));
+ db_set_b(NULL, MODULENAME, "ExpandSettingsOnOpen", (BYTE)IsDlgButtonChecked(hwnd, IDC_EXPANDSETTINGS));
+ db_set_b(NULL, MODULENAME, "RestoreOnOpen", (BYTE)IsDlgButtonChecked(hwnd, IDC_RESTORESETTINGS));
+ db_set_b(NULL, MODULENAME, "WarnOnDelete", (BYTE)IsDlgButtonChecked(hwnd, IDC_WARNONDEL));
g_bUsePopups = IsDlgButtonChecked(hwnd, IDC_POPUPS) != 0;
- db_set_b(NULL, modname, "UsePopUps", (BYTE)g_bUsePopups);
- db_set_w(NULL, modname, "PopupDelay", (WORD)GetDlgItemInt(hwnd, IDC_POPUPTIMEOUT, nullptr, 0));
- db_set_dw(NULL, modname, "PopupColour", (DWORD)SendDlgItemMessage(hwnd, IDC_COLOUR, CPM_GETCOLOUR, 0, 0));
+ db_set_b(NULL, MODULENAME, "UsePopUps", (BYTE)g_bUsePopups);
+ db_set_w(NULL, MODULENAME, "PopupDelay", (WORD)GetDlgItemInt(hwnd, IDC_POPUPTIMEOUT, nullptr, 0));
+ db_set_dw(NULL, MODULENAME, "PopupColour", (DWORD)SendDlgItemMessage(hwnd, IDC_COLOUR, CPM_GETCOLOUR, 0, 0));
return TRUE;
}
break;
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp
index 6043abc02c..ccb766e9ae 100644
--- a/plugins/DbEditorPP/src/settinglist.cpp
+++ b/plugins/DbEditorPP/src/settinglist.cpp
@@ -127,7 +127,7 @@ void DeleteSettingsFromList(MCONTACT hContact, const char *module, const char *s
if (!count) return;
- if (db_get_b(NULL, modname, "WarnOnDelete", 1)) {
+ if (db_get_b(NULL, MODULENAME, "WarnOnDelete", 1)) {
wchar_t text[MSG_SIZE];
mir_snwprintf(text, TranslateT("Are you sure you want to delete setting(s): %d?"), count);
if (dlg(text, MB_YESNO | MB_ICONEXCLAMATION) == IDNO)
diff --git a/plugins/DbEditorPP/src/stdafx.h b/plugins/DbEditorPP/src/stdafx.h
index 3e3c0c9e6b..ce5058594e 100644
--- a/plugins/DbEditorPP/src/stdafx.h
+++ b/plugins/DbEditorPP/src/stdafx.h
@@ -44,14 +44,12 @@
//=======================================================
// Definitions
//=======================================================
-#define modname "DBEditorpp"
-#define modFullname "Database Editor++"
+#define MODULENAME "DBEditorpp"
+#define modFullname "Database Editor++"
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(modname)
- {}
+ CMPlugin();
};
#define msg(a) MessageBox(hwnd2mainWindow,a,_A2T(modFullname),MB_OK)
diff --git a/plugins/DbEditorPP/src/watchedvars.cpp b/plugins/DbEditorPP/src/watchedvars.cpp
index 5d894c2c5a..787354cc95 100644
--- a/plugins/DbEditorPP/src/watchedvars.cpp
+++ b/plugins/DbEditorPP/src/watchedvars.cpp
@@ -247,7 +247,7 @@ INT_PTR CALLBACK WatchDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
ListView_SetExtendedListViewStyle(GetDlgItem(hwnd, IDC_VARS), 32 | LVS_EX_LABELTIP); // LVS_EX_GRIDLINES
loadListSettings(GetDlgItem(hwnd, IDC_VARS), csWatchList);
- Utils_RestoreWindowPositionNoMove(hwnd, NULL, modname, "Watch_");
+ Utils_RestoreWindowPositionNoMove(hwnd, NULL, MODULENAME, "Watch_");
mir_subclassWindow(GetDlgItem(hwnd, IDC_VARS), WatchSubclassProc);
@@ -330,7 +330,7 @@ INT_PTR CALLBACK WatchDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_DESTROY:
ListView_DeleteAllItems(GetDlgItem(hwnd, IDC_VARS));
saveListSettings(GetDlgItem(hwnd, IDC_VARS), csWatchList);
- Utils_SaveWindowPosition(hwnd, NULL, modname, "Watch_");
+ Utils_SaveWindowPosition(hwnd, NULL, MODULENAME, "Watch_");
hwnd2watchedVarsWindow = nullptr;
break;
}
@@ -348,9 +348,9 @@ void openWatchedVarWindow()
void popupWatchedVar(MCONTACT hContact, const char *module, const char *setting)
{
- COLORREF colorBack = db_get_dw(NULL, modname, "PopupColour", RGB(255, 0, 0));
- COLORREF colorText = db_get_dw(NULL, modname, "PopupTextColour", RGB(0, 0, 0));
- int timeout = db_get_b(NULL, modname, "PopupDelay", 3);
+ COLORREF colorBack = db_get_dw(NULL, MODULENAME, "PopupColour", RGB(255, 0, 0));
+ COLORREF colorText = db_get_dw(NULL, MODULENAME, "PopupTextColour", RGB(0, 0, 0));
+ int timeout = db_get_b(NULL, MODULENAME, "PopupDelay", 3);
wchar_t name[NAME_SIZE], text[MAX_SECONDLINE], value[MAX_SECONDLINE];
GetContactName(hContact, nullptr, name, _countof(name));