pull/50/head
parent 486874768b
commit dd3981085f

@ -915,7 +915,7 @@ void *on_config_save(void *data){
if (!main_config.install_complete){
int size=0;
config_str parameters = yon_config_get_all(&size);
main_config.install_thread=(GThread*)0x1;
// main_config.install_thread=(GThread*)0x1;
FILE *file = fopen(progress_path,"w");
if (file)
fclose(file);
@ -1694,8 +1694,7 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
}break;
case YON_PAGE_INSTALLATION_BEGIN:{
pthread_t tid;
pthread_create(&tid,NULL,on_config_save,widgets);
pthread_create(main_config.install_thread,NULL,on_config_save,widgets);
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION);
} break;
@ -2087,6 +2086,27 @@ void on_gparted_open(){
yon_launch_app_with_arguments(open_gparted_command,NULL);
}
gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets);
gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets){
GtkWidget *dialog = gtk_dialog_new_with_buttons(TITLE_LABEL,GTK_WINDOW(widgets->MainWindow),0,CANCEL_LABEL,GTK_RESPONSE_CANCEL,ACCEPT_LABEL,GTK_RESPONSE_ACCEPT,NULL);
GtkWidget *box = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
GtkWidget *HeadLabel = gtk_label_new(EXIT_WARNING_LABEL);
gtk_widget_show(HeadLabel);
gtk_box_pack_start(GTK_BOX(box),HeadLabel,0,0,5);
int resp = gtk_dialog_run(GTK_DIALOG(dialog));
if (resp == GTK_RESPONSE_ACCEPT){
if (main_config.install_thread)
pthread_cancel(*main_config.install_thread);
return 0;
} else {
gtk_widget_destroy(dialog);
}
return 1;
}
/**yon_main_window_complete(main_window *widgets)
* [EN]
*
@ -2260,6 +2280,7 @@ main_window *yon_main_window_complete(){
widgets->SameFSTypeSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameFSTypeSensitiveCheck");
widgets->SameLabelSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameLabelSensitiveCheck");
g_signal_connect(G_OBJECT(widgets->MainWindow),"delete-event",G_CALLBACK(on_yon_exit),widgets);
GtkWidget *menu = yon_gtk_builder_get_widget(builder,"menu2");
gtk_style_context_add_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemmiddle");
gtk_style_context_remove_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemtop");

@ -200,7 +200,7 @@ typedef struct {
guint slider_thread;
int install_mode;
GThread *config_save_thread;
GThread *install_thread;
pthread_t *install_thread;
guint progress_thread;
int configure_mode;
int log_progress_buzy;
@ -434,6 +434,12 @@ typedef struct {
char *command;
} log_window;
typedef struct {
GtkWidget *Window;
GtkWidget *AcceptButton;
GtkWidget *CancelButton;
} confirmation_window;
void config_init();
main_window *yon_main_window_complete();
ubinstall_language_window *yon_ubinstall_language_new();

@ -168,4 +168,9 @@
#define DEFAULT_LOCALES_LABEL _("English, U.S.A.; Russian, Russia")
#define READ_INSTALL_LOG_LABEL _("Read installation log")
#define READ_PROGRESS_LOG_LABEL _("Read progress log")
#define READ_PROGRESS_LOG_LABEL _("Read progress log")
#define ACCEPT_LABEL _("Accept")
#define ACCEPT_LABEL _("Start GParted")
#define EXIT_WARNING_LABEL _("Are you sure want to exit and interrupt installation process?")

@ -69,6 +69,7 @@
<object class="GtkLabel" id="LogLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
</object>

@ -2855,6 +2855,8 @@ or continue working in the UBLinux Live environment.</property>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-end">10</property>
<property name="margin-bottom">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
@ -2956,6 +2958,7 @@ or continue working in the UBLinux Live environment.</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Start GParted</property>
<property name="image">image5</property>
<style>
<class name="thin"/>
@ -3223,6 +3226,8 @@ or continue working in the UBLinux Live environment.</property>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-end">10</property>
<property name="margin-bottom">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
@ -3359,6 +3364,7 @@ installed.</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Start GParted</property>
<property name="image">image36</property>
<style>
<class name="thin"/>
@ -3821,6 +3827,8 @@ installed.</property>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-end">10</property>
<property name="margin-bottom">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
@ -3956,6 +3964,7 @@ installed.</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Start GParted</property>
<property name="image">image1</property>
<style>
<class name="thin"/>

@ -561,6 +561,10 @@ msgstr ""
msgid "Read progress log"
msgstr ""
#: source/ubl-strings.h:140
msgid "Start GParted"
msgstr ""
msgid "Load global configuration"
msgstr ""

@ -637,6 +637,10 @@ msgstr "Открыть лог установки"
msgid "Read progress log"
msgstr "Открыть лог прогресса"
#: source/ubl-strings.h:140
msgid "Start GParted"
msgstr "Запустить GParted"
msgid "English, U.S.A.; Russian, Russia"
msgstr "Английский, США; Русский, Россия"

Loading…
Cancel
Save