diff options
Diffstat (limited to 'src/setup/gnunet-setup-gns-edit.c')
-rw-r--r-- | src/setup/gnunet-setup-gns-edit.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/setup/gnunet-setup-gns-edit.c b/src/setup/gnunet-setup-gns-edit.c index be3ca42f..362b1ce0 100644 --- a/src/setup/gnunet-setup-gns-edit.c +++ b/src/setup/gnunet-setup-gns-edit.c | |||
@@ -199,7 +199,7 @@ edit_dialog_setup_common_elements (struct EditDialogContext *edc) | |||
199 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (edc->builder, | 199 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (edc->builder, |
200 | "edit_dialog_options_shadow_checkbutton")), | 200 | "edit_dialog_options_shadow_checkbutton")), |
201 | edc->n_is_shadow); | 201 | edc->n_is_shadow); |
202 | if (GNUNET_TIME_UNIT_FOREVER_REL.rel_value == edc->n_exp_time) | 202 | if (GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us == edc->n_exp_time) |
203 | { | 203 | { |
204 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (edc->builder, | 204 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (edc->builder, |
205 | "edit_dialog_expiration_never_radiobutton")), | 205 | "edit_dialog_expiration_never_radiobutton")), |
@@ -212,7 +212,7 @@ edit_dialog_setup_common_elements (struct EditDialogContext *edc) | |||
212 | "edit_dialog_expiration_relative_combobox"))); | 212 | "edit_dialog_expiration_relative_combobox"))); |
213 | } | 213 | } |
214 | if ( (edc->n_is_relative) && | 214 | if ( (edc->n_is_relative) && |
215 | (GNUNET_TIME_UNIT_FOREVER_REL.rel_value != edc->n_exp_time) ) | 215 | (GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us != edc->n_exp_time) ) |
216 | { | 216 | { |
217 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (edc->builder, | 217 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (edc->builder, |
218 | "edit_dialog_expiration_relative_radiobutton")), | 218 | "edit_dialog_expiration_relative_radiobutton")), |
@@ -221,7 +221,7 @@ edit_dialog_setup_common_elements (struct EditDialogContext *edc) | |||
221 | "edit_dialog_expiration_absolute_calendar"))); | 221 | "edit_dialog_expiration_absolute_calendar"))); |
222 | gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (edc->builder, | 222 | gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (edc->builder, |
223 | "edit_dialog_expiration_absolute_hbox"))); | 223 | "edit_dialog_expiration_absolute_hbox"))); |
224 | rt.rel_value = edc->n_exp_time; | 224 | rt.rel_value_us = edc->n_exp_time; |
225 | } | 225 | } |
226 | else | 226 | else |
227 | { | 227 | { |
@@ -237,7 +237,7 @@ edit_dialog_setup_common_elements (struct EditDialogContext *edc) | |||
237 | -1); | 237 | -1); |
238 | gtk_combo_box_set_active_iter (cb, &iter); | 238 | gtk_combo_box_set_active_iter (cb, &iter); |
239 | if ( (! edc->n_is_relative) && | 239 | if ( (! edc->n_is_relative) && |
240 | (GNUNET_TIME_UNIT_FOREVER_ABS.abs_value != edc->n_exp_time) ) | 240 | (GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us != edc->n_exp_time) ) |
241 | { | 241 | { |
242 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (edc->builder, | 242 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (edc->builder, |
243 | "edit_dialog_expiration_absolute_radiobutton")), | 243 | "edit_dialog_expiration_absolute_radiobutton")), |
@@ -245,14 +245,14 @@ edit_dialog_setup_common_elements (struct EditDialogContext *edc) | |||
245 | 245 | ||
246 | gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (edc->builder, | 246 | gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (edc->builder, |
247 | "edit_dialog_expiration_relative_combobox"))); | 247 | "edit_dialog_expiration_relative_combobox"))); |
248 | at.abs_value = edc->n_exp_time; | 248 | at.abs_value_us = edc->n_exp_time; |
249 | } | 249 | } |
250 | else | 250 | else |
251 | { | 251 | { |
252 | /* select a sane default: right now */ | 252 | /* select a sane default: right now */ |
253 | at = GNUNET_TIME_absolute_get (); | 253 | at = GNUNET_TIME_absolute_get (); |
254 | } | 254 | } |
255 | tp = (time_t) (at.abs_value / 1000LL); /* convert to seconds */ | 255 | tp = (time_t) (at.abs_value_us / 1000000LL); /* convert to seconds */ |
256 | ymd = gmtime (&tp); | 256 | ymd = gmtime (&tp); |
257 | cal = GTK_CALENDAR (gtk_builder_get_object (edc->builder, | 257 | cal = GTK_CALENDAR (gtk_builder_get_object (edc->builder, |
258 | "edit_dialog_expiration_absolute_calendar")); | 258 | "edit_dialog_expiration_absolute_calendar")); |
@@ -327,7 +327,7 @@ edit_dialog_putes_common_elements (struct EditDialogContext *edc) | |||
327 | if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (edc->builder, | 327 | if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (edc->builder, |
328 | "edit_dialog_expiration_never_radiobutton")))) | 328 | "edit_dialog_expiration_never_radiobutton")))) |
329 | { | 329 | { |
330 | edc->n_exp_time = GNUNET_TIME_UNIT_FOREVER_REL.rel_value; | 330 | edc->n_exp_time = GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us; |
331 | edc->n_is_relative = TRUE; /* doesn't matter, but make sure it is well-defined anyway */ | 331 | edc->n_is_relative = TRUE; /* doesn't matter, but make sure it is well-defined anyway */ |
332 | } | 332 | } |
333 | 333 | ||
@@ -349,7 +349,7 @@ edit_dialog_putes_common_elements (struct EditDialogContext *edc) | |||
349 | GNUNET_break (GNUNET_YES == | 349 | GNUNET_break (GNUNET_YES == |
350 | GNUNET_STRINGS_fancy_time_to_relative (rt_s, | 350 | GNUNET_STRINGS_fancy_time_to_relative (rt_s, |
351 | &rt)); | 351 | &rt)); |
352 | edc->n_exp_time = rt.rel_value; | 352 | edc->n_exp_time = rt.rel_value_us; |
353 | edc->n_is_relative = TRUE; | 353 | edc->n_is_relative = TRUE; |
354 | } | 354 | } |
355 | 355 | ||
@@ -387,7 +387,7 @@ edit_dialog_putes_common_elements (struct EditDialogContext *edc) | |||
387 | GNUNET_break (GNUNET_OK == | 387 | GNUNET_break (GNUNET_OK == |
388 | GNUNET_STRINGS_fancy_time_to_absolute (fancydate, | 388 | GNUNET_STRINGS_fancy_time_to_absolute (fancydate, |
389 | &atime)); | 389 | &atime)); |
390 | edc->n_exp_time = atime.abs_value; | 390 | edc->n_exp_time = atime.abs_value_us; |
391 | edc->n_is_relative = FALSE; | 391 | edc->n_is_relative = FALSE; |
392 | } | 392 | } |
393 | 393 | ||