summaryrefslogtreecommitdiff
path: root/plugins/Watrack_MPD/src/options.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-12-08 20:12:16 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-12-08 20:12:26 +0300
commit8ffc77be71507825a8f7585bcabff8ccc370206a (patch)
treeaa13a8070f31286db6ad22e17a577e547942f951 /plugins/Watrack_MPD/src/options.cpp
parent41b2fdfc654e3eec07c97ceba00cda13d988ffff (diff)
db_get_sa / db_get_wsa to receive the default value, massive code simplification
Diffstat (limited to 'plugins/Watrack_MPD/src/options.cpp')
-rwxr-xr-xplugins/Watrack_MPD/src/options.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/Watrack_MPD/src/options.cpp b/plugins/Watrack_MPD/src/options.cpp
index f861e8ed90..a83003f9e0 100755
--- a/plugins/Watrack_MPD/src/options.cpp
+++ b/plugins/Watrack_MPD/src/options.cpp
@@ -26,12 +26,8 @@ public:
bool OnInitDialog() override
{
edit_PORT.SetInt(g_plugin.getWord("Port", 6600));
- wchar_t *tmp = UniGetContactSettingUtf(0, MODULENAME, "Server", L"127.0.0.1");
- edit_SERVER.SetText(tmp);
- mir_free(tmp);
- tmp = UniGetContactSettingUtf(0, MODULENAME, "Password", L"");
- edit_PASSWORD.SetText(tmp);
- mir_free(tmp);
+ edit_SERVER.SetText(ptrW(db_get_wsa(0, MODULENAME, "Server", L"127.0.0.1")));
+ edit_PASSWORD.SetText(ptrW(db_get_wsa(0, MODULENAME, "Password", L"")));
return true;
}