From db6a9b33d286e1b2ded90957f6938591661a7a47 Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Sat, 23 Apr 2011 17:08:34 +0000 Subject: reindent. remote prefs was sending the active encryption preference, lower cased, which won't work with i18n - fixed. --- src/trg-remote-prefs-dialog.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/trg-remote-prefs-dialog.c') diff --git a/src/trg-remote-prefs-dialog.c b/src/trg-remote-prefs-dialog.c index e1717c2..07395bc 100644 --- a/src/trg-remote-prefs-dialog.c +++ b/src/trg-remote-prefs-dialog.c @@ -110,9 +110,19 @@ static void update_session(GtkDialog * dlg) /* Connection */ - encryption = - g_ascii_strdown(gtk_combo_box_get_active_text - (GTK_COMBO_BOX(priv->encryption_combo)), -1); + switch (gtk_combo_box_get_active + (GTK_COMBO_BOX(priv->encryption_combo))) { + case 0: + encryption = "required"; + break; + case 2: + encryption = "tolerated"; + break; + default: + encryption = "preferred"; + break; + } + json_object_set_string_member(args, SGET_ENCRYPTION, encryption); gtk_toggle_button_json_out(GTK_TOGGLE_BUTTON (priv->peer_port_random_check), args); @@ -152,8 +162,6 @@ static void update_session(GtkDialog * dlg) (priv->peer_limit_per_torrent_spin), args); - g_free(encryption); - dispatch_async(priv->client, request, on_session_set, priv->parent); } -- cgit v1.2.3