diff options
author | fluxgen <fluxgen> | 2003-05-18 22:01:14 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-05-18 22:01:14 (GMT) |
commit | b90558a9a967ddd076ba5ed5fa02f0a6160760bd (patch) | |
tree | b1a3555962d4c4e15054b73367f393d1e8c3afcc /src | |
parent | 1e78e743a740ae39d7febafdf6da6eb32f91312d (diff) | |
download | fluxbox-b90558a9a967ddd076ba5ed5fa02f0a6160760bd.zip fluxbox-b90558a9a967ddd076ba5ed5fa02f0a6160760bd.tar.bz2 |
moved Resource to FbTk and change name of DirHelper to FbTk Directory
Diffstat (limited to 'src')
-rw-r--r-- | src/Screen.cc | 35 |
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 | ||
167 | template<> | 167 | template<> |
168 | void Resource<Toolbar::Placement>:: | 168 | void FbTk::Resource<Toolbar::Placement>:: |
169 | setFromString(const char *strval) { | 169 | setFromString(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 | ||
199 | template<> | 199 | template<> |
200 | void Resource<ToolbarHandler::ToolbarMode>:: | 200 | void FbTk::Resource<ToolbarHandler::ToolbarMode>:: |
201 | setFromString(const char *strval) { | 201 | setFromString(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 | ||
219 | string Resource<Toolbar::Placement>:: | 219 | string FbTk::Resource<Toolbar::Placement>:: |
220 | getString() { | 220 | getString() { |
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 | ||
265 | template<> | 265 | template<> |
266 | string Resource<ToolbarHandler::ToolbarMode>:: | 266 | string FbTk::Resource<ToolbarHandler::ToolbarMode>:: |
267 | getString() { | 267 | getString() { |
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 | ||
344 | template<> | 344 | template<> |
345 | void Resource<Slit::Placement>::setFromString(const char *strval) { | 345 | void 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 | ||
366 | template<> | 366 | template<> |
367 | void Resource<Slit::Direction>::setFromString(const char *strval) { | 367 | void 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 | ||
376 | string Resource<Slit::Placement>::getString() { | 376 | string 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 | ||
407 | template<> | 407 | template<> |
408 | string Resource<Slit::Direction>::getString() { | 408 | string 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 | ||
450 | BScreen::ScreenResource::ScreenResource(ResourceManager &rm, | 450 | BScreen::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 | ||
493 | BScreen::BScreen(ResourceManager &rm, | 493 | BScreen::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 | ||