diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-09-03 15:45:33 +0200 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-09-03 15:45:33 +0200 |
commit | a83f13375bc72d0d96523295bd9e76ab75af9255 (patch) | |
tree | d3fce3c5c1db720c2b6da3f9a7aa494a15cd3ab7 /src/im-source-menu-item.c | |
parent | 641cda4f3387597e297afee9429d89be2d79893b (diff) | |
download | ayatana-indicator-messages-a83f13375bc72d0d96523295bd9e76ab75af9255.tar.gz ayatana-indicator-messages-a83f13375bc72d0d96523295bd9e76ab75af9255.tar.bz2 ayatana-indicator-messages-a83f13375bc72d0d96523295bd9e76ab75af9255.zip |
im-source-menu-item: ellipsize label when it's longer than 40 em
Also make sure that the label is left-aligned when ellipsized.
Diffstat (limited to 'src/im-source-menu-item.c')
-rw-r--r-- | src/im-source-menu-item.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/im-source-menu-item.c b/src/im-source-menu-item.c index 5f89d07..775fa91 100644 --- a/src/im-source-menu-item.c +++ b/src/im-source-menu-item.c @@ -60,6 +60,9 @@ im_source_menu_item_constructed (GObject *object) gtk_widget_set_margin_left (priv->icon, icon_width + 6); priv->label = g_object_ref (gtk_label_new ("")); + gtk_label_set_max_width_chars (GTK_LABEL (priv->label), 40); + gtk_label_set_ellipsize (GTK_LABEL (priv->label), PANGO_ELLIPSIZE_END); + gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.5); priv->detail = g_object_ref (ido_detail_label_new ("")); gtk_widget_set_halign (priv->detail, GTK_ALIGN_END); |