set parent for add torrent dialog

This commit is contained in:
Marcos Pinto 2007-09-30 21:13:37 +00:00
parent b9f543682b
commit 47fe9bd11f
2 changed files with 2 additions and 3 deletions

View File

@ -105,7 +105,6 @@ class PreferencesDlg:
self.glade.get_widget("txt_peer_proxy_hostname").set_text(self.preferences.get("peer_proxy_hostname"))
self.glade.get_widget("txt_peer_proxy_username").set_text(self.preferences.get("peer_proxy_username"))
self.glade.get_widget("txt_peer_proxy_password").set_text(self.preferences.get("peer_proxy_password"))
self.glade.get_widget("txt_tracker_proxy_hostname").set_text(self.preferences.get("tracker_proxy_hostname"))
self.glade.get_widget("txt_tracker_proxy_username").set_text(self.preferences.get("tracker_proxy_username"))
self.glade.get_widget("txt_tracker_proxy_password").set_text(self.preferences.get("tracker_proxy_password"))
@ -463,7 +462,7 @@ def show_popup_question(window, message):
## Browse for .torrent files
def show_file_open_dialog(parent=None, title=None):
def show_file_open_dialog(parent, title=None):
if title is None:
title = _("Choose a .torrent file")
chooser = gtk.FileChooserDialog(title, parent, gtk.FILE_CHOOSER_ACTION_OPEN,

View File

@ -1282,7 +1282,7 @@ torrent error."))
trunk/+pots/deluge')
def add_torrent_clicked(self, obj=None):
torrent = dialogs.show_file_open_dialog()
torrent = dialogs.show_file_open_dialog(self.window)
if torrent is not None:
for single in torrent:
self.interactive_add_torrent(single)