|
|
|
|
@ -418,7 +418,7 @@ void yon_main_window_create(main_window *widgets){
|
|
|
|
|
__attribute__((unused)) char *locale = setlocale(LC_ALL, "en_US.UTF-8");
|
|
|
|
|
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path);
|
|
|
|
|
yon_scroll_block_for_builder(builder);
|
|
|
|
|
yon_translation_init(builder);
|
|
|
|
|
yon_installer_translation_init(builder);
|
|
|
|
|
gtk_builder_add_callback_symbol(builder,"yon_gtk_widget_set_sensitive_from_toggle_button",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button));
|
|
|
|
|
gtk_builder_add_callback_symbol(builder,"on_toggle_button_switch_on",G_CALLBACK(on_toggle_button_switch_on));
|
|
|
|
|
// Custom widgets configuration
|
|
|
|
|
@ -959,7 +959,7 @@ void yon_main_window_create(main_window *widgets){
|
|
|
|
|
{
|
|
|
|
|
widgets->debug_button = yon_debug_button_new();
|
|
|
|
|
GtkWidget *Label = g_object_get_data(G_OBJECT(widgets->debug_button),"Label");
|
|
|
|
|
yon_gtk_widget_set_translation(Label);
|
|
|
|
|
yon_installer_widget_set_translation(Label);
|
|
|
|
|
gtk_style_context_add_class(gtk_widget_get_style_context(widgets->debug_button),"menuitemmiddle");
|
|
|
|
|
gtk_style_context_remove_class(gtk_widget_get_style_context(widgets->debug_button),"menuitemtop");
|
|
|
|
|
gtk_menu_shell_prepend(GTK_MENU_SHELL(gtk_widget_get_parent(widgets->AboutMenuItem)),widgets->debug_button);
|
|
|
|
|
@ -970,7 +970,7 @@ void yon_main_window_create(main_window *widgets){
|
|
|
|
|
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);
|
|
|
|
|
yon_installer_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);
|
|
|
|
|
@ -985,7 +985,7 @@ 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);
|
|
|
|
|
yon_installer_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);
|
|
|
|
|
@ -999,7 +999,7 @@ 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);
|
|
|
|
|
yon_installer_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);
|
|
|
|
|
@ -1016,7 +1016,7 @@ void yon_main_window_create(main_window *widgets){
|
|
|
|
|
{
|
|
|
|
|
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);
|
|
|
|
|
yon_installer_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);
|
|
|
|
|
|
|
|
|
|
@ -1027,7 +1027,7 @@ void yon_main_window_create(main_window *widgets){
|
|
|
|
|
|
|
|
|
|
dictionary *iter = NULL;
|
|
|
|
|
for_dictionaries (iter,widgets->PackagesMenu->buttons){
|
|
|
|
|
yon_gtk_widget_set_translation(g_object_get_data(G_OBJECT(iter->data),"Label"));
|
|
|
|
|
yon_installer_widget_set_translation(g_object_get_data(G_OBJECT(iter->data),"Label"));
|
|
|
|
|
}
|
|
|
|
|
yon_startup_language_init();
|
|
|
|
|
yon_locale_init();
|
|
|
|
|
@ -1053,13 +1053,13 @@ void yon_main_window_create(main_window *widgets){
|
|
|
|
|
gtk_window_set_icon_name(GTK_WINDOW(widgets->MainWindow),icon_path);
|
|
|
|
|
}
|
|
|
|
|
gtk_builder_connect_signals(builder,NULL);
|
|
|
|
|
if (getuid()){
|
|
|
|
|
if (getuid()&&!main_config.autoinstall){
|
|
|
|
|
gtk_menu_item_activate(GTK_MENU_ITEM(widgets->ConfigurationModeMenuItem));
|
|
|
|
|
if (yon_char_is_empty(main_config.config_save_path)){
|
|
|
|
|
exit (1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (main_config.force_ini){
|
|
|
|
|
if (main_config.force_ini&&!main_config.autoinstall){
|
|
|
|
|
while(gtk_events_pending()) gtk_main_iteration();
|
|
|
|
|
if (!yon_configuration_path_check(main_config.config_save_path)){
|
|
|
|
|
exit (1);
|
|
|
|
|
@ -1115,6 +1115,7 @@ main_window *yon_main_window_complete(){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]){
|
|
|
|
|
main_config.block_restore=1;
|
|
|
|
|
config_str unfound = NULL;
|
|
|
|
|
int size=0;
|
|
|
|
|
opterr=0;
|
|
|
|
|
@ -1163,6 +1164,7 @@ int main(int argc, char *argv[]){
|
|
|
|
|
|
|
|
|
|
main_config.launch_arguments=yon_char_parsed_copy(argv,argc);
|
|
|
|
|
main_config.launch_size=argc;
|
|
|
|
|
main_config.block_restore=0;
|
|
|
|
|
gtk_main();
|
|
|
|
|
return 0;
|
|
|
|
|
}
|