This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository e16.

View the commit online.

commit edc06f4950242e0c334ee349e704b46929242d86
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Sun Sep 17 19:33:08 2023 +0200

    text: Drop unused fsize argument in Text functions
---
 src/backgrounds.c |  6 +++---
 src/borders.c     |  5 ++---
 src/coords.c      |  4 ++--
 src/dialog.c      | 12 ++++++------
 src/iclass.c      |  6 +++---
 src/magwin.c      |  6 +++---
 src/menus.c       |  6 ++----
 src/progress.c    | 10 ++++------
 src/tclass.c      |  6 +++---
 src/tclass.h      | 10 +++++-----
 src/text.c        | 11 +++++------
 src/tooltips.c    | 13 ++++++-------
 src/warp.c        |  6 +++---
 13 files changed, 47 insertions(+), 54 deletions(-)

diff --git a/src/backgrounds.c b/src/backgrounds.c
index 80183b38..3677576c 100644
--- a/src/backgrounds.c
+++ b/src/backgrounds.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2022 Kim Woelders
+ * Copyright (C) 2004-2023 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -1685,10 +1685,10 @@ BG_RedrawView(Dialog * d)
 		     int                 tw, th;
 
 		     TextSize(tc, 0, 0, STATE_NORMAL,
-			      _("No\nBackground"), &tw, &th, 17);
+			      _("No\nBackground"), &tw, &th);
 		     TextDraw(tc, win, pmap, 0, 0, STATE_NORMAL,
 			      _("No\nBackground"), x + 4,
-			      4 + ((mini_h - th) / 2), mini_w, mini_h, 17, 512);
+			      4 + ((mini_h - th) / 2), mini_w, mini_h, 512);
 		  }
 	     }
 	   else
diff --git a/src/borders.c b/src/borders.c
index 6c577636..2268d9c9 100644
--- a/src/borders.c
+++ b/src/borders.c
@@ -397,8 +397,7 @@ _BorderWinpartCalc(const EWin * ewin, int i, int ww, int hh)
 	tclass = ewin->border->part[i].tclass;
 	pad = ImageclassGetPadding(iclass);
 	TextSize(tclass, ewin->state.active, EoIsSticky(ewin),
-		 ewin->bits[i].state, EwinGetTitle(ewin), &max, &dummywidth,
-		 w - (pad->top + pad->bottom));
+		 ewin->bits[i].state, EwinGetTitle(ewin), &max, &dummywidth);
 	max += pad->left + pad->right;
 	if (h > max)
 	  {
@@ -446,7 +445,7 @@ _BorderWinpartCalc(const EWin * ewin, int i, int ww, int hh)
 	     pad = ImageclassGetPadding(iclass);
 	     TextSize(tclass, ewin->state.active, EoIsSticky(ewin),
 		      ewin->bits[i].state, EwinGetTitle(ewin), &max,
-		      &dummyheight, h - (pad->top + pad->bottom));
+		      &dummyheight);
 	     max += pad->left + pad->right;
 
 	     if (w > max)
diff --git a/src/coords.c b/src/coords.c
index 1cff5111..6b96fd14 100644
--- a/src/coords.c
+++ b/src/coords.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2006-2018 Kim Woelders
+ * Copyright (C) 2006-2023 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -77,7 +77,7 @@ _CoordsShow(EWin * ewin, int mode)
 		  OpacityToPercent(ewin->props.opacity));
 	break;
      }
-   TextSize(tc, 0, 0, 0, s, &cw, &ch, 17);
+   TextSize(tc, 0, 0, 0, s, &cw, &ch);
    pad = ImageclassGetPadding(ic);
    cw += pad->left + pad->right;
    ch += pad->top + pad->bottom;
diff --git a/src/dialog.c b/src/dialog.c
index 0b8e917c..b8550976 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2022 Kim Woelders
+ * Copyright (C) 2004-2023 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -978,7 +978,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
 	break;
      case DITEM_BUTTON:
 	pad = ImageclassGetPadding(di->iclass);
