From 4e243d159987c50d45e03d435cd85e8af01fc4a9 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Thu, 15 Jul 2004 13:42:50 +0000 Subject: fixed Resource long long, time_t is long long some systems --- src/fluxbox.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 1adc314..377c78a 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.246 2004/07/14 23:38:53 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.247 2004/07/15 13:42:50 fluxgen Exp $ #include "fluxbox.hh" @@ -208,6 +208,14 @@ setFromString(const char *strval) { setDefaultValue(); } +template<> +void FbTk::Resource:: +setFromString(const char *strval) { + if (sscanf(strval, "%ul", &m_value) != 1) + setDefaultValue(); +} + + //----------------------------------------------------------------- //---- manipulators for int, bool, and some enums with Resource --- //----------------------------------------------------------------- @@ -282,6 +290,14 @@ getString() { } template<> +string FbTk::Resource:: +getString() { + char tmpstr[128]; + sprintf(tmpstr, "%ul", m_value); + return string(tmpstr); +} + +template<> void FbTk::Resource:: setFromString(const char *strval) { int tempnum = 0; -- cgit v0.11.2