systray: Make sure systray is actually embedded before we keep app running.

This commit is contained in:
Cole Robinson 2009-11-10 11:56:15 -05:00
parent d8e8430285
commit 48cc0a33d9
2 changed files with 6 additions and 1 deletions

View File

@ -401,7 +401,7 @@ class vmmEngine(gobject.GObject):
self.windows -= 1
logging.debug("window counter decremented to %s" % self.windows)
# Don't exit if system tray is enabled
if self.windows <= 0 and not self.config.get_view_system_tray() :
if self.windows <= 0 and not self.systray.is_visible():
self.exit_app()
def exit_app(self):

View File

@ -70,6 +70,11 @@ class vmmSystray(gobject.GObject):
self.config.on_view_system_tray_changed(self.show_systray)
self.show_systray()
def is_visible(self):
return (self.config.get_view_system_tray() and
self.systray_icon and
self.systray_icon.is_embedded())
# Initialization routines
def init_systray_menu(self):