summaryrefslogtreecommitdiff
path: root/libappstream-builder/plugins
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-08-22 18:53:22 +0100
committerRichard Hughes <richard@hughsie.com>2014-08-22 19:23:16 +0100
commit208fe0c7bc623b7c1a1513d1dc3cb77f7bef48af (patch)
tree1fd6e21c21b077de699af1b5200106cb247ed06a /libappstream-builder/plugins
parent194ee99b9648a18858ade33f88b3375aab6ae5e4 (diff)
downloadappstream-glib-208fe0c7bc623b7c1a1513d1dc3cb77f7bef48af.tar.gz
Rename as_app_get_id() to as_app_get_id_filename()
This makes the API a little more sane with a better defined return value.
Diffstat (limited to 'libappstream-builder/plugins')
-rw-r--r--libappstream-builder/plugins/asb-plugin-appdata.c6
-rw-r--r--libappstream-builder/plugins/asb-plugin-desktop.c2
-rw-r--r--libappstream-builder/plugins/asb-plugin-font.c6
-rw-r--r--libappstream-builder/plugins/asb-plugin-hardcoded.c2
4 files changed, 8 insertions, 8 deletions
diff --git a/libappstream-builder/plugins/asb-plugin-appdata.c b/libappstream-builder/plugins/asb-plugin-appdata.c
index 762cd1e..cf41c74 100644
--- a/libappstream-builder/plugins/asb-plugin-appdata.c
+++ b/libappstream-builder/plugins/asb-plugin-appdata.c
@@ -196,7 +196,7 @@ asb_plugin_appdata_load_url (AsbPlugin *plugin,
cache_dir = asb_package_get_config (asb_app_get_package (app), "CacheDir");
cache_filename = g_strdup_printf ("%s/%s-%s",
cache_dir,
- as_app_get_id (AS_APP (app)),
+ as_app_get_id_filename (AS_APP (app)),
basename);
if (!g_file_test (cache_filename, G_FILE_TEST_EXISTS)) {
if (asb_context_get_no_net (plugin->ctx)) {
@@ -493,7 +493,7 @@ asb_plugin_process_app (AsbPlugin *plugin,
/* get possible sources */
appdata_filename = g_strdup_printf ("%s/usr/share/appdata/%s.appdata.xml",
- tmpdir, as_app_get_id (AS_APP (app)));
+ tmpdir, as_app_get_id_filename (AS_APP (app)));
tmp = asb_package_get_config (pkg, "AppDataExtra");
if (tmp != NULL && g_file_test (tmp, G_FILE_TEST_EXISTS)) {
if (!asb_plugin_appdata_add_files (plugin, tmp, error))
@@ -502,7 +502,7 @@ asb_plugin_process_app (AsbPlugin *plugin,
appdata_filename_extra = g_strdup_printf ("%s/%s/%s.appdata.xml",
tmp,
kind_str,
- as_app_get_id (AS_APP (app)));
+ as_app_get_id_filename (AS_APP (app)));
if (g_file_test (appdata_filename, G_FILE_TEST_EXISTS) &&
g_file_test (appdata_filename_extra, G_FILE_TEST_EXISTS)) {
asb_package_log (pkg,
diff --git a/libappstream-builder/plugins/asb-plugin-desktop.c b/libappstream-builder/plugins/asb-plugin-desktop.c
index 4408a38..3033207 100644
--- a/libappstream-builder/plugins/asb-plugin-desktop.c
+++ b/libappstream-builder/plugins/asb-plugin-desktop.c
@@ -274,7 +274,7 @@ asb_plugin_process_filename (AsbPlugin *plugin,
} else {
/* save in target directory */
icon_filename = g_strdup_printf ("%s.png",
- as_app_get_id (AS_APP (app)));
+ as_app_get_id_filename (AS_APP (app)));
as_app_set_icon (AS_APP (app), icon_filename, -1);
as_app_set_icon_kind (AS_APP (app), AS_ICON_KIND_CACHED);
asb_app_set_pixbuf (app, pixbuf);
diff --git a/libappstream-builder/plugins/asb-plugin-font.c b/libappstream-builder/plugins/asb-plugin-font.c
index 543f067..371de6e 100644
--- a/libappstream-builder/plugins/asb-plugin-font.c
+++ b/libappstream-builder/plugins/asb-plugin-font.c
@@ -409,7 +409,7 @@ asb_font_add_screenshot (AsbApp *app, FT_Face ft_face, GError **error)
cache_dir = asb_package_get_config (asb_app_get_package (app), "CacheDir");
cache_fn = g_strdup_printf ("%s/%s.png",
cache_dir,
- as_app_get_id (AS_APP (app)));
+ as_app_get_id_filename (AS_APP (app)));
if (g_file_test (cache_fn, G_FILE_TEST_EXISTS)) {
pixbuf = gdk_pixbuf_new_from_file (cache_fn, error);
if (pixbuf == NULL)
@@ -435,7 +435,7 @@ asb_font_add_screenshot (AsbApp *app, FT_Face ft_face, GError **error)
as_image_set_pixbuf (im, pixbuf);
as_image_set_kind (im, AS_IMAGE_KIND_SOURCE);
basename = g_strdup_printf ("%s-%s.png",
- as_app_get_id (AS_APP (app)),
+ as_app_get_id_filename (AS_APP (app)),
as_image_get_md5 (im));
as_image_set_basename (im, basename);
url_tmp = g_build_filename (mirror_uri,
@@ -611,7 +611,7 @@ asb_plugin_process_filename (AsbPlugin *plugin,
/* generate icon */
tmp = as_app_get_metadata_item (AS_APP (app), "FontIconText");
if (tmp != NULL) {
- icon_filename = g_strdup_printf ("%s.png", as_app_get_id (AS_APP (app)));
+ icon_filename = g_strdup_printf ("%s.png", as_app_get_id_filename (AS_APP (app)));
as_app_set_icon (AS_APP (app), icon_filename, -1);
pixbuf = asb_font_get_pixbuf (ft_face,
AS_APP_ICON_DEFAULT_WIDTH,
diff --git a/libappstream-builder/plugins/asb-plugin-hardcoded.c b/libappstream-builder/plugins/asb-plugin-hardcoded.c
index df2834e..194fdab 100644
--- a/libappstream-builder/plugins/asb-plugin-hardcoded.c
+++ b/libappstream-builder/plugins/asb-plugin-hardcoded.c
@@ -304,7 +304,7 @@ asb_plugin_process_app (AsbPlugin *plugin,
tmp = asb_package_get_config (pkg, "ScreenshotsExtra");
if (tmp != NULL) {
_cleanup_free_ gchar *dirname = NULL;
- dirname = g_build_filename (tmp, as_app_get_id (AS_APP (app)), NULL);
+ dirname = g_build_filename (tmp, as_app_get_id_filename (AS_APP (app)), NULL);
if (g_file_test (dirname, G_FILE_TEST_EXISTS)) {
if (!asb_plugin_hardcoded_add_screenshots (app, dirname, error))
return FALSE;