Fixed closing for package removal dialog window

pull/48/head
parent 0035f69115
commit 5906d6162e

@ -617,6 +617,7 @@ void on_package_remove_accept(GtkWidget *, dictionary *dict){
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*); main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
kernels_tab *tab = yon_dictionary_get_data(dict->first->next,kernels_tab*); 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*); dialog_window *window = yon_dictionary_get_data(dict->first->next->next,dialog_window*);
dict=dict->first;
free(dict->first->next->next); free(dict->first->next->next);
dict->first->next->next = NULL; dict->first->next->next = NULL;
char *module_formated = yon_package_string_set(tab->package); 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(); 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_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); 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); g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_package_remove_accept),dict);
char *action_text = ""; char *action_text = "";
gtk_widget_show(window->Window); 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))){ if (gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))){
action_text = KERNEL_PACKAGE_REMOVE_CONFIRMATION_LABEL(tab->name); action_text = KERNEL_PACKAGE_REMOVE_CONFIRMATION_LABEL(tab->name);
gtk_label_set_text(GTK_LABEL(window->HeadLabel),REMOVE_ADDITION_PACKAGE_TITLE_LABEL); 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->install_package_button = yon_gtk_builder_get_widget(builder,"InstallPackageButton");
tab->changelog_button = yon_gtk_builder_get_widget(builder,"ChangelogButton"); tab->changelog_button = yon_gtk_builder_get_widget(builder,"ChangelogButton");
tab->launch_button = yon_gtk_builder_get_widget(builder,"LaunchButton"); tab->launch_button = yon_gtk_builder_get_widget(builder,"LaunchButton");
tab->module_updated=0;
tab->package_updated=0;
dictionary *dict = NULL; dictionary *dict = NULL;
yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets); 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->launch_button = NULL;
tab->run_tags_box = NULL; tab->run_tags_box = NULL;
tab->tags_box = NULL; tab->tags_box = NULL;
tab->module_updated=0;
tab->package_updated=0;
dictionary *dict = NULL; dictionary *dict = NULL;
yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets); yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets);

Loading…
Cancel
Save