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); 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.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 (tempapp.Pluggable) tempapp.DualPluggable=g_key_file_get_boolean(gfile,"Desktop Entry", "X-UBLPluggable",NULL);
if (size==0){ if (g_key_file_get_boolean(gfile,"Desktop Entry", "X-UBL-SettingsManager-Hidden",NULL)==1)
applist=(apps*)malloc(size+1*sizeof(apps)); if (size==0){
applist[0].Name=yon_char_new(tempapp.Name); applist=(apps*)malloc(size+1*sizeof(apps));
applist[0].Categories=yon_char_new(tempapp.Categories); applist[0].Name=yon_char_new(tempapp.Name);
applist[0].Exec=yon_char_new(tempapp.Exec); applist[0].Categories=yon_char_new(tempapp.Categories);
applist[0].Icon=yon_char_new(tempapp.Icon); applist[0].Exec=yon_char_new(tempapp.Exec);
applist[0].Type=tempapp.Type; applist[0].Icon=yon_char_new(tempapp.Icon);
applist[0].Pluggable=tempapp.Pluggable; applist[0].Type=tempapp.Type;
applist[0].DualPluggable=tempapp.DualPluggable; applist[0].Pluggable=tempapp.Pluggable;
size++; applist[0].DualPluggable=tempapp.DualPluggable;
} else { size++;
applist=(apps*)realloc(applist,(size+1)*sizeof(apps)); } else {
applist[size].Name=yon_char_new(tempapp.Name); applist=(apps*)realloc(applist,(size+1)*sizeof(apps));
applist[size].Categories=yon_char_new(tempapp.Categories); applist[size].Name=yon_char_new(tempapp.Name);
applist[size].Exec=yon_char_new(tempapp.Exec); applist[size].Categories=yon_char_new(tempapp.Categories);
applist[size].Icon=yon_char_new(tempapp.Icon); applist[size].Exec=yon_char_new(tempapp.Exec);
applist[size].Pluggable=tempapp.Pluggable; applist[size].Icon=yon_char_new(tempapp.Icon);
applist[size].DualPluggable=tempapp.DualPluggable; applist[size].Pluggable=tempapp.Pluggable;
applist[size].Type=tempapp.Type; applist[size].DualPluggable=tempapp.DualPluggable;
size++; applist[size].Type=tempapp.Type;
} size++;
}
} }
} }
} }

Loading…
Cancel
Save