start hidden in tray fix - oksana

This commit is contained in:
Marcos Pinto 2007-07-08 20:55:31 +00:00
parent ac483482b6
commit 6f7ac72599
2 changed files with 4 additions and 3 deletions

View File

@ -66,7 +66,7 @@ def start_deluge():
print "Starting new Deluge session..."
interface = deluge.interface.DelugeGTK()
add_args(interface)
interface.start()
interface.start(options.tray)
def add_args(interface):

View File

@ -795,8 +795,9 @@ class DelugeGTK:
## Start the timer that updates the interface
def start(self):
if not (self.window.flags() & gtk.VISIBLE):
def start(self, start_in_tray=False):
if not(start_in_tray and self.config.get("enable_system_tray") and
self.has_tray) and not self.window.get_property("visible"):
print "Showing window"
self.window.show()
# go through torrent files to add