diff options
Diffstat (limited to 'src/MenuCreator.cc')
-rw-r--r-- | src/MenuCreator.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc index 374411d..9c3cb4f 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.11 2004/08/26 18:26:39 akir Exp $ | 23 | // $Id: MenuCreator.cc,v 1.12 2004/08/29 12:35:29 rathnor Exp $ |
24 | 24 | ||
25 | #include "MenuCreator.hh" | 25 | #include "MenuCreator.hh" |
26 | 26 | ||
@@ -322,36 +322,38 @@ FbTk::Menu *MenuCreator::createFromFile(const std::string &filename, int screen_ | |||
322 | } | 322 | } |
323 | 323 | ||
324 | 324 | ||
325 | void MenuCreator::createFromFile(const std::string &filename, | 325 | bool MenuCreator::createFromFile(const std::string &filename, |
326 | FbTk::Menu &inject_into) { | 326 | FbTk::Menu &inject_into) { |
327 | 327 | ||
328 | std::string real_filename = FbTk::StringUtil::expandFilename(filename); | 328 | std::string real_filename = FbTk::StringUtil::expandFilename(filename); |
329 | FbMenuParser parser(real_filename); | 329 | FbMenuParser parser(real_filename); |
330 | if (!parser.isLoaded()) | 330 | if (!parser.isLoaded()) |
331 | return; | 331 | return false; |
332 | 332 | ||
333 | std::string label; | 333 | std::string label; |
334 | if (!getStart(parser, label)) | 334 | if (!getStart(parser, label)) |
335 | return; | 335 | return false; |
336 | 336 | ||
337 | parseMenu(parser, inject_into); | 337 | parseMenu(parser, inject_into); |
338 | return true; | ||
338 | } | 339 | } |
339 | 340 | ||
340 | 341 | ||
341 | void MenuCreator::createFromFile(const std::string &filename, | 342 | bool MenuCreator::createFromFile(const std::string &filename, |
342 | FbTk::Menu &inject_into, | 343 | FbTk::Menu &inject_into, |
343 | FluxboxWindow &win) { | 344 | FluxboxWindow &win) { |
344 | std::string real_filename = FbTk::StringUtil::expandFilename(filename); | 345 | std::string real_filename = FbTk::StringUtil::expandFilename(filename); |
345 | FbMenuParser parser(real_filename); | 346 | FbMenuParser parser(real_filename); |
346 | if (!parser.isLoaded()) | 347 | if (!parser.isLoaded()) |
347 | return; | 348 | return false; |
348 | 349 | ||
349 | std::string label; | 350 | std::string label; |
350 | 351 | ||
351 | if (!getStart(parser, label)) | 352 | if (!getStart(parser, label)) |
352 | return; | 353 | return false; |
353 | 354 | ||
354 | parseWindowMenu(parser, inject_into, win); | 355 | parseWindowMenu(parser, inject_into, win); |
356 | return true; | ||
355 | } | 357 | } |
356 | 358 | ||
357 | 359 | ||