added option for hiding any app from Settings Manager by adding 'X-UBL-SettingsManager-Hidden=true' (absence of that string means false) in its .desktop file

pull/9/head
parent db2579df2a
commit 1dbfb9f341

@ -877,27 +877,28 @@ apps *find_apps(int *sizef){
tempapp.Pluggable=g_key_file_get_boolean(gfile,"Desktop Entry", "Pluggable",NULL);
if (!tempapp.Pluggable) tempapp.Pluggable=g_key_file_get_boolean(gfile,"Desktop Entry", "X-XfcePluggable",NULL);
if (tempapp.Pluggable) tempapp.DualPluggable=g_key_file_get_boolean(gfile,"Desktop Entry", "X-UBLPluggable",NULL);
if (size==0){
applist=(apps*)malloc(size+1*sizeof(apps));
applist[0].Name=yon_char_new(tempapp.Name);
applist[0].Categories=yon_char_new(tempapp.Categories);
applist[0].Exec=yon_char_new(tempapp.Exec);
applist[0].Icon=yon_char_new(tempapp.Icon);
applist[0].Type=tempapp.Type;
applist[0].Pluggable=tempapp.Pluggable;
applist[0].DualPluggable=tempapp.DualPluggable;
size++;
} else {
applist=(apps*)realloc(applist,(size+1)*sizeof(apps));
applist[size].Name=yon_char_new(tempapp.Name);
applist[size].Categories=yon_char_new(tempapp.Categories);
applist[size].Exec=yon_char_new(tempapp.Exec);
applist[size].Icon=yon_char_new(tempapp.Icon);
applist[size].Pluggable=tempapp.Pluggable;
applist[size].DualPluggable=tempapp.DualPluggable;
applist[size].Type=tempapp.Type;
size++;
}
if (g_key_file_get_boolean(gfile,"Desktop Entry", "X-UBL-SettingsManager-Hidden",NULL)==1)
if (size==0){
applist=(apps*)malloc(size+1*sizeof(apps));
applist[0].Name=yon_char_new(tempapp.Name);
applist[0].Categories=yon_char_new(tempapp.Categories);
applist[0].Exec=yon_char_new(tempapp.Exec);
applist[0].Icon=yon_char_new(tempapp.Icon);
applist[0].Type=tempapp.Type;
applist[0].Pluggable=tempapp.Pluggable;
applist[0].DualPluggable=tempapp.DualPluggable;
size++;
} else {
applist=(apps*)realloc(applist,(size+1)*sizeof(apps));
applist[size].Name=yon_char_new(tempapp.Name);
applist[size].Categories=yon_char_new(tempapp.Categories);
applist[size].Exec=yon_char_new(tempapp.Exec);
applist[size].Icon=yon_char_new(tempapp.Icon);
applist[size].Pluggable=tempapp.Pluggable;
applist[size].DualPluggable=tempapp.DualPluggable;
applist[size].Type=tempapp.Type;
size++;
}
}
}
}

Loading…
Cancel
Save