diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c index 2b9342a..7d7af83 100644 --- a/source/ubl-settings-update.c +++ b/source/ubl-settings-update.c @@ -1438,7 +1438,11 @@ void on_repo_source_add(GtkWidget *, repo_add_window *window){ section->TypeCombo = yon_gtk_builder_get_widget(builder,"TypeCombo"); section->edits=0; - gtk_combo_box_set_active_id(GTK_COMBO_BOX(section->TypeCombo),gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->RepoSourceCombo))); + const char *id = gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->RepoSourceCombo)); + if (!yon_char_is_empty(id)) + gtk_combo_box_set_active_id(GTK_COMBO_BOX(section->TypeCombo),id); + else + gtk_combo_box_set_active(GTK_COMBO_BOX(section->TypeCombo),4); yon_dictionary_add_or_create_if_exists_with_data(window->sections,(char*)target,section); gtk_entry_set_text(GTK_ENTRY(section->PathEntry),target);