summaryrefslogtreecommitdiff
path: root/src/trg-remote-prefs-dialog.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-04-23 17:08:34 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-04-23 17:08:34 +0000
commitdb6a9b33d286e1b2ded90957f6938591661a7a47 (patch)
tree2ea0f47ae4a21ca1194c0cda1e0a5c9987b1b912 /src/trg-remote-prefs-dialog.c
parent9d0f1730fa146ee68ad3c6e3e6a9295364d22d98 (diff)
reindent. remote prefs was sending the active encryption preference, lower cased, which won't work with i18n - fixed.
Diffstat (limited to 'src/trg-remote-prefs-dialog.c')
-rw-r--r--src/trg-remote-prefs-dialog.c18
1 files changed, 13 insertions, 5 deletions
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);
}