diff --git a/data/widgets/about.xml b/data/widgets/about.xml index dd2e643f4..cc21abce7 100644 --- a/data/widgets/about.xml +++ b/data/widgets/about.xml @@ -1,5 +1,5 @@ - + @@ -20,6 +20,7 @@ + diff --git a/src/app/commands/cmd_about.cpp b/src/app/commands/cmd_about.cpp index f015caa40..3f6a87060 100644 --- a/src/app/commands/cmd_about.cpp +++ b/src/app/commands/cmd_about.cpp @@ -1,5 +1,5 @@ // Aseprite -// Copyright (C) 2020-2021 Igara Studio S.A. +// Copyright (C) 2020-2024 Igara Studio S.A. // Copyright (C) 2001-2018 David Capello // // This program is distributed under the terms of @@ -49,6 +49,11 @@ void AboutCommand::onExecute(Context* context) window.closeWindow(nullptr); App::instance()->mainWindow()->showBrowser("README.md", "Authors"); }); + window.i18nCredits()->Click.connect( + [&window]{ + window.closeWindow(nullptr); + App::instance()->mainWindow()->showBrowser("strings/README.md", "Translators"); + }); window.openWindowInForeground(); } diff --git a/src/app/ui/browser_view.cpp b/src/app/ui/browser_view.cpp index 8d07eb7fb..6279cc6ac 100644 --- a/src/app/ui/browser_view.cpp +++ b/src/app/ui/browser_view.cpp @@ -1,5 +1,5 @@ // Aseprite -// Copyright (C) 2018-2022 Igara Studio S.A. +// Copyright (C) 2018-2024 Igara Studio S.A. // Copyright (C) 2016-2017 David Capello // // This program is distributed under the terms of @@ -237,7 +237,14 @@ private: bool onProcessMessage(Message* msg) override { if (msg->type() == kLoadFileMessage) { - loadFile(static_cast(msg)->file()); + std::string newFile = static_cast(msg)->file(); + std::string newRelativeFile = + base::join_path(base::get_file_path(m_file), + newFile); + if (base::is_file(newRelativeFile)) { + newFile = newRelativeFile; + } + loadFile(newFile); return true; } @@ -574,12 +581,16 @@ BrowserView::~BrowserView() void BrowserView::loadFile(const std::string& file, const std::string& section) { + if (section.empty()) + m_title = base::get_file_title(file); + else + m_title = section; m_textBox->loadFile(file, section); } std::string BrowserView::getTabText() { - return base::get_file_title(m_textBox->file()); + return m_title; } TabIcon BrowserView::getTabIcon() diff --git a/src/app/ui/browser_view.h b/src/app/ui/browser_view.h index d213674b7..a43c79b54 100644 --- a/src/app/ui/browser_view.h +++ b/src/app/ui/browser_view.h @@ -1,5 +1,5 @@ // Aseprite -// Copyright (C) 2021 Igara Studio S.A. +// Copyright (C) 2021-2024 Igara Studio S.A. // Copyright (C) 2016 David Capello // // This program is distributed under the terms of @@ -40,6 +40,7 @@ namespace app { private: class CMarkBox; + std::string m_title; ui::View m_view; CMarkBox* m_textBox; };