[gnome-panel] menu: ellipsize long recent document names
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] menu: ellipsize long recent document names
- Date: Sun, 25 Mar 2018 11:21:52 +0000 (UTC)
commit 177cbb11c3df50bc0b3c923b045c0e3b3a1940d5
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Mar 25 14:18:45 2018 +0300
menu: ellipsize long recent document names
modules/menu/gp-recent-menu.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/modules/menu/gp-recent-menu.c b/modules/menu/gp-recent-menu.c
index a3405fb..0c81083 100644
--- a/modules/menu/gp-recent-menu.c
+++ b/modules/menu/gp-recent-menu.c
@@ -99,6 +99,7 @@ append_recent_items (GpRecentMenu *menu)
GtkWidget *image;
const gchar *label;
GtkWidget *item;
+ GtkWidget *child;
gchar *uri_display;
info = l->data;
@@ -112,6 +113,13 @@ append_recent_items (GpRecentMenu *menu)
item = gp_image_menu_item_new_with_label (label);
gp_image_menu_item_set_image (GP_IMAGE_MENU_ITEM (item), image);
+ child = gtk_bin_get_child (GTK_BIN (item));
+ if (GTK_IS_LABEL (child))
+ {
+ gtk_label_set_ellipsize (GTK_LABEL (child), PANGO_ELLIPSIZE_END);
+ gtk_label_set_max_width_chars (GTK_LABEL (child), 30);
+ }
+
uri_display = gtk_recent_info_get_uri_display (info);
if (uri_display != NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]