mirror of
https://gitlab.gnome.org/GNOME/libmks.git
synced 2024-12-22 13:45:21 +00:00
lib: handle any potential changes to type
This commit is contained in:
parent
459cb173b0
commit
f5935b38cf
@ -129,6 +129,24 @@ mks_screen_console_notify_cb (MksScreen *self,
|
|||||||
_mks_screen_set_height (self, mks_qemu_console_get_height (console));
|
_mks_screen_set_height (self, mks_qemu_console_get_height (console));
|
||||||
else if (strcmp (pspec->name, "number") == 0)
|
else if (strcmp (pspec->name, "number") == 0)
|
||||||
_mks_screen_set_number (self, mks_qemu_console_get_head (console));
|
_mks_screen_set_number (self, mks_qemu_console_get_head (console));
|
||||||
|
else if (strcmp (pspec->name, "type") == 0)
|
||||||
|
{
|
||||||
|
const char *type;
|
||||||
|
|
||||||
|
if ((type = mks_qemu_console_get_type_ ((console))))
|
||||||
|
{
|
||||||
|
MksScreenKind kind = MKS_SCREEN_KIND_TEXT;
|
||||||
|
|
||||||
|
if (strcmp (type, "Graphic") == 0)
|
||||||
|
kind = MKS_SCREEN_KIND_GRAPHIC;
|
||||||
|
|
||||||
|
if (kind != self->kind)
|
||||||
|
{
|
||||||
|
self->kind = kind;
|
||||||
|
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_KIND]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user