Code cleanup
This commit is contained in:
parent
56ebc2c3b6
commit
b249e227e2
|
@ -1048,6 +1048,7 @@ static int _current_loop_applications(Desktop * desktop)
|
||||||
struct dirent * de;
|
struct dirent * de;
|
||||||
size_t len;
|
size_t len;
|
||||||
const char ext[] = ".desktop";
|
const char ext[] = ".desktop";
|
||||||
|
const char section[] = "Desktop Entry";
|
||||||
char * path = NULL;
|
char * path = NULL;
|
||||||
char * p;
|
char * p;
|
||||||
Config * config;
|
Config * config;
|
||||||
|
@ -1083,8 +1084,7 @@ static int _current_loop_applications(Desktop * desktop)
|
||||||
config_reset(config);
|
config_reset(config);
|
||||||
if(config_load(config, path) != 0)
|
if(config_load(config, path) != 0)
|
||||||
continue;
|
continue;
|
||||||
if((q = config_get(config, "Desktop Entry", "Categories"))
|
if((q = config_get(config, section, "Categories")) == NULL)
|
||||||
== NULL)
|
|
||||||
continue;
|
continue;
|
||||||
if(string_find(q, desktop->category->category) == NULL)
|
if(string_find(q, desktop->category->category) == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user