diff options
author | David Hewitt <davidmhewitt@gmail.com> | 2019-03-24 15:36:46 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2019-04-09 09:37:04 -0400 |
commit | 66144b68d8d2247177ca72a8b584337a2c8b6255 (patch) | |
tree | 5993aa74b068c1d55cb99d9c047bbc7ebf23cd4f /client | |
parent | c80b3d5e726c20867d9e7b727990ae14bc0e7c7c (diff) | |
download | appstream-glib-66144b68d8d2247177ca72a8b584337a2c8b6255.tar.gz |
as-compose: Remove relative path from icon names
Diffstat (limited to 'client')
-rw-r--r-- | client/as-compose.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/client/as-compose.c b/client/as-compose.c index 29a6872..a1104c4 100644 --- a/client/as-compose.c +++ b/client/as-compose.c @@ -82,9 +82,7 @@ add_icons (AsApp *app, pixbuf = g_object_ref (as_image_get_pixbuf (im)); /* save in target directory */ - name = g_strdup_printf ("%ix%i/%s.png", - 64, 64, - as_app_get_id_filename (AS_APP (app))); + name = g_strdup_printf ("%s.png", as_app_get_id_filename (AS_APP (app))); icon = as_icon_new (); as_icon_set_pixbuf (icon, pixbuf); @@ -93,7 +91,7 @@ add_icons (AsApp *app, as_icon_set_prefix (icon, as_app_get_icon_path (AS_APP (app))); as_app_add_icon (AS_APP (app), icon); - icon_path = g_build_filename (icons_dir, name, NULL); + icon_path = g_build_filename (icons_dir, "64x64", name, NULL); icon_subdir = g_path_get_dirname (icon_path); if (g_mkdir_with_parents (icon_subdir, 0755)) { @@ -140,9 +138,7 @@ add_icons (AsApp *app, as_app_add_kudo_kind (AS_APP (app), AS_KUDO_KIND_HI_DPI_ICON); /* save icon */ - name_hidpi = g_strdup_printf ("%ix%i/%s.png", - 128, 128, - as_app_get_id_filename (AS_APP (app))); + name_hidpi = g_strdup_printf ("%s.png", as_app_get_id_filename (AS_APP (app))); icon_hidpi = as_icon_new (); as_icon_set_pixbuf (icon_hidpi, pixbuf_hidpi); as_icon_set_name (icon_hidpi, name_hidpi); @@ -150,7 +146,7 @@ add_icons (AsApp *app, as_icon_set_prefix (icon_hidpi, as_app_get_icon_path (AS_APP (app))); as_app_add_icon (AS_APP (app), icon_hidpi); - icon_path_hidpi = g_build_filename (icons_dir, name_hidpi, NULL); + icon_path_hidpi = g_build_filename (icons_dir, "128x128", name_hidpi, NULL); icon_subdir_hidpi = g_path_get_dirname (icon_path_hidpi); if (g_mkdir_with_parents (icon_subdir_hidpi, 0755)) { int errsv = errno; |