Ability to set a default username added.
- Done by adding a `default_username = whatever` to your `config.ini`. - `whatever` can be any string. - If nothing is given, it defaults to the, uh, default nothing.
This commit is contained in:
parent
3295e5a78e
commit
977a88a267
@ -133,6 +133,9 @@ public:
|
||||
//may contain, from config.ini.
|
||||
int get_max_log_size();
|
||||
|
||||
// Returns the username the user may have set in config.ini.
|
||||
QString get_default_username();
|
||||
|
||||
//Returns the list of words in callwords.ini
|
||||
QStringList get_call_words();
|
||||
|
||||
|
@ -111,6 +111,8 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
|
||||
ui_ooc_chat_name->setFrame(false);
|
||||
ui_ooc_chat_name->setPlaceholderText("Name");
|
||||
|
||||
ui_ooc_chat_name->setText(p_ao_app->get_default_username());
|
||||
|
||||
//ui_area_password = new QLineEdit(this);
|
||||
//ui_area_password->setFrame(false);
|
||||
ui_music_search = new QLineEdit(this);
|
||||
|
@ -99,6 +99,12 @@ int AOApplication::get_max_log_size()
|
||||
else return f_result.toInt();
|
||||
}
|
||||
|
||||
QString AOApplication::get_default_username()
|
||||
{
|
||||
QString f_result = read_config("default_username");
|
||||
return f_result;
|
||||
}
|
||||
|
||||
QStringList AOApplication::get_call_words()
|
||||
{
|
||||
QStringList return_value;
|
||||
|
Loading…
Reference in New Issue
Block a user