Default timezone getting changes

pull/299/head
parent 32a472a5b9
commit f7d1f2bb43

@ -261,4 +261,12 @@ void yon_region_init(main_window *widgets){
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ZoneCombo),0);
gtk_switch_set_active(GTK_SWITCH(widgets->RegionSensitiveSwitch),0);
}
if (!gtk_switch_get_active(GTK_SWITCH(widgets->RegionSensitiveSwitch))){
config_str autotimezone = yon_config_load(internet_tomezone_check_command,(int*)&size);
if (size&&!yon_char_is_empty(autotimezone[0])){
yon_char_remove_last_symbol(autotimezone[0],'\n');
gtk_entry_set_text(GTK_ENTRY(widgets->RegionEntry),autotimezone[0]);
cc_timezone_map_set_timezone(CC_TIMEZONE_MAP(widgets->RegionMapTarget),autotimezone[0]);
}
}
}

@ -142,6 +142,8 @@ layout && /description:/ {\
}\
\" | sort -u\
"
#define internet_tomezone_check_command "curl -s ipinfo.io/timezone"
#define ubinstall_dry_run_command "ubinstall --dry-run"
#define os_name_get_command "sed -En 's/^PRETTY_NAME=[\"]*([^\"]+)[\"]*/\\1/p' /etc/os-release"

Loading…
Cancel
Save