diff options
author | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2013-02-06 19:03:07 +0100 |
---|---|---|
committer | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2013-02-06 21:17:54 +0100 |
commit | 2685676e118cd63380e6a12ce81ce5d4f0badc0a (patch) | |
tree | e32bbf16aa5d84a68edfa061f68506a876f966fe /src/actions.c | |
parent | 20c5d11a3be2843c808ba84f971ed3fed011e144 (diff) | |
download | ratpoison-2685676e118cd63380e6a12ce81ce5d4f0badc0a.zip |
rp_text_width: remove "font" argument
* (globals.[ch]): remove rp_text_width "font" arg, since its value
is always the global variable defaults.font (non-Xft case).
remove one #ifdef while here
* update rp_text_width() calls to match new signature
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/actions.c b/src/actions.c index 912f0a8..9227feb 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1772,7 +1772,7 @@ read_frame (struct sbuf *s, struct cmdarg **arg) determine the height and width of the window. */ /* num = xsprintf (" %d ", cur->number); */ num = frame_selector (cur->number); - width = defaults.bar_x_padding * 2 + rp_text_width (screen, defaults.font, num, -1); + width = defaults.bar_x_padding * 2 + rp_text_width (screen, num, -1); height = (FONT_HEIGHT (screen) + defaults.bar_y_padding * 2); /* Create and map the window. */ @@ -3310,7 +3310,7 @@ cmd_license (int interactive UNUSED, struct cmdarg **args UNUSED) { int tmp; - tmp = rp_text_width (s, defaults.font, license_text[i], -1); + tmp = rp_text_width (s, license_text[i], -1); if (tmp > max_width) max_width = tmp; } @@ -3389,7 +3389,7 @@ cmd_help (int interactive, struct cmdarg **args) keysym_name = keysym_to_string (prefix_key.sym, prefix_key.state); rp_draw_string (s, s->help_window, STYLE_NORMAL, - 10 + rp_text_width (s, defaults.font, "Command key: ", -1), + 10 + rp_text_width (s, "Command key: ", -1), y + FONT_ASCENT(s), keysym_name, -1); free (keysym_name); @@ -3408,8 +3408,8 @@ cmd_help (int interactive, struct cmdarg **args) x, y + FONT_ASCENT(s), keysym_name, -1); - if (rp_text_width (s, defaults.font, keysym_name, -1) > max_width) - max_width = rp_text_width (s, defaults.font, keysym_name, -1); + if (rp_text_width (s, keysym_name, -1) > max_width) + max_width = rp_text_width (s, keysym_name, -1); free (keysym_name); } @@ -3419,9 +3419,9 @@ cmd_help (int interactive, struct cmdarg **args) x, y + FONT_ASCENT(s), map->actions[i].data, -1); - if (rp_text_width (s, defaults.font, map->actions[i].data, -1) > max_width) + if (rp_text_width (s, map->actions[i].data, -1) > max_width) { - max_width = rp_text_width (s, defaults.font, map->actions[i].data, -1); + max_width = rp_text_width (s, map->actions[i].data, -1); } } |