summaryrefslogtreecommitdiff
path: root/src/MenuCreator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/MenuCreator.cc')
-rw-r--r--src/MenuCreator.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc
index 00bc82d..11ca7ee 100644
--- a/src/MenuCreator.cc
+++ b/src/MenuCreator.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: MenuCreator.cc,v 1.3 2004/05/02 22:28:45 fluxgen Exp $ 23// $Id: MenuCreator.cc,v 1.4 2004/05/03 15:38:26 fluxgen Exp $
24 24
25#include "MenuCreator.hh" 25#include "MenuCreator.hh"
26 26
@@ -55,13 +55,13 @@ void LayerMenuItem<FluxboxWindow>::click(int button, int time) {
55 m_object->moveToLayer(m_layernum); 55 m_object->moveToLayer(m_layernum);
56} 56}
57 57
58static FbTk::Menu *createStyleMenu(FbTk::Menu &parent, const std::string &label, 58static void createStyleMenu(FbTk::Menu &parent, const std::string &label,
59 const std::string &directory) { 59 const std::string &directory) {
60 // perform shell style ~ home directory expansion 60 // perform shell style ~ home directory expansion
61 string stylesdir(FbTk::StringUtil::expandFilename(directory)); 61 string stylesdir(FbTk::StringUtil::expandFilename(directory));
62 62
63 if (!FbTk::Directory::isDirectory(stylesdir)) 63 if (!FbTk::Directory::isDirectory(stylesdir))
64 return 0; 64 return;
65 65
66 FbTk::Directory dir(stylesdir.c_str()); 66 FbTk::Directory dir(stylesdir.c_str());
67 67
@@ -87,6 +87,7 @@ static FbTk::Menu *createStyleMenu(FbTk::Menu &parent, const std::string &label,
87 // update menu graphics 87 // update menu graphics
88 parent.update(); 88 parent.update();
89 Fluxbox::instance()->saveMenuFilename(stylesdir.c_str()); 89 Fluxbox::instance()->saveMenuFilename(stylesdir.c_str());
90
90} 91}
91 92
92static void translateMenuItem(Parser &parse, 93static void translateMenuItem(Parser &parse,
@@ -280,7 +281,8 @@ bool getStart(FbMenuParser &parser, std::string &label) {
280} 281}
281 282
282FbTk::Menu *MenuCreator::createFromFile(const std::string &filename, int screen_number) { 283FbTk::Menu *MenuCreator::createFromFile(const std::string &filename, int screen_number) {
283 FbMenuParser parser(filename); 284 std::string real_filename = FbTk::StringUtil::expandFilename(filename);
285 FbMenuParser parser(real_filename);
284 if (!parser.isLoaded()) 286 if (!parser.isLoaded())
285 return 0; 287 return 0;
286 288