summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-07-18 08:38:08 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-07-18 08:38:08 +0000
commit2fca5c410191f5b3f7531590a3cdf9d4e6c68358 (patch)
tree9c026702d3ab0415afaa37584f064ff10811ab09 /plugins
parent97be7930e06227e0e9c6815937ef6d2c8b7cdc8e (diff)
DBEditor:
- minor bugfixes git-svn-id: http://svn.miranda-ng.org/main/trunk@14585 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/DbEditorPP/src/exportimport.cpp7
-rw-r--r--plugins/DbEditorPP/src/main_window.cpp1
-rw-r--r--plugins/DbEditorPP/src/settinglist.cpp14
3 files changed, 14 insertions, 8 deletions
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp
index e5ce1941fb..b474684de4 100644
--- a/plugins/DbEditorPP/src/exportimport.cpp
+++ b/plugins/DbEditorPP/src/exportimport.cpp
@@ -384,17 +384,17 @@ void importSettings(MCONTACT hContact, char *utf8)
switch (type) {
case 'b':
case 'B':
- if (sscanf((end + 2), "%u", &value) == 1)
+ if (sscanf(end + 2, "%u", &value) == 1)
db_set_b(hContact, module, setting, (BYTE)value);
break;
case 'w':
case 'W':
- if (sscanf((end + 2), "%u", &value) == 1)
+ if (sscanf(end + 2, "%u", &value) == 1)
db_set_w(hContact, module, setting, (WORD)value);
break;
case 'd':
case 'D':
- if (sscanf((end + 2), "%u", &value) == 1)
+ if (sscanf(end + 2, "%u", &value) == 1)
db_set_dw(hContact, module, setting, (DWORD)value);
break;
case 's':
@@ -414,6 +414,7 @@ void importSettings(MCONTACT hContact, char *utf8)
memmove(pstr + 1, pstr + 2, mir_strlen(pstr + 2) + 1);
}
}
+ // fall through - write it to database
case 'u':
case 'U':
db_set_utf(hContact, module, setting, (end + 2));
diff --git a/plugins/DbEditorPP/src/main_window.cpp b/plugins/DbEditorPP/src/main_window.cpp
index 9200506b93..25817ab206 100644
--- a/plugins/DbEditorPP/src/main_window.cpp
+++ b/plugins/DbEditorPP/src/main_window.cpp
@@ -501,6 +501,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case MENU_INLINE_EDIT:
g_Inline = !g_Inline;
CheckMenuItem(GetSubMenu(GetMenu(hwnd), 5), MENU_INLINE_EDIT, MF_BYCOMMAND | (g_Inline ? MF_CHECKED : MF_UNCHECKED));
+ break;
case MENU_SORT_ORDER:
g_Order = !g_Order;
CheckMenuItem(GetSubMenu(GetMenu(hwnd), 5), MENU_SORT_ORDER, MF_BYCOMMAND | (g_Order ? MF_CHECKED : MF_UNCHECKED));
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp
index 2920e24948..51098328c9 100644
--- a/plugins/DbEditorPP/src/settinglist.cpp
+++ b/plugins/DbEditorPP/src/settinglist.cpp
@@ -62,15 +62,19 @@ int convertSetting(MCONTACT hContact, const char *module, const char *setting, i
break;
case DBVT_WCHAR:
- if (!value) value = mir_u2t(dbv.pwszVal);
+ if (!value)
+ value = mir_u2t(dbv.pwszVal);
+ // fall through
case DBVT_UTF8:
- if (!value) value = mir_utf8decodeT(dbv.pszVal);
+ if (!value)
+ value = mir_utf8decodeT(dbv.pszVal);
+ // fall through
case DBVT_ASCIIZ:
- if (!value) value = mir_a2t(dbv.pszVal);
+ if (!value)
+ value = mir_a2t(dbv.pszVal);
if (mir_tstrlen(value) < 11)
val = _tcstoul(value, NULL, NULL);
- break;
}
switch (toType) {
@@ -530,6 +534,7 @@ static LRESULT CALLBACK SettingLabelEditSubClassProc(HWND hwnd, UINT msg, WPARAM
case _T('0'):
i = 1;
+ // fall through
case _T('1'):
case _T('2'):
case _T('3'):
@@ -625,7 +630,6 @@ void EditLabel(int item, int subitem)
if (db_get_s(info.hContact, info.module, setting, &dbv, 0))
return;
- info.hContact = info.hContact;
mir_strcpy(info.setting, setting);
info.subitem = subitem;