Changed update dialog label

pull/39/head
parent 258200a7cb
commit 5410ab25f6

@ -527,7 +527,11 @@ dialog_window *yon_dialog_window_new(){
void on_module_install_clicked(GtkWidget *self,dictionary *dict){ void on_module_install_clicked(GtkWidget *self,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*);
char *action_text = KERNEL_MODULE_INSTALL_CONFIRMATION_LABEL(tab->name); char *action_text = NULL;
if (self == tab->update_module_button)
action_text = KERNEL_MODULE_UPDATE_CONFIRMATION_LABEL(tab->name);
else
action_text = KERNEL_MODULE_INSTALL_CONFIRMATION_LABEL(tab->name);
if (!gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))){ if (!gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))){
dialog_window *window = yon_dialog_window_new(); dialog_window *window = yon_dialog_window_new();
yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window); yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window);
@ -554,6 +558,9 @@ void on_module_install_clicked(GtkWidget *self,dictionary *dict){
} else { } else {
dialog_confirmation_data *data = malloc(sizeof(dialog_confirmation_data)); dialog_confirmation_data *data = malloc(sizeof(dialog_confirmation_data));
if (self == tab->update_module_button)
data->action_text = ADDITION_MODULE_UPDATE_CONFIRMATION_LABEL(tab->name);
else
data->action_text = ADDITION_MODULE_INSTALL_CONFIRMATION_LABEL(tab->name); data->action_text = ADDITION_MODULE_INSTALL_CONFIRMATION_LABEL(tab->name);
data->function = NULL; data->function = NULL;
data->data = NULL; data->data = NULL;
@ -569,7 +576,11 @@ void on_module_install_clicked(GtkWidget *self,dictionary *dict){
void on_package_install_clicked(GtkWidget *self,dictionary *dict){ void on_package_install_clicked(GtkWidget *self,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*);
char *action_text = KERNEL_PACKAGE_INSTALL_CONFIRMATION_LABEL(tab->name); char *action_text = NULL;
if (self == tab->update_module_button)
action_text = KERNEL_PACKAGE_UPDATE_CONFIRMATION_LABEL(tab->name);
else
action_text = KERNEL_PACKAGE_INSTALL_CONFIRMATION_LABEL(tab->name);
if (!gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))){ if (!gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))){
dialog_window *window = yon_dialog_window_new(); dialog_window *window = yon_dialog_window_new();
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_package_install_accept),dict); g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_package_install_accept),dict);
@ -596,6 +607,9 @@ void on_package_install_clicked(GtkWidget *self,dictionary *dict){
} else { } else {
dialog_confirmation_data *data = malloc(sizeof(dialog_confirmation_data)); dialog_confirmation_data *data = malloc(sizeof(dialog_confirmation_data));
if (self == tab->update_package_button)
data->action_text = ADDITION_PACKAGE_UPDATE_CONFIRMATION_LABEL(tab->name);
else
data->action_text = ADDITION_PACKAGE_INSTALL_CONFIRMATION_LABEL(tab->name); data->action_text = ADDITION_PACKAGE_INSTALL_CONFIRMATION_LABEL(tab->name);
data->function = NULL; data->function = NULL;
data->data = NULL; data->data = NULL;

Loading…
Cancel
Save