summaryrefslogtreecommitdiff
path: root/plugins/Watrack_MPD/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Watrack_MPD/src')
-rwxr-xr-xplugins/Watrack_MPD/src/init.cpp4
-rwxr-xr-xplugins/Watrack_MPD/src/options.cpp8
-rwxr-xr-xplugins/Watrack_MPD/src/stdafx.h1
-rwxr-xr-xplugins/Watrack_MPD/src/utilities.cpp24
-rwxr-xr-xplugins/Watrack_MPD/src/utilities.h6
5 files changed, 4 insertions, 39 deletions
diff --git a/plugins/Watrack_MPD/src/init.cpp b/plugins/Watrack_MPD/src/init.cpp
index 45f263e94d..381769f8ef 100755
--- a/plugins/Watrack_MPD/src/init.cpp
+++ b/plugins/Watrack_MPD/src/init.cpp
@@ -54,8 +54,8 @@ static int OnModulesLoaded(WPARAM, LPARAM)
ghNetlibUser = Netlib_RegisterUser(&nlu);
gbPort = g_plugin.getWord("Port", 6600);
- gbHost = UniGetContactSettingUtf(0, MODULENAME, "Server", L"127.0.0.1");
- gbPassword = UniGetContactSettingUtf(0, MODULENAME, "Password", L"");
+ gbHost = db_get_wsa(0, MODULENAME, "Server", L"127.0.0.1");
+ gbPassword = db_get_wsa(0, MODULENAME, "Password", L"");
if (ServiceExists(MS_WAT_PLAYER))
bWatrackService = TRUE;
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;
}
diff --git a/plugins/Watrack_MPD/src/stdafx.h b/plugins/Watrack_MPD/src/stdafx.h
index ac03eee33a..fddc052a34 100755
--- a/plugins/Watrack_MPD/src/stdafx.h
+++ b/plugins/Watrack_MPD/src/stdafx.h
@@ -29,7 +29,6 @@
#include <m_music.h>
#include "resource.h"
-#include "utilities.h"
#include "version.h"
#define MODULENAME "Watrack_MPD"
diff --git a/plugins/Watrack_MPD/src/utilities.cpp b/plugins/Watrack_MPD/src/utilities.cpp
deleted file mode 100755
index b8c209150f..0000000000
--- a/plugins/Watrack_MPD/src/utilities.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright © 2008 sss, chaos.persei
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-#include "stdafx.h"
-
-wchar_t* __stdcall UniGetContactSettingUtf(MCONTACT hContact, const char *szModule,const char* szSetting, wchar_t* szDef)
-{
- wchar_t *szRes = db_get_wsa(hContact, szModule, szSetting);
- return szRes ? szRes : mir_wstrdup(szDef);
-}
diff --git a/plugins/Watrack_MPD/src/utilities.h b/plugins/Watrack_MPD/src/utilities.h
deleted file mode 100755
index 3f594c7084..0000000000
--- a/plugins/Watrack_MPD/src/utilities.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef UTILITIES_H
-#define UTILITIES_H
-
-wchar_t* __stdcall UniGetContactSettingUtf(MCONTACT hContact, const char *szModule,const char* szSetting, wchar_t* szDef);
-
-#endif