From b371bb3271f76361a21ab4176dc3d60eee850317 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 16 Dec 2024 12:32:34 +0600 Subject: [PATCH 1/2] Paths remade --- gresource.xml | 1 + source/CMakeLists.txt | 1 + source/ubl-settings-update.c | 124 +++++++++++++++------- source/ubl-settings-update.h | 16 ++- ubl-settings-update-mirror-path-add.glade | 7 +- ubl-settings-update-repo-path-add.glade | 98 +++++++++++++++++ 6 files changed, 207 insertions(+), 40 deletions(-) create mode 100644 ubl-settings-update-repo-path-add.glade diff --git a/gresource.xml b/gresource.xml index 8ddfb99..a57eede 100644 --- a/gresource.xml +++ b/gresource.xml @@ -6,6 +6,7 @@ ubl-settings-update-web-publication-add.glade ubl-settings-update-mirror-add.glade ubl-settings-update-mirror-path-add.glade + ubl-settings-update-repo-path-add.glade ubl-settings-update-mirror-configure.glade ubl-settings-update-password.glade diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 4c61581..330c856 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -36,6 +36,7 @@ set(DEPENDFILES ../ubl-settings-update-web-publication-add.glade ../ubl-settings-update-mirror-add.glade ../ubl-settings-update-mirror-path-add.glade + ../ubl-settings-update-repo-path-add.glade ../ubl-settings-update-mirror-configure.glade ../ubl-settings-update-password.glade ../gresource.xml diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c index 06991d7..2b341cd 100644 --- a/source/ubl-settings-update.c +++ b/source/ubl-settings-update.c @@ -996,11 +996,11 @@ void on_repo_accept_clicked(GtkWidget *, dictionary *dict){ } int enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->EnabledCheck)); char *sources = ""; - GList *list = gtk_container_get_children(GTK_CONTAINER(window->SourceBox)); - for (guint i=0;isections){ + + char *cur = yon_char_unite(gtk_combo_box_get_active_id(GTK_COMBO_BOX(((path_section*)dact->data)->TypeCombo)),"@",(char*)gtk_entry_get_text(GTK_ENTRY(((path_section*)dact->data)->PathEntry)),NULL); + char *temp = yon_char_unite(sources,!yon_char_is_empty(sources)?",":"",cur,NULL); if (!yon_char_is_empty(sources)) free(sources); sources = temp; } @@ -1144,16 +1144,14 @@ void on_mirror_accept(GtkWidget *,dictionary *dict){ mirror_add_window *window = yon_dictionary_get_data(dict->first->next,mirror_add_window*); char *name = (char*)gtk_entry_get_text(GTK_ENTRY(window->NameEntry)); char *paths = ""; - GList *list = gtk_container_get_children(GTK_CONTAINER(window->PathBox)); - for (guint i=0;isections){ + + char *cur = yon_char_unite(gtk_combo_box_get_active_id(GTK_COMBO_BOX(((path_section*)dact->data)->TypeCombo)),"@",(char*)gtk_entry_get_text(GTK_ENTRY(((path_section*)dact->data)->PathEntry)),NULL); char *temp = yon_char_unite(paths,!yon_char_is_empty(paths)?",":"",cur,NULL); if (!yon_char_is_empty(paths)) free(paths); paths = temp; - g_list_free(container); } - g_list_free(list); if (!yon_char_is_empty(window->name)&&strcmp(name,window->name)){ yon_config_remove_by_key(REPOPUBLIC_CACHE_full(window->name)); } @@ -1261,23 +1259,50 @@ void on_password_accept(GtkWidget *,dictionary *dict){ } -void on_mirror_path_removed(GtkWidget *, GtkWidget *target){ - if (GTK_IS_WIDGET(target)){ - gtk_widget_destroy(target); +void on_mirror_path_removed(GtkWidget *self, mirror_add_window *window){ + int found=0; + dictionary *dict = NULL; + for_dictionaries(dict, window->sections){ + if (self == ((path_section*)dict->data)->PathRemoveButton){ + found =1; + break; + } + } + if (!found) return; + if (GTK_IS_WIDGET(((path_section*)dict->data)->PathRemovalBox)){ + gtk_widget_destroy(((path_section*)dict->data)->PathRemovalBox); + window->sections = yon_dictionary_rip(dict); } } -void on_mirror_path_edit(GtkWidget*,GtkWidget *target){ - GList *container = gtk_container_get_children(GTK_CONTAINER(target)); - if (gtk_editable_get_editable(GTK_EDITABLE(g_list_nth_data(container,0)))){ - gtk_editable_set_editable(GTK_EDITABLE(g_list_nth_data(container,0)),0); - GtkWidget *image = gtk_button_get_image(GTK_BUTTON(g_list_nth_data(container,1))); - gtk_entry_set_has_frame(GTK_ENTRY(g_list_nth_data(container,0)),0); +void on_mirror_path_edit(GtkWidget *self,mirror_add_window *window){ + int active = 0; + dictionary *cur = NULL; + dictionary *dict = NULL; + for_dictionaries(dict, window->sections){ + if (self == ((path_section*)dict->data)->PathEditButton){ + + cur = dict; + break; + } + if (((path_section*)dict->data)->edits) { + active = 1; + } + } + if (!cur||active) return; + if (gtk_editable_get_editable(GTK_EDITABLE(((path_section*)dict->data)->PathEntry))){ + ((path_section*)dict->data)->edits=1; + gtk_editable_set_editable(GTK_EDITABLE(((path_section*)dict->data)->PathEntry),0); + gtk_widget_set_sensitive(((path_section*)dict->data)->TypeCombo,0); + GtkWidget *image = gtk_button_get_image(GTK_BUTTON(((path_section*)dict->data)->PathEditButton)); + gtk_entry_set_has_frame(GTK_ENTRY(((path_section*)dict->data)->PathEntry),0); gtk_image_set_from_icon_name(GTK_IMAGE(image),edit_icon_name,GTK_ICON_SIZE_BUTTON); } else { - gtk_editable_set_editable(GTK_EDITABLE(g_list_nth_data(container,0)),1); - GtkWidget *image = gtk_button_get_image(GTK_BUTTON(g_list_nth_data(container,1))); - gtk_entry_set_has_frame(GTK_ENTRY(g_list_nth_data(container,0)),1); + ((path_section*)dict->data)->edits=0; + gtk_widget_set_sensitive(((path_section*)dict->data)->TypeCombo,1); + gtk_editable_set_editable(GTK_EDITABLE(((path_section*)dict->data)->PathEntry),1); + GtkWidget *image = gtk_button_get_image(GTK_BUTTON(((path_section*)dict->data)->PathEditButton)); + gtk_entry_set_has_frame(GTK_ENTRY(((path_section*)dict->data)->PathEntry),1); gtk_image_set_from_icon_name(GTK_IMAGE(image),accept_icon_name,GTK_ICON_SIZE_BUTTON); } } @@ -1289,14 +1314,26 @@ void on_mirror_path_add(GtkWidget *, mirror_add_window *window){ yon_ubl_status_highlight_incorrect(window->TypeEntry); return; } - char *type = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->TypeCombo)); - char *full_name = yon_char_unite(type,"@",target,NULL); - gtk_entry_set_text(GTK_ENTRY(window->TypeEntry),""); + GtkBuilder *builder = gtk_builder_new_from_resource(glade_mirror_path_add_path); - gtk_box_pack_start(GTK_BOX(window->PathBox),yon_gtk_builder_get_widget(builder,"PathRemovalBox"),0,0,2); - gtk_entry_set_text(GTK_ENTRY(gtk_builder_get_object(builder,"PathEntry")),full_name); - 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")); + + path_section *section = malloc(sizeof(path_section)); + section->PathRemovalBox = yon_gtk_builder_get_widget(builder,"PathRemovalBox"); + section->PathEditButton = yon_gtk_builder_get_widget(builder,"PathEditButton"); + section->PathEntry = yon_gtk_builder_get_widget(builder,"PathEntry"); + section->PathRemoveButton = yon_gtk_builder_get_widget(builder,"PathRemoveButton"); + 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->TypeCombo))); + yon_dictionary_add_or_create_if_exists_with_data(window->sections,(char*)target,section); + + gtk_entry_set_text(GTK_ENTRY(section->PathEntry),target); + gtk_entry_set_text(GTK_ENTRY(window->TypeEntry),""); + gtk_box_pack_start(GTK_BOX(window->PathBox),section->PathRemovalBox,0,0,2); + + g_signal_connect(gtk_builder_get_object(builder,"PathEditButton"),"clicked",G_CALLBACK(on_mirror_path_edit),window); + g_signal_connect(gtk_builder_get_object(builder,"PathRemoveButton"),"clicked",G_CALLBACK(on_mirror_path_removed),window); } @@ -1307,14 +1344,25 @@ void on_repo_source_add(GtkWidget *, repo_add_window *window){ 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); + + GtkBuilder *builder = gtk_builder_new_from_resource(glade_repo_path_add_path); + + path_section *section = malloc(sizeof(path_section)); + section->PathRemovalBox = yon_gtk_builder_get_widget(builder,"PathRemovalBox"); + section->PathEditButton = yon_gtk_builder_get_widget(builder,"PathEditButton"); + section->PathEntry = yon_gtk_builder_get_widget(builder,"PathEntry"); + section->PathRemoveButton = yon_gtk_builder_get_widget(builder,"PathRemoveButton"); + 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))); + yon_dictionary_add_or_create_if_exists_with_data(window->sections,(char*)target,section); + + gtk_entry_set_text(GTK_ENTRY(section->PathEntry),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); - 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")); + gtk_box_pack_start(GTK_BOX(window->SourceBox),section->PathRemovalBox,0,0,2); + g_signal_connect(gtk_builder_get_object(builder,"PathEditButton"),"clicked",G_CALLBACK(on_mirror_path_edit),window); + g_signal_connect(gtk_builder_get_object(builder,"PathRemoveButton"),"clicked",G_CALLBACK(on_mirror_path_removed),window); } void on_file_chooser_open(GtkWidget *, GtkEntry *target){ @@ -1388,6 +1436,7 @@ repo_add_window *yon_repo_add_window_new(){ window->PackageTrustAllRadio = yon_gtk_builder_get_widget(builder,"PackageTrustAllRadio"); window->DatabaseTrustAllRadio = yon_gtk_builder_get_widget(builder,"DatabaseTrustAllRadio"); + window->sections = NULL; window->name=NULL; g_signal_connect(G_OBJECT(window->RepoSourceButton),"clicked",G_CALLBACK(on_file_chooser_open),window->RepoSourceEntry); g_signal_connect(G_OBJECT(window->RepoSourceAddButton),"clicked",G_CALLBACK(on_repo_source_add),window); @@ -1499,6 +1548,7 @@ mirror_add_window *yon_mirror_add_window_new(){ window->HeadLabel = yon_gtk_builder_get_widget(builder,"HeadLabel"); window->PathBox = yon_gtk_builder_get_widget(builder,"PathBox"); + window->sections = NULL; window->name=NULL; g_signal_connect(G_OBJECT(window->TypeButton),"clicked",G_CALLBACK(on_file_chooser_open),window->TypeEntry); diff --git a/source/ubl-settings-update.h b/source/ubl-settings-update.h index 6a9e348..3fa2caf 100644 --- a/source/ubl-settings-update.h +++ b/source/ubl-settings-update.h @@ -28,6 +28,7 @@ #define glade_mirror_configure_path "/com/ublinux/ui/ubl-settings-update-mirror-configure.glade" #define glade_mirror_add_path "/com/ublinux/ui/ubl-settings-update-mirror-add.glade" #define glade_mirror_path_add_path "/com/ublinux/ui/ubl-settings-update-mirror-path-add.glade" +#define glade_repo_path_add_path "/com/ublinux/ui/ubl-settings-update-repo-path-add.glade" #define glade_password_path "/com/ublinux/ui/ubl-settings-update-password.glade" #define banner_path "/com/ublinux/images/ubl-settings-update-banner.png" #define CssPath "/com/ublinux/css/ubl-settings-update.css" @@ -144,6 +145,7 @@ typedef struct { } main_window; typedef struct { + dictionary *sections; GtkWidget *Window; GtkWidget *HeadLabel; GtkWidget *StatusBox; @@ -211,6 +213,7 @@ typedef struct { } web_publication_add_window; typedef struct { + dictionary *sections; GtkWidget *Window; GtkWidget *HeadLabel; GtkWidget *StatusBox; @@ -278,6 +281,15 @@ typedef struct { GtkWidget *AcceptButton; } documentation_confirmation_window; +typedef struct { + GtkWidget *PathRemovalBox; + GtkWidget *PathEntry; + GtkWidget *PathEditButton; + GtkWidget *PathRemoveButton; + GtkWidget *TypeCombo; + int edits; +} path_section; + void on_save_done(main_window *, config_str output, int size); void on_toggle_button_toggled(GtkWidget *self, main_window *widgets); @@ -344,8 +356,8 @@ void on_selection_changed(GtkWidget *self, main_window *widgets); void yon_interface_update(main_window *widgets); void on_mirror_path_add(GtkWidget *, mirror_add_window *window); -void on_mirror_path_removed(GtkWidget *, GtkWidget *target); -void on_mirror_path_edit(GtkWidget*,GtkWidget *target); +void on_mirror_path_removed(GtkWidget *, mirror_add_window *); +void on_mirror_path_edit(GtkWidget*,mirror_add_window *); void on_repo_source_add(GtkWidget *, repo_add_window *window); void on_cell_renderer_toggle_toggled(GtkWidget *self, gchar* path, GtkWidget *table); diff --git a/ubl-settings-update-mirror-path-add.glade b/ubl-settings-update-mirror-path-add.glade index bc6bbf8..5bc6933 100644 --- a/ubl-settings-update-mirror-path-add.glade +++ b/ubl-settings-update-mirror-path-add.glade @@ -39,9 +39,14 @@ - + True False + + WEB link + Proxy server + Mirrors file + False diff --git a/ubl-settings-update-repo-path-add.glade b/ubl-settings-update-repo-path-add.glade new file mode 100644 index 0000000..04856c9 --- /dev/null +++ b/ubl-settings-update-repo-path-add.glade @@ -0,0 +1,98 @@ + + + + + + + True + False + document-edit-symbolic + + + True + False + com.ublinux.libublsettingsui-gtk3.decrease-symbolic + + + True + False + 5 + + + 28 + 28 + True + False + True + Remove + image2 + + + + False + True + end + 0 + + + + + True + False + False + + file:// + ftp:// + http:// + https:// + Configuration + + + + False + True + 0 + + + + + True + True + False + False + + + + True + True + 1 + + + + + 28 + 28 + True + False + True + Edit + image1 + + + + False + True + end + 2 + + + + From 9675d2877559ef6df0ce4c6a4d1fba70f0e5c0b8 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 16 Dec 2024 16:45:28 +0600 Subject: [PATCH 2/2] Fixed editing for repos and mirrors --- source/ubl-settings-update.c | 71 ++++++++++++++--------- source/ubl-settings-update.h | 8 +-- ubl-settings-update-mirror-path-add.glade | 1 + ubl-settings-update.glade | 15 ----- 4 files changed, 49 insertions(+), 46 deletions(-) diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c index 2b341cd..c14bef6 100644 --- a/source/ubl-settings-update.c +++ b/source/ubl-settings-update.c @@ -738,19 +738,31 @@ void on_repo_edit(GtkWidget *,main_window *widgets){ int cur_size; config_str repos = yon_char_parse(parsed[0],&cur_size,","); for (int i=0;iStatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); - yon_ubl_status_highlight_incorrect(window->RepoSourceEntry); - return; - } - 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")),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")); + GtkBuilder *builder = gtk_builder_new_from_resource(glade_repo_path_add_path); + + path_section *section = malloc(sizeof(path_section)); + section->PathRemovalBox = yon_gtk_builder_get_widget(builder,"PathRemovalBox"); + section->PathEditButton = yon_gtk_builder_get_widget(builder,"PathEditButton"); + section->PathEntry = yon_gtk_builder_get_widget(builder,"PathEntry"); + section->PathRemoveButton = yon_gtk_builder_get_widget(builder,"PathRemoveButton"); + section->TypeCombo = yon_gtk_builder_get_widget(builder,"TypeCombo"); + section->edits=0; + + if (strstr(repos[i],"@")){ + char *type = yon_char_divide_search(repos[i],"@",-1); + gtk_combo_box_set_active_id(GTK_COMBO_BOX(section->TypeCombo),type); + free(type); + + } 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),repos[i]); + gtk_box_pack_start(GTK_BOX(window->SourceBox),section->PathRemovalBox,0,0,2); + g_signal_connect(gtk_builder_get_object(builder,"PathEditButton"),"clicked",G_CALLBACK(on_mirror_path_edit),window); + g_signal_connect(gtk_builder_get_object(builder,"PathRemoveButton"),"clicked",G_CALLBACK(on_mirror_path_removed),window); } + yon_char_parsed_free(repos,cur_size); } if (size>1&&!yon_char_is_empty(parsed[1])){ //siglevel int cur_size; @@ -908,18 +920,25 @@ void on_mirror_edit(GtkWidget *,main_window *widgets){ config_str parsed = yon_char_parse(parameter,&size,","); for (int i=0;iStatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); - yon_ubl_status_highlight_incorrect(window->TypeEntry); - return; - } - gtk_entry_set_text(GTK_ENTRY(window->TypeEntry),""); GtkBuilder *builder = gtk_builder_new_from_resource(glade_mirror_path_add_path); - gtk_box_pack_start(GTK_BOX(window->PathBox),yon_gtk_builder_get_widget(builder,"PathRemovalBox"),0,0,2); - 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")); - g_object_unref(G_OBJECT(builder)); + + path_section *section = malloc(sizeof(path_section)); + section->PathRemovalBox = yon_gtk_builder_get_widget(builder,"PathRemovalBox"); + section->PathEditButton = yon_gtk_builder_get_widget(builder,"PathEditButton"); + section->PathEntry = yon_gtk_builder_get_widget(builder,"PathEntry"); + section->PathRemoveButton = yon_gtk_builder_get_widget(builder,"PathRemoveButton"); + section->TypeCombo = yon_gtk_builder_get_widget(builder,"TypeCombo"); + section->edits=0; + + char *type = yon_char_divide_search(parsed[i],"@",-1); + gtk_combo_box_set_active_id(GTK_COMBO_BOX(section->TypeCombo),type); + yon_dictionary_add_or_create_if_exists_with_data(window->sections,(char*)target,section); + + gtk_entry_set_text(GTK_ENTRY(section->PathEntry),parsed[i]); + gtk_box_pack_start(GTK_BOX(window->PathBox),section->PathRemovalBox,0,0,2); + + g_signal_connect(gtk_builder_get_object(builder,"PathEditButton"),"clicked",G_CALLBACK(on_mirror_path_edit),window); + g_signal_connect(gtk_builder_get_object(builder,"PathRemoveButton"),"clicked",G_CALLBACK(on_mirror_path_removed),window); } gtk_widget_show(window->Window); @@ -998,8 +1017,8 @@ void on_repo_accept_clicked(GtkWidget *, dictionary *dict){ char *sources = ""; dictionary *dact = NULL; for_dictionaries (dact, window->sections){ - - char *cur = yon_char_unite(gtk_combo_box_get_active_id(GTK_COMBO_BOX(((path_section*)dact->data)->TypeCombo)),"@",(char*)gtk_entry_get_text(GTK_ENTRY(((path_section*)dact->data)->PathEntry)),NULL); + char *type = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(((path_section*)dact->data)->TypeCombo)); + char *cur = yon_char_unite(type?type:"",type?"@":"",(char*)gtk_entry_get_text(GTK_ENTRY(((path_section*)dact->data)->PathEntry)),NULL); char *temp = yon_char_unite(sources,!yon_char_is_empty(sources)?",":"",cur,NULL); if (!yon_char_is_empty(sources)) free(sources); sources = temp; @@ -1295,14 +1314,12 @@ void on_mirror_path_edit(GtkWidget *self,mirror_add_window *window){ gtk_editable_set_editable(GTK_EDITABLE(((path_section*)dict->data)->PathEntry),0); gtk_widget_set_sensitive(((path_section*)dict->data)->TypeCombo,0); GtkWidget *image = gtk_button_get_image(GTK_BUTTON(((path_section*)dict->data)->PathEditButton)); - gtk_entry_set_has_frame(GTK_ENTRY(((path_section*)dict->data)->PathEntry),0); gtk_image_set_from_icon_name(GTK_IMAGE(image),edit_icon_name,GTK_ICON_SIZE_BUTTON); } else { ((path_section*)dict->data)->edits=0; gtk_widget_set_sensitive(((path_section*)dict->data)->TypeCombo,1); gtk_editable_set_editable(GTK_EDITABLE(((path_section*)dict->data)->PathEntry),1); GtkWidget *image = gtk_button_get_image(GTK_BUTTON(((path_section*)dict->data)->PathEditButton)); - gtk_entry_set_has_frame(GTK_ENTRY(((path_section*)dict->data)->PathEntry),1); gtk_image_set_from_icon_name(GTK_IMAGE(image),accept_icon_name,GTK_ICON_SIZE_BUTTON); } } diff --git a/source/ubl-settings-update.h b/source/ubl-settings-update.h index 3fa2caf..ee5cc72 100644 --- a/source/ubl-settings-update.h +++ b/source/ubl-settings-update.h @@ -146,6 +146,8 @@ typedef struct { typedef struct { dictionary *sections; + GtkWidget *RepoSourceCombo; + GtkWidget *RepoSourceEntry; GtkWidget *Window; GtkWidget *HeadLabel; GtkWidget *StatusBox; @@ -158,8 +160,6 @@ typedef struct { GtkWidget *RepoSignConditionCombo; GtkWidget *RepoSignCheckCombo; GtkWidget *RepoSourceButton; - GtkWidget *RepoSourceEntry; - GtkWidget *RepoSourceCombo; GtkWidget *SourceBox; GtkWidget *RepoSourceAddButton; GtkWidget *RepoNameEntry; @@ -214,6 +214,8 @@ typedef struct { typedef struct { dictionary *sections; + GtkWidget *TypeCombo; + GtkWidget *TypeEntry; GtkWidget *Window; GtkWidget *HeadLabel; GtkWidget *StatusBox; @@ -221,8 +223,6 @@ typedef struct { GtkWidget *AcceptButton; GtkWidget *CancelButton; GtkWidget *NameEntry; - GtkWidget *TypeCombo; - GtkWidget *TypeEntry; GtkWidget *TypeButton; GtkWidget *PathBox; diff --git a/ubl-settings-update-mirror-path-add.glade b/ubl-settings-update-mirror-path-add.glade index 5bc6933..167bd1a 100644 --- a/ubl-settings-update-mirror-path-add.glade +++ b/ubl-settings-update-mirror-path-add.glade @@ -41,6 +41,7 @@ True + False False WEB link diff --git a/ubl-settings-update.glade b/ubl-settings-update.glade index 2a59e9b..476d005 100644 --- a/ubl-settings-update.glade +++ b/ubl-settings-update.glade @@ -1552,21 +1552,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - - True - fixed - Type - - - end - - - 1 - - - - Resource URL