From 6125c24401266effb90baf4b99d918bcdf29cad8 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sat, 26 Apr 2003 18:58:30 +0000 Subject: moved StringUtil to FbTk --- src/FbTk/Makefile.am | 7 +++++-- src/FbTk/XmbFontImp.cc | 10 ++++------ src/Remember.cc | 16 +++++++++++----- src/Workspace.cc | 4 ++-- 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/FbTk/Makefile.am b/src/FbTk/Makefile.am index 1e40bfc..18e394a 100644 --- a/src/FbTk/Makefile.am +++ b/src/FbTk/Makefile.am @@ -12,14 +12,17 @@ libFbTk_a_SOURCES = App.hh App.cc Color.cc Color.hh Command.hh \ FbWindow.hh FbWindow.cc Font.cc Font.hh FontImp.hh \ ImageControl.hh ImageControl.cc \ MacroCommand.hh MacroCommand.cc \ - Menu.hh Menu.cc MenuItem.hh MenuItem.cc MenuTheme.hh MenuTheme.cc NotCopyable.hh \ + Menu.hh Menu.cc MenuItem.hh MenuItem.cc \ + MenuTheme.hh MenuTheme.cc NotCopyable.hh \ RefCount.hh SimpleCommand.hh SignalHandler.cc SignalHandler.hh \ Text.hh Text.cc \ - Texture.cc Texture.hh TextureRender.hh TextureRender.cc Theme.hh Theme.cc Timer.hh Timer.cc \ + Texture.cc Texture.hh TextureRender.hh TextureRender.cc \ + Theme.hh Theme.cc Timer.hh Timer.cc \ XFontImp.cc XFontImp.hh \ Button.hh Button.cc \ Layer.hh LayerItem.hh MultLayers.cc MultLayers.hh \ XLayer.cc XLayer.hh XLayerItem.cc XLayerItem.hh \ + StringUtil.hh StringUtil.cc \ Subject.hh Subject.cc Observer.hh Observer.cc \ Transparent.hh Transparent.cc \ FbPixmap.hh FbPixmap.cc \ diff --git a/src/FbTk/XmbFontImp.cc b/src/FbTk/XmbFontImp.cc index 431b598..6a3ffed 100644 --- a/src/FbTk/XmbFontImp.cc +++ b/src/FbTk/XmbFontImp.cc @@ -1,5 +1,5 @@ // XmbFontImp.cc for FbTk fluxbox toolkit -// Copyright (c) 2002 Henrik Kinnunen (fluxgen at linuxmail.org) +// Copyright (c) 2002-2003 Henrik Kinnunen (fluxgen at users.sourceforge.net) // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), @@ -19,14 +19,12 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: XmbFontImp.cc,v 1.5 2003/02/17 23:36:43 fluxgen Exp $ +// $Id: XmbFontImp.cc,v 1.6 2003/04/26 18:57:51 fluxgen Exp $ #include "XmbFontImp.hh" #include "App.hh" - -//!! TODO: Change this -#include "../StringUtil.hh" +#include "StringUtil.hh" #ifdef HAVE_CONFIG_H #include "config.h" @@ -104,7 +102,7 @@ const char *getFontElement(const char *pattern, char *buf, int bufsiz, ...) { buf[bufsiz-1] = 0; buf[bufsiz-2] = '*'; while((v = va_arg(va, char *)) != 0) { - p = StringUtil::strcasestr(pattern, v); + p = FbTk::StringUtil::strcasestr(pattern, v); if (p) { std::strncpy(buf, p+1, bufsiz-2); p2 = strchr(buf, '-'); diff --git a/src/Remember.cc b/src/Remember.cc index 9783c17..d92b4ec 100644 --- a/src/Remember.cc +++ b/src/Remember.cc @@ -20,7 +20,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Remember.cc,v 1.7 2003/04/26 14:36:21 rathnor Exp $ +// $Id: Remember.cc,v 1.8 2003/04/26 18:56:39 fluxgen Exp $ #include "Remember.hh" #include "StringUtil.hh" @@ -207,10 +207,12 @@ int Remember::parseApp(ifstream &file, Application *a) { if (line[0] != '#') { //the line is commented int parse_pos = 0, err = 0; string str_key, str_label; - err = StringUtil::getStringBetween(str_key, line.c_str(), '[', ']'); + err = FbTk::StringUtil::getStringBetween(str_key, + line.c_str(), + '[', ']'); if (err > 0 ) { parse_pos += err; - err = StringUtil::getStringBetween(str_label, + err = FbTk::StringUtil::getStringBetween(str_label, line.c_str() + parse_pos, '{', '}'); if (err>0) { @@ -308,12 +310,16 @@ void Remember::load() { continue; string key; int pos=0; - int err = StringUtil::getStringBetween(key, line.c_str(), '[', ']'); + int err = FbTk::StringUtil::getStringBetween(key, + line.c_str(), + '[', ']'); if (err >0 && key == "app") { pos += err; string label; - err = StringUtil::getStringBetween(label, line.c_str()+pos, '(', ')'); + err = FbTk::StringUtil::getStringBetween(label, + line.c_str()+pos, + '(', ')'); if (err>0) { Application *a; Apps::iterator i = apps.find(label); diff --git a/src/Workspace.cc b/src/Workspace.cc index 9799034..b839f14 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Workspace.cc,v 1.55 2003/04/25 11:22:40 fluxgen Exp $ +// $Id: Workspace.cc,v 1.56 2003/04/26 18:57:10 fluxgen Exp $ #include "Workspace.hh" @@ -432,7 +432,7 @@ bool Workspace::loadGroups(const std::string &filename) { string line; vector names; getline(infile, line); - StringUtil::stringtok(names, line); + FbTk::StringUtil::stringtok(names, line); m_groups.push_back(names); } -- cgit v0.11.2