Skip to content

Commit

Permalink
feat: переместить окно Adw.AboutDialog в отдельный файл для лёгкого…
Browse files Browse the repository at this point in the history
… поиска и редактирования со стороны контрибутора
  • Loading branch information
Rirusha committed May 16, 2024
1 parent f258035 commit a79d82a
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 53 deletions.
79 changes: 79 additions & 0 deletions src/about.vala
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/* Copyright 2023-2024 Rirusha
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-3.0-only
*/

namespace Cassette {

public Adw.AboutDialog build_about_dialog () {
const string RIRUSHA = "Rirusha https://github.com/Rirusha";
const string TELEGRAM_CHAT = "https://t.me/CassetteGNOME_Discussion";
const string TELEGRAM_CHANNEL = "https://t.me/CassetteGNOME_Devlog";
const string ISSUE_LINK = "https://github.com/Rirusha/Cassette/issues/new";
const string TINKOFF_SUPPORT_LINK = "https://www.tinkoff.ru/cf/21GCxLuFuE9";
const string BOOSTY_SUPPORT_LINK = "https://boosty.to/rirusha/donate";

string[] developers = {
RIRUSHA
};

string[] designers = {
RIRUSHA
};

string[] artists = {
RIRUSHA,
"Arseniy Nechkin <[email protected]>",
"NaumovSN",
};

string[] documenters = {
RIRUSHA,
"Armatik https://github.com/Armatik",
"Fiersik https://github.com/fiersik",
"Mikazil https://github.com/Mikazil",
};

var about = new Adw.AboutDialog () {
application_name = Config.APP_NAME,
application_icon = Config.APP_ID_DYN,
developer_name = "Rirusha",
version = Config.VERSION,
developers = developers,
designers = designers,
artists = artists,
documenters = documenters,
// Translators: NAME <EMAIL.COM> /n NAME <EMAIL.COM>
translator_credits = _("translator-credits"),
license_type = Gtk.License.GPL_3_0_ONLY,
copyright = "© 2023-2024 Rirusha",
support_url = TELEGRAM_CHAT,
issue_url = ISSUE_LINK,
release_notes_version = Config.VERSION
};

about.add_link (_("Telegram channel"), TELEGRAM_CHANNEL);
about.add_link (_("Financial support (Tinkoff)"), TINKOFF_SUPPORT_LINK);
about.add_link (_("Financial support (Boosty)"), BOOSTY_SUPPORT_LINK);

about.add_acknowledgement_section ("Donaters", {
"katze_942", "gen1s", "Semen Fomchenkov", "Oleg Shchavelev", "Fissium", "Fiersik", "belovmv",
"krylov_alexandr", "Spp595", "Mikazil", "Sergey P.", "khaustovdn", "dant4ick", "Nikolai M.",
"Toxblh", "Roman Aysin", "IQQator", "𝙰𝚖𝚙𝚎𝚛 𝚂𝚑𝚒𝚣", "kvadrozorro", "Mikhail Postnikov", "eugene_t"
});

return about;
}
}
2 changes: 2 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ cassette_gui_sources = files(
'widgets/theme-switcher.vala',
'widgets/track-carousel.vala',
'widgets/track-info-panel.vala',

'about.vala',
'application.vala',
'authenticator.vala',
'window.vala',
Expand Down
54 changes: 1 addition & 53 deletions src/window.vala
Original file line number Diff line number Diff line change
Expand Up @@ -152,59 +152,7 @@ public class Cassette.Window : ApplicationWindow {
}

void on_about_action () {
const string RIRUSHA = "Rirusha https://github.com/Rirusha";
const string TELEGRAM_CHAT = "https://t.me/CassetteGNOME_Discussion";
const string TELEGRAM_CHANNEL = "https://t.me/CassetteGNOME_Devlog";
const string ISSUE_LINK = "https://github.com/Rirusha/Cassette/issues/new";

string[] developers = {
RIRUSHA
};

string[] designers = {
RIRUSHA
};

string[] artists = {
RIRUSHA,
"Arseniy Nechkin <[email protected]>",
"NaumovSN",
};

string[] documenters = {
RIRUSHA,
"Armatik https://github.com/Armatik",
"Fiersik https://github.com/fiersik",
"Mikazil https://github.com/Mikazil",
};

var about = new Adw.AboutDialog () {
application_name = Config.APP_NAME,
application_icon = Config.APP_ID_DYN,
developer_name = "Rirusha",
version = Config.VERSION,
developers = developers,
designers = designers,
artists = artists,
documenters = documenters,
// Translators: NAME <EMAIL.COM> /n NAME <EMAIL.COM>
translator_credits = _("translator-credits"),
license_type = Gtk.License.GPL_3_0_ONLY,
copyright = "© 2023-2024 Rirusha",
support_url = TELEGRAM_CHAT,
issue_url = ISSUE_LINK,
release_notes_version = Config.VERSION
};

about.add_link (_("Telegram channel"), TELEGRAM_CHANNEL);
about.add_link (_("Financial support (Tinkoff)"), "https://www.tinkoff.ru/cf/21GCxLuFuE9");
about.add_link (_("Financial support (Boosty)"), "https://boosty.to/rirusha/donate");

about.add_acknowledgement_section ("Donaters", {
"katze_942", "gen1s", "Semen Fomchenkov", "Oleg Shchavelev", "Fissium", "Fiersik", "belovmv",
"krylov_alexandr", "Spp595", "Mikazil", "Sergey P.", "khaustovdn", "dant4ick", "Nikolai M.",
"Toxblh", "Roman Aysin", "IQQator", "𝙰𝚖𝚙𝚎𝚛 𝚂𝚑𝚒𝚣", "kvadrozorro", "Mikhail Postnikov", "eugene_t"
});
var about = build_about_dialog ();

about.present (this);
}
Expand Down

0 comments on commit a79d82a

Please sign in to comment.