aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-12-18 21:13:52 (GMT)
committerfluxgen <fluxgen>2003-12-18 21:13:52 (GMT)
commit7f8adc5a49c0ecf03be4f57ab284ee9accbf669a (patch)
tree09835d53476ee077616914e9b3d182e213a3fe85 /src
parent6018caf733ef099b2576cff90de1b1d7ac74d37f (diff)
downloadfluxbox_pavel-7f8adc5a49c0ecf03be4f57ab284ee9accbf669a.zip
fluxbox_pavel-7f8adc5a49c0ecf03be4f57ab284ee9accbf669a.tar.bz2
add style item only if the file is a regular file and not a .file or a backup~ file, thanks Ciaran McCreesh
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 7d15b20..ec4a395 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.251 2003/12/18 18:03:21 fluxgen Exp $ 25// $Id: Screen.cc,v 1.252 2003/12/18 21:13:52 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -2049,9 +2049,12 @@ void BScreen::createStyleMenu(FbTk::Menu &menu,
2049 // for each file in directory add filename and path to menu 2049 // for each file in directory add filename and path to menu
2050 for (size_t file_index = 0; file_index < dir.entries(); file_index++) { 2050 for (size_t file_index = 0; file_index < dir.entries(); file_index++) {
2051 std::string style(stylesdir + '/' + filelist[file_index]); 2051 std::string style(stylesdir + '/' + filelist[file_index]);
2052 // add to menu only if the file is a regular file 2052 // add to menu only if the file is a regular file, and not a
2053 if (FbTk::Directory::isRegularFile(style) || 2053 // .file or a backup~ file
2054 FbTk::Directory::isRegularFile(style + "/theme.cfg")) 2054 if ((FbTk::Directory::isRegularFile(style) &&
2055 (filelist[file_index][0] != '.') &&
2056 (style[style.length() - 1] != '~')
2057 ) || FbTk::Directory::isRegularFile(style + "/theme.cfg"))
2055 menu.insert(new StyleMenuItem(filelist[file_index], style)); 2058 menu.insert(new StyleMenuItem(filelist[file_index], style));
2056 } 2059 }
2057 // update menu graphics 2060 // update menu graphics