|
|
|
@ -7,11 +7,6 @@ config main_config;
|
|
|
|
int yon_char_parsed_compare(const void *a, const void *b){
|
|
|
|
int yon_char_parsed_compare(const void *a, const void *b){
|
|
|
|
const config_str str_a = (const config_str)a;
|
|
|
|
const config_str str_a = (const config_str)a;
|
|
|
|
const config_str str_b = (const config_str)b;
|
|
|
|
const config_str str_b = (const config_str)b;
|
|
|
|
|
|
|
|
|
|
|
|
// if (strstr(*str_a,"+")&&strstr(*str_b,"-")) return 1;
|
|
|
|
|
|
|
|
// else if (strstr(*str_a,"-")&&strstr(*str_b,"+")) return -1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (strstr(*str_a,"-")&&strstr(*str_b,"-")) return strcmp(*str_b,*str_a);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((strstr(*str_a,"-")||strstr(*str_a,"+"))&&(strstr(*str_b,"-")||strstr(*str_b,"+"))){
|
|
|
|
if ((strstr(*str_a,"-")||strstr(*str_a,"+"))&&(strstr(*str_b,"-")||strstr(*str_b,"+"))){
|
|
|
|
int a = atoi(*str_a+3);
|
|
|
|
int a = atoi(*str_a+3);
|
|
|
|
@ -258,6 +253,11 @@ void on_region_changed(GtkComboBox *self, main_window *widgets){
|
|
|
|
config_str parsed_sorted = yon_char_parsed_sort(parsed,size);
|
|
|
|
config_str parsed_sorted = yon_char_parsed_sort(parsed,size);
|
|
|
|
yon_char_parsed_free(parsed,size);
|
|
|
|
yon_char_parsed_free(parsed,size);
|
|
|
|
for (int i=0;i<size;i++){
|
|
|
|
for (int i=0;i<size;i++){
|
|
|
|
|
|
|
|
if (strstr(parsed_sorted[i],"GMT")){
|
|
|
|
|
|
|
|
char *temp = yon_char_unite("UTC",parsed_sorted[i]+3," (",parsed_sorted[i],")",NULL);
|
|
|
|
|
|
|
|
free(parsed_sorted[i]);
|
|
|
|
|
|
|
|
parsed_sorted[i]=temp;
|
|
|
|
|
|
|
|
}
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->ZoneCombo),parsed_sorted[i],_(parsed_sorted[i]));
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->ZoneCombo),parsed_sorted[i],_(parsed_sorted[i]));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (size) yon_char_parsed_free(parsed_sorted,size);
|
|
|
|
if (size) yon_char_parsed_free(parsed_sorted,size);
|
|
|
|
|