From ecfe6f2542d73e9559b75a502f6eebffe63a76cf Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Sat, 25 Dec 2021 19:17:27 -0600 Subject: Change master chat in courtroom to debug log Since the MS chat has been disabled for quite some time now (and we aren't planning on bringing it back since Discord, Guilded etc. have better chat features), I decided to go ahead and change the pane into a debug log to keep it useful and avoid creating a gaping hole in themes. Though, maybe it is worth removing the whole switcher and keeping the debug log hidden away where it can't scare people. --- include/aoapplication.h | 4 ++++ include/aotextarea.h | 3 ++- include/courtroom.h | 10 +++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 957d7f6b..ab738220 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -567,6 +567,10 @@ private slots: public slots: void server_disconnected(); void loading_cancelled(); + +signals: + void qt_log_message(QtMsgType type, const QMessageLogContext &context, + const QString &msg); }; #endif // AOAPPLICATION_H diff --git a/include/aotextarea.h b/include/aotextarea.h index 453e9659..d9a960db 100644 --- a/include/aotextarea.h +++ b/include/aotextarea.h @@ -12,7 +12,8 @@ public: AOTextArea(QWidget *p_parent = nullptr); void append_linked(QString p_message); - void append_chatmessage(QString p_name, QString p_message, QString p_colur); + void append_chatmessage(QString p_name, QString p_message, + QString p_name_colour, QString p_color = QString()); void append_error(QString p_message); private: diff --git a/include/courtroom.h b/include/courtroom.h index 4bc86242..4c286062 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -214,8 +214,12 @@ public: void list_music(); void list_areas(); - // these are for OOC chat - void append_ms_chatmessage(QString f_name, QString f_message); + // Debug log (formerly master server chat log) + void debug_message_handler(QtMsgType type, const QMessageLogContext &context, + const QString &msg); + void append_debug_message(QString f_message); + + // OOC chat log void append_server_chatmessage(QString p_name, QString p_message, QString p_color); @@ -628,7 +632,7 @@ private: QTextEdit *ui_ic_chatlog; - AOTextArea *ui_ms_chatlog; + AOTextArea *ui_debug_log; AOTextArea *ui_server_chatlog; QListWidget *ui_mute_list; -- cgit