|
|
|
@ -323,12 +323,11 @@ void on_region_changed(GtkComboBox *self, main_window *widgets){
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
g_time_zone_unref(tz);
|
|
|
|
g_time_zone_unref(tz);
|
|
|
|
char *name_string = NULL;
|
|
|
|
char *name_string = NULL;
|
|
|
|
|
|
|
|
char *utc_string = parsed_sorted[i];
|
|
|
|
if (strstr(parsed_sorted[i],"GMT")){
|
|
|
|
if (strstr(parsed_sorted[i],"GMT")){
|
|
|
|
char *temp = yon_char_unite("UTC",parsed_sorted[i]+3," (",parsed_sorted[i],")",NULL);
|
|
|
|
utc_string = yon_char_unite("UTC",parsed_sorted[i]+3," (",parsed_sorted[i],")",NULL);
|
|
|
|
free(parsed_sorted[i]);
|
|
|
|
|
|
|
|
parsed_sorted[i]=temp;
|
|
|
|
|
|
|
|
} else if (strcmp(active_name,"Etc")){
|
|
|
|
} else if (strcmp(active_name,"Etc")){
|
|
|
|
char *zonereg = yon_char_unite(active,"/",parsed_sorted[i],NULL);
|
|
|
|
char *zonereg = yon_char_unite(active,"/",utc_string,NULL);
|
|
|
|
if (g_setenv("TZ",zonereg,1)){
|
|
|
|
if (g_setenv("TZ",zonereg,1)){
|
|
|
|
time_t curtime = time(NULL);
|
|
|
|
time_t curtime = time(NULL);
|
|
|
|
struct tm *local = localtime(&curtime);
|
|
|
|
struct tm *local = localtime(&curtime);
|
|
|
|
@ -338,7 +337,7 @@ void on_region_changed(GtkComboBox *self, main_window *widgets){
|
|
|
|
free(zonereg);
|
|
|
|
free(zonereg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->ZoneCombo),parsed_sorted[i],name_string?name_string:_(parsed_sorted[i]));
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->ZoneCombo),parsed_sorted[i],name_string?name_string:_(utc_string));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (size) yon_char_parsed_free(parsed_sorted,size);
|
|
|
|
if (size) yon_char_parsed_free(parsed_sorted,size);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ZoneCombo),0);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ZoneCombo),0);
|
|
|
|
|