Remove dead code
@@ -261,10 +261,8 @@ schedule_panel_redraw();
} void clock_compute_text_geometry(Clock *clock, - int *time_height_ink, int *time_height, int *time_width, - int *date_height_ink, int *date_height, int *date_width) {@@ -273,10 +271,8 @@ buf_time,
time2_format ? buf_date : NULL, time1_font_desc, time2_font_desc, - time_height_ink, time_height, time_width, - date_height_ink, date_height, date_width); }
@@ -304,7 +304,6 @@ int *interior_padding,
int *icon_w, int *icon_h, gboolean *text_next_line, - int *txt_height_ink, int *txt_height, int *txt_width, int *new_size,@@ -342,7 +341,6 @@ : area->width - 2 * *horiz_padding - left_right_border_width(area);
available_h = panel->area.height; } get_text_size2(execp->backend->font_desc, - txt_height_ink, txt_height, txt_width, available_h,@@ -386,7 +384,7 @@ Execp *execp = (Execp *)obj;
int horiz_padding, vert_padding, interior_padding; int icon_w, icon_h; gboolean text_next_line; - int txt_height_ink, txt_height, txt_width; + int txt_height, txt_width; int new_size; gboolean resized; execp_compute_icon_text_geometry(execp,@@ -396,7 +394,6 @@ &interior_padding,
&icon_w, &icon_h, &text_next_line, - &txt_height_ink, &txt_height, &txt_width, &new_size,@@ -411,7 +408,7 @@ Execp *execp = (Execp *)obj;
int horiz_padding, vert_padding, interior_padding; int icon_w, icon_h; gboolean text_next_line; - int txt_height_ink, txt_height, txt_width; + int txt_height, txt_width; int new_size; gboolean resized; execp_compute_icon_text_geometry(execp,@@ -421,7 +418,6 @@ &interior_padding,
&icon_w, &icon_h, &text_next_line, - &txt_height_ink, &txt_height, &txt_width, &new_size,@@ -492,6 +488,7 @@
// draw layout pango_layout_set_font_description(layout, execp->backend->font_desc); pango_layout_set_width(layout, (execp->frontend->textw + TINT2_PANGO_SLACK) * PANGO_SCALE); + pango_layout_set_height(layout, (execp->frontend->texth + TINT2_PANGO_SLACK) * PANGO_SCALE); pango_layout_set_alignment(layout, execp->backend->centered ? PANGO_ALIGN_CENTER : PANGO_ALIGN_LEFT); pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR); pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_NONE);
@@ -333,9 +333,8 @@ }
} // compute vertical position : text and icon - int height_ink, height, width; + int height, width; get_text_size2(panel->g_task.font_desc, - &height_ink, &height, &width, panel->area.height,
@@ -134,9 +134,8 @@ int taskbarname_compute_desired_size(void *obj)
{ TaskbarName *taskbar_name = (TaskbarName *)obj; Panel *panel = (Panel *)taskbar_name->area.panel; - int name_height, name_width, name_height_ink; + int name_height, name_width; get_text_size2(panel_config.taskbarname_font_desc, - &name_height_ink, &name_height, &name_width, panel->area.height,@@ -162,9 +161,8 @@ Panel *panel = (Panel *)taskbar_name->area.panel;
schedule_redraw(&taskbar_name->area); - int name_height, name_width, name_height_ink; + int name_height, name_width; get_text_size2(panel_config.taskbarname_font_desc, - &name_height_ink, &name_height, &name_width, panel->area.height,
@@ -929,10 +929,8 @@ const char *line1,
const char *line2, PangoFontDescription *line1_font_desc, PangoFontDescription *line2_font_desc, - int *line1_height_ink, int *line1_height, int *line1_width, - int *line2_height_ink, int *line2_height, int *line2_width) {@@ -941,7 +939,6 @@ area_compute_available_size(area, &available_w, &available_h);
if (line1 && line1[0]) get_text_size2(line1_font_desc, - line1_height_ink, line1_height, line1_width, available_h,@@ -953,11 +950,10 @@ PANGO_ELLIPSIZE_NONE,
FALSE, ((Panel*)area->panel)->scale); else - *line1_width = *line1_height_ink = *line1_height = 0; + *line1_width = *line1_height = 0; if (line2 && line2[0]) get_text_size2(line2_font_desc, - line2_height_ink, line2_height, line2_width, available_h,@@ -969,7 +965,7 @@ PANGO_ELLIPSIZE_NONE,
FALSE, ((Panel*)area->panel)->scale); else - *line2_width = *line2_height_ink = *line2_height = 0; + *line2_width = *line2_height = 0; } int text_area_compute_desired_size(Area *area,@@ -978,16 +974,14 @@ const char *line2,
PangoFontDescription *line1_font_desc, PangoFontDescription *line2_font_desc) { - int line1_height_ink, line1_height, line1_width, line2_height_ink, line2_height, line2_width; + int line1_height, line1_width, line2_height, line2_width; area_compute_text_geometry(area, line1, line2, line1_font_desc, line2_font_desc, - &line1_height_ink, &line1_height, &line1_width, - &line2_height_ink, &line2_height, &line2_width);@@ -1012,17 +1006,15 @@ gboolean result = FALSE;
schedule_redraw(area); - int line1_height_ink, line1_height, line1_width; - int line2_height_ink, line2_height, line2_width; + int line1_height, line1_width; + int line2_height, line2_width; area_compute_text_geometry(area, line1, line2, line1_font_desc, line2_font_desc, - &line1_height_ink, &line1_height, &line1_width, - &line2_height_ink, &line2_height, &line2_width);
@@ -273,10 +273,8 @@ const char *line1,
const char *line2, PangoFontDescription *line1_font_desc, PangoFontDescription *line2_font_desc, - int *line1_height_ink, int *line1_height, int *line1_width, - int *line2_height_ink, int *line2_height, int *line2_width); int text_area_compute_desired_size(Area *area,
@@ -925,7 +925,6 @@ XRenderFreePicture(server.display, pict);
} void get_text_size2(const PangoFontDescription *font, - int *height_ink, int *height, int *width, int available_height,@@ -962,7 +961,6 @@ else
pango_layout_set_markup(layout, text, text_len); pango_layout_get_pixel_extents(layout, &rect_ink, &rect); - *height_ink = rect_ink.height; *height = rect.height; *width = rect.width; // fprintf(stderr, "tint2: dimension : %d - %d\n", rect_ink.height, rect.height);
@@ -114,7 +114,6 @@ // Renders the current Imlib image to a drawable. Wrapper around imlib_render_image_on_drawable.
void render_image(Drawable d, int x, int y); void get_text_size2(const PangoFontDescription *font, - int *height_ink, int *height, int *width, int available_height,