-	TextSize(di->tclass, 0, 0, STATE_NORMAL, di->text, &iw, &ih, 17);
+	TextSize(di->tclass, 0, 0, STATE_NORMAL, di->text, &iw, &ih);
 	iw += pad->left + pad->right;
 	ih += pad->top + pad->bottom;
 	di->win = ECreateWindow(d->win, -20, -20, 2, 2, 0);
@@ -1015,7 +1015,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
 			   &di->item.check_button.orig_h);
 	     EImageFree(im);
 	  }
-	TextSize(di->tclass, 0, 0, STATE_NORMAL, di->text, &iw, &ih, 17);
+	TextSize(di->tclass, 0, 0, STATE_NORMAL, di->text, &iw, &ih);
 	if (ih < di->item.check_button.orig_h)
 	   ih = di->item.check_button.orig_h;
 	iw += di->item.check_button.orig_w + pad->left;
@@ -1031,7 +1031,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
 	di->h = ih;
 	break;
      case DITEM_TEXT:
-	TextSize(di->tclass, 0, 0, STATE_NORMAL, di->text, &iw, &ih, 17);
+	TextSize(di->tclass, 0, 0, STATE_NORMAL, di->text, &iw, &ih);
 	di->w = iw;
 	di->h = ih;
 	break;
@@ -1065,7 +1065,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
 			   &di->item.radio_button.orig_h);
 	     EImageFree(im);
 	  }
-	TextSize(di->tclass, 0, 0, STATE_NORMAL, di->text, &iw, &ih, 17);
+	TextSize(di->tclass, 0, 0, STATE_NORMAL, di->text, &iw, &ih);
 	if (ih < di->item.radio_button.orig_h)
 	   ih = di->item.radio_button.orig_h;
 	iw += di->item.radio_button.orig_w + pad->left;
@@ -1452,7 +1452,7 @@ DialogDrawItem(Dialog * d, DItem * di)
 	   EXCopyArea(d->pmm_bg.pmap, WinGetPmap(d->win),
 		      di->x, di->y, di->w, di->h, di->x, di->y);
 	TextDraw(di->tclass, d->win, WinGetPmap(d->win), 0, 0, state, di->text,
-		 x, di->y, w, 99999, 17, TextclassGetJustification(di->tclass));
+		 x, di->y, w, 99999, TextclassGetJustification(di->tclass));
 	break;
      }
 
diff --git a/src/iclass.c b/src/iclass.c
index 29664a1a..bd6f4858 100644
--- a/src/iclass.c
+++ b/src/iclass.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2022 Kim Woelders
+ * Copyright (C) 2004-2023 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -931,7 +931,7 @@ ITApply(Win win, ImageClass * ic, ImageState * is,
 
 		  if (ts && text)
 		     TextstateTextDraw(ts, win, pmap, text, 0, 0, w, h,
-				       &(ic->padding), 0,
+				       &(ic->padding),
 				       TextclassGetJustification(tc),
 				       flags & ITA_JUSTV);
 	       }
@@ -970,7 +970,7 @@ ITApply(Win win, ImageClass * ic, ImageState * is,
 	     ImagestateDrawNoImg(is, pmap, 0, 0, w, h);
 	     if (ts && text)
 		TextstateTextDraw(ts, win, pmap, text, 0, 0, w, h,
-				  &(ic->padding), 0,
+				  &(ic->padding),
 				  TextclassGetJustification(tc),
 				  flags & ITA_JUSTV);
 	  }
diff --git a/src/magwin.c b/src/magwin.c
index 4891cdea..4cf277ae 100644
--- a/src/magwin.c
+++ b/src/magwin.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2021 Kim Woelders
+ * Copyright (C) 2007-2023 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -80,9 +80,9 @@ MagwinDrawText(MagWindow * mw, int x, int y, const char *txt)
    if (!tc)
       return;
 
