aboutsummaryrefslogtreecommitdiff
path: root/src/text_file_functions.cpp
diff options
context:
space:
mode:
authorMangosArentLiterature <58055358+MangosArentLiterature@users.noreply.github.com>2021-04-28 00:43:06 -0500
committerMangosArentLiterature <58055358+MangosArentLiterature@users.noreply.github.com>2021-04-28 00:43:06 -0500
commit99d083d114844ce3f8274663da212784595421ed (patch)
tree23dc0f0b2d3737dffb259c105c02d4aae83373cb /src/text_file_functions.cpp
parentf08a293a2f052806480984717cf2961f8b6824ac (diff)
Add default shownames
Adds a new setting to config.ini to set a default showname. This works similarly to default username, but for IC shownames, setting the client's showname automatically. Like default username, this has a 30 character limit. * Adds a new option to config.ini, default_showname. * Adds this setting to the options dialog. * Adds get_default_showname() for retrieving this showname. * Sets the showname box to this value upon joining a server.
Diffstat (limited to 'src/text_file_functions.cpp')
-rw-r--r--src/text_file_functions.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp
index 39ebb7e8..2c50e175 100644
--- a/src/text_file_functions.cpp
+++ b/src/text_file_functions.cpp
@@ -112,6 +112,12 @@ QString AOApplication::get_default_username()
return result;
}
+QString AOApplication::get_default_showname()
+{
+ QString result = configini->value("default_showname", "").value<QString>();
+ return result;
+}
+
QString AOApplication::get_audio_output_device()
{
QString result =