unsigned char pnd_emit_dotdesktop ( char *targetpath, char *pndrun, pnd_disco_t *p );
#define PND_DOTDESKTOP_LIBPND_ONLY 1 /* convenience flag; caller can do this himself as well */
-pnd_disco_t *pnd_parse_dotdesktop ( char *ddpath, unsigned int flags ); // sets object_flag CUSTOM1 for libpnd-origin
+pnd_disco_t *pnd_parse_dotdesktop ( char *ddpath, unsigned int flags ); // sets object_flag PND_DISCO_LIBPND_DD for libpnd-origin
// emit_dotinfo() will spit out a .desktop 'info entry', similar to the way emit_dotdesktop does its thing
// - rather than slide this into emit_dotdesktop(), we wish to allow apps to do this or not by calling this
// fetch the full PXML and get all the details. But I think we got out of control here :)
// NOTE: We really need to rework disco-t so it can include non-english titles/desc; perhaps more info as optional,
// or a name/value pairing system so it can have extra data in it, without a complex structure.
-#define PND_DISCO_FLAG_OVR 1 // An ovr file was found for this app (not per subapp, just per .pnd)
+#define PND_DISCO_FLAG_OVR 1 // An ovr file was found for this app (not per subapp, just per .pnd)
#define PND_DISCO_GENERATED 2 // This disco is 'faux', made up and not reflecting a real 'pnd file'
+#define PND_DISCO_LIBPND_DD 4 // This disco is from libpnd .desktop parsing
#define PND_DISCO_CUSTOM1 (1<<30) // An app may make use of this bitflag safely
#define PND_DISCO_CUSTOM2 (1<<31) // An app may make use of this bitflag safely
typedef struct {
// perform app discovery on .desktop files?
//
if ( pnd_conf_get_as_int_d ( g_conf, "minimenu.disco_dotdesktop", 0 ) ) {
- char *chunks[5] = {
+ char *chunks[10] = {
pnd_conf_get_as_char ( g_desktopconf, "desktop.dotdesktoppath" ),
pnd_conf_get_as_char ( g_desktopconf, "menu.dotdesktoppath" ),
+ pnd_conf_get_as_char ( g_conf, "minimenu.aux_searchpath" ),
//"/usr/share/applications",
NULL
};
snprintf ( ddpath, 1024, "%s/%s", chunks [ i ], de -> d_name );
pnd_disco_t *p = pnd_parse_dotdesktop ( ddpath, flags );
if ( p ) {
+ // store
pnd_disco_t *ai = pnd_box_allocinsert ( g_active_apps, ddpath, sizeof(pnd_disco_t) );
memmove ( ai, p, sizeof(pnd_disco_t) );
+ // free
+ free ( p );
}
}
while ( iter ) {
//pnd_log ( pndn_debug, " App: '%s'\n", IFNULL(iter->title_en,"No Name") );
+ // dump
+#if 0
+ printf ( "App %s\t%s\t Cat %s:%s:%s %s:%s:%s\n", iter -> title_en, iter -> unique_id,
+ iter -> main_category, iter -> main_category1, iter -> main_category2,
+ iter -> alt_category, iter -> alt_category1, iter -> alt_category2 );
+#endif
+
// update cachescreen
- // ... every 5 filenames, just to avoid slowing it too much
- if ( loadlater == 0 && itercount % 5 == 0 ) {
+ // ... every 10 filenames, just to avoid slowing it too much
+ if ( loadlater == 0 && itercount % 10 == 0 ) {
ui_cachescreen ( 0 /* clear screen */, IFNULL(iter->title_en,"No Name") );
}
// OR its a .desktop and we've got a path
// THEN go try to cache/load the icon
if ( ( iter -> pnd_icon_pos ) ||
- ( iter -> icon && iter -> object_flags & PND_DISCO_CUSTOM1 )
+ ( iter -> icon && iter -> object_flags & PND_DISCO_LIBPND_DD )
)
{
// has an icon that is not already cached?
if ( ( iter -> pnd_icon_pos ) ||
- ( iter -> icon && iter -> object_flags & PND_DISCO_CUSTOM1 )
+ ( iter -> icon && iter -> object_flags & PND_DISCO_LIBPND_DD )
)
{
}
void ui_start_defered_icon_thread ( void ) {
-
if ( pnd_conf_get_as_int_d ( g_conf, "minimenu.load_icons_later", 0 ) == 0 ) {
return;
}