From 5906d6162ea1e61956b75114c6c2215ff5b36c53 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 3 Dec 2024 11:31:06 +0600 Subject: [PATCH] Fixed closing for package removal dialog window --- source/ubl-settings-kernel.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/ubl-settings-kernel.c b/source/ubl-settings-kernel.c index 1e42b76..03b21aa 100644 --- a/source/ubl-settings-kernel.c +++ b/source/ubl-settings-kernel.c @@ -617,6 +617,7 @@ void on_package_remove_accept(GtkWidget *, dictionary *dict){ main_window *widgets = yon_dictionary_get_data(dict->first,main_window*); kernels_tab *tab = yon_dictionary_get_data(dict->first->next,kernels_tab*); dialog_window *window = yon_dictionary_get_data(dict->first->next->next,dialog_window*); + dict=dict->first; free(dict->first->next->next); dict->first->next->next = NULL; char *module_formated = yon_package_string_set(tab->package); @@ -867,11 +868,11 @@ void on_package_remove_clicked(GtkWidget *self,dictionary *dict){ dialog_window *window = yon_dialog_window_new(); yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window),self==tab->update_package_button?UPDATE_MODULE_TITLE_LABEL:INSTALL_MODULE_TITLE_LABEL,icon_path,"dialog"); yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window); + dict=dict->first; g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_package_remove_accept),dict); char *action_text = ""; gtk_widget_show(window->Window); - yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window); if (gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))){ action_text = KERNEL_PACKAGE_REMOVE_CONFIRMATION_LABEL(tab->name); gtk_label_set_text(GTK_LABEL(window->HeadLabel),REMOVE_ADDITION_PACKAGE_TITLE_LABEL); @@ -951,6 +952,8 @@ kernels_tab *yon_tab_row_new(GtkListBox *target, char *target_string, main_windo tab->install_package_button = yon_gtk_builder_get_widget(builder,"InstallPackageButton"); tab->changelog_button = yon_gtk_builder_get_widget(builder,"ChangelogButton"); tab->launch_button = yon_gtk_builder_get_widget(builder,"LaunchButton"); + tab->module_updated=0; + tab->package_updated=0; dictionary *dict = NULL; yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets); @@ -1058,6 +1061,8 @@ additions_kernels_tab *yon_additions_tab_row_new(GtkListBox *target, char *targe tab->launch_button = NULL; tab->run_tags_box = NULL; tab->tags_box = NULL; + tab->module_updated=0; + tab->package_updated=0; dictionary *dict = NULL; yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets);