diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-07-09 15:32:05 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-08-11 02:39:48 +0200 |
commit | d956102647a5b53dab359290568c6caabd5f75e0 (patch) | |
tree | c209d64690a0caac962a7caf6dffbcc0a45a0fb9 /src/gui/windowmenu.cpp | |
parent | 6a2d8e712aefbec19e870ad8799936cbe5786783 (diff) | |
download | mana-d956102647a5b53dab359290568c6caabd5f75e0.tar.gz mana-d956102647a5b53dab359290568c6caabd5f75e0.tar.bz2 mana-d956102647a5b53dab359290568c6caabd5f75e0.tar.xz mana-d956102647a5b53dab359290568c6caabd5f75e0.zip |
Made the button icon only shown when the icon file is valid.
And falls back to the text based caption otherwise.
Diffstat (limited to 'src/gui/windowmenu.cpp')
-rw-r--r-- | src/gui/windowmenu.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp index a200427f..2595c819 100644 --- a/src/gui/windowmenu.cpp +++ b/src/gui/windowmenu.cpp @@ -160,10 +160,9 @@ void WindowMenu::addButton(const std::string& text, int &x, int &h, const std::string& iconPath) { Button *btn = new Button("", text, this); - if (!iconPath.empty()) + if (!iconPath.empty() && btn->setButtonIcon(iconPath)) { btn->setButtonPopupText(gettext(text.c_str())); - btn->setButtonIcon(iconPath); } else { |