store welcome message set in the GUI in the ini file

This commit is contained in:
Volker Fischer 2020-07-10 18:51:36 +02:00
parent 71c1067905
commit 48dc79efb5
2 changed files with 11 additions and 2 deletions

View File

@ -19,12 +19,11 @@
- scale channel instrument picture in Compact skin mode
- redesign of the server dialog
- redesign of the server dialog (e.g. added welcome message setting)
- bug fix: grouping faders in the client should be proportional (see discussion in #202, #419)
TODO store welcome message set in the GUI in the ini file
TODO improve settings management -> move settings class in client/server classes, move actual settings variables
TODO improve interaction between use of inifile and command line parameters (edited) #120

View File

@ -825,6 +825,12 @@ if ( GetFlagIniSet ( IniXMLDocument, "server", "defcentservaddr", bValue ) )
pServer->SetLicenceType ( static_cast<ELicenceType> ( iValue ) );
}
// welcome message (command line overwrites setting file)
if ( pServer->GetWelcomeMessage().isEmpty() )
{
pServer->SetWelcomeMessage ( FromBase64ToString ( GetIniSetting ( IniXMLDocument, "server", "welcome" ) ) );
}
// window position of the main window
vecWindowPosMain = FromBase64ToByteArray (
GetIniSetting ( IniXMLDocument, "server", "winposmain_base64" ) );
@ -868,6 +874,10 @@ void CServerSettings::WriteToXML ( QDomDocument& IniXMLDocument )
SetNumericIniSet ( IniXMLDocument, "server", "licencetype",
static_cast<int> ( pServer->GetLicenceType() ) );
// welcome message
PutIniSetting ( IniXMLDocument, "server", "welcome",
ToBase64 ( pServer->GetWelcomeMessage() ) );
// window position of the main window
PutIniSetting ( IniXMLDocument, "server", "winposmain_base64",
ToBase64 ( vecWindowPosMain ) );