-   TextSize(tc, 0, 0, 0, txt, &cw, &ch, 17);
+   TextSize(tc, 0, 0, 0, txt, &cw, &ch);
    TextDraw(tc, EwinGetClientWin(mw->ewin), NoXID, 0, 0, 0,
-	    txt, x, y, cw, ch, 17, 0);
+	    txt, x, y, cw, ch, 0);
 }
 
 static unsigned int
diff --git a/src/menus.c b/src/menus.c
index 8d0e2446..43f56d5e 100644
--- a/src/menus.c
+++ b/src/menus.c
@@ -743,8 +743,7 @@ MenuRealize(Menu * m)
 
 	if ((m->style->tclass) && (m->items[i]->text))
 	  {
-	     TextSize(m->style->tclass, 0, 0, 0, _(m->items[i]->text), &w, &h,
-		      17);
+	     TextSize(m->style->tclass, 0, 0, 0, _(m->items[i]->text), &w, &h);
 	     if (h > maxh)
 		maxh = h;
 	     if (w > maxtw)
@@ -1002,8 +1001,7 @@ MenuDrawItem(Menu * m, MenuItem * mi, char shape, int state)
 	  {
 	     TextDraw(m->style->tclass, mi->win, mi_pmm->pmap, 0, 0, mi->state,
 		      _(mi->text), mi->text_x, mi->text_y, mi->text_w,
-		      mi->text_h, 17,
-		      TextclassGetJustification(m->style->tclass));
+		      mi->text_h, TextclassGetJustification(m->style->tclass));
 	  }
 	if (mi->icon && Conf.menus.show_icons)
 	  {
diff --git a/src/progress.c b/src/progress.c
index afa02466..3cb3c9fa 100644
--- a/src/progress.c
+++ b/src/progress.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2006-2018 Kim Woelders
+ * Copyright (C) 2006-2023 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -58,7 +58,7 @@ ProgressbarCreate(const char *name, int w, int h)
    p->tnc = TextclassAlloc("PROGRESS_TEXT_NUMBER", 1);
 
    pad = ImageclassGetPadding(p->ic);
-   TextSize(p->tc, 0, 0, 0, name, &tw, &th, 0);
+   TextSize(p->tc, 0, 0, 0, name, &tw, &th);
    if (h < th + pad->top + pad->bottom)
       h = th + pad->top + pad->bottom;
 
@@ -157,8 +157,7 @@ ProgressbarSet(Progressbar * p, int progress)
    EClearWindow(EobjGetWin(p->n_win));
    TextDraw(p->tnc, EobjGetWin(p->n_win), NoXID, 0, 0, STATE_CLICKED, s,
 	    pad->left, pad->top, p->h * 5 - (pad->left + pad->right),
-	    p->h - (pad->top + pad->bottom), p->h - (pad->top + pad->bottom),
-	    TextclassGetJustification(p->tnc));
+	    p->h - (pad->top + pad->bottom), TextclassGetJustification(p->tnc));
 
    /* Hack - We may not be running in the event loop here */
    EobjDamage(p->n_win);
@@ -181,6 +180,5 @@ ProgressbarShow(Progressbar * p)
    TextDraw(p->tc, EobjGetWin(p->win), NoXID, 0, 0, STATE_NORMAL,
 	    EobjGetName(p->win), pad->left, pad->top,
 	    p->w - (p->h * 5) - (pad->left + pad->right),
-	    p->h - (pad->top + pad->bottom), p->h - (pad->top + pad->bottom),
-	    TextclassGetJustification(p->tnc));
+	    p->h - (pad->top + pad->bottom), TextclassGetJustification(p->tnc));
 }
diff --git a/src/tclass.c b/src/tclass.c
index a19af72e..a9f37efb 100644
--- a/src/tclass.c
+++ b/src/tclass.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2021 Kim Woelders
+ * Copyright (C) 2004-2023 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -448,7 +448,7 @@ TextclassIpc(const char *params)
 	if (!win)
 	   return;
 
-	TextDraw(tc, win, NoXID, 0, 0, st, p, x, y, 99999, 99999, 17, 0);
+	TextDraw(tc, win, NoXID, 0, 0, st, p, x, y, 99999, 99999, 0);
 	EDestroyWin(win);
      }
    else if (!strcmp(param2, "query_size"))
@@ -461,7 +461,7 @@ TextclassIpc(const char *params)
 	   return;
 
 	w = h = 0;
-	TextSize(tc, 0, 0, STATE_NORMAL, p, &w, &h, 17);
+	TextSize(tc, 0, 0, STATE_NORMAL, p, &w, &h);
 	IpcPrintf("%i %i\n", w, h);
      }
    else if (!strcmp(param2, "query"))
diff --git a/src/tclass.h b/src/tclass.h
index b16f6d59..ecb6ceaa 100644
--- a/src/tclass.h
+++ b/src/tclass.h
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2022 Kim Woelders
+ * Copyright (C) 2004-2023 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -102,15 +102,15 @@ void                TextstateTextFit(TextState * ts, char **ptext, int *pw,
 void                TextstateTextDraw(TextState * ts, Win win,
 				      EX_Drawable draw, const char *text,
 				      int x, int y, int w, int h,
-				      const EImageBorder * pad, int fsize,
+				      const EImageBorder * pad,
 				      int justh, int justv);
 void                TextSize(TextClass * tclass, int active, int sticky,
-			     int state, const char *text, int *width,
-			     int *height, int fsize);
+			     int state, const char *text,
+			     int *width, int *height);
 void                TextDraw(TextClass * tclass, Win win, EX_Drawable draw,
 			     int active, int sticky, int state,
 			     const char *text, int x, int y, int w, int h,
-			     int fsize, int justification);
+			     int justification);
 
 int                 _xft_FdcInit(TextState * ts, Win win, EX_Drawable draw);
 void                _xft_FdcFini(TextState * ts);
diff --git a/src/text.c b/src/text.c
index a913ebcc..d1874eff 100644
--- a/src/text.c
+++ b/src/text.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2022 Kim Woelders
+ * Copyright (C) 2004-2023 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -483,7 +483,7 @@ TextStateLoadFont(TextState * ts)
 
 void
 TextSize(TextClass * tclass, int active, int sticky, int state,
-	 const char *text, int *width, int *height, int fsize __UNUSED__)
+	 const char *text, int *width, int *height)
 {
    const char         *str;
    char              **lines;
@@ -534,8 +534,7 @@ TextstateTextFit(TextState * ts, char **ptext, int *pw, int textwidth_limit)
 void
 TextstateTextDraw(TextState * ts, Win win, EX_Drawable draw,
 		  const char *text, int x, int y, int w, int h,
-		  const EImageBorder * pad, int fsize __UNUSED__, int justh,
-		  int justv)
+		  const EImageBorder * pad, int justh, int justv)
 {
    const char         *str;
    char              **lines;
@@ -688,7 +687,7 @@ TextstateTextDraw(TextState * ts, Win win, EX_Drawable draw,
 void
 TextDraw(TextClass * tclass, Win win, EX_Drawable draw, int active,
 	 int sticky, int state, const char *text, int x, int y, int w, int h,
-	 int fsize, int justh)
+	 int justh)
 {
    TextState          *ts;
 
@@ -699,5 +698,5 @@ TextDraw(TextClass * tclass, Win win, EX_Drawable draw, int active,
    if (!ts)
       return;
 
-   TextstateTextDraw(ts, win, draw, text, x, y, w, h, NULL, fsize, justh, 0);
+   TextstateTextDraw(ts, win, draw, text, x, y, w, h, NULL, justh, 0);
 }
diff --git a/src/tooltips.c b/src/tooltips.c
index 2ab5a7e1..03a6dca2 100644
--- a/src/tooltips.c
+++ b/src/tooltips.c
@@ -304,15 +304,14 @@ TooltipShow(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
 		continue;
 	     tts = _(tts);
 
-	     TextSize(tt->tclass, 0, 0, STATE_NORMAL, tts, &temp_w, &temp_h,
-		      17);
+	     TextSize(tt->tclass, 0, 0, STATE_NORMAL, tts, &temp_w, &temp_h);
 	     if (temp_w > labels_width)
 		labels_width = temp_w;
 
 	     if (ActionGetEvent(aa) == EVENT_DOUBLE_DOWN)
 	       {
 		  TextSize(tt->tclass, 0, 0, STATE_NORMAL, "2x", &double_w,
-			   &temp_h, 17);
+			   &temp_h);
 		  if (cols[0] < double_w)
 		     cols[0] = double_w;
 	       }
@@ -390,7 +389,7 @@ TooltipShow(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
 	  }
      }
 
-   TextSize(tt->tclass, 0, 0, STATE_NORMAL, text, &headline_w, &headline_h, 17);
+   TextSize(tt->tclass, 0, 0, STATE_NORMAL, text, &headline_w, &headline_h);
    if (headline_w < icons_width + labels_width)
       w = icons_width + labels_width;
    else
@@ -564,7 +563,7 @@ TooltipShow(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
 
    /* draw the ordinary tooltip text */
    TextDraw(tt->tclass, EobjGetWin(tt->TTWIN), NoXID, 0, 0, STATE_NORMAL, text,
-	    xx, pad->top, headline_w, headline_h, 17, 512);
+	    xx, pad->top, headline_w, headline_h, 512);
 
    /* draw the icons and labels, if any */
    if (ac)
@@ -590,7 +589,7 @@ TooltipShow(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
 	       {
 		  TextDraw(tt->tclass, EobjGetWin(tt->TTWIN), NoXID, 0, 0,
 			   STATE_NORMAL, "2x", xx + iw - double_w, y, double_w,
-			   heights[i], 17, 0);
+			   heights[i], 0);
 	       }
 
 	     if (ActionGetAnybutton(aa))
@@ -642,7 +641,7 @@ TooltipShow(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
 
 	     TextDraw(tt->tclass, EobjGetWin(tt->TTWIN), NoXID, 0, 0,
 		      STATE_NORMAL, tts, pad->left + icons_width + iw, y,
-		      labels_width, heights[i], 17, 0);
+		      labels_width, heights[i], 0);
 	     y += heights[i];
 
 	  }
diff --git a/src/warp.c b/src/warp.c
index 0f99c298..f2f90e4c 100644
--- a/src/warp.c
+++ b/src/warp.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2022 Kim Woelders
+ * Copyright (C) 2004-2023 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -175,7 +175,7 @@ WarpFocusWinShow(WarpFocusWin * fw)
 	  }
 	Esnprintf(s, sizeof(s), fmt, ss, EwinGetTitle(ewin));
 	wi->txt = Estrdup(s);
-	TextSize(fw->tc, 0, 0, 0, wi->txt, &ww, &hh, 17);
+	TextSize(fw->tc, 0, 0, 0, wi->txt, &ww, &hh);
 	if (ww > w)
 	   w = ww;
 	if (hh > h)
@@ -280,7 +280,7 @@ WarpFocusWinPaint(WarpFocusWin * fw)
 	  }
 
 	TextDraw(fw->tc, wi->win, NoXID, 0, 0, state, wi->txt,
-		 pad->left + iw, pad->top, fw->tw, fw->th, 0, 0);
+		 pad->left + iw, pad->top, fw->tw, fw->th, 0);
      }
 
    /* FIXME - Check shape */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to