aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-08-03 21:31:31 (GMT)
committerfluxgen <fluxgen>2004-08-03 21:31:31 (GMT)
commitcd0cdb530184f1996cc0e30d8f844f27c7a8a90a (patch)
tree7d5d9c70258f847879816d626ad224c8b0380a97
parent7b4d57f275fb7fbc7521fd3efad57f6fd07bb248 (diff)
downloadfluxbox_pavel-cd0cdb530184f1996cc0e30d8f844f27c7a8a90a.zip
fluxbox_pavel-cd0cdb530184f1996cc0e30d8f844f27c7a8a90a.tar.bz2
expand pixmap filename before loading, patch from Mathias Gumz
-rw-r--r--src/FbTk/MenuItem.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/FbTk/MenuItem.cc b/src/FbTk/MenuItem.cc
index be8555b..898bf99 100644
--- a/src/FbTk/MenuItem.cc
+++ b/src/FbTk/MenuItem.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: MenuItem.cc,v 1.4 2004/07/05 09:40:08 fluxgen Exp $ 22// $Id: MenuItem.cc,v 1.5 2004/08/03 21:31:31 fluxgen Exp $
23 23
24#include "MenuItem.hh" 24#include "MenuItem.hh"
25#include "Command.hh" 25#include "Command.hh"
@@ -28,6 +28,7 @@
28#include "PixmapWithMask.hh" 28#include "PixmapWithMask.hh"
29#include "Image.hh" 29#include "Image.hh"
30#include "App.hh" 30#include "App.hh"
31#include "StringUtil.hh"
31 32
32namespace FbTk { 33namespace FbTk {
33 34
@@ -230,8 +231,9 @@ void MenuItem::setIcon(const std::string &filename, int screen_num) {
230 if (m_icon.get() == 0) 231 if (m_icon.get() == 0)
231 m_icon.reset(new Icon); 232 m_icon.reset(new Icon);
232 233
233 m_icon->filename = filename; 234 m_icon->filename = FbTk::StringUtil::expandFilename(filename);
234 m_icon->pixmap.reset(Image::load(filename.c_str(), screen_num)); 235 m_icon->pixmap.reset(Image::load(m_icon->filename.c_str(),
236 screen_num));
235} 237}
236 238
237unsigned int MenuItem::height(const MenuTheme &theme) const { 239unsigned int MenuItem::height(const MenuTheme &theme) const {