Beispiel #1
0
/**
 * Gets the path to an ui file.
 * May first look in ./data/ui/[file], and then in
 * PACKAGE_DATA_DIR/PACKAGE/ui/[file].
 *
 * @param filename the name of the ui file
 * @return path to the ui file or NULL on failure. Must be freed.
 */
gchar *
get_ui_file(const char *uifilename)
{
	gchar *filename = g_build_filename("ui", uifilename, NULL);
	gchar *filepath = get_data_file(filename);

	g_free(filename);
	return filepath;
}
Beispiel #2
0
/**
 * Gets the path to a pixmap file.
 * May first look in ./data/pixmaps/[file], and then in
 * PACKAGE_DATA_DIR/PACKAGE/ui/[file].
 *
 * @param filename the pixmap file to find
 * @return path to the ui file or NULL on failure. Must be freed.
 */
gchar *
get_pixmap_file(const gchar *pixfilename)
{
	gchar *filename = g_build_filename("pixmaps", pixfilename, NULL);
	gchar *filepath = get_data_file(filename);

	g_free(filename);
	return filepath;
}
void handle_get_activity()
{
    uint32_t size = 0;
    char* fn = get_data_file(&size);
    if (fn == NULL)
    {
        log_info("handle_get_activity() no valid data\n");
        return;
    }
    log_info("handle_get_activity() return %s\n", fn);

    transfer_file(fn);
}