From 4ffbef09d83ee6109044298b1dd8dfc38baf4943 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 3 Jun 2024 17:17:20 +0600 Subject: [PATCH] Moved add button at storage configuration window --- source/ubl-settings-repomanager.c | 4 +- ubl-settings-repomanager-configuration.glade | 97 +++++++++++--------- 2 files changed, 58 insertions(+), 43 deletions(-) diff --git a/source/ubl-settings-repomanager.c b/source/ubl-settings-repomanager.c index 3adb92c..59b41c8 100644 --- a/source/ubl-settings-repomanager.c +++ b/source/ubl-settings-repomanager.c @@ -268,6 +268,7 @@ void on_repo_add(GtkWidget *self, storage_config_window *window){ } yon_window_config_add_instant_parameter(path,"storage_info",yon_char_parsed_to_string(old_repos_parsed,old_repos_size,","),YON_TYPE_STRING); yon_char_parsed_free(old_repos_parsed,old_repos_size); + yon_debug_output("%s\n",create_storage_command(path, new_repo)); yon_launch(create_storage_command(path, new_repo)); int size; config_str dirs = yon_file_list_dirs(child_path,&size); @@ -291,7 +292,8 @@ void on_repo_add(GtkWidget *self, storage_config_window *window){ } } closedir(current_dir); - yon_window_config_add_instant_parameter(arch_path,"package_info",yon_char_parsed_to_string(final,size,","),YON_TYPE_STRING); + if (size) + yon_window_config_add_instant_parameter(arch_path,"package_info",yon_char_parsed_to_string(final,final_size,","),YON_TYPE_STRING); } } yon_char_parsed_free(dirs,size); diff --git a/ubl-settings-repomanager-configuration.glade b/ubl-settings-repomanager-configuration.glade index 5819698..3aa1cf5 100644 --- a/ubl-settings-repomanager-configuration.glade +++ b/ubl-settings-repomanager-configuration.glade @@ -196,13 +196,66 @@ False none - + True False vertical 5 - + + True + False + vertical + 5 + + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + + + True + True + 0 + + + + + True + True + True + Add repository + image5 + + + + False + True + 1 + + + + + False + True + 1 + @@ -215,46 +268,6 @@ 0 - - - True - False - 5 - - - True - True - - - True - True - 0 - - - - - True - True - True - Add repository - image5 - - - - False - True - 1 - - - - - False - True - 1 - -