mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Check OnlyShowIn and NotShowIn values if they are given
This commit is contained in:
parent
419a80a732
commit
44d18dc433
@ -73,11 +73,22 @@ bool DesktopEntry::load(void) {
|
|||||||
if(df.hidden() || df.no_display())
|
if(df.hidden() || df.no_display())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
char buf[128];
|
||||||
|
|
||||||
|
/* should it be shown in EDE */
|
||||||
|
if(df.only_show_in(buf, sizeof(buf))) {
|
||||||
|
if(strstr(buf, "EDE") == NULL)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(df.not_show_in(buf, sizeof(buf))) {
|
||||||
|
if(strstr(buf, "EDE") != NULL)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* it must be application type */
|
/* it must be application type */
|
||||||
E_RETURN_VAL_IF_FAIL(df.type() == DESK_FILE_TYPE_APPLICATION, false);
|
E_RETURN_VAL_IF_FAIL(df.type() == DESK_FILE_TYPE_APPLICATION, false);
|
||||||
|
|
||||||
char buf[128];
|
|
||||||
|
|
||||||
/* name must be present too */
|
/* name must be present too */
|
||||||
E_RETURN_VAL_IF_FAIL(df.name(buf, sizeof(buf)) == true, false);
|
E_RETURN_VAL_IF_FAIL(df.name(buf, sizeof(buf)) == true, false);
|
||||||
name = new String(buf);
|
name = new String(buf);
|
||||||
|
Loading…
Reference in New Issue
Block a user