This repository has been archived on 2023-09-06. You can view files and clone it, but cannot push or open issues/pull-requests.
yutent
/
py-gtk-notes
Archived
1
0
Fork 0
master
yutent 2023-07-24 19:39:00 +08:00
parent 2b0afc5d1b
commit ba5edd93a4
1 changed files with 2 additions and 0 deletions

View File

@ -5,11 +5,13 @@ import gi, platform
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk from gi.repository import Gtk
# 需要安装这个包 gir1.2-gdkpixbuf-2.0
from gi.repository.GdkPixbuf import Pixbuf from gi.repository.GdkPixbuf import Pixbuf
# 优先尝试使用指示器, 没有再使用 Gtk.StatusIcon # 优先尝试使用指示器, 没有再使用 Gtk.StatusIcon
try: try:
gi.require_version('AyatanaAppIndicator3', '0.1') gi.require_version('AyatanaAppIndicator3', '0.1')
# 需要安装这个包 gir1.2-ayatanaappindicator3-0.1
from gi.repository import AyatanaAppIndicator3 as AppIndicator3 from gi.repository import AyatanaAppIndicator3 as AppIndicator3
except (ValueError, ImportError): except (ValueError, ImportError):
AppIndicator3 = None AppIndicator3 = None