mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 23:48:40 +00:00
Able to change the visibility of the toolbar and infopane.
This commit is contained in:
parent
40e1376bc4
commit
57ff5be823
4 changed files with 571 additions and 554 deletions
File diff suppressed because it is too large
Load diff
|
@ -157,11 +157,13 @@ class MenuBar(component.Component):
|
||||||
component.get("TorrentView").get_selected_torrents())
|
component.get("TorrentView").get_selected_torrents())
|
||||||
|
|
||||||
## View Menu ##
|
## View Menu ##
|
||||||
def on_menuitem_toolbar_toggled(self, data=None):
|
def on_menuitem_toolbar_toggled(self, value):
|
||||||
log.debug("on_menuitem_toolbar_toggled")
|
log.debug("on_menuitem_toolbar_toggled")
|
||||||
|
component.get("ToolBar").visible(value.get_active())
|
||||||
|
|
||||||
def on_menuitem_infopane_toggled(self, data=None):
|
def on_menuitem_infopane_toggled(self, value):
|
||||||
log.debug("on_menuitem_infopane_toggled")
|
log.debug("on_menuitem_infopane_toggled")
|
||||||
|
component.get("TorrentDetails").visible(value.get_active())
|
||||||
|
|
||||||
## Help Menu ##
|
## Help Menu ##
|
||||||
def on_menuitem_about_activate(self, data=None):
|
def on_menuitem_about_activate(self, data=None):
|
||||||
|
|
|
@ -57,6 +57,12 @@ class ToolBar(component.Component):
|
||||||
self.on_toolbutton_connectionmanager_clicked
|
self.on_toolbutton_connectionmanager_clicked
|
||||||
})
|
})
|
||||||
|
|
||||||
|
def visible(self, visible):
|
||||||
|
if visible:
|
||||||
|
self.toolbar.show()
|
||||||
|
else:
|
||||||
|
self.toolbar.hide()
|
||||||
|
|
||||||
def add_toolbutton(self, callback, label=None, image=None, stock=None,
|
def add_toolbutton(self, callback, label=None, image=None, stock=None,
|
||||||
tooltip=None):
|
tooltip=None):
|
||||||
"""Adds a toolbutton to the toolbar"""
|
"""Adds a toolbutton to the toolbar"""
|
||||||
|
|
|
@ -73,6 +73,13 @@ class TorrentDetails(component.Component):
|
||||||
self.eta = glade.get_widget("summary_eta")
|
self.eta = glade.get_widget("summary_eta")
|
||||||
self.torrent_path = glade.get_widget("summary_torrent_path")
|
self.torrent_path = glade.get_widget("summary_torrent_path")
|
||||||
|
|
||||||
|
def visible(self, visible):
|
||||||
|
if visible:
|
||||||
|
self.notebook.show()
|
||||||
|
else:
|
||||||
|
self.notebook.hide()
|
||||||
|
self.window.vpaned.set_position(-1)
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self.clear()
|
self.clear()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue