[gtk+] tests: Make testmenubars make all menubar items ellipsized



commit cb99f0750d5868d72e7e666c2941a2e56c7407a3
Author: Benjamin Otte <otte redhat com>
Date:   Sun May 1 04:18:53 2011 +0200

    tests: Make testmenubars make all menubar items ellipsized
    
    This reproduces a bug in Nautilus. And it allows to shrink things,
    woohoo!

 tests/testmenubars.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/tests/testmenubars.c b/tests/testmenubars.c
index 250b515..592b959 100644
--- a/tests/testmenubars.c
+++ b/tests/testmenubars.c
@@ -72,6 +72,7 @@ create_menubar (GtkPackDirection pack_dir,
   gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
   child = gtk_bin_get_child (GTK_BIN (menuitem));
   gtk_label_set_angle (GTK_LABEL (child), angle);
+  gtk_label_set_ellipsize (GTK_LABEL (child), PANGO_ELLIPSIZE_START);
   menu = create_menu (2);
   gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
 
@@ -79,6 +80,7 @@ create_menubar (GtkPackDirection pack_dir,
   gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
   child = gtk_bin_get_child (GTK_BIN (menuitem));
   gtk_label_set_angle (GTK_LABEL (child), angle);
+  gtk_label_set_ellipsize (GTK_LABEL (child), PANGO_ELLIPSIZE_MIDDLE);
   menu = create_menu (2);
   gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
 
@@ -86,6 +88,7 @@ create_menubar (GtkPackDirection pack_dir,
   gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
   child = gtk_bin_get_child (GTK_BIN (menuitem));
   gtk_label_set_angle (GTK_LABEL (child), angle);
+  gtk_label_set_ellipsize (GTK_LABEL (child), PANGO_ELLIPSIZE_END);
   menu = create_menu (2);
   gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]