mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
console/gtk: add qemu_console_get_label
Add a new function to get a nice label for a given QemuConsole. Drop the labeling code in gtk.c and use the new function instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
f8c223f69a
commit
779ce88fbd
3 changed files with 17 additions and 11 deletions
12
ui/gtk.c
12
ui/gtk.c
|
@ -1730,17 +1730,7 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc,
|
|||
QemuConsole *con, int idx,
|
||||
GSList *group, GtkWidget *view_menu)
|
||||
{
|
||||
Object *obj;
|
||||
|
||||
obj = object_property_get_link(OBJECT(con), "device", NULL);
|
||||
if (obj) {
|
||||
vc->label = g_strdup_printf("%s", object_get_typename(obj));
|
||||
} else if (qemu_console_is_graphic(con)) {
|
||||
vc->label = g_strdup_printf("VGA");
|
||||
} else {
|
||||
vc->label = g_strdup_printf("vc%d", idx);
|
||||
}
|
||||
|
||||
vc->label = qemu_console_get_label(con);
|
||||
vc->s = s;
|
||||
vc->gfx.scale_x = 1.0;
|
||||
vc->gfx.scale_y = 1.0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue