mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 04:54:23 +00:00
Remove unnecessary calls to update_buttons()
This commit is contained in:
parent
6dca7958a2
commit
95d0b65785
@ -88,27 +88,22 @@ class Signals(component.Component):
|
||||
# Remove the torrent from the treeview
|
||||
component.get("TorrentView").remove_row(torrent_id)
|
||||
component.get("TorrentDetails").clear()
|
||||
component.get("ToolBar").update_buttons()
|
||||
|
||||
def torrent_paused(self, torrent_id):
|
||||
log.debug("torrent_paused signal received..")
|
||||
component.get("TorrentView").update()
|
||||
component.get("ToolBar").update_buttons("paused", torrent_id)
|
||||
|
||||
def torrent_resumed(self, torrent_id):
|
||||
log.debug("torrent_resumed signal received..")
|
||||
component.get("TorrentView").update()
|
||||
component.get("ToolBar").update_buttons("resumed", torrent_id)
|
||||
|
||||
def torrent_all_paused(self):
|
||||
log.debug("torrent_all_paused signal received..")
|
||||
component.get("TorrentView").update()
|
||||
component.get("ToolBar").update_buttons("paused")
|
||||
|
||||
def torrent_all_resumed(self):
|
||||
log.debug("torrent_all_resumed signal received..")
|
||||
component.get("TorrentView").update()
|
||||
component.get("ToolBar").update_buttons("resumed")
|
||||
|
||||
def config_value_changed(self, key, value):
|
||||
log.debug("config_value_changed signal received..")
|
||||
|
@ -78,7 +78,6 @@ class ToolBar(component.Component):
|
||||
for widget in self.change_sensitivity:
|
||||
self.window.main_glade.get_widget(widget).set_sensitive(True)
|
||||
self.update_buttons()
|
||||
gobject.idle_add(self.update_buttons)
|
||||
|
||||
def stop(self):
|
||||
for widget in self.change_sensitivity:
|
||||
@ -103,9 +102,7 @@ class ToolBar(component.Component):
|
||||
toolbutton.set_icon_widget(image)
|
||||
# Set the tooltip
|
||||
if tooltip is not None:
|
||||
tip = gtk.Tooltips()
|
||||
tip.set_tip(toolbutton, tooltip)
|
||||
|
||||
toolbutton.set_tooltip_text(tooltip)
|
||||
# Connect the 'clicked' event callback
|
||||
toolbutton.connect("clicked", callback)
|
||||
|
||||
@ -207,6 +204,7 @@ class ToolBar(component.Component):
|
||||
("toolbutton_remove", remove)):
|
||||
self.window.main_glade.get_widget(name).set_sensitive(sensitive)
|
||||
|
||||
|
||||
return False
|
||||
|
||||
pause = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user