diff --git a/AUTHORS b/AUTHORS index 42d24764a1..16ef332372 100644 --- a/AUTHORS +++ b/AUTHORS @@ -23,6 +23,7 @@ Contributors (and Past Developers): * Pedro Algarvio ('s0undt3ch') * Cristian Greco ('cgreco') * Chase Sterling ('gazpachoKing') + * Justin Williams ('Jaywalker') Plugin Developers: * Autoadd : Chase Sterling diff --git a/deluge/ui/gtk3/connectionmanager.py b/deluge/ui/gtk3/connectionmanager.py index b53dd8e042..d6e2437028 100644 --- a/deluge/ui/gtk3/connectionmanager.py +++ b/deluge/ui/gtk3/connectionmanager.py @@ -316,7 +316,7 @@ def _on_connect_fail(self, reason, host_id, try_counter): def dialog_finished(response_id): if response_id == Gtk.ResponseType.OK: - self._connect(host_id, dialog.get_username(), dialog.get_password()) + self._connect(host_id, dialog.account.username, dialog.account.password) return dialog.run().addCallback(dialog_finished) diff --git a/deluge/ui/gtk3/dialogs.py b/deluge/ui/gtk3/dialogs.py index db337d3d5b..dafca01dfc 100644 --- a/deluge/ui/gtk3/dialogs.py +++ b/deluge/ui/gtk3/dialogs.py @@ -207,6 +207,8 @@ def __init__(self, err_msg='', username=None, parent=None): parent, ) + self.account = None + table = Gtk.Table(2, 2, False) self.username_label = Gtk.Label() self.username_label.set_markup('' + _('Username:') + '') @@ -245,6 +247,16 @@ def get_password(self): def on_password_activate(self, widget): self.response(Gtk.ResponseType.OK) + def _on_response(self, widget, response): + if response == Gtk.ResponseType.OK: + self.account = Account( + self.username_entry.get_text(), + self.password_entry.get_text(), + "", + ) + self.destroy() + self.deferred.callback(response) + class AccountDialog(BaseDialog): def __init__(