From c722432c87ed4a8b72402cce08cea77189622524 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 20 Dec 2024 17:18:49 +0600 Subject: [PATCH] Fixed source type conficuration wasn't showing up --- source/ubl-settings-update.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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);