Code cleanup

This commit is contained in:
Pierre Pronchery 2013-12-04 06:15:10 +01:00
parent 91bd571f40
commit bc4f45494d

View File

@ -1366,8 +1366,8 @@ static void _done_categories(Desktop * desktop)
path = config_get(config, NULL, "path");
if((q = config_get(config, section, "Categories")) == NULL)
{
icon = desktopicon_new_application(desktop, path,
NULL);
if((icon = desktopicon_new_application(desktop, path,
NULL)) != NULL)
_desktop_icon_add(desktop, icon);
continue;
}
@ -1377,15 +1377,17 @@ static void _done_categories(Desktop * desktop)
&& string_find(q, dc->category) == NULL; i++);
if(dc->category == NULL)
{
icon = desktopicon_new_application(desktop, path,
NULL);
if((icon = desktopicon_new_application(desktop, path,
NULL)) != NULL)
_desktop_icon_add(desktop, icon);
continue;
}
if(dc->show == TRUE)
continue;
dc->show = TRUE;
icon = desktopicon_new_category(desktop, dc->name, dc->icon);
if((icon = desktopicon_new_category(desktop, dc->name,
dc->icon)) == NULL)
continue;
desktopicon_set_callback(icon, _done_categories_open, dc);
_desktop_icon_add(desktop, icon);
}