fixed Resource long long, time_t is long long some systems
This commit is contained in:
parent
b672bc50bb
commit
4e243d1599
1 changed files with 17 additions and 1 deletions
|
@ -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<long long>::
|
||||
setFromString(const char *strval) {
|
||||
if (sscanf(strval, "%ul", &m_value) != 1)
|
||||
setDefaultValue();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
//---- manipulators for int, bool, and some enums with Resource ---
|
||||
//-----------------------------------------------------------------
|
||||
|
@ -281,6 +289,14 @@ getString() {
|
|||
return string(tmpstr);
|
||||
}
|
||||
|
||||
template<>
|
||||
string FbTk::Resource<long long>::
|
||||
getString() {
|
||||
char tmpstr[128];
|
||||
sprintf(tmpstr, "%ul", m_value);
|
||||
return string(tmpstr);
|
||||
}
|
||||
|
||||
template<>
|
||||
void FbTk::Resource<Fluxbox::Layer>::
|
||||
setFromString(const char *strval) {
|
||||
|
|
Loading…
Reference in a new issue