const function Resource getString
This commit is contained in:
parent
be1cbd4690
commit
f7cfa81bbb
4 changed files with 18 additions and 18 deletions
|
@ -87,7 +87,7 @@ void FbTk::Resource<IconbarTool::DeiconifyMode>::setFromString(const char* strva
|
|||
}
|
||||
|
||||
template<>
|
||||
std::string FbTk::Resource<IconbarTool::DeiconifyMode>::getString() {
|
||||
std::string FbTk::Resource<IconbarTool::DeiconifyMode>::getString() const {
|
||||
switch (m_value) {
|
||||
case IconbarTool::SEMIFOLLOW:
|
||||
return std::string("SemiFollow");
|
||||
|
@ -119,7 +119,7 @@ void FbTk::Resource<IconbarTool::WheelMode>::setFromString(const char* strval) {
|
|||
|
||||
|
||||
template<>
|
||||
std::string FbTk::Resource<IconbarTool::WheelMode>::getString() {
|
||||
std::string FbTk::Resource<IconbarTool::WheelMode>::getString() const {
|
||||
switch(m_value) {
|
||||
case IconbarTool::ON:
|
||||
return std::string("On");
|
||||
|
@ -137,7 +137,7 @@ void FbTk::Resource<Container::Alignment>::setDefaultValue() {
|
|||
}
|
||||
|
||||
template<>
|
||||
string FbTk::Resource<Container::Alignment>::getString() {
|
||||
string FbTk::Resource<Container::Alignment>::getString() const {
|
||||
switch (m_value) {
|
||||
case Container::LEFT:
|
||||
return string("Left");
|
||||
|
@ -162,7 +162,7 @@ void FbTk::Resource<Container::Alignment>::setFromString(const char *str) {
|
|||
}
|
||||
|
||||
template<>
|
||||
string FbTk::Resource<IconbarTool::Mode>::getString() {
|
||||
string FbTk::Resource<IconbarTool::Mode>::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);
|
||||
|
|
|
@ -111,13 +111,13 @@ setFromString(const char *strval) {
|
|||
//-----------------------------------------------------------------
|
||||
template<>
|
||||
std::string FbTk::Resource<bool>::
|
||||
getString() {
|
||||
getString() const {
|
||||
return std::string(**this == true ? "true" : "false");
|
||||
}
|
||||
|
||||
template<>
|
||||
std::string FbTk::Resource<int>::
|
||||
getString() {
|
||||
getString() const {
|
||||
char strval[256];
|
||||
sprintf(strval, "%d", **this);
|
||||
return std::string(strval);
|
||||
|
@ -125,12 +125,12 @@ getString() {
|
|||
|
||||
template<>
|
||||
std::string FbTk::Resource<std::string>::
|
||||
getString() { return **this; }
|
||||
getString() const { return **this; }
|
||||
|
||||
|
||||
template<>
|
||||
std::string FbTk::Resource<Fluxbox::TitlebarList>::
|
||||
getString() {
|
||||
getString() const {
|
||||
string retval;
|
||||
int size=m_value.size();
|
||||
for (int i=0; i<size; i++) {
|
||||
|
@ -164,7 +164,7 @@ getString() {
|
|||
|
||||
template<>
|
||||
std::string FbTk::Resource<Fluxbox::TabsAttachArea>::
|
||||
getString() {
|
||||
getString() const {
|
||||
if (m_value == Fluxbox::ATTACH_AREA_TITLEBAR)
|
||||
return "Titlebar";
|
||||
else
|
||||
|
@ -173,7 +173,7 @@ getString() {
|
|||
|
||||
template<>
|
||||
string FbTk::Resource<unsigned int>::
|
||||
getString() {
|
||||
getString() const {
|
||||
char tmpstr[128];
|
||||
sprintf(tmpstr, "%ul", m_value);
|
||||
return string(tmpstr);
|
||||
|
@ -181,7 +181,7 @@ getString() {
|
|||
|
||||
template<>
|
||||
string FbTk::Resource<long long>::
|
||||
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<Fluxbox::Layer>::
|
||||
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<long>::
|
||||
getString() {
|
||||
getString() const {
|
||||
char tmpstr[128];
|
||||
sprintf(tmpstr, "%ld", m_value);
|
||||
return string(tmpstr);
|
||||
|
|
|
@ -115,7 +115,7 @@ void FbTk::Resource<Slit::Direction>::setFromString(const char *strval) {
|
|||
}
|
||||
|
||||
template<>
|
||||
string FbTk::Resource<Slit::Placement>::getString() {
|
||||
string FbTk::Resource<Slit::Placement>::getString() const {
|
||||
switch (m_value) {
|
||||
case Slit::TOPLEFT:
|
||||
return string("TopLeft");
|
||||
|
@ -147,7 +147,7 @@ string FbTk::Resource<Slit::Placement>::getString() {
|
|||
}
|
||||
|
||||
template<>
|
||||
string FbTk::Resource<Slit::Direction>::getString() {
|
||||
string FbTk::Resource<Slit::Direction>::getString() const {
|
||||
switch (m_value) {
|
||||
case Slit::VERTICAL:
|
||||
return string("Vertical");
|
||||
|
|
|
@ -106,7 +106,7 @@ setFromString(const char *strval) {
|
|||
|
||||
template<>
|
||||
string FbTk::Resource<Toolbar::Placement>::
|
||||
getString() {
|
||||
getString() const {
|
||||
switch (m_value) {
|
||||
case Toolbar::TOPLEFT:
|
||||
return string("TopLeft");
|
||||
|
|
Loading…
Reference in a new issue