2023-08-22 18:52:18 +08:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
2023-08-25 18:33:01 +08:00
|
|
|
import gi, sys
|
2023-08-22 18:52:18 +08:00
|
|
|
|
|
|
|
gi.require_version('Gtk', '3.0')
|
2023-08-25 18:33:01 +08:00
|
|
|
from gi.repository import Gtk, GdkPixbuf
|
2023-08-22 18:52:18 +08:00
|
|
|
|
2023-08-25 18:33:01 +08:00
|
|
|
from assets import image_dict
|
2023-08-22 18:52:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
class AboutWindow(Gtk.AboutDialog):
|
|
|
|
def __init__(self):
|
|
|
|
super().__init__(self)
|
|
|
|
|
2023-08-25 15:45:56 +08:00
|
|
|
self.set_keep_above(True)
|
|
|
|
|
2023-08-22 18:52:18 +08:00
|
|
|
self.set_program_name('Sonist Gtk')
|
2023-08-25 18:33:01 +08:00
|
|
|
if sys.platform == 'linux':
|
|
|
|
self.set_logo_icon_name('sonist')
|
|
|
|
else:
|
|
|
|
self.set_logo(GdkPixbuf.Pixbuf.new_from_file(image_dict['sonist']))
|
|
|
|
|
2023-08-22 18:52:18 +08:00
|
|
|
self.set_license_type(Gtk.License.MIT_X11)
|
2023-09-05 10:48:45 +08:00
|
|
|
self.set_version('1.0.5')
|
2023-08-31 17:13:18 +08:00
|
|
|
self.set_website('https://git.wkit.fun/appcat/sonist-gtk')
|
2023-08-22 18:52:18 +08:00
|
|
|
self.set_website_label('官网')
|
2023-08-24 15:25:03 +08:00
|
|
|
self.set_authors([
|
|
|
|
'Yutent <yutent.io@gmail.com> (Sonist)',
|
|
|
|
'Mic92 <https://github.com/Mic92/python-mpd2> (python-mpd2)',
|
|
|
|
])
|
|
|
|
self.set_copyright('© 2023 Yutent <yutent.io@gmail.com>')
|
|
|
|
self.set_comments('Sonist-Gtk 是一个界面美观, 基于MPD后端的音乐播放器, 使用python + gtk3开发。')
|
|
|
|
|
|
|
|
self.connect("response", self.on_close)
|
|
|
|
|
|
|
|
|
|
|
|
def on_close(self, dialog, res):
|
|
|
|
self.hide()
|