mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Add 'page' argument to show() to allow opening the Preferences dialog to
a specific page.
This commit is contained in:
parent
ff4009cb6e
commit
d7dd5180cf
1 changed files with 8 additions and 1 deletions
|
@ -164,7 +164,14 @@ class Preferences(component.Component):
|
||||||
def _on_get_listen_port(self, port):
|
def _on_get_listen_port(self, port):
|
||||||
self.active_port = port
|
self.active_port = port
|
||||||
|
|
||||||
def show(self):
|
def show(self, page=None):
|
||||||
|
"""Page should be the string in the left list.. ie, 'Network' or 'Bandwidth'"""
|
||||||
|
if page != None:
|
||||||
|
for (index, string) in self.liststore:
|
||||||
|
if page == string:
|
||||||
|
self.notebook.set_current_page(index)
|
||||||
|
break
|
||||||
|
|
||||||
# Update the preferences dialog to reflect current config settings
|
# Update the preferences dialog to reflect current config settings
|
||||||
self.core_config = {}
|
self.core_config = {}
|
||||||
client.get_config(self._on_get_config)
|
client.get_config(self._on_get_config)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue