mirror of
https://gitlab.com/virt-viewer/virt-viewer.git
synced 2025-01-25 06:03:42 +03:00
app: append VTE consoles to display submenu
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
This commit is contained in:
parent
f6448ae6e6
commit
fd25645c11
@ -2293,6 +2293,26 @@ window_update_menu_displays_cb(gpointer value,
|
|||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (tmp = self->priv->windows; tmp; tmp = tmp->next) {
|
||||||
|
VirtViewerWindow *win = VIRT_VIEWER_WINDOW(tmp->data);
|
||||||
|
VirtViewerDisplay *display = virt_viewer_window_get_display(win);
|
||||||
|
|
||||||
|
if (VIRT_VIEWER_IS_DISPLAY_VTE(display)) {
|
||||||
|
gchar *name = NULL;
|
||||||
|
GtkWidget *item;
|
||||||
|
|
||||||
|
g_object_get(display, "name", &name, NULL);
|
||||||
|
item = gtk_check_menu_item_new_with_label(name);
|
||||||
|
g_free(name);
|
||||||
|
|
||||||
|
virt_viewer_signal_connect_object(G_OBJECT(item), "toggled",
|
||||||
|
G_CALLBACK(menu_display_visible_toggled_cb), display, 0);
|
||||||
|
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item),
|
||||||
|
gtk_widget_get_visible(GTK_WIDGET(virt_viewer_window_get_window(win))));
|
||||||
|
gtk_menu_shell_append(submenu, item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gtk_widget_show_all(GTK_WIDGET(submenu));
|
gtk_widget_show_all(GTK_WIDGET(submenu));
|
||||||
g_list_free(keys);
|
g_list_free(keys);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user