From 6e6663e749d16abf1a09a896fb788ba58a7277de Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Fri, 20 Feb 2026 15:31:30 +0600 Subject: [PATCH] Fixed vnc and rdp menu items --- source/ubinstall-gtk.c | 13 +++++++------ ubinstall-gtk.glade | 8 +++++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 1fce292..8158699 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -136,27 +136,28 @@ void on_rdp_toggled(GtkWidget *self, main_window *){ GList *box = gtk_container_get_children(GTK_CONTAINER(self)); GList *children = gtk_container_get_children(GTK_CONTAINER(box->data)); - int active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g_list_nth_data(children,1))); + int active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g_list_nth_data(children,0))); if (!active){ yon_launch(enable_rdp_command); } else { yon_launch(disable_rdp_command); } - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_list_nth_data(children,1)),!active); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_list_nth_data(children,0)),!active); g_list_free(box); g_list_free(children); } + void on_vnc_toggled(GtkWidget *self, main_window *){ GList *box = gtk_container_get_children(GTK_CONTAINER(self)); GList *children = gtk_container_get_children(GTK_CONTAINER(box->data)); - int active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g_list_nth_data(children,1))); + int active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g_list_nth_data(children,0))); if (!active){ - yon_launch(enable_vnc_command); + yon_launch_app_with_arguments(enable_vnc_command,NULL); } else { - yon_launch(disable_vnc_command); + yon_launch_app_with_arguments(disable_vnc_command,NULL); } - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_list_nth_data(children,1)),!active); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_list_nth_data(children,0)),!active); g_list_free(box); g_list_free(children); } diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 14a7516..eea5ab3 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -709,7 +709,8 @@ True False - start + center + center 5 112 com.ublinux.ubinstall-gtk @@ -741,6 +742,7 @@ 5 5 Welcome + True 0 @@ -770,6 +772,7 @@ 5 Licence agreement + True 0 @@ -797,6 +800,7 @@ agreement 5 5 Preparation + True 0 @@ -824,6 +828,7 @@ agreement 5 5 Configuration + True 0 @@ -851,6 +856,7 @@ agreement 5 5 Installation + True 0