From cb340c80a61395c5fde4bcf40b20994f30ac48ae Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 12 Sep 2025 10:29:58 +0600 Subject: [PATCH 1/2] Changed filesystem type combo boxes filling --- filesystems-format-list.csv | 10 ++++++ gresource.xml | 1 + source/CMakeLists.txt | 1 + source/ubinstall-gtk-installation.c | 12 +++++++ source/ubinstall-gtk.h | 1 + ubinstall-gtk.glade | 56 ----------------------------- 6 files changed, 25 insertions(+), 56 deletions(-) create mode 100644 filesystems-format-list.csv diff --git a/filesystems-format-list.csv b/filesystems-format-list.csv new file mode 100644 index 0000000..e1e5271 --- /dev/null +++ b/filesystems-format-list.csv @@ -0,0 +1,10 @@ +STATUS;NAME +1;ext4 +1;ext3 +1;exfat +1;fat32 +1;fat16 +1;riserfs +0;udf +0;xfs +1;zfs \ No newline at end of file diff --git a/gresource.xml b/gresource.xml index c7a8641..8cfa3cf 100644 --- a/gresource.xml +++ b/gresource.xml @@ -56,5 +56,6 @@ kernel-list-addon.csv services-list.csv network-list.csv + filesystems-format-list.csv \ No newline at end of file diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 1e9ccda..3174321 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -78,6 +78,7 @@ set(DEPENDFILES ../kernel-list-addon.csv ../services-list.csv ../network-list.csv + ../filesystems-format-list.csv ../icons-builtin/install_type_custom_normal.png ../icons-builtin/install_type_data_only_normal.png ../icons-builtin/install_type_fast_normal.png diff --git a/source/ubinstall-gtk-installation.c b/source/ubinstall-gtk-installation.c index 5c5f8f1..817e6d9 100644 --- a/source/ubinstall-gtk-installation.c +++ b/source/ubinstall-gtk-installation.c @@ -487,6 +487,18 @@ void yon_install_init(main_window *widgets, enum YON_PAGES page){ } } if (fs_type_combo){ + gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(fs_type_combo)); + int size; + config_str fs_types = yon_resource_open_file(fs_types_path,&size); + for (int i=0;i 5 5 left - False True @@ -5240,17 +5239,6 @@ or continue working in the UBLinux Live environment. True False 1 - - ext3 - ext4 - fat16 - fat32 - exfat - riserfs - udf - xfs - zfs - True @@ -5917,17 +5905,6 @@ or continue working in the UBLinux Live environment. True False 1 - - ext3 - ext4 - fat16 - fat32 - exfat - riserfs - udf - xfs - zfs - True @@ -6553,17 +6530,6 @@ or continue working in the UBLinux Live environment. True False 1 - - ext3 - ext4 - fat16 - fat32 - exfat - riserfs - udf - xfs - zfs - True @@ -9437,17 +9403,6 @@ separately into the selected partition. False False 1 - - ext3 - ext4 - fat16 - fat32 - exfat - riserfs - udf - xfs - zfs - True @@ -10167,17 +10122,6 @@ separately into the selected partition. False False 1 - - ext3 - ext4 - fat16 - fat32 - exfat - riserfs - udf - xfs - zfs - True -- 2.35.1 From ed30b86beb7390dea007f15347875faf2e85ab97 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 12 Sep 2025 11:29:57 +0600 Subject: [PATCH 2/2] Added VNC switching --- source/ubinstall-gtk.c | 12 +++++++++++- source/ubinstall-gtk.h | 8 +++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index b21e890..fd5a71c 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -3,6 +3,13 @@ config main_config; // //functions +void on_vnc_toggled(GtkWidget *self, main_window *){ + if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(self))){ + yon_launch(enable_vnc_command); + } else { + yon_launch(disable_vnc_command); + } +} void on_pacman_software_all_toggled(GtkWidget *, char *path, main_window *widgets){ GtkTreeIter iter; @@ -381,6 +388,7 @@ main_window *yon_main_window_complete(){ widgets->Notebook = yon_gtk_builder_get_widget(builder,"Notebook"); widgets->MainSpinner=yon_gtk_builder_get_widget(builder,"MainSpinner"); + widgets->EnableVNCMenuItem = yon_gtk_builder_get_widget(builder,"EnableVNCMenuItem"); widgets->DocumentationMenuItem = yon_ubl_menu_item_documentation_new(DOCUMENTATION_LABEL); widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL); @@ -630,11 +638,13 @@ main_window *yon_main_window_complete(){ gtk_style_context_remove_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemtop"); gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->DocumentationMenuItem); gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->AboutMenuItem); - + g_signal_connect(G_OBJECT(widgets->LoadGlobalConfigurationMenuItem),"activate",G_CALLBACK(on_config_global_load),widgets); g_signal_connect(G_OBJECT(widgets->LoadLocalConfigurationMenuItem),"activate",G_CALLBACK(on_config_local_load),widgets); g_signal_connect(G_OBJECT(widgets->LoadExternalConfigurationMenuItem),"activate",G_CALLBACK(on_config_custom_load),widgets); + g_signal_connect(G_OBJECT(widgets->EnableVNCMenuItem),"activate",G_CALLBACK(on_vnc_toggled),widgets); + // g_signal_connect(G_OBJECT(widgets->SaveGlobalLocalConfigurationMenuItem),"activate",G_CALLBACK(on_config_global_local_save),widgets); // g_signal_connect(G_OBJECT(widgets->SaveGlobalConfigurationMenuItem),"activate",G_CALLBACK(on_config_global_save),widgets); // g_signal_connect(G_OBJECT(widgets->SaveLocalConfigurationMenuItem),"activate",G_CALLBACK(on_config_local_save),widgets); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 9185204..4bdfbff 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -123,6 +123,10 @@ layout && /description:/ {\ }\ \" | sort -u\ " + +#define enable_vnc_command "ubconfig --target system set [desktop] X11VNC=ublinux" +#define disable_vnc_command "ubconfig --target system remove [desktop] X11VNC=ublinux" + #define get_layouts_local_command(layout) yon_char_unite("xkbcli list --load-exotic | awk -v layout=\"",layout,"\" \"BEGIN {layout_pattern = sprintf(\\\"^ *- *layout: *'%s'\\\",layout);matched=0} matched && /variant:/ {match(\\$0, /: *'([^']+)'/, matches);variant = matches[1]} matched && /description:/ {match(\\$0, /: *(.+)/, matches);description = matches[1]} matched && /^ *-/{matched=0; if (variant) printf \\\"%s|%s\\n\\\",variant,description} \\$0 ~ layout_pattern {matched=1;variant=\\\"\\\";description=\\\"\\\";next}\" | sort -u",NULL) #define get_devices_command "lsblk --noheadings --nodeps -Jo PATH,SIZE,MODEL,VENDOR,SERIAL --exclude 7" #define get_parts_and_devices_command "lsblk --noheadings --bytes -o TYPE,PATH,SIZE,FSTYPE,LABEL,PARTLABEL,MOUNTPOINT,FSUSED,FSUSE% --exclude 7 |awk '{print ($1\";\"$2\";\"$3\";\"$4\";\"$5\";\"$6\";\"$7\";\"$8\";\"$9)}'" @@ -515,6 +519,7 @@ typedef struct { GtkWidget *ConfigurationModeMenuItem; + GtkWidget *EnableVNCMenuItem; GtkWidget *AboutMenuItem; GtkWidget *DocumentationMenuItem; @@ -1113,4 +1118,5 @@ void yon_source_update(source_window *window); void yon_source_element_add(char *key,void*,source_window *window); source_element *yon_source_element_new(); void on_system_setup_pass(GtkWidget *, main_window *widgets); -void yon_resize_images_update(main_window *widgets); \ No newline at end of file +void yon_resize_images_update(main_window *widgets); +void on_vnc_toggled(GtkWidget *self, main_window *widgets); \ No newline at end of file -- 2.35.1