From 726992ab534c3e2707009247de737ce79456c8c3 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 16 Jun 2007 02:16:34 +0000 Subject: [PATCH] Some minor fix ups for the pause/resume --- src/interface.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/interface.py b/src/interface.py index c90705195..85020b0fa 100644 --- a/src/interface.py +++ b/src/interface.py @@ -411,17 +411,22 @@ class DelugeGTK: self.manager.set_user_pause(uid, not self.manager.is_user_paused(uid)) # We need to force an update so the GUI looks more responsive - print "doing update()" self.update() except KeyError: pass def torrent_menu_focus(self, widget, direction): + menuitem = self.torrent_glade.get_widget("menu_pause") + # Check if we are selecting multiple torrents + if len(self.get_selected_torrent_rows()) > 1: + menuitem.set_image(gtk.image_new_from_stock(gtk.STOCK_MEDIA_PAUSE, gtk.ICON_SIZE_MENU)) + menuitem.get_children()[0].set_text(_("Pause/Resume")) + return + # Get the selected torrent state so we can check if the torrent is paused. unique_id = self.get_selected_torrent() torrent_state = self.manager.get_torrent_state(unique_id) - menuitem = self.torrent_glade.get_widget("menu_pause") if torrent_state["is_paused"]: menuitem.set_image(gtk.image_new_from_stock(gtk.STOCK_MEDIA_PLAY, gtk.ICON_SIZE_MENU)) menuitem.get_children()[0].set_text(_("Resume"))