diff options
author | Clement Lefebvre <[email protected]> | 2015-09-04 11:37:13 +0100 |
---|---|---|
committer | Clement Lefebvre <[email protected]> | 2015-09-04 11:37:13 +0100 |
commit | 4399fcd592684e15848c78ceb99a0e53e13b6e78 (patch) | |
tree | 87ce876eadf8d28f2b601ac91a041084250fd007 /capplets/display/xrandr-capplet.c | |
parent | 0fa9d943b98554bd51bbaa13294e67dc3e26bd7c (diff) | |
parent | c6935f255ea711557c3c5e0e3ae8439e59c9a7aa (diff) | |
download | mate-control-center-4399fcd592684e15848c78ceb99a0e53e13b6e78.tar.bz2 mate-control-center-4399fcd592684e15848c78ceb99a0e53e13b6e78.tar.xz |
Merge pull request #194 from clefebvre/master
Display settings: Show output names in addition to display names.
Diffstat (limited to 'capplets/display/xrandr-capplet.c')
-rw-r--r-- | capplets/display/xrandr-capplet.c | 29 |
1 files 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<small>%s</small>", 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 |