27
27
#include "lenmus_logger.h"
28
28
#include "lenmus_colors.h"
29
29
#include "lenmus_status_reporter.h"
30
#include "lenmus_string.h"
31
#include "lenmus_version.h"
33
31
//wxWidgets and others
34
32
#include <wx/arrstr.h> //AWARE: Required by wxsqlite3. In Linux GCC complains
110
107
int major = LENMUS_VERSION_MAJOR;
111
108
int minor = LENMUS_VERSION_MINOR;
112
109
int patch = LENMUS_VERSION_PATCH;
113
wxString type = _T(LENMUS_VERSION_TYPE);
114
if (type.empty() || type == _T(" "))
110
wxString state = _T(LENMUS_VERSION_STATE);
117
114
m_sVersionString = wxString::Format(_T("%d.%d"), major, minor);
136
133
int major = LENMUS_VERSION_MAJOR;
137
134
int minor = LENMUS_VERSION_MINOR;
138
135
int patch = LENMUS_VERSION_PATCH;
139
wxString type = _T(LENMUS_VERSION_TYPE);
140
if (type.empty() || type == _T(" "))
136
wxString state = _T(LENMUS_VERSION_STATE);
142
139
name += get_version_string();
143
if (state == _T("a"))
147
144
name += wxString::Format(_T("%d.%d alpha %d"), major, minor, patch);
148
else if (type == _T("b"))
145
else if (state == _T("b"))
149
146
name += wxString::Format(_T("%d.%d beta %d"), major, minor, patch);
151
148
name += get_version_string();
219
216
//---------------------------------------------------------------------------------------
220
void ApplicationScope::inform_lomse_about_fonts_path()
222
Paths* pPaths = get_paths();
223
wxString sPath = pPaths->GetFontsPath();
224
m_lomse.set_default_fonts_path( to_std_string(sPath) );
227
//---------------------------------------------------------------------------------------
228
217
MidiServer* ApplicationScope::get_midi_server()
323
312
m_pProxySettings = LENMUS_NEW ProxySettings();
324
313
wxConfigBase* pPrefs = get_preferences();
327
pPrefs->Read(_T("/Internet/UseProxy"), &fUseProxy, false);
328
m_pProxySettings->fUseProxy = fUseProxy;
330
m_pProxySettings->sProxyHostname = pPrefs->Read(_T("/Internet/Hostname"), _T(""));
333
wxString sPort = pPrefs->Read(_T("/Internet/PortNumber"), _T(""));
334
if (sPort.IsNumber())
335
sPort.ToLong(&nPort);
336
m_pProxySettings->nProxyPort = nPort;
338
bool fAuthentication;
339
pPrefs->Read(_T("/Internet/ProxyAuthentication"), &fAuthentication, false);
340
m_pProxySettings->fRequiresAuth = fAuthentication;
342
m_pProxySettings->sProxyUsername = pPrefs->Read(_T("/Internet/Username"), _T(""));
343
m_pProxySettings->sProxyPassword = pPrefs->Read(_T("/Internet/Password"), _T(""));
316
pPrefs->Read(_T("/Internet/UseProxy"), &fUseProxy, false);
317
m_pProxySettings->fUseProxy = fUseProxy;
319
m_pProxySettings->sProxyHostname = pPrefs->Read(_T("/Internet/Hostname"), _T(""));
322
wxString sPort = pPrefs->Read(_T("/Internet/PortNumber"), _T(""));
323
if (sPort.IsNumber())
324
sPort.ToLong(&nPort);
325
m_pProxySettings->nProxyPort = nPort;
327
bool fAuthentication;
328
pPrefs->Read(_T("/Internet/ProxyAuthentication"), &fAuthentication, false);
329
m_pProxySettings->fRequiresAuth = fAuthentication;
331
m_pProxySettings->sProxyUsername = pPrefs->Read(_T("/Internet/Username"), _T(""));
332
m_pProxySettings->sProxyPassword = pPrefs->Read(_T("/Internet/Password"), _T(""));
345
334
return m_pProxySettings;