Added missing import
[memo.git] / AppRun
blobdac89f5c8d9fe5cc7bac820468f66fc1f26dc7ec
1 #!/usr/bin/env python
3 import sys
4 import main
5 import Window
7 try:
8 import Systray
9 systray = Systray.HideableSystray()
10 def delete_main(window, dev):
11 if systray.is_present():
12 # Only allow hiding the main window if the system tray icon is present
13 # and visible
14 window.hide()
15 return True
16 return False
17 main.main_window.connect('delete-event', delete_main)
18 except AssertionError:
19 # No Systray available, due to GTK version (requires 2.10 or better)
20 main.main_window.show()
21 pass
23 main.main()