更新readme和关于页面

master
yutent 2023-08-24 15:25:03 +08:00
parent 8fd907e805
commit cbd376b62e
4 changed files with 29 additions and 8 deletions

View File

@ -5,3 +5,14 @@
<div align="center">
<h1>Sonist - 基于mpd后端的音乐播放器</h1>
</div>
### 感觉以下第三方库
- [`python-mpd2`](https://github.com/Mic92/python-mpd2), 本项目内置了修改版的`python-mpd2`, 加入了Gtk的信号与槽机制的支持, 并更加友好的方式处理异常, 减少程序崩溃。
- [`python-mutagen`](https://github.com/quodlibet/mutagen)
### 开源协议
本项目采用`MIT`开源协议。

View File

@ -13,11 +13,21 @@ class AboutWindow(Gtk.AboutDialog):
super().__init__(self)
self.set_program_name('Sonist Gtk')
# self.set_logo('youtube')
self.set_logo_icon_name('google-chrome')
self.set_license_type(Gtk.License.MIT_X11)
self.set_version('0.1.0')
self.set_website('https://github.com/app-cat/sonist-gtk')
self.set_website_label('官网')
self.set_copyright('© 2023 Yutent')
self.set_authors([
'Yutent <yutent.io@gmail.com> (Sonist)',
'Mic92 <https://github.com/Mic92/python-mpd2> (python-mpd2)',
'quodlibet <https://github.com/quodlibet/mutagen> (python-mutagen)'
])
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()

View File

@ -7,8 +7,9 @@ from gi.repository import Gtk, Gdk, GObject
from .image import ScaleImage
class OptionMenu(Gtk.Menu):
def __init__(self):
def __init__(self, app):
Gtk.Menu.__init__(self)
self.app = app
btn_icos = [
'./usr/share/sonist/setting.png',
@ -50,6 +51,7 @@ class OptionMenu(Gtk.Menu):
case '退出应用':
pass
case '关于播放器':
self.app.about.present()
pass

View File

@ -62,7 +62,7 @@ class SonistWindow(Gtk.Window):
# 菜单按钮
menu_btn = ImageButton('./usr/share/sonist/menu.png')
popup_menu = OptionMenu()
popup_menu = OptionMenu(app)
menu_btn.connect('clicked', lambda w: popup_menu.show(w))
layout.put(menu_btn, 276, 6)
@ -228,8 +228,6 @@ class SonistWindow(Gtk.Window):
@idle
def sync_state(self, stat = None, song = None, first = False):
self.ctrl_box.disabled = False
print(threading.active_count())
print(threading.current_thread())
self.stat = stat or self.get_mpd_stat()