Added new status message

pull/9/head
parent 119a3ba17b
commit 9b63bab785

@ -200,7 +200,7 @@ void *yon_tab_set_installed(kernels_tab *tab){
} }
void *yon_interface_update(main_window *widgets){ void *yon_interface_update(main_window *widgets){
gdk_threads_add_idle((GSourceFunc)yon_clear_interface,widgets); yon_clear_interface(widgets);
int kernels_size; int kernels_size;
config_str kernels = yon_resource_open_file(kernels_path, &kernels_size); config_str kernels = yon_resource_open_file(kernels_path, &kernels_size);
@ -328,6 +328,7 @@ gboolean yon_terminal_get_progress(main_window *widgets){
for (i=0;target[i];i++){ for (i=0;target[i];i++){
target[i][strlen(target[i])-1]='\0'; target[i][strlen(target[i])-1]='\0';
percentage = atof(target[i]); percentage = atof(target[i]);
yon_debug_output("%s\n",target[i]);
} }
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress),percentage/i/100); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress),percentage/i/100);
} }
@ -508,6 +509,14 @@ void on_package_install_clicked(GtkWidget *self,dictionary *dict){
} }
} }
void on_module_remove_done(GtkWidget *self, int state, kernels_tab *tab){
char *command = get_package_is_installed_command(tab->module);
if (!state&&!system(command)){
yon_ubl_status_box_render(PACKAGE_REMOVED_BUT_NOT_DISABLED_LABEL,BACKGROUND_IMAGE_INFO_TYPE);
}
g_signal_handlers_disconnect_by_func(G_OBJECT(self),on_module_remove_done,tab);
}
void on_module_remove_clicked(GtkWidget *self,dictionary *dict){ void on_module_remove_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*);
@ -517,6 +526,7 @@ void on_module_remove_clicked(GtkWidget *self,dictionary *dict){
data->data = NULL; data->data = NULL;
if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){ if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){
char *command = remove_command(tab->module); char *command = remove_command(tab->module);
g_signal_connect(G_OBJECT(widgets->InstallTerminal),"child-exited",G_CALLBACK(on_module_remove_done),tab);
yon_command_execute_async(command,widgets); yon_command_execute_async(command,widgets);
tab->module_installed=0; tab->module_installed=0;
} }

@ -241,6 +241,7 @@ dialog_window *yon_dialog_window_new();
void on_module_install_accept(GtkWidget *, dictionary *dict); void on_module_install_accept(GtkWidget *, dictionary *dict);
void on_package_install_accept(GtkWidget *, dictionary *dict); void on_package_install_accept(GtkWidget *, dictionary *dict);
void on_module_remove_done(GtkWidget *self, int state, kernels_tab *tab);
void on_module_install_clicked(GtkWidget *,dictionary *dict); void on_module_install_clicked(GtkWidget *,dictionary *dict);
void on_package_install_clicked(GtkWidget *,dictionary *dict); void on_package_install_clicked(GtkWidget *,dictionary *dict);
void on_module_remove_clicked(GtkWidget *,dictionary *dict); void on_module_remove_clicked(GtkWidget *,dictionary *dict);

@ -56,6 +56,7 @@
#define OPERATION_SUCCESS_LABEL _("Terminal operation success") #define OPERATION_SUCCESS_LABEL _("Terminal operation success")
#define OPERATION_ERROR_LABEL _("Terminal operation failed") #define OPERATION_ERROR_LABEL _("Terminal operation failed")
#define OPERATION_IN_PROGRESS_LABEL _("Terminal operation in process") #define OPERATION_IN_PROGRESS_LABEL _("Terminal operation in process")
#define PACKAGE_REMOVED_BUT_NOT_DISABLED_LABEL _("The package with the module has been removed, but the module is not disabled from the system, as it is used by other system programs. After rebooting, the module will be disabled and removed.")
#define MODULE_INSTALL_CONFIRMATION_LABEL(target) yon_char_unite(_("Are you sure want to install kernel")," ",target,"?",NULL) #define MODULE_INSTALL_CONFIRMATION_LABEL(target) yon_char_unite(_("Are you sure want to install kernel")," ",target,"?",NULL)
#define PACKAGE_INSTALL_CONFIRMATION_LABEL(target) yon_char_unite(_("Are you sure want to install package")," ",target,"?",NULL) #define PACKAGE_INSTALL_CONFIRMATION_LABEL(target) yon_char_unite(_("Are you sure want to install package")," ",target,"?",NULL)

@ -14,7 +14,6 @@
<property name="icon-name">com.ublinux.libublsettingsui-gtk.update-cloud-symbolic</property> <property name="icon-name">com.ublinux.libublsettingsui-gtk.update-cloud-symbolic</property>
</object> </object>
<object class="GtkBox" id="TableRowLabel"> <object class="GtkBox" id="TableRowLabel">
<property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="margin-start">5</property> <property name="margin-start">5</property>
<property name="margin-end">5</property> <property name="margin-end">5</property>

@ -14,7 +14,6 @@
<property name="icon-name">com.ublinux.libublsettingsui-gtk.update-cloud-symbolic</property> <property name="icon-name">com.ublinux.libublsettingsui-gtk.update-cloud-symbolic</property>
</object> </object>
<object class="GtkBox" id="TableRowLabel"> <object class="GtkBox" id="TableRowLabel">
<property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="margin-start">5</property> <property name="margin-start">5</property>
<property name="margin-end">5</property> <property name="margin-end">5</property>

@ -198,6 +198,10 @@ msgstr ""
msgid "Terminal operation in process" msgid "Terminal operation in process"
msgstr "" msgstr ""
#: source/ubl-strings.h:58
msgid "The package with the module has been removed, but the module is not disabled from the system, as it is used by other system programs. After rebooting, the module will be disabled and removed."
msgstr ""
#: source/ubl-strings.h:60 #: source/ubl-strings.h:60
msgid "Are you sure want to install kernel" msgid "Are you sure want to install kernel"
msgstr "" msgstr ""

@ -199,6 +199,10 @@ msgstr "Операция терминала завершена с ошибкой
msgid "Terminal operation in process" msgid "Terminal operation in process"
msgstr "Операция терминала в процессе выполнения" msgstr "Операция терминала в процессе выполнения"
#: source/ubl-strings.h:58
msgid "The package with the module has been removed, but the module is not disabled from the system, as it is used by other system programs. After rebooting, the module will be disabled and removed."
msgstr "Пакет с модулем удалён, но модуль не отключен от системы, так как используется другими системными программами. После перезагрузки модуль будет отключен и удалён."
#: source/ubl-strings.h:60 #: source/ubl-strings.h:60
msgid "Are you sure want to install kernel" msgid "Are you sure want to install kernel"
msgstr "Вы хотите установить в систему ядро" msgstr "Вы хотите установить в систему ядро"

Loading…
Cancel
Save