]> Dogcows Code - chaz/openbox/blobdiff - openbox/menu.c
Big rework of image.c and the image cache system.
[chaz/openbox] / openbox / menu.c
index a4f62f6c7301f87778dbf571dc3e36556a96911f..6c346e85a995bedf4bb2ebf80e7ad26cac220e45 100644 (file)
@@ -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;
This page took 0.020922 seconds and 4 git commands to generate.