|
|
|
|
@ -818,25 +818,13 @@ void yon_main_window_create(main_window *widgets){
|
|
|
|
|
}
|
|
|
|
|
yon_window_config_load(path);
|
|
|
|
|
yon_window_config_add_instant_parameter("fullscreen","window",&fullscreen,YON_TYPE_BOOLEAN);
|
|
|
|
|
|
|
|
|
|
yon_startup_language_init();
|
|
|
|
|
yon_locale_init();
|
|
|
|
|
yon_main_window_update_locale(widgets);
|
|
|
|
|
|
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(widgets->MainWindow),NULL,TITLE_LABEL,icon_path,NULL);
|
|
|
|
|
|
|
|
|
|
gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter),(GtkTreeModelFilterVisibleFunc)on_country_filter,widgets,NULL);
|
|
|
|
|
|
|
|
|
|
gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(widgets->LanguagesTree),(GtkTreeViewSearchEqualFunc)on_languages_search_func,widgets,NULL);
|
|
|
|
|
gtk_overlay_add_overlay(GTK_OVERLAY(widgets->RegionMapOverlay),widgets->TimeZoneMapOverlayBox);
|
|
|
|
|
gtk_overlay_set_overlay_pass_through(GTK_OVERLAY(widgets->RegionMapOverlay),widgets->TimeZoneMapOverlayBox,1);
|
|
|
|
|
gtk_widget_hide(widgets->TimeZoneMapOverlayBox);
|
|
|
|
|
g_thread_new("Partitions_thread",(GThreadFunc)yon_partitions_list_load,widgets);
|
|
|
|
|
{
|
|
|
|
|
widgets->EnableRDPMenuItem = gtk_menu_item_new();
|
|
|
|
|
GtkWidget *Box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
|
|
|
|
|
GtkWidget *Label = gtk_label_new(ENABLE_RDP_LABEL);
|
|
|
|
|
GtkWidget *Check = gtk_check_button_new();
|
|
|
|
|
yon_gtk_widget_set_translation(Label);
|
|
|
|
|
g_object_set_data(G_OBJECT(widgets->EnableRDPMenuItem),"Label",Label);
|
|
|
|
|
gtk_box_pack_start(GTK_BOX(Box),Check,0,0,0);
|
|
|
|
|
gtk_box_pack_start(GTK_BOX(Box),Label,0,0,0);
|
|
|
|
|
gtk_container_add(GTK_CONTAINER(widgets->EnableRDPMenuItem),Box);
|
|
|
|
|
@ -850,6 +838,8 @@ void yon_main_window_create(main_window *widgets){
|
|
|
|
|
GtkWidget *Box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
|
|
|
|
|
GtkWidget *Label = gtk_label_new(ENABLE_VNC_LABEL);
|
|
|
|
|
GtkWidget *Check = gtk_check_button_new();
|
|
|
|
|
yon_gtk_widget_set_translation(Label);
|
|
|
|
|
g_object_set_data(G_OBJECT(widgets->EnableVNCMenuItem),"Label",Label);
|
|
|
|
|
gtk_box_pack_start(GTK_BOX(Box),Check,0,0,0);
|
|
|
|
|
gtk_box_pack_start(GTK_BOX(Box),Label,0,0,0);
|
|
|
|
|
gtk_container_add(GTK_CONTAINER(widgets->EnableVNCMenuItem),Box);
|
|
|
|
|
@ -862,6 +852,8 @@ void yon_main_window_create(main_window *widgets){
|
|
|
|
|
widgets->ConfigurationModeMenuItem = gtk_menu_item_new();
|
|
|
|
|
GtkWidget *Box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
|
|
|
|
|
GtkWidget *Label = gtk_label_new(CONFIGURATION_MODE_LABEL);
|
|
|
|
|
yon_gtk_widget_set_translation(Label);
|
|
|
|
|
g_object_set_data(G_OBJECT(widgets->ConfigurationModeMenuItem),"Label",Label);
|
|
|
|
|
widgets->ConfigurationModeCheck = gtk_check_button_new();
|
|
|
|
|
gtk_box_pack_start(GTK_BOX(Box),widgets->ConfigurationModeCheck,0,0,0);
|
|
|
|
|
gtk_box_pack_start(GTK_BOX(Box),Label,0,0,0);
|
|
|
|
|
@ -874,6 +866,29 @@ void yon_main_window_create(main_window *widgets){
|
|
|
|
|
gtk_widget_set_sensitive(widgets->ConfigurationModeMenuItem,0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
widgets->root_button = yon_root_button_new(main_config.argv,main_config.argc);
|
|
|
|
|
GtkWidget *Label = g_object_get_data(G_OBJECT(widgets->root_button),"Label");
|
|
|
|
|
yon_gtk_widget_set_translation(Label);
|
|
|
|
|
gtk_style_context_add_class(gtk_widget_get_style_context(widgets->root_button),"menuitemtop");
|
|
|
|
|
gtk_menu_shell_prepend(GTK_MENU_SHELL(gtk_widget_get_parent(widgets->AboutMenuItem)),widgets->root_button);
|
|
|
|
|
|
|
|
|
|
yon_root_button_init(widgets->root_button,GTK_WINDOW(widgets->MainWindow));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
yon_startup_language_init();
|
|
|
|
|
yon_locale_init();
|
|
|
|
|
yon_main_window_update_locale(widgets);
|
|
|
|
|
|
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(widgets->MainWindow),NULL,TITLE_LABEL,icon_path,NULL);
|
|
|
|
|
|
|
|
|
|
gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter),(GtkTreeModelFilterVisibleFunc)on_country_filter,widgets,NULL);
|
|
|
|
|
|
|
|
|
|
gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(widgets->LanguagesTree),(GtkTreeViewSearchEqualFunc)on_languages_search_func,widgets,NULL);
|
|
|
|
|
gtk_overlay_add_overlay(GTK_OVERLAY(widgets->RegionMapOverlay),widgets->TimeZoneMapOverlayBox);
|
|
|
|
|
gtk_overlay_set_overlay_pass_through(GTK_OVERLAY(widgets->RegionMapOverlay),widgets->TimeZoneMapOverlayBox,1);
|
|
|
|
|
gtk_widget_hide(widgets->TimeZoneMapOverlayBox);
|
|
|
|
|
g_thread_new("Partitions_thread",(GThreadFunc)yon_partitions_list_load,widgets);
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (main_config.lock_load_global == 1){
|
|
|
|
|
@ -963,6 +978,8 @@ main_window *yon_main_window_complete(){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]){
|
|
|
|
|
main_config.argv=argv;
|
|
|
|
|
main_config.argc = argc;
|
|
|
|
|
// __attribute__((unused)) char *locale = setlocale(LC_ALL, "en_US.UTF-8");
|
|
|
|
|
config_str unfound = NULL;
|
|
|
|
|
int size=0;
|
|
|
|
|
@ -1003,11 +1020,6 @@ int main(int argc, char *argv[]){
|
|
|
|
|
-1);
|
|
|
|
|
{
|
|
|
|
|
widgets = yon_main_window_complete();
|
|
|
|
|
GtkWidget *root_button = yon_root_button_new(argv,argc);
|
|
|
|
|
gtk_style_context_add_class(gtk_widget_get_style_context(root_button),"menuitemtop");
|
|
|
|
|
gtk_menu_shell_prepend(GTK_MENU_SHELL(gtk_widget_get_parent(widgets->AboutMenuItem)),root_button);
|
|
|
|
|
|
|
|
|
|
yon_root_button_init(root_button,GTK_WINDOW(widgets->MainWindow));
|
|
|
|
|
|
|
|
|
|
on_config_global_load(NULL,widgets);
|
|
|
|
|
}
|
|
|
|
|
|