From f7cfa81bbb1f488899905731f9b72a9cce7d8c83 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Tue, 22 Nov 2005 21:09:14 +0000 Subject: const function Resource getString --- src/IconbarTool.cc | 12 ++++++------ src/Resources.cc | 18 +++++++++--------- src/Slit.cc | 4 ++-- src/Toolbar.cc | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc index c9de74c..6aab114 100644 --- a/src/IconbarTool.cc +++ b/src/IconbarTool.cc @@ -87,7 +87,7 @@ void FbTk::Resource::setFromString(const char* strva } template<> -std::string FbTk::Resource::getString() { +std::string FbTk::Resource::getString() const { switch (m_value) { case IconbarTool::SEMIFOLLOW: return std::string("SemiFollow"); @@ -119,7 +119,7 @@ void FbTk::Resource::setFromString(const char* strval) { template<> -std::string FbTk::Resource::getString() { +std::string FbTk::Resource::getString() const { switch(m_value) { case IconbarTool::ON: return std::string("On"); @@ -137,7 +137,7 @@ void FbTk::Resource::setDefaultValue() { } template<> -string FbTk::Resource::getString() { +string FbTk::Resource::getString() const { switch (m_value) { case Container::LEFT: return string("Left"); @@ -162,7 +162,7 @@ void FbTk::Resource::setFromString(const char *str) { } template<> -string FbTk::Resource::getString() { +string FbTk::Resource::getString() const { switch (m_value) { case IconbarTool::NONE: @@ -721,8 +721,8 @@ void IconbarTool::renderTheme() { m_icon_container.height(), m_theme.unfocusedTexture()); m_unfocused_err_pm = m_screen.imageControl().renderImage(icon_width+1, - m_icon_container.height(), - m_theme.unfocusedTexture()); + m_icon_container.height(), + m_theme.unfocusedTexture()); } if (tmp) m_screen.imageControl().removeImage(tmp); diff --git a/src/Resources.cc b/src/Resources.cc index ae0d72a..ff4f3f2 100644 --- a/src/Resources.cc +++ b/src/Resources.cc @@ -111,13 +111,13 @@ setFromString(const char *strval) { //----------------------------------------------------------------- template<> std::string FbTk::Resource:: -getString() { +getString() const { return std::string(**this == true ? "true" : "false"); } template<> std::string FbTk::Resource:: -getString() { +getString() const { char strval[256]; sprintf(strval, "%d", **this); return std::string(strval); @@ -125,12 +125,12 @@ getString() { template<> std::string FbTk::Resource:: -getString() { return **this; } +getString() const { return **this; } template<> std::string FbTk::Resource:: -getString() { +getString() const { string retval; int size=m_value.size(); for (int i=0; i std::string FbTk::Resource:: -getString() { +getString() const { if (m_value == Fluxbox::ATTACH_AREA_TITLEBAR) return "Titlebar"; else @@ -173,7 +173,7 @@ getString() { template<> string FbTk::Resource:: -getString() { +getString() const { char tmpstr[128]; sprintf(tmpstr, "%ul", m_value); return string(tmpstr); @@ -181,7 +181,7 @@ getString() { template<> string FbTk::Resource:: -getString() { +getString() const { char tmpstr[128]; sprintf(tmpstr, "%llu", (unsigned long long) m_value); return string(tmpstr); @@ -214,7 +214,7 @@ setFromString(const char *strval) { template<> string FbTk::Resource:: -getString() { +getString() const { if (m_value.getNum() == Fluxbox::instance()->getMenuLayer()) return string("Menu"); @@ -245,7 +245,7 @@ setFromString(const char *strval) { template<> string FbTk::Resource:: -getString() { +getString() const { char tmpstr[128]; sprintf(tmpstr, "%ld", m_value); return string(tmpstr); diff --git a/src/Slit.cc b/src/Slit.cc index 6656dec..a5840e6 100644 --- a/src/Slit.cc +++ b/src/Slit.cc @@ -115,7 +115,7 @@ void FbTk::Resource::setFromString(const char *strval) { } template<> -string FbTk::Resource::getString() { +string FbTk::Resource::getString() const { switch (m_value) { case Slit::TOPLEFT: return string("TopLeft"); @@ -147,7 +147,7 @@ string FbTk::Resource::getString() { } template<> -string FbTk::Resource::getString() { +string FbTk::Resource::getString() const { switch (m_value) { case Slit::VERTICAL: return string("Vertical"); diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 9361a4c..882857b 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -106,7 +106,7 @@ setFromString(const char *strval) { template<> string FbTk::Resource:: -getString() { +getString() const { switch (m_value) { case Toolbar::TOPLEFT: return string("TopLeft"); -- cgit v0.11.2