return list;
}
+void AppendWidgetMetadata(GList** metadatas,
+ const std::vector<std::pair<std::string, std::string>> metadata) {
+ GList* list = *metadatas;
+ for (auto& meta : metadata) {
+ metadata_x* new_meta = static_cast<metadata_x*>(calloc(1, sizeof(metadata_x)));
+ new_meta->key = strdup(meta.first.c_str());
+ if (!meta.second.empty())
+ new_meta->value = strdup(meta.second.c_str());
+
+ list = g_list_append(list, new_meta);
+ }
+
+ *metadatas = list;
+}
+
void SetApplicationXDefaults(application_x* application) {
application->effectimage_type = strdup("image");
application->enabled = strdup("true");
application->icon = g_list_append(application->icon, icon);
}
+ if (!app_widget.metadata.empty())
+ AppendWidgetMetadata(&application->metadata, app_widget.metadata);
+
manifest->application = g_list_append(manifest->application, application);
}
return true;