depends
parent
2b0afc5d1b
commit
ba5edd93a4
|
@ -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
|
||||||
|
|
Reference in New Issue