From 001f174cf5b06e8725d46a659ef5416c241b45dd Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 21 Sep 2010 14:23:57 -0400 Subject: Big rework of image.c and the image cache system. Added a lot of comments, simplified call graphs. Added full (not second-class) support for images coming from named sources (files, icon themes). RrImage holds an RrImageSet. RrImageSet holds a bunch of RrImagePic, which are different sizes of a logical image. RrImageSet objects can be merged if it is discovered they (will) share an RrImagePic. The RrImage objects are updated to use the new merged RrImageSet. --- openbox/menu.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'openbox/menu.c') diff --git a/openbox/menu.c b/openbox/menu.c index a4f62f6c..6c346e85 100644 --- a/openbox/menu.c +++ b/openbox/menu.c @@ -294,19 +294,7 @@ static void parse_menu_item(xmlNodePtr node, gpointer data) if (config_menu_show_icons && obt_xml_attr_string(node, "icon", &icon)) { - RrImage *ic; - - ic = RrImageCacheFindName(ob_rr_icons, icon); - if (ic) - RrImageRef(ic); - else { - ic = RrImageNew(ob_rr_icons); - if (!RrImageAddPictureName(ic, icon)) { - RrImageUnref(ic); /* no need to keep it around */ - ic = NULL; - } - } - e->data.normal.icon = ic; + e->data.normal.icon = RrImageNewFromName(ob_rr_icons, icon); if (e->data.normal.icon) e->data.normal.icon_alpha = 0xff; -- cgit v1.2.3