]> Dogcows Code - chaz/openbox/blobdiff - openbox/menu.c
Some style changes, less ifdefs.
[chaz/openbox] / openbox / menu.c
index f53e4f0b44661e23cc82f69c17750fd865750f93..77d9548c0da34069884a41d57042230849f9751a 100644 (file)
@@ -270,19 +270,17 @@ static void parse_menu_item(xmlNodePtr node,  gpointer data)
 {
     ObMenuParseState *state = data;
     gchar *label;
-    #ifdef USE_IMLIB2
     gchar *icon;
-    #endif
     ObMenuEntry *e;
 
     if (state->parent) {
-        #ifdef USE_IMLIB2
         /* Don't try to extract "icon" attribute if icons in user-defined
           menus are not enabled. */
         if (!(config_menu_user_show_icons &&
             obt_xml_attr_string(node, "icon", &icon)))
-               icon = NULL;
-        #endif
+        {
+            icon = NULL;
+        }
 
         if (obt_xml_attr_string(node, "label", &label)) {
             GSList *acts = NULL;
@@ -296,17 +294,12 @@ static void parse_menu_item(xmlNodePtr node,  gpointer data)
             }
             e = menu_add_normal(state->parent, -1, label, acts, TRUE);
             
-            #ifdef USE_IMLIB2
             if (icon) { /* Icon will be used. */
                 e->data.normal.icon = RrImageFetchFromFile(ob_rr_icons, icon);
-                if (e->data.normal.icon) {
+                if (e->data.normal.icon)
                     e->data.normal.icon_alpha = 0xff;
-                }
                 g_free(icon);
             }
-
-            menu_add_normal(state->parent, -1, label, acts, TRUE);
-            #endif
             g_free(label);
         }
     }
This page took 0.020099 seconds and 4 git commands to generate.