monitor-manager: Use connector_type instead of name sniffing

This commit is contained in:
Jasper St. Pierre 2014-12-29 17:13:25 -08:00
parent 8296d4cdce
commit c5940580ed

View File

@ -344,11 +344,14 @@ make_display_name (MetaMonitorManager *manager,
char *vendor_name = NULL;
char *ret;
if (g_str_has_prefix (output->name, "LVDS") ||
g_str_has_prefix (output->name, "eDP"))
switch (output->connector_type)
{
case META_CONNECTOR_TYPE_LVDS:
case META_CONNECTOR_TYPE_eDP:
ret = g_strdup (_("Built-in display"));
goto out;
default:
break;
}
if (output->width_mm > 0 && output->height_mm > 0)