diff options
author | Mathias Gumz <akira@fluxbox.org> | 2015-01-03 20:45:14 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2015-01-03 20:45:14 (GMT) |
commit | 90f2fcf031554577ce811e7f7151f2a78ea7a265 (patch) | |
tree | 3705ddd022d4b6c8e859e17a8858cf602617b8ec | |
parent | 3c85ace912824df11ccb22666085e9ba84cd00be (diff) | |
download | fluxbox-90f2fcf031554577ce811e7f7151f2a78ea7a265.zip fluxbox-90f2fcf031554577ce811e7f7151f2a78ea7a265.tar.bz2 |
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.
-rw-r--r-- | src/OSDWindow.cc | 2 | ||||
-rw-r--r-- | src/OSDWindow.hh | 2 | ||||
-rw-r--r-- | src/Screen.cc | 13 | ||||
-rw-r--r-- | src/TooltipWindow.cc | 2 |
4 files changed, 9 insertions, 10 deletions
diff --git a/src/OSDWindow.cc b/src/OSDWindow.cc index 82090c5..d5f0ed5 100644 --- a/src/OSDWindow.cc +++ b/src/OSDWindow.cc | |||
@@ -57,7 +57,7 @@ void OSDWindow::reconfigTheme() { | |||
57 | 57 | ||
58 | } | 58 | } |
59 | 59 | ||
60 | void OSDWindow::resize(const FbTk::BiDiString &text) { | 60 | void OSDWindow::resizeForText(const FbTk::BiDiString &text) { |
61 | 61 | ||
62 | int bw = 2 * m_theme->bevelWidth(); | 62 | int bw = 2 * m_theme->bevelWidth(); |
63 | int h = m_theme->font().height() + bw; | 63 | int h = m_theme->font().height() + bw; |
diff --git a/src/OSDWindow.hh b/src/OSDWindow.hh index 14e01d2..0b063b2 100644 --- a/src/OSDWindow.hh +++ b/src/OSDWindow.hh | |||
@@ -41,7 +41,7 @@ public: | |||
41 | m_pixmap(None), m_visible(false) { } | 41 | m_pixmap(None), m_visible(false) { } |
42 | 42 | ||
43 | void reconfigTheme(); | 43 | void reconfigTheme(); |
44 | void resize(const FbTk::BiDiString &text); | 44 | void resizeForText(const FbTk::BiDiString &text); |
45 | void showText(const FbTk::BiDiString &text); | 45 | void showText(const FbTk::BiDiString &text); |
46 | void hide(); | 46 | void hide(); |
47 | 47 | ||
diff --git a/src/Screen.cc b/src/Screen.cc index 29ab548..1a42f33 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -1900,19 +1900,18 @@ void BScreen::renderGeomWindow() { | |||
1900 | char buf[256]; | 1900 | char buf[256]; |
1901 | _FB_USES_NLS; | 1901 | _FB_USES_NLS; |
1902 | 1902 | ||
1903 | sprintf(buf, | 1903 | const std::string msg = _FB_XTEXT(Screen, GeometrySpacing, |
1904 | _FB_XTEXT(Screen, GeometrySpacing, | 1904 | "W: %04d x H: %04d", "Representative maximum sized text for width and height dialog"); |
1905 | "W: %04d x H: %04d", "Representative maximum sized text for width and height dialog").c_str(), | 1905 | const int n = snprintf(buf, msg.size(), msg.c_str(), 0, 0); |
1906 | 0, 0); | ||
1907 | 1906 | ||
1908 | FbTk::BiDiString label(buf); | 1907 | FbTk::BiDiString label(std::string(buf, n)); |
1909 | m_geom_window->resize(label); | 1908 | m_geom_window->resizeForText(label); |
1910 | m_geom_window->reconfigTheme(); | 1909 | m_geom_window->reconfigTheme(); |
1911 | } | 1910 | } |
1912 | 1911 | ||
1913 | 1912 | ||
1914 | void BScreen::renderPosWindow() { | 1913 | void BScreen::renderPosWindow() { |
1915 | m_pos_window->resize(FbTk::BiDiString("0:00000 x 0:00000")); | 1914 | m_pos_window->resizeForText(FbTk::BiDiString("0:00000 x 0:00000")); |
1916 | m_pos_window->reconfigTheme(); | 1915 | m_pos_window->reconfigTheme(); |
1917 | } | 1916 | } |
1918 | 1917 | ||
diff --git a/src/TooltipWindow.cc b/src/TooltipWindow.cc index 77a6e1e..06ddf63 100644 --- a/src/TooltipWindow.cc +++ b/src/TooltipWindow.cc | |||
@@ -53,7 +53,7 @@ void TooltipWindow::raiseTooltip() { | |||
53 | if (m_lastText.logical().empty()) | 53 | if (m_lastText.logical().empty()) |
54 | return; | 54 | return; |
55 | 55 | ||
56 | resize(m_lastText); | 56 | resizeForText(m_lastText); |
57 | reconfigTheme(); | 57 | reconfigTheme(); |
58 | 58 | ||
59 | FbTk::Font& font = theme()->iconbarTheme().text().font(); | 59 | FbTk::Font& font = theme()->iconbarTheme().text().font(); |