mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-28 00:35:30 +00:00
Add link in About dialog to show the list of translators
This commit is contained in:
parent
a7d4c23af9
commit
749ea49185
@ -1,5 +1,5 @@
|
||||
<!-- Aseprite -->
|
||||
<!-- Copyright (C) 2018-2022 Igara Studio S.A. -->
|
||||
<!-- Copyright (C) 2018-2024 Igara Studio S.A. -->
|
||||
<!-- Copyright (C) 2018 David Capello -->
|
||||
<gui i18nwarnings="false">
|
||||
<window id="about" text="About Aseprite">
|
||||
@ -20,6 +20,7 @@
|
||||
<vbox>
|
||||
<separator text="Credits" horizontal="true" cell_hspan="2" />
|
||||
<link text="Contributors" url="" id="credits" />
|
||||
<link text="Translators" url="" id="i18n_credits" />
|
||||
<link text="Open Source Projects" url="" id="licenses" />
|
||||
</vbox>
|
||||
</hbox>
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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<LoadFileMessage*>(msg)->file());
|
||||
std::string newFile = static_cast<LoadFileMessage*>(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()
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user