pull/24/head
parent 58a861276d
commit 6c3ca55bcd

@ -391,6 +391,8 @@ void on_module_install_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*);
free(dict->first->next->next);
dict->first->next->next = NULL;
char *module_formated = yon_package_string_set(tab->module); char *module_formated = yon_package_string_set(tab->module);
char *modules_to_install = module_formated; char *modules_to_install = module_formated;
@ -406,11 +408,10 @@ void on_module_install_accept(GtkWidget *, dictionary *dict){
} }
} }
char *command = install_command(modules_to_install); char *command = install_command(modules_to_install);
// char *command_with_unload = yon_char_unite(unload_command(modules_to_install),"; ",command,NULL); char *command_unload = unload_command(modules_to_install);
system(command_unload);
yon_command_execute_async(command,widgets); yon_command_execute_async(command,widgets);
tab->module_installed=1; tab->module_installed=1;
free(dict->first->next->next);
dict->first->next->next=NULL;
on_subwindow_close(window->Window); on_subwindow_close(window->Window);
} }
@ -462,6 +463,7 @@ void on_module_install_clicked(GtkWidget *self,dictionary *dict){
char *action_text = MODULE_INSTALL_CONFIRMATION_LABEL(tab->name); char *action_text = 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);
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_module_install_accept),dict); g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_module_install_accept),dict);
gtk_label_set_text(GTK_LABEL(window->TopicLabel),action_text); gtk_label_set_text(GTK_LABEL(window->TopicLabel),action_text);
@ -615,6 +617,7 @@ kernels_tab *yon_tab_row_new(GtkListBox *target, char *target_string, main_windo
gtk_image_set_from_icon_name(GTK_IMAGE(tab->module_icon),module_icon_path,GTK_ICON_SIZE_BUTTON); gtk_image_set_from_icon_name(GTK_IMAGE(tab->module_icon),module_icon_path,GTK_ICON_SIZE_BUTTON);
} else { } else {
gtk_widget_hide(tab->remove_module_button); gtk_widget_hide(tab->remove_module_button);
gtk_widget_hide(tab->update_module_button);
gtk_widget_show(tab->install_module_button); gtk_widget_show(tab->install_module_button);
} }
@ -627,6 +630,7 @@ kernels_tab *yon_tab_row_new(GtkListBox *target, char *target_string, main_windo
} else { } else {
gtk_widget_hide(tab->remove_package_button); gtk_widget_hide(tab->remove_package_button);
gtk_widget_hide(tab->update_package_button);
gtk_widget_show(tab->install_package_button); gtk_widget_show(tab->install_package_button);
} }
@ -662,6 +666,8 @@ kernels_tab *yon_tab_row_new(GtkListBox *target, char *target_string, main_windo
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);
yon_dictionary_add_or_create_if_exists_with_data(dict,"tab",tab); yon_dictionary_add_or_create_if_exists_with_data(dict,"tab",tab);
g_signal_connect(G_OBJECT(tab->update_module_button),"clicked",G_CALLBACK(on_module_install_clicked),dict);
g_signal_connect(G_OBJECT(tab->update_package_button),"clicked",G_CALLBACK(on_package_install_clicked),dict);
g_signal_connect(G_OBJECT(tab->install_module_button),"clicked",G_CALLBACK(on_module_install_clicked),dict); g_signal_connect(G_OBJECT(tab->install_module_button),"clicked",G_CALLBACK(on_module_install_clicked),dict);
g_signal_connect(G_OBJECT(tab->install_package_button),"clicked",G_CALLBACK(on_package_install_clicked),dict); g_signal_connect(G_OBJECT(tab->install_package_button),"clicked",G_CALLBACK(on_package_install_clicked),dict);
g_signal_connect(G_OBJECT(tab->remove_module_button),"clicked",G_CALLBACK(on_module_remove_clicked),dict); g_signal_connect(G_OBJECT(tab->remove_module_button),"clicked",G_CALLBACK(on_module_remove_clicked),dict);
@ -1077,7 +1083,7 @@ void yon_main_window_complete(main_window *widgets){
glong columns = vte_terminal_get_column_count(VTE_TERMINAL(widgets->InstallTerminal)); glong columns = vte_terminal_get_column_count(VTE_TERMINAL(widgets->InstallTerminal));
vte_terminal_set_size(VTE_TERMINAL(widgets->InstallTerminal),columns,20); vte_terminal_set_size(VTE_TERMINAL(widgets->InstallTerminal),columns,20);
gtk_paned_add2(GTK_PANED(widgets->TerminalPaned),widgets->TerminalRevealer); gtk_paned_pack2(GTK_PANED(widgets->TerminalPaned),widgets->TerminalRevealer,1,1);
yon_interface_update(widgets); yon_interface_update(widgets);
yon_save_window_set_postsave_function(on_save_done,widgets); yon_save_window_set_postsave_function(on_save_done,widgets);

@ -55,7 +55,6 @@
<object class="GtkRevealer" id="TerminalRevealer"> <object class="GtkRevealer" id="TerminalRevealer">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="valign">end</property>
<property name="transition-type">slide-up</property> <property name="transition-type">slide-up</property>
<property name="transition-duration">0</property> <property name="transition-duration">0</property>
<child> <child>

Loading…
Cancel
Save