-
Notifications
You must be signed in to change notification settings - Fork 0
/
winter.py
executable file
·33 lines (25 loc) · 904 Bytes
/
winter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/python3
from gi.repository import Gtk, Unity, Dbusmenu, GObject
import sys
sys.path.append('./src')
sys.path.append('.')
GObject.threads_init()
from widgets.mainwindow import MainWindow
class Winter:
def __init__(self):
self.unity_integration()
winter = MainWindow()
winter.connect("delete-event", Gtk.main_quit)
winter.show_all()
Gtk.main()
def unity_integration(self):
launcher = Unity.LauncherEntry.get_for_desktop_id("winter.desktop")
launcher.set_property("urgent", True)
ql = Dbusmenu.Menuitem.new()
item = Dbusmenu.Menuitem.new()
item.property_set(Dbusmenu.MENUITEM_PROP_LABEL, "Item 1")
item.property_set_bool(Dbusmenu.MENUITEM_PROP_VISIBLE, True)
ql.child_append(item)
launcher.set_property("quicklist", ql)
if __name__ == "__main__":
winter = Winter()