From c6935f255ea711557c3c5e0e3ae8439e59c9a7aa Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Fri, 4 Sep 2015 11:35:35 +0100 Subject: Display settings: Show output names in addition to display names. --- capplets/display/xrandr-capplet.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/capplets/display/xrandr-capplet.c b/capplets/display/xrandr-capplet.c index e256c0b8..fe09036e 100644 --- a/capplets/display/xrandr-capplet.c +++ b/capplets/display/xrandr-capplet.c @@ -1653,20 +1653,25 @@ static PangoLayout * get_display_name (App *app, MateRROutputInfo *output) { - const char *text; + char *text; + PangoLayout * layout; if (mate_rr_config_get_clone (app->current_configuration)) { - /* Translators: this is the feature where what you see on your laptop's - * screen is the same as your external monitor. Here, "Mirror" is being - * used as an adjective, not as a verb. For example, the Spanish - * translation could be "Pantallas en Espejo", *not* "Espejar Pantallas". - */ - text = _("Mirror Screens"); - } else - text = mate_rr_output_info_get_display_name (output); - - return gtk_widget_create_pango_layout ( - GTK_WIDGET (app->area), text); + /* Translators: this is the feature where what you see on your laptop's + * screen is the same as your external monitor. Here, "Mirror" is being + * used as an adjective, not as a verb. For example, the Spanish + * translation could be "Pantallas en Espejo", *not* "Espejar Pantallas". + */ + text = _("Mirror Screens"); + } + else { + text = g_strdup_printf ("%s\n%s", mate_rr_output_info_get_display_name (output), mate_rr_output_info_get_name (output)); + } + layout = gtk_widget_create_pango_layout (GTK_WIDGET (app->area), text); + pango_layout_set_markup (layout, text, -1); + g_free (text); + pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER); + return layout; } static void -- cgit v1.2.1