[PATCH] Make the device name in a MountpointSelector less wide (#1048583).

Vratislav Podzimek vpodzime at redhat.com
Mon Jan 20 15:52:12 UTC 2014


On Mon, 2014-01-20 at 10:48 -0500, Chris Lumens wrote:
> The name could be very long, obscuring the size of the device and making the
> accordion hard to use.
> ---
>  widgets/src/MountpointSelector.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/widgets/src/MountpointSelector.c b/widgets/src/MountpointSelector.c
> index ea7ce17..6286268 100644
> --- a/widgets/src/MountpointSelector.c
> +++ b/widgets/src/MountpointSelector.c
> @@ -21,6 +21,7 @@
>  #include <gdk/gdk.h>
>  #include <glib.h>
>  #include <glib/gstdio.h>
> +#include <pango/pango.h>
>  #include <gettext.h>
>  
>  #include "MountpointSelector.h"
> @@ -208,6 +209,8 @@ static void anaconda_mountpoint_selector_init(AnacondaMountpointSelector *mountp
>      mountpoint->priv->name_label = gtk_label_new(NULL);
>      format_name_label(mountpoint, _(DEFAULT_NAME));
>      gtk_misc_set_alignment(GTK_MISC(mountpoint->priv->name_label), 0, 0);
> +    gtk_label_set_ellipsize(GTK_LABEL(mountpoint->priv->name_label), PANGO_ELLIPSIZE_MIDDLE);
> +    gtk_label_set_max_width_chars(GTK_LABEL(mountpoint->priv->name_label), 25);
>      gtk_widget_set_hexpand(GTK_WIDGET(mountpoint->priv->name_label), TRUE);
>  
>      /* Create the size label. */
Much better ;) ACK.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list