diff options
author | rathnor <rathnor> | 2003-08-10 12:50:04 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-08-10 12:50:04 (GMT) |
commit | c8c5072fd1a542cc3783cb5b32e5e4b68e45efe7 (patch) | |
tree | 29e6bab43c762e475844e8d42080ffd939db870b /src/Screen.cc | |
parent | babf480280200fa4af3d8ab917a9f9ad76a6309c (diff) | |
download | fluxbox-c8c5072fd1a542cc3783cb5b32e5e4b68e45efe7.zip fluxbox-c8c5072fd1a542cc3783cb5b32e5e4b68e45efe7.tar.bz2 |
fix ~ to work properly in session.menuFile
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 0ec1655..593dd69 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.212 2003/08/04 12:50:06 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.213 2003/08/10 12:50:04 rathnor Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -1612,8 +1612,10 @@ void BScreen::initMenu() { | |||
1612 | 1612 | ||
1613 | bool defaultMenu = true; | 1613 | bool defaultMenu = true; |
1614 | Fluxbox * const fb = Fluxbox::instance(); | 1614 | Fluxbox * const fb = Fluxbox::instance(); |
1615 | if (fb->getMenuFilename()) { | 1615 | if (fb->getMenuFilename().size() > 0) { |
1616 | ifstream menu_file(fb->getMenuFilename()); | 1616 | std::string menufilestr = fb->getMenuFilename(); |
1617 | menufilestr = FbTk::StringUtil::expandFilename(menufilestr); | ||
1618 | ifstream menu_file(menufilestr.c_str()); | ||
1617 | 1619 | ||
1618 | if (!menu_file.fail()) { | 1620 | if (!menu_file.fail()) { |
1619 | if (! menu_file.eof()) { | 1621 | if (! menu_file.eof()) { |
@@ -1650,11 +1652,11 @@ void BScreen::initMenu() { | |||
1650 | i18n->getMessage( | 1652 | i18n->getMessage( |
1651 | FBNLS::ScreenSet, FBNLS::ScreenEmptyMenuFile, | 1653 | FBNLS::ScreenSet, FBNLS::ScreenEmptyMenuFile, |
1652 | "%s: Empty menu file"), | 1654 | "%s: Empty menu file"), |
1653 | fb->getMenuFilename()); | 1655 | menufilestr.c_str()); |
1654 | } | 1656 | } |
1655 | menu_file.close(); | 1657 | menu_file.close(); |
1656 | } else | 1658 | } else |
1657 | perror(fb->getMenuFilename()); | 1659 | perror(menufilestr.c_str()); |
1658 | } | 1660 | } |
1659 | 1661 | ||
1660 | if (defaultMenu) { | 1662 | if (defaultMenu) { |
@@ -1674,8 +1676,7 @@ void BScreen::initMenu() { | |||
1674 | FBNLS::ScreenSet, FBNLS::ScreenExit, | 1676 | FBNLS::ScreenSet, FBNLS::ScreenExit, |
1675 | "Exit"), | 1677 | "Exit"), |
1676 | exit_fb); | 1678 | exit_fb); |
1677 | } else | 1679 | } |
1678 | fb->saveMenuFilename(fb->getMenuFilename()); | ||
1679 | } | 1680 | } |
1680 | 1681 | ||
1681 | /// looks through a menufile and adds correct items to the root-menu. | 1682 | /// looks through a menufile and adds correct items to the root-menu. |