Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/wncklet/ChangeLog,v
retrieving revision 1.487
diff -u -r1.487 ChangeLog
--- ChangeLog	7 Oct 2003 12:49:21 -0000	1.487
+++ ChangeLog	8 Oct 2003 11:17:18 -0000
@@ -1,3 +1,8 @@
+2003-10-08  Vincent Untz  <vincent@vuntz.net>
+
+	* window-menu.c: (window_menu_add_window) trim the name of the window
+	if it's longer than 32 characters. Fix bug #119647.
+
 2003-10-07  Padraig O'Briain <padraig.obriain@sun.com>
 
 	* showdesktop.c (show_desktop_applet_fill): Set accessible name for
Index: window-menu.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/wncklet/window-menu.c,v
retrieving revision 1.6
diff -u -r1.6 window-menu.c
--- window-menu.c	7 Oct 2003 12:49:21 -0000	1.6
+++ window-menu.c	8 Oct 2003 11:17:18 -0000
@@ -331,6 +331,7 @@
 	GtkWidget     *item;
 	GtkWidget     *image;
 	const char    *name;
+	char          *trimmed_name;
 	char          *label;
 	char          *freeme = NULL;
 
@@ -341,10 +342,23 @@
 	if (!name)
 		name = _("Unknown Window");
 
-	if (!wnck_window_is_minimized (window))
-		label = (char *) name;
-	else {
-		label = g_strdup_printf ("[%s]", name);
+	if (!wnck_window_is_minimized (window)) {
+		if (strlen (name) > 32) {
+			trimmed_name = g_strndup (name, 29);
+			label = g_strdup_printf ("%s...", trimmed_name);
+			g_free (trimmed_name);
+			freeme = label;
+		} else {
+			label = (char *) name;
+		}
+	} else {
+		if (strlen (name) > 30) {
+			trimmed_name = g_strndup (name, 27);
+			label = g_strdup_printf ("[%s...]", trimmed_name);
+			g_free (trimmed_name);
+		} else {
+			label = g_strdup_printf ("[%s]", name);
+		}
 		freeme = label;
 	}
 
