From 99d083d114844ce3f8274663da212784595421ed Mon Sep 17 00:00:00 2001 From: MangosArentLiterature <58055358+MangosArentLiterature@users.noreply.github.com> Date: Wed, 28 Apr 2021 00:43:06 -0500 Subject: 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. --- include/aoapplication.h | 3 +++ include/aooptionsdialog.h | 2 ++ 2 files changed, 5 insertions(+) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 16bbb9f..7715475 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -278,6 +278,9 @@ public: // Returns whether the user would like to have custom shownames on by default. bool get_showname_enabled_by_default(); + //Returns the showname the user may have set in config.ini. + QString get_default_showname(); + // Returns the list of words in callwords.ini QStringList get_call_words(); diff --git a/include/aooptionsdialog.h b/include/aooptionsdialog.h index 45fc86c..a6c8b8e 100644 --- a/include/aooptionsdialog.h +++ b/include/aooptionsdialog.h @@ -78,6 +78,8 @@ private: QLabel *ui_username_lbl; QLabel *ui_showname_lbl; QCheckBox *ui_showname_cb; + QLabel *ui_default_showname_lbl; + QLineEdit *ui_default_showname_textbox; QFrame *ui_net_divider; QLabel *ui_ms_lbl; QLineEdit *ui_ms_textbox; -- cgit