all repos — fluxbox @ cd85257a4b1f6b634c08202f88e93ae2d087877d

custom fork of the fluxbox windowmanager

fixed loading of color or pixmaps for texture
fluxgen fluxgen
commit

cd85257a4b1f6b634c08202f88e93ae2d087877d

parent

a3f23b5ec18cb1cb294c43c67a1c43018f1d01eb

1 files changed, 15 insertions(+), 13 deletions(-)

jump to
M src/FbTk/Theme.ccsrc/FbTk/Theme.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Theme.cc,v 1.17 2003/08/28 23:06:27 fluxgen Exp $ +// $Id: Theme.cc,v 1.18 2003/09/10 21:22:25 fluxgen Exp $ #include "Theme.hh"

@@ -100,18 +100,6 @@ template <>

void ThemeItem<FbTk::Font>::load() { } -template <> -void ThemeItem<FbTk::Texture>::setDefaultValue() { - m_value.setType(FbTk::Texture::FLAT | FbTk::Texture::SOLID); -} - -template <> -void ThemeItem<FbTk::Texture>::setFromString(const char *str) { - m_value.setFromString(str); - if (m_value.type() == 0) // failed to set value - setDefaultValue(); -} - template <> void ThemeItem<FbTk::Texture>::load() {

@@ -139,6 +127,20 @@ m_value.pixmap() = 0;

} else m_value.pixmap() = pm->pixmap().release(); } + +template <> +void ThemeItem<FbTk::Texture>::setDefaultValue() { + m_value.setType(FbTk::Texture::FLAT | FbTk::Texture::SOLID); + load(); // one might forget to add line something: so we try to load something.*: too +} + +template <> +void ThemeItem<FbTk::Texture>::setFromString(const char *str) { + m_value.setFromString(str); + if (m_value.type() == 0) // failed to set value + setDefaultValue(); +} + // not used