title->language = lang;
title->string = text;
- pnd_log ( PND_LOG_DEFAULT, (char*)" Title/Lang: %s/%s\n", text, lang );
+ //pnd_log ( PND_LOG_DEFAULT, (char*)" Title/Lang: %s/%s\n", text, lang );
}
continue;
}
- char *text = strdup(pElem->GetText());
- if (!text) continue;
+ char *text = strdup(pElem->GetText());
+ if (!text) continue;
- char *lang = pnd_pxml_get_attribute(pElem, PND_PXML_ATTRNAME_DESCRLANG);
- if (!lang) continue;
+ char *lang = pnd_pxml_get_attribute(pElem, PND_PXML_ATTRNAME_DESCRLANG);
+ if (!lang) continue;
- app->descriptions_c++;
- if (app->descriptions_c > app->descriptions_alloc_c) //we don't have enough strings allocated
- {
- app->descriptions_alloc_c <<= 1;
- app->descriptions = (pnd_localized_string_t*)realloc((void*)app->descriptions, app->descriptions_alloc_c);
- if (!app->descriptions) return (0); //errno = ENOMEM
- }
+ app->descriptions_c++;
+ if (app->descriptions_c > app->descriptions_alloc_c) //we don't have enough strings allocated
+ {
+ app->descriptions_alloc_c <<= 1;
+ app->descriptions = (pnd_localized_string_t*)realloc((void*)app->descriptions, app->descriptions_alloc_c * sizeof(pnd_localized_string_t) );
+ if (!app->descriptions) return (0); //errno = ENOMEM
+ }
- pnd_localized_string_t *description = &app->descriptions[app->descriptions_c - 1];
- description->language = lang;
- description->string = text;
+ pnd_localized_string_t *description = &app->descriptions[app->descriptions_c - 1];
+ description->language = lang;
+ description->string = text;
}
+
return (1);
}
// until we run out of applications in the PXML..
while ( 1 ) {
- pnd_log ( PND_LOG_DEFAULT, (char*)" App #%u inside of PXML %s\n", appcount, pFilename );
+ //pnd_log ( PND_LOG_DEFAULT, (char*)" App #%u inside of PXML %s\n", appcount, pFilename );
// create the buffer to hold the pxml
apps [ appcount ] = (pnd_pxml_t*) malloc ( sizeof(pnd_pxml_t) );
//Get unique ID first.
if ( appwrappermode ) {
app->unique_id = pnd_pxml_get_attribute(appElem, PND_PXML_ATTRNAME_UID);
- pnd_log ( PND_LOG_DEFAULT, (char*)" Subapp #%u has unique_id %s\n", appcount, app -> unique_id );
+ //pnd_log ( PND_LOG_DEFAULT, (char*)" Subapp #%u has unique_id %s\n", appcount, app -> unique_id );
+ app->appdata_dirname = pnd_pxml_get_attribute(appElem, PND_PXML_ATTRNAME_APPDATANAME);
} else {
app->unique_id = pnd_pxml_get_attribute(hRoot.Element(), PND_PXML_ATTRNAME_UID);
- pnd_log ( PND_LOG_DEFAULT, (char*)" Only-app #%u has unique_id %s\n", appcount, app -> unique_id );
+ //pnd_log ( PND_LOG_DEFAULT, (char*)" Only-app #%u has unique_id %s\n", appcount, app -> unique_id );
}
//Everything related to the title:
app->exec = pnd_pxml_get_attribute(pElem, PND_PXML_ATTRNAME_EXECCMD);
app->startdir = pnd_pxml_get_attribute(pElem, PND_PXML_ATTRNAME_EXECWD);
app->exec_no_x11 = pnd_pxml_get_attribute(pElem, PND_PXML_ATTRNAME_EXECNOX11);
+ app->execargs = pnd_pxml_get_attribute(pElem, PND_PXML_ATTRNAME_EXECARGS);
}
//The app icon:
app->icon = pnd_pxml_get_attribute(pElem, PND_PXML_ATTRNAME_ICONSRC);
}
+ // <info>
+ if ( (pElem = hRoot.FirstChild(PND_PXML_ENAME_INFO).Element()) )
+ {
+ app-> info_name = pnd_pxml_get_attribute ( pElem, PND_PXML_ATTRNAME_INFONAME );
+ app-> info_filename = pnd_pxml_get_attribute ( pElem, PND_PXML_ATTRNAME_INFOSRC );
+ app-> info_type = pnd_pxml_get_attribute ( pElem, PND_PXML_ATTRNAME_INFOTYPE );
+ }
+
//The preview pics:
if ( (pElem = hRoot.FirstChild(PND_PXML_NODENAME_PREVPICS).Element()) )
{
if ( appwrappermode ) {
appElem = appElem -> NextSiblingElement ( PND_PXML_APP );
if ( ! appElem ) {
- pnd_log ( PND_LOG_DEFAULT, (char*)" No more applications within PXML\n" );
+ //pnd_log ( PND_LOG_DEFAULT, (char*)" No more applications within PXML\n" );
break; // no more applications
}
// got another application..