summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/DbEditorPP/src')
-rw-r--r--plugins/DbEditorPP/src/main_window.cpp4
-rw-r--r--plugins/DbEditorPP/src/settinglist.cpp6
-rw-r--r--plugins/DbEditorPP/src/version.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/DbEditorPP/src/main_window.cpp b/plugins/DbEditorPP/src/main_window.cpp
index 4c1b9af097..46c66b6afe 100644
--- a/plugins/DbEditorPP/src/main_window.cpp
+++ b/plugins/DbEditorPP/src/main_window.cpp
@@ -269,14 +269,12 @@ void CMainDlg::OnDestroy()
}
int pos = m_settings.GetSelectionMark();
-
if (pos != -1) {
char data[FLD_SIZE];
ListView_GetItemTextA(m_settings.GetHwnd(), pos, 0, data, _countof(data));
g_plugin.setString("LastSetting", data);
}
- else
- g_plugin.delSetting("LastSetting");
+ else g_plugin.delSetting("LastSetting");
}
}
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp
index 207a5b95b6..0df1490230 100644
--- a/plugins/DbEditorPP/src/settinglist.cpp
+++ b/plugins/DbEditorPP/src/settinglist.cpp
@@ -94,9 +94,11 @@ void CMainDlg::DeleteSettingsFromList(MCONTACT hContact, const char *module, con
if (!count)
return;
+ bool isContacts = (hContact == 0 && mir_strlen(module) == 0);
+
if (g_plugin.bWarnOnDelete) {
wchar_t text[MSG_SIZE];
- if (info.hContact == 0)
+ if (isContacts)
mir_snwprintf(text, TranslateT("Are you sure you want to delete %d contact(s)?"), count);
else
mir_snwprintf(text, TranslateT("Are you sure you want to delete %d setting(s)?"), count);
@@ -104,7 +106,7 @@ void CMainDlg::DeleteSettingsFromList(MCONTACT hContact, const char *module, con
return;
}
- if (hContact == 0) {
+ if (isContacts) {
int items = m_settings.GetItemCount();
for (int i = 0; i < items;) {
if (m_settings.GetItemState(i, LVIS_SELECTED)) {
diff --git a/plugins/DbEditorPP/src/version.h b/plugins/DbEditorPP/src/version.h
index 3883913a11..cbcffdad69 100644
--- a/plugins/DbEditorPP/src/version.h
+++ b/plugins/DbEditorPP/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 4
#define __MINOR_VERSION 1
#define __RELEASE_NUM 0
-#define __BUILD_NUM 1
+#define __BUILD_NUM 2
#include <stdver.h>