Minor API change for OSDWindow OSDWindow::resize(const FbTk::BiDiString&) shadowed FbWindow::resize(x, y). To fix this I renamed the function to OSDWindow::resizeForText() to make the intention clear.
Mathias Gumz akira@fluxbox.org
4 files changed,
9 insertions(+),
10 deletions(-)
M
src/OSDWindow.cc
→
src/OSDWindow.cc
@@ -57,7 +57,7 @@ }
} -void OSDWindow::resize(const FbTk::BiDiString &text) { +void OSDWindow::resizeForText(const FbTk::BiDiString &text) { int bw = 2 * m_theme->bevelWidth(); int h = m_theme->font().height() + bw;
M
src/OSDWindow.hh
→
src/OSDWindow.hh
@@ -41,7 +41,7 @@ m_screen(screen), m_theme(theme),
m_pixmap(None), m_visible(false) { } void reconfigTheme(); - void resize(const FbTk::BiDiString &text); + void resizeForText(const FbTk::BiDiString &text); void showText(const FbTk::BiDiString &text); void hide();
M
src/Screen.cc
→
src/Screen.cc
@@ -1900,19 +1900,18 @@
char buf[256]; _FB_USES_NLS; - sprintf(buf, - _FB_XTEXT(Screen, GeometrySpacing, - "W: %04d x H: %04d", "Representative maximum sized text for width and height dialog").c_str(), - 0, 0); + const std::string msg = _FB_XTEXT(Screen, GeometrySpacing, + "W: %04d x H: %04d", "Representative maximum sized text for width and height dialog"); + const int n = snprintf(buf, msg.size(), msg.c_str(), 0, 0); - FbTk::BiDiString label(buf); - m_geom_window->resize(label); + FbTk::BiDiString label(std::string(buf, n)); + m_geom_window->resizeForText(label); m_geom_window->reconfigTheme(); } void BScreen::renderPosWindow() { - m_pos_window->resize(FbTk::BiDiString("0:00000 x 0:00000")); + m_pos_window->resizeForText(FbTk::BiDiString("0:00000 x 0:00000")); m_pos_window->reconfigTheme(); }
M
src/TooltipWindow.cc
→
src/TooltipWindow.cc
@@ -53,7 +53,7 @@
if (m_lastText.logical().empty()) return; - resize(m_lastText); + resizeForText(m_lastText); reconfigTheme(); FbTk::Font& font = theme()->iconbarTheme().text().font();