aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-05-18 22:01:14 (GMT)
committerfluxgen <fluxgen>2003-05-18 22:01:14 (GMT)
commitb90558a9a967ddd076ba5ed5fa02f0a6160760bd (patch)
treeb1a3555962d4c4e15054b73367f393d1e8c3afcc
parent1e78e743a740ae39d7febafdf6da6eb32f91312d (diff)
downloadfluxbox-b90558a9a967ddd076ba5ed5fa02f0a6160760bd.zip
fluxbox-b90558a9a967ddd076ba5ed5fa02f0a6160760bd.tar.bz2
moved Resource to FbTk and change name of DirHelper to FbTk Directory
-rw-r--r--src/Screen.cc35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 4a243ff..d3eb39e 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Screen.cc,v 1.170 2003/05/17 11:05:33 fluxgen Exp $ 25// $Id: Screen.cc,v 1.171 2003/05/18 22:01:14 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -35,7 +35,7 @@
35#include "Workspace.hh" 35#include "Workspace.hh"
36#include "StringUtil.hh" 36#include "StringUtil.hh"
37#include "Netizen.hh" 37#include "Netizen.hh"
38#include "DirHelper.hh" 38#include "Directory.hh"
39#include "WinButton.hh" 39#include "WinButton.hh"
40#include "SimpleCommand.hh" 40#include "SimpleCommand.hh"
41#include "FbWinFrameTheme.hh" 41#include "FbWinFrameTheme.hh"
@@ -165,7 +165,7 @@ private:
165 165
166 166
167template<> 167template<>
168void Resource<Toolbar::Placement>:: 168void FbTk::Resource<Toolbar::Placement>::
169setFromString(const char *strval) { 169setFromString(const char *strval) {
170 if (strcasecmp(strval, "TopLeft")==0) 170 if (strcasecmp(strval, "TopLeft")==0)
171 m_value = Toolbar::TOPLEFT; 171 m_value = Toolbar::TOPLEFT;
@@ -197,7 +197,7 @@ setFromString(const char *strval) {
197 197
198 198
199template<> 199template<>
200void Resource<ToolbarHandler::ToolbarMode>:: 200void FbTk::Resource<ToolbarHandler::ToolbarMode>::
201setFromString(const char *strval) { 201setFromString(const char *strval) {
202 if (strcasecmp(strval, "Off") == 0) 202 if (strcasecmp(strval, "Off") == 0)
203 m_value = ToolbarHandler::OFF; 203 m_value = ToolbarHandler::OFF;
@@ -216,7 +216,7 @@ setFromString(const char *strval) {
216} 216}
217 217
218 218
219string Resource<Toolbar::Placement>:: 219string FbTk::Resource<Toolbar::Placement>::
220getString() { 220getString() {
221 switch (m_value) { 221 switch (m_value) {
222 case Toolbar::TOPLEFT: 222 case Toolbar::TOPLEFT:
@@ -263,7 +263,7 @@ getString() {
263 263
264 264
265template<> 265template<>
266string Resource<ToolbarHandler::ToolbarMode>:: 266string FbTk::Resource<ToolbarHandler::ToolbarMode>::
267getString() { 267getString() {
268 switch (m_value) { 268 switch (m_value) {
269 case ToolbarHandler::OFF: 269 case ToolbarHandler::OFF:
@@ -342,7 +342,7 @@ void setupWorkspacemenu(BScreen &scr, FbTk::Menu &menu) {
342 342
343 343
344template<> 344template<>
345void Resource<Slit::Placement>::setFromString(const char *strval) { 345void FbTk::Resource<Slit::Placement>::setFromString(const char *strval) {
346 if (strcasecmp(strval, "TopLeft")==0) 346 if (strcasecmp(strval, "TopLeft")==0)
347 m_value = Slit::TOPLEFT; 347 m_value = Slit::TOPLEFT;
348 else if (strcasecmp(strval, "CenterLeft")==0) 348 else if (strcasecmp(strval, "CenterLeft")==0)
@@ -364,7 +364,7 @@ void Resource<Slit::Placement>::setFromString(const char *strval) {
364} 364}
365 365
366template<> 366template<>
367void Resource<Slit::Direction>::setFromString(const char *strval) { 367void FbTk::Resource<Slit::Direction>::setFromString(const char *strval) {
368 if (strcasecmp(strval, "Vertical") == 0) 368 if (strcasecmp(strval, "Vertical") == 0)
369 m_value = Slit::VERTICAL; 369 m_value = Slit::VERTICAL;
370 else if (strcasecmp(strval, "Horizontal") == 0) 370 else if (strcasecmp(strval, "Horizontal") == 0)
@@ -373,7 +373,7 @@ void Resource<Slit::Direction>::setFromString(const char *strval) {
373 setDefaultValue(); 373 setDefaultValue();
374} 374}
375 375
376string Resource<Slit::Placement>::getString() { 376string FbTk::Resource<Slit::Placement>::getString() {
377 switch (m_value) { 377 switch (m_value) {
378 case Slit::TOPLEFT: 378 case Slit::TOPLEFT:
379 return string("TopLeft"); 379 return string("TopLeft");
@@ -405,7 +405,7 @@ string Resource<Slit::Placement>::getString() {
405} 405}
406 406
407template<> 407template<>
408string Resource<Slit::Direction>::getString() { 408string FbTk::Resource<Slit::Direction>::getString() {
409 switch (m_value) { 409 switch (m_value) {
410 case Slit::VERTICAL: 410 case Slit::VERTICAL:
411 return string("Vertical"); 411 return string("Vertical");
@@ -447,7 +447,7 @@ void FbTk::ThemeItem<int>::setFromString(const char *str) {
447 sscanf(str, "%d", &m_value); 447 sscanf(str, "%d", &m_value);
448} 448}
449 449
450BScreen::ScreenResource::ScreenResource(ResourceManager &rm, 450BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm,
451 const std::string &scrname, 451 const std::string &scrname,
452 const std::string &altscrname): 452 const std::string &altscrname):
453 toolbar_auto_hide(rm, false, scrname+".toolbar.autoHide", altscrname+".Toolbar.AutoHide"), 453 toolbar_auto_hide(rm, false, scrname+".toolbar.autoHide", altscrname+".Toolbar.AutoHide"),
@@ -490,7 +490,7 @@ BScreen::ScreenResource::ScreenResource(ResourceManager &rm,
490 490
491}; 491};
492 492
493BScreen::BScreen(ResourceManager &rm, 493BScreen::BScreen(FbTk::ResourceManager &rm,
494 const string &screenname, const string &altscreenname, 494 const string &screenname, const string &altscreenname,
495 int scrn, int num_layers) : 495 int scrn, int num_layers) :
496 m_clientlist_sig(*this), // client signal 496 m_clientlist_sig(*this), // client signal
@@ -2267,18 +2267,19 @@ void BScreen::createStyleMenu(FbTk::Menu &menu,
2267 if (! stat(stylesdir.c_str(), &statbuf)) { 2267 if (! stat(stylesdir.c_str(), &statbuf)) {
2268 if (S_ISDIR(statbuf.st_mode)) { // is a directory? 2268 if (S_ISDIR(statbuf.st_mode)) { // is a directory?
2269 2269
2270 DirHelper d(stylesdir.c_str()); 2270 FbTk::Directory dir(stylesdir.c_str());
2271 2271
2272 // create a vector of all the filenames in the directory 2272 // create a vector of all the filenames in the directory
2273 // add sort it 2273 // add sort it
2274 std::vector<std::string> filelist(d.entries()); 2274 std::vector<std::string> filelist(dir.entries());
2275 for (size_t file_index = 0; file_index < d.entries(); ++file_index) 2275 for (size_t file_index = 0; file_index < dir.entries(); ++file_index)
2276 filelist[file_index] = d.readFilename(); 2276 filelist[file_index] = dir.readFilename();
2277
2277 std::sort(filelist.begin(), filelist.end(), less<string>()); 2278 std::sort(filelist.begin(), filelist.end(), less<string>());
2278 2279
2279 int slen = stylesdir.size(); 2280 int slen = stylesdir.size();
2280 // for each file in directory add filename and path to menu 2281 // for each file in directory add filename and path to menu
2281 for (size_t file_index = 0; file_index < d.entries(); file_index++) { 2282 for (size_t file_index = 0; file_index < dir.entries(); file_index++) {
2282 int nlen = filelist[file_index].size(); 2283 int nlen = filelist[file_index].size();
2283 char style[MAXPATHLEN + 1]; 2284 char style[MAXPATHLEN + 1];
2284 2285