+ int limit = (int) floor (pixel_width - NAME_X_OFFSET);
+ bool shrinking = (last_name_text_width > pixel_width);
+ int actual_width;
+ ustring ustr;
+ ustring::size_type n;
+
+ if ((last_name_text_width && // we did this once
+ shrinking && // we're getting smaller
+ (name_text_width <= limit) && // fits the new size
+ (name_text_width <= last_name_text_width - NAME_X_OFFSET))) { // fit into the old size too
+ last_name_text_width = pixel_width;
+ return;
+ }
+
+ /* now check the cache of existing truncations */
+
+ Gtk::Label foo;
+ Glib::RefPtr<Pango::Layout> layout = foo.create_pango_layout ("");
+
+ for (n = item_name.length(); n > 0; --n) {