aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorin1tiate <32779090+in1tiate@users.noreply.github.com>2020-03-08 05:38:24 -0500
committerGitHub <noreply@github.com>2020-03-08 05:38:24 -0500
commit5f69d4e6493475e41fdad34f5041d1a8bdc8176c (patch)
tree1fb7068f04ffa2cf7f72b73df17e1b1293df5438 /src
parentba17334fb8686f84a7dce862f85de829c0141b74 (diff)
parent0ce577c482a97d1d85cf84a6a04550bfe99be8fa (diff)
Merge pull request #5 from AttorneyOnline/master
bring up to date with master
Diffstat (limited to 'src')
-rw-r--r--src/courtroom.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index b9686e70..805c8cca 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -1655,7 +1655,21 @@ void Courtroom::handle_chatmessage_2()
ui_vp_chatbox->set_image("chatmed.png");
else
{
- QString chatbox_path = ao_app->get_base_path() + "misc/" + chatbox + "/chatbox.png";
+ QString chatbox_path;
+ QString misc_path = ao_app->get_base_path() + "misc/" + chatbox + "/chatbox.png";
+ // support for 2.4 legacy chatboxes
+ QString legacy_path = ao_app->get_base_path() + "misc/" + chatbox + ".png";
+ if (file_exists(misc_path))
+ {
+ chatbox_path = misc_path;
+ }
+ else if (file_exists(legacy_path))
+ chatbox_path = legacy_path;
+ else
+ {
+ QString default_chatbox_path = ao_app->get_theme_path("chatmed.png");
+ chatbox_path = default_chatbox_path;
+ }
ui_vp_chatbox->set_image_from_path(chatbox_path);
}