From 2b5d2d084f9b99f69671ccb31ad95417ad50491b Mon Sep 17 00:00:00 2001 From: gotmor Date: Thu, 12 Feb 2009 17:36:35 +0000 Subject: removed "..." truncation indicator git-svn-id: http://dzen.googlecode.com/svn/trunk@247 f2baff5b-bf2c-0410-a398-912abdc3d8b2 --- draw.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/draw.c b/draw.c index 54275aa..e73e3f2 100644 --- a/draw.c +++ b/draw.c @@ -320,7 +320,7 @@ parse_line(const char *line, int lnr, int align, int reverse, int nodraw) { /* positioning */ int n_posx, n_posy, set_posy=0; int px=0, py=0, xorig=0; - int i, next_pos=0, j=0, h=0, tw=0, ow; + int i, next_pos=0, j=0, h=0, tw=0; /* fonts */ int font_was_set=0; /* position */ @@ -664,19 +664,11 @@ parse_line(const char *line, int lnr, int align, int reverse, int nodraw) { } /* check if text is longer than window's width */ - ow = j; tw = textnw(cur_fnt, lbuf, strlen_utf8(lbuf)); + tw = textnw(cur_fnt, lbuf, strlen_utf8(lbuf)); while( ((tw + px) > (dzen.w - h)) && j>=0) { lbuf[--j] = '\0'; tw = textnw(cur_fnt, lbuf, strlen_utf8(lbuf)); } - if(j < ow) { - if(j > 1) - lbuf[j - 1] = '.'; - if(j > 2) - lbuf[j - 2] = '.'; - if(j > 3) - lbuf[j - 3] = '.'; - } if(!nobg) setcolor(&pm, px, tw, lastfg, lastbg, reverse, nobg); @@ -934,19 +926,11 @@ parse_line(const char *line, int lnr, int align, int reverse, int nodraw) { } /* check if text is longer than window's width */ - ow = j; tw = textnw(cur_fnt, lbuf, strlen_utf8(lbuf)); + tw = textnw(cur_fnt, lbuf, strlen_utf8(lbuf)); while( ((tw + px) > (dzen.w - h)) && j>=0) { lbuf[--j] = '\0'; tw = textnw(cur_fnt, lbuf, strlen_utf8(lbuf)); } - if(j < ow) { - if(j > 1) - lbuf[j - 1] = '.'; - if(j > 2) - lbuf[j - 2] = '.'; - if(j > 3) - lbuf[j - 3] = '.'; - } if(!nobg) setcolor(&pm, px, tw, lastfg, lastbg, reverse, nobg); -- cgit v1.2.3