From 6f7ac72599f1fcf3597df5a9071b121ef578bbc3 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Sun, 8 Jul 2007 20:55:31 +0000 Subject: [PATCH] start hidden in tray fix - oksana --- scripts/deluge | 2 +- src/interface.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/deluge b/scripts/deluge index ee06dfb6f..5190aac7c 100755 --- a/scripts/deluge +++ b/scripts/deluge @@ -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): diff --git a/src/interface.py b/src/interface.py index bcfb6390a..0fc50920e 100644 --- a/src/interface.py +++ b/src/interface.py @@ -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