diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-08-14 11:44:38 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-08-14 11:44:38 +0200 |
commit | 2361b945a3500e5adc663e435776bfb811f962af (patch) | |
tree | 51b0d086a492948404d2c68af8662ae405422553 | |
parent | 32d05eb8d248a61258aa8e506b8a512fc2d54006 (diff) | |
download | gnunet-gtk-2361b945a3500e5adc663e435776bfb811f962af.tar.gz gnunet-gtk-2361b945a3500e5adc663e435776bfb811f962af.zip |
fix service/protocol confusion in TLSA dialog restoration
-rw-r--r-- | src/namestore/plugin_gtk_namestore_tlsa.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/namestore/plugin_gtk_namestore_tlsa.c b/src/namestore/plugin_gtk_namestore_tlsa.c index 1fc970e4..18ac43ac 100644 --- a/src/namestore/plugin_gtk_namestore_tlsa.c +++ b/src/namestore/plugin_gtk_namestore_tlsa.c | |||
@@ -134,9 +134,8 @@ get_selected_radio_value (GtkBuilder *builder, | |||
134 | const char *const*button_names) | 134 | const char *const*button_names) |
135 | { | 135 | { |
136 | GtkToggleButton *b; | 136 | GtkToggleButton *b; |
137 | int i; | ||
138 | 137 | ||
139 | for (i=0; NULL != button_names[i]; i++) | 138 | for (int i=0; NULL != button_names[i]; i++) |
140 | { | 139 | { |
141 | b = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, | 140 | b = GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, |
142 | button_names[i])); | 141 | button_names[i])); |
@@ -202,7 +201,7 @@ tlsa_load (void *cls, | |||
202 | GtkTreeIter iter; | 201 | GtkTreeIter iter; |
203 | GtkTreeModel *tm; | 202 | GtkTreeModel *tm; |
204 | unsigned int service; | 203 | unsigned int service; |
205 | guint service_at_iter; | 204 | guint protocol_at_iter; |
206 | unsigned int record_type; | 205 | unsigned int record_type; |
207 | unsigned int usage; | 206 | unsigned int usage; |
208 | unsigned int selector; | 207 | unsigned int selector; |
@@ -234,7 +233,7 @@ tlsa_load (void *cls, | |||
234 | gtk_spin_button_set_value | 233 | gtk_spin_button_set_value |
235 | (GTK_SPIN_BUTTON (gtk_builder_get_object (builder, | 234 | (GTK_SPIN_BUTTON (gtk_builder_get_object (builder, |
236 | "edit_dialog_port_spinbutton")), | 235 | "edit_dialog_port_spinbutton")), |
237 | protocol); | 236 | service); |
238 | cb = GTK_COMBO_BOX (gtk_builder_get_object (builder, | 237 | cb = GTK_COMBO_BOX (gtk_builder_get_object (builder, |
239 | "edit_dialog_protocol_combobox")); | 238 | "edit_dialog_protocol_combobox")); |
240 | tm = GTK_TREE_MODEL (gtk_builder_get_object (builder, | 239 | tm = GTK_TREE_MODEL (gtk_builder_get_object (builder, |
@@ -246,9 +245,9 @@ tlsa_load (void *cls, | |||
246 | { | 245 | { |
247 | gtk_tree_model_get (tm, | 246 | gtk_tree_model_get (tm, |
248 | &iter, | 247 | &iter, |
249 | 1, &service_at_iter, | 248 | 1, &protocol_at_iter, |
250 | -1); | 249 | -1); |
251 | if (service_at_iter == service) | 250 | if (protocol_at_iter == protocol) |
252 | { | 251 | { |
253 | gtk_combo_box_set_active_iter (cb, | 252 | gtk_combo_box_set_active_iter (cb, |
254 | &iter); | 253 | &iter); |