diff options
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/modern_rowtemplateopt.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_skinbutton.cpp | 8 |
2 files changed, 3 insertions, 9 deletions
diff --git a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp index f28e596aae..f5d455ee83 100644 --- a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp +++ b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp @@ -336,9 +336,7 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- rowOptTmplStr = db_get_sa(0, "ModernData", "RowTemplate");
- if (!rowOptTmplStr)
- rowOptTmplStr = mir_strdup("<TR />");
+ rowOptTmplStr = db_get_sa(0, "ModernData", "RowTemplate", "<TR />");
SendDlgItemMessage(hwndDlg, IDC_SPINCONTWIDTH, UDM_SETRANGE, 0, MAKELONG(999, 0));
SendDlgItemMessage(hwndDlg, IDC_SPINCONTHEIGHT, UDM_SETRANGE, 0, MAKELONG(999, 0));
diff --git a/plugins/Clist_modern/src/modern_skinbutton.cpp b/plugins/Clist_modern/src/modern_skinbutton.cpp index 6884fbbbe6..bebfd0ffca 100644 --- a/plugins/Clist_modern/src/modern_skinbutton.cpp +++ b/plugins/Clist_modern/src/modern_skinbutton.cpp @@ -127,12 +127,8 @@ static int ModernSkinButtonPaintWorker(HWND hwnd, HDC whdc) } while (key[0] != '\0'); switch (bct->ValueTypeDef[0]) { case 's': - { - Value = db_get_sa(0, section, key); - if (!Value) - Value = mir_strdup(bct->ValueTypeDef + 1); - break; - } + Value = db_get_sa(0, section, key, bct->ValueTypeDef + 1); + break; case 'd': defval = db_get_dw(0, section, key, defval); Value = mir_strdup(_ltoa(defval, buf, _countof(buf))); |