From d5ab09e11f9472077ac4846e51decf54adf6ead8 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 25 Jan 2008 00:28:07 +0000 Subject: [PATCH] Remove main window update() attempts in SystemTray. Force the add_torrent call to happen right away. --- deluge/ui/gtkui/addtorrentdialog.py | 1 + deluge/ui/gtkui/sidebar.py | 2 +- deluge/ui/gtkui/systemtray.py | 4 ---- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/deluge/ui/gtkui/addtorrentdialog.py b/deluge/ui/gtkui/addtorrentdialog.py index cdef46521..6cfca8a6a 100644 --- a/deluge/ui/gtkui/addtorrentdialog.py +++ b/deluge/ui/gtkui/addtorrentdialog.py @@ -412,6 +412,7 @@ class AddTorrentDialog: row = self.torrent_liststore.iter_next(row) client.add_torrent_file(torrent_filenames, torrent_options) + client.force_call() self.dialog.destroy() def _on_button_apply_clicked(self, widget): diff --git a/deluge/ui/gtkui/sidebar.py b/deluge/ui/gtkui/sidebar.py index 3e67c1d53..901c2a22d 100644 --- a/deluge/ui/gtkui/sidebar.py +++ b/deluge/ui/gtkui/sidebar.py @@ -111,4 +111,4 @@ class SideBar(component.Component): if value == "Paused": component.get("TorrentView").set_filter("state", deluge.common.TORRENT_STATE.index("Paused")) - + diff --git a/deluge/ui/gtkui/systemtray.py b/deluge/ui/gtkui/systemtray.py index 828d1771e..63f89e281 100644 --- a/deluge/ui/gtkui/systemtray.py +++ b/deluge/ui/gtkui/systemtray.py @@ -237,15 +237,11 @@ class SystemTray(component.Component): self.window.hide() else: self.window.present() - # Force UI update as we don't update it while minimized - self.window.update() else: if self.config["lock_tray"] == True: self.unlock_tray("mainwinshow") else: self.window.show() - # Force UI update as we don't update it while in tray - self.window.update() def on_tray_popup(self, status_icon, button, activate_time): """Called when the tray icon is right clicked."""