move about dialog to about.py for clarity

parent f2ca6ced
......@@ -5,6 +5,7 @@ data/ru.ximperlinux.TuneIt.metainfo.xml.in
data/ru.ximperlinux.TuneIt.gschema.xml
data/ru.ximperlinux.TuneIt.Daemon.policy
src/about.py
src/main.py
src/window.py
src/window.blp
......
# about.py
#
# Copyright 2025 Etersoft
#
# 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, either version 3 of the License, or
# (at your option) any later version.
#
# 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 <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-3.0-or-later
from gi.repository import Adw
developers = [
"Roman Alifanov https://gitlab.eterfund.ru/ximper",
"Anton Palgunov https://gitlab.eterfund.ru/Toxblh",
"Kirill Unitsaev https://gitlab.eterfund.ru/fiersik",
"Vladimir Vaskov <rirusha@altlinux.org>"
]
def build_about_dialog() -> Adw.AboutDialog:
about = Adw.AboutDialog(
application_name='tuneit',
application_icon='ru.ximperlinux.TuneIt',
developer_name='Etersoft',
version=tuneit_config.VERSION,
developers=developers,
copyright='© 2024-2025 Etersoft'
)
# Translators: Replace "translator-credits" with your name/username, and optionally an email or URL.
about.set_translator_credits(_('translator-credits'))
return about
......@@ -25,6 +25,7 @@ gi.require_version('Adw', '1')
from gi.repository import Gtk, Gio, Adw
from .window import TuneitWindow
from .about import build_about_dialog
def get_main_window():
return _application.props.active_window
......@@ -58,14 +59,7 @@ class TuneitApplication(Adw.Application):
def on_about_action(self, *args):
"""Callback for the app.about action."""
about = Adw.AboutDialog(application_name='tuneit',
application_icon='ru.ximperlinux.TuneIt',
developer_name='Etersoft',
version=tuneit_config.VERSION,
developers=['Ximper'],
copyright='© 2024 Etersoft')
# Translators: Replace "translator-credits" with your name/username, and optionally an email or URL.
about.set_translator_credits(_('translator-credits'))
about = build_about_dialog()
about.present(self.props.active_window)
def on_preferences_action(self, widget, _):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment