|
|
|
|
@ -615,6 +615,7 @@ gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets){
|
|
|
|
|
data->action_text=INTERRUPT_TEXT_LABEL;
|
|
|
|
|
data->title=WARNING_TITLE_LABEL;
|
|
|
|
|
if (yon_confirmation_dialog_call(widgets->MainWindow,data)==GTK_RESPONSE_ACCEPT ){
|
|
|
|
|
yon_window_config_save_instant();
|
|
|
|
|
on_exit_accepted(widgets);
|
|
|
|
|
gtk_main_quit();
|
|
|
|
|
return 1;
|
|
|
|
|
@ -1219,18 +1220,11 @@ void yon_main_window_create(main_window *widgets){
|
|
|
|
|
yon_char_parsed_free(slides,size);
|
|
|
|
|
}
|
|
|
|
|
gtk_builder_connect_signals(builder,NULL);
|
|
|
|
|
// yon_load_proceed(YON_CONFIG_LOCAL);
|
|
|
|
|
// yon_interface_update(widgets);
|
|
|
|
|
if (!yon_char_is_empty(config(AUTOINSTALL_TYPE_INSTALL))){
|
|
|
|
|
gtk_widget_show(widgets->StartScenarioButton);
|
|
|
|
|
} else {
|
|
|
|
|
gtk_widget_hide(widgets->StartScenarioButton);
|
|
|
|
|
}
|
|
|
|
|
// char *locale = config(installer_lang_parameter);
|
|
|
|
|
// if (!yon_char_is_empty(locale)){
|
|
|
|
|
// locale = setlocale(LC_ALL,NULL);
|
|
|
|
|
// }
|
|
|
|
|
// yon_ubl_window_init(TITLE_LABEL,DESCRIPTION_LABEL,locale,CssPath,LocaleName,version_application,WIKI_LINK);
|
|
|
|
|
if (main_config.force_ini){
|
|
|
|
|
main_config.configure_mode=1;
|
|
|
|
|
g_signal_handlers_block_by_func(G_OBJECT(widgets->ConfigurationModeMenuItem),G_CALLBACK(on_configuration_mode_switch),widgets);
|
|
|
|
|
@ -1242,20 +1236,6 @@ void yon_main_window_create(main_window *widgets){
|
|
|
|
|
}
|
|
|
|
|
yon_locale_init();
|
|
|
|
|
set_locales_list(widgets);
|
|
|
|
|
// {
|
|
|
|
|
// char *parameter = config(installer_lang_parameter);
|
|
|
|
|
// if (yon_char_is_empty(parameter)){
|
|
|
|
|
// parameter=setlocale(LC_ALL,NULL);
|
|
|
|
|
// }
|
|
|
|
|
// GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->LanguagesBox));
|
|
|
|
|
// GList *iter;
|
|
|
|
|
// for (iter = list;iter;iter=iter->next){
|
|
|
|
|
// char *lang = g_object_get_data(G_OBJECT(iter->data),"language");
|
|
|
|
|
// if (!strcmp(lang,parameter)){
|
|
|
|
|
// gtk_flow_box_select_child(GTK_FLOW_BOX(widgets->LanguagesBox),GTK_FLOW_BOX_CHILD(iter->data));
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**yon_main_window_complete(main_window *widgets)
|
|
|
|
|
@ -1268,6 +1248,8 @@ main_window *yon_main_window_complete(){
|
|
|
|
|
main_window *widgets=NULL;
|
|
|
|
|
widgets = yon_remalloc(widgets,sizeof(main_window));
|
|
|
|
|
yon_main_window_create(widgets);
|
|
|
|
|
yon_window_config_setup(GTK_WINDOW(widgets->MainWindow));
|
|
|
|
|
// yon_window_config_custom_window_setup(GTK_WINDOW(widgets->MainWindow),"MainWindow");
|
|
|
|
|
return widgets;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1301,12 +1283,17 @@ int main(int argc, char *argv[]){
|
|
|
|
|
}
|
|
|
|
|
gtk_init(&argc,&argv);
|
|
|
|
|
main_window *widgets = NULL;
|
|
|
|
|
if (widgets){};
|
|
|
|
|
int fullscreen = 0;
|
|
|
|
|
widgets = yon_main_window_complete();
|
|
|
|
|
on_config_global_load(NULL,widgets);
|
|
|
|
|
if (widgets){};
|
|
|
|
|
char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL);
|
|
|
|
|
yon_window_config_setup(GTK_WINDOW(widgets->MainWindow));
|
|
|
|
|
if (access(path,F_OK)){
|
|
|
|
|
fullscreen = 1;
|
|
|
|
|
gtk_window_maximize(GTK_WINDOW(widgets->MainWindow));
|
|
|
|
|
}
|
|
|
|
|
yon_window_config_load(path);
|
|
|
|
|
yon_window_config_add_instant_parameter("fullscreen","window",&fullscreen,YON_TYPE_BOOLEAN);
|
|
|
|
|
main_config.launch_arguments=yon_char_parsed_copy(argv,argc);
|
|
|
|
|
main_config.launch_size=argc;
|
|
|
|
|
GtkCssProvider *css=gtk_css_provider_new();
|
|
|
|
|
|