|
|
|
|
@ -1407,12 +1407,13 @@ void yon_system_load(main_window *window){
|
|
|
|
|
if (yon_gtk_list_store_find_text(window->liststore1,&iter,2,parsed[0])){
|
|
|
|
|
GDateTime *date = g_date_time_new_from_unix_local(atol(parsed[2])*24*60*60);
|
|
|
|
|
char *date_string;
|
|
|
|
|
date_string = g_date_time_format(date,yon_settings_configuration_get(date_format_parameter));
|
|
|
|
|
char *format = yon_settings_configuration_get(date_format_parameter);
|
|
|
|
|
date_string = g_date_time_format(date,format?format:"%d.%m.%Y");
|
|
|
|
|
g_date_time_unref(date);
|
|
|
|
|
char *expiration_string="";
|
|
|
|
|
if (parsed_size>7&&!yon_char_is_empty(parsed[7])){
|
|
|
|
|
date = g_date_time_new_from_unix_local(atol(parsed[7])*24*60*60);
|
|
|
|
|
expiration_string = g_date_time_format(date,yon_settings_configuration_get(date_format_parameter));
|
|
|
|
|
expiration_string = g_date_time_format(date,format?format:"%d.%m.%Y");
|
|
|
|
|
g_date_time_unref(date);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1525,7 +1526,8 @@ void on_date_selected(GtkWidget *, ubl_settings_usergroups_user_window *window){
|
|
|
|
|
char *mn = yon_char_from_int(month+1);
|
|
|
|
|
char *yr = yon_char_from_int(year);
|
|
|
|
|
GDateTime *datetime = g_date_time_new_local(year,month+1,day,0,0,0);
|
|
|
|
|
char *date_string = g_date_time_format(datetime,yon_settings_configuration_get(date_format_parameter));
|
|
|
|
|
char *format = yon_settings_configuration_get(date_format_parameter);
|
|
|
|
|
char *date_string = g_date_time_format(datetime,format?format:"%d.%m.%Y");
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(window->userPasswordExpirationEntry), date_string);
|
|
|
|
|
window->expiration_unix=date_string;
|
|
|
|
|
free(dy);
|
|
|
|
|
@ -2468,7 +2470,11 @@ template_main_window *yon_main_window_complete(main_window *widgets){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
g_list_free(menu_items);
|
|
|
|
|
yon_configuration_window_add_combo_box_parameter(CONFIGURATION_PARAMETER_BOOL,date_format_parameter,DATE_FORMAT_SETTINGS_LABEL,G_CALLBACK(on_date_format_changed),widgets,"%d.%m.%Y",DMY_FORMAT_LABEL,"%d-%m-%Y",DMY_MINUS_FORMAT_LABEL,"%d/%m/%Y",DMY_SLASH_FORMAT_LABEL,"%m-%d-%Y",MDY_FORMAT_LABEL,NULL);
|
|
|
|
|
struct yon_configuration_window_custom_parameter *parameter = malloc(sizeof(struct yon_configuration_window_custom_parameter));
|
|
|
|
|
parameter->custom_parameter_create_func = yon_date_chooser_new;
|
|
|
|
|
parameter->custom_parameter_save_value_func = yon_date_chooser_save;
|
|
|
|
|
parameter->custom_parameter_update_func = yon_date_chooser_update;
|
|
|
|
|
yon_configuration_window_add_custom_parameter(date_format_parameter,parameter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
yon_system_load(widgets);
|
|
|
|
|
|