From f30ba72a05505aa8201d38952edbc458f3719294 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 20 Nov 2024 16:53:46 +0600 Subject: [PATCH 01/15] command fix --- source/ubl-settings-update.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ubl-settings-update.h b/source/ubl-settings-update.h index 67cd0d8..7b41468 100644 --- a/source/ubl-settings-update.h +++ b/source/ubl-settings-update.h @@ -49,7 +49,7 @@ #define config_get_global_only_parameters "" #define config_get_local_only_parameters "" -#define get_publication_list_command "sed -rn \"s/^\\[(.*)\\]$/\\1/p;/^\\[options\\]$/d\" /etc/pacman.conf" +#define get_publication_list_command "sed -rn \"/^[[:blank:]]*\\[options\\][[:blank:]]*$/d;s/^\\[(.*)\\]$/\\1/p\" /etc/pacman.conf" #define REPOSITORY(target) yon_char_unite("REPOSITORY[",target,"]",NULL) #define REPOSITORY_parameter "REPOSITORY" From 0e4701baabfd6b4b065cbfdec368f1ee98229822 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 21 Nov 2024 17:09:54 +0600 Subject: [PATCH 02/15] Localisation update --- source/ubl-strings.h | 6 +++--- ubl-settings-update.glade | 12 ++++++++---- ubl-settings-update.pot | 20 +++++++++++++++++-- ubl-settings-update_ru.po | 41 +++++++++++++++++++++++++++------------ 4 files changed, 58 insertions(+), 21 deletions(-) diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 54ffc46..e13d4da 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -47,7 +47,7 @@ // #define _LABEL _("Signature level") // #define _LABEL _("Usage level") // #define _LABEL _("Repository connection configuration") - // #define _LABEL _("Repository connection configuration") + // #define _LABEL _("Setting up a connection to a distributed repository network and publishing your repositories") // #define _LABEL _("Connect and publish") // #define _LABEL _("Recieve DB packages from shared network") // #define _LABEL _("Repositories for publishing") @@ -56,7 +56,7 @@ // #define _LABEL _("Choose") // #define _LABEL _("Accept") // #define _LABEL _("Repository name") - // #define _LABEL _("Repository connection configuration") + // #define _LABEL _("Setting up publication of storage and/or repositories as a local WEB resource") // #define _LABEL _("Authorization parameters") // #define _LABEL _("Storage") // #define _LABEL _("Chosen repositories") @@ -65,7 +65,7 @@ // #define _LABEL _("Name") // #define _LABEL _("Password/Hash type") // #define _LABEL _("Password/Password hash") - // #define _LABEL _("Repository connection configuration") + // #define _LABEL _("Setting up publication of a lazy mirror of connected repositories as a local WEB resource") // #define _LABEL _("Publish lazy mirror") // #define _LABEL _("Type") // #define _LABEL _("Resource URL") diff --git a/ubl-settings-update.glade b/ubl-settings-update.glade index bb10805..4fb9faa 100644 --- a/ubl-settings-update.glade +++ b/ubl-settings-update.glade @@ -1,5 +1,5 @@ - + @@ -15,6 +15,7 @@ 500 + 300 False True com.ublinux.ubl-settings-repomanager From 6a2b66357b44e3cb2cbc293207f8c6f75135b1e5 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 22 Nov 2024 09:12:36 +0600 Subject: [PATCH 08/15] Fixed adding extra 'file://' at editing of existing repository on repositories page --- source/ubl-settings-update.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c index 27cf985..07afe72 100644 --- a/source/ubl-settings-update.c +++ b/source/ubl-settings-update.c @@ -718,12 +718,10 @@ void on_repo_edit(GtkWidget *,main_window *widgets){ yon_ubl_status_highlight_incorrect(window->RepoSourceEntry); return; } - char *type = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->RepoSourceCombo)); - char *full_name = yon_char_append(type,target); gtk_entry_set_text(GTK_ENTRY(window->RepoSourceEntry),""); GtkBuilder *builder = gtk_builder_new_from_resource(glade_mirror_path_add_path); gtk_box_pack_start(GTK_BOX(window->SourceBox),yon_gtk_builder_get_widget(builder,"PathRemovalBox"),0,0,2); - gtk_entry_set_text(GTK_ENTRY(gtk_builder_get_object(builder,"PathEntry")),full_name); + gtk_entry_set_text(GTK_ENTRY(gtk_builder_get_object(builder,"PathEntry")),target); g_signal_connect(gtk_builder_get_object(builder,"PathEditButton"),"clicked",G_CALLBACK(on_mirror_path_edit),gtk_builder_get_object(builder,"PathRemovalBox")); g_signal_connect(gtk_builder_get_object(builder,"PathRemoveButton"),"clicked",G_CALLBACK(on_mirror_path_removed),gtk_builder_get_object(builder,"PathRemovalBox")); } From e95ec38bd4a35e26bd11944fdbe015ee86d32091 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 22 Nov 2024 09:19:51 +0600 Subject: [PATCH 09/15] Fixed removing of repositories at repository tab --- source/ubl-settings-update.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c index 07afe72..0c76aa1 100644 --- a/source/ubl-settings-update.c +++ b/source/ubl-settings-update.c @@ -682,12 +682,12 @@ void on_mirror_remove_accept(GtkWidget *, main_window *widgets){ void on_repositories_remove_accept(GtkWidget *, main_window *widgets){ GtkTreeModel *model=NULL; GtkTreeIter iter; - if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepositoriesTree)),&model,&iter)) { + if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepositoriesTree)),&model,&iter)) { return; } char *repo; gtk_tree_model_get(model,&iter,1,&repo,-1); - yon_config_remove_by_key(repo); + yon_config_remove_by_key(REPOSITORY(repo)); yon_interface_update(widgets); } @@ -920,9 +920,6 @@ void on_repo_accept_clicked(GtkWidget *, dictionary *dict){ GList *list = gtk_container_get_children(GTK_CONTAINER(window->SourceBox)); for (guint i=0;iUsageDefaultCheck)); - // int usage_level_enable_update = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsageEnableUpdateCheck)); - // int usage_level_enable_search = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsageEnableSearchCheck)); - // int usage_level_enable_install = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsageEnableInsallCheck)); - // int usage_level_sysupgrade = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsageSysupgradeCheck)); - char *final = yon_char_unite(sources,";",sign_level_package,",",sign_level_condiition,";",";",enabled?"":"disable",NULL); if (!yon_char_is_empty(window->name)&&strcmp(repo_name,window->name)){ From 7b1bd0c532ee2ece663ded35cd86d9d1c9f178fa Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 22 Nov 2024 09:25:25 +0600 Subject: [PATCH 10/15] Localisation edits --- source/ubl-settings-update.c | 2 +- source/ubl-strings.h | 1 + ubl-settings-update.pot | 4 ++++ ubl-settings-update_ru.po | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c index 0c76aa1..338e8f7 100644 --- a/source/ubl-settings-update.c +++ b/source/ubl-settings-update.c @@ -693,7 +693,7 @@ void on_repositories_remove_accept(GtkWidget *, main_window *widgets){ void on_repo_edit(GtkWidget *,main_window *widgets){ repo_add_window *window = yon_repo_add_window_new(); - yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window),ADD_REPO_LABEL,icon_path,"add_repo_window"); + yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window),EDIT_REPO_LABEL,icon_path,"add_repo_window"); GtkTreeIter iter; char *target; diff --git a/source/ubl-strings.h b/source/ubl-strings.h index e13d4da..dd2850c 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -6,6 +6,7 @@ #define NOTHING_CHOSEN_LABEL _("Nothing were chosen") #define EMPTY_IMPORTANT_LABEL _("Empty important field!") #define ADD_REPO_LABEL _("Add repository") + #define EDIT_REPO_LABEL _("Edit repository") #define REMOVE_REPO_WARNING_LABEL _("Are you sure want to remove repository?") #define NO_SHARED_REPOS_LABEL _("No repositories were chosen to share") diff --git a/ubl-settings-update.pot b/ubl-settings-update.pot index ea2974b..b80675a 100644 --- a/ubl-settings-update.pot +++ b/ubl-settings-update.pot @@ -37,6 +37,10 @@ msgstr "" msgid "Add repository" msgstr "" +#: source/ubl-strings.h:8 +msgid "Edit repository" +msgstr "" + #: source/ubl-strings.h:9 msgid "Are you sure want to remove repository?" msgstr "" diff --git a/ubl-settings-update_ru.po b/ubl-settings-update_ru.po index 2b2b431..46b0556 100644 --- a/ubl-settings-update_ru.po +++ b/ubl-settings-update_ru.po @@ -37,6 +37,10 @@ msgstr "" msgid "Add repository" msgstr "Добавить репозиторий" +#: source/ubl-strings.h:8 +msgid "Edit repository" +msgstr "Редактировать репозиторий" + #: source/ubl-strings.h:9 msgid "Are you sure want to remove repository?" msgstr "Вы точно хотите удалить репозиторий?" From cc7787393b2e8a030a32cb726d14b55f3b9baa98 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 22 Nov 2024 09:42:49 +0600 Subject: [PATCH 11/15] fixed head --- source/ubl-settings-update.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c index 338e8f7..662c408 100644 --- a/source/ubl-settings-update.c +++ b/source/ubl-settings-update.c @@ -694,7 +694,7 @@ void on_repositories_remove_accept(GtkWidget *, main_window *widgets){ void on_repo_edit(GtkWidget *,main_window *widgets){ repo_add_window *window = yon_repo_add_window_new(); yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window),EDIT_REPO_LABEL,icon_path,"add_repo_window"); - + gtk_label_set_text(GTK_LABEL(window->HeadLabel),EDIT_REPO_LABEL); GtkTreeIter iter; char *target; gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->RepositoriesTree)),NULL,&iter); From cadb396411db64c976657025b176798510298a3f Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 22 Nov 2024 09:47:41 +0600 Subject: [PATCH 12/15] Repositories list buttons sensitivity logic --- source/ubl-settings-update.c | 4 ++++ ubl-settings-update.glade | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c index 662c408..940f572 100644 --- a/source/ubl-settings-update.c +++ b/source/ubl-settings-update.c @@ -1510,6 +1510,10 @@ void yon_main_window_complete(main_window *widgets){ g_signal_connect(G_OBJECT(widgets->UpdateToggleCell),"toggled",G_CALLBACK(on_toggle_cell_toggled),widgets->UpdateRepoList); g_signal_connect(G_OBJECT(widgets->PublicationToggleCell),"toggled",G_CALLBACK(on_toggle_cell_toggled),widgets->PublicationList); + g_signal_connect(G_OBJECT(widgets->UpdateRepoListCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->UpdateRepoTree); + g_signal_connect(G_OBJECT(widgets->PublicationCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->PublicationTree); + g_signal_connect(G_OBJECT(widgets->PublicationCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->PublicationUpdateButton); + GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->WebPublicationTree)); for (unsigned int i=0;i -