[nautilus/wip/gaction_] canvas-item: remove useless check



commit bf90ee134944b0d0d34ded47891536f65b72c0ce
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Jan 22 15:48:32 2015 -0800

    canvas-item: remove useless check
    
    The max text width is always > 0.

 libnautilus-private/nautilus-canvas-item.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/libnautilus-private/nautilus-canvas-item.c b/libnautilus-private/nautilus-canvas-item.c
index 916d29e..11d85a2 100644
--- a/libnautilus-private/nautilus-canvas-item.c
+++ b/libnautilus-private/nautilus-canvas-item.c
@@ -677,12 +677,8 @@ static void
 prepare_pango_layout_width (NautilusCanvasItem *item,
                            PangoLayout *layout)
 {
-       if (nautilus_canvas_item_get_max_text_width (item) < 0) {
-               pango_layout_set_width (layout, -1);
-       } else {
-               pango_layout_set_width (layout, floor (nautilus_canvas_item_get_max_text_width (item)) * 
PANGO_SCALE);
-               pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
-       }
+       pango_layout_set_width (layout, floor (nautilus_canvas_item_get_max_text_width (item)) * PANGO_SCALE);
+       pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
 }
 
 static void


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