Fixed vnc and rdp menu items

pull/238/head
parent 69db070329
commit 6e6663e749

@ -136,27 +136,28 @@ void on_rdp_toggled(GtkWidget *self, main_window *){
GList *box = gtk_container_get_children(GTK_CONTAINER(self)); GList *box = gtk_container_get_children(GTK_CONTAINER(self));
GList *children = gtk_container_get_children(GTK_CONTAINER(box->data)); 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){ if (!active){
yon_launch(enable_rdp_command); yon_launch(enable_rdp_command);
} else { } else {
yon_launch(disable_rdp_command); 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(box);
g_list_free(children); g_list_free(children);
} }
void on_vnc_toggled(GtkWidget *self, main_window *){ void on_vnc_toggled(GtkWidget *self, main_window *){
GList *box = gtk_container_get_children(GTK_CONTAINER(self)); GList *box = gtk_container_get_children(GTK_CONTAINER(self));
GList *children = gtk_container_get_children(GTK_CONTAINER(box->data)); 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){ if (!active){
yon_launch(enable_vnc_command); yon_launch_app_with_arguments(enable_vnc_command,NULL);
} else { } 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(box);
g_list_free(children); g_list_free(children);
} }

@ -709,7 +709,8 @@
<object class="GtkImage"> <object class="GtkImage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="valign">start</property> <property name="halign">center</property>
<property name="valign">center</property>
<property name="margin-top">5</property> <property name="margin-top">5</property>
<property name="pixel-size">112</property> <property name="pixel-size">112</property>
<property name="icon-name">com.ublinux.ubinstall-gtk</property> <property name="icon-name">com.ublinux.ubinstall-gtk</property>
@ -741,6 +742,7 @@
<property name="margin-start">5</property> <property name="margin-start">5</property>
<property name="margin-end">5</property> <property name="margin-end">5</property>
<property name="label" translatable="yes">Welcome</property> <property name="label" translatable="yes">Welcome</property>
<property name="wrap">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
</object> </object>
</child> </child>
@ -770,6 +772,7 @@
<property name="margin-end">5</property> <property name="margin-end">5</property>
<property name="label" translatable="yes">Licence <property name="label" translatable="yes">Licence
agreement</property> agreement</property>
<property name="wrap">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
</object> </object>
</child> </child>
@ -797,6 +800,7 @@ agreement</property>
<property name="margin-start">5</property> <property name="margin-start">5</property>
<property name="margin-end">5</property> <property name="margin-end">5</property>
<property name="label" translatable="yes">Preparation</property> <property name="label" translatable="yes">Preparation</property>
<property name="wrap">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
</object> </object>
</child> </child>
@ -824,6 +828,7 @@ agreement</property>
<property name="margin-start">5</property> <property name="margin-start">5</property>
<property name="margin-end">5</property> <property name="margin-end">5</property>
<property name="label" translatable="yes">Configuration</property> <property name="label" translatable="yes">Configuration</property>
<property name="wrap">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
</object> </object>
</child> </child>
@ -851,6 +856,7 @@ agreement</property>
<property name="margin-start">5</property> <property name="margin-start">5</property>
<property name="margin-end">5</property> <property name="margin-end">5</property>
<property name="label" translatable="yes">Installation</property> <property name="label" translatable="yes">Installation</property>
<property name="wrap">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
</object> </object>
</child> </child>

Loading…
Cancel
Save