Revert "Merge branch 'include-hicolor-index-theme-as-resource' into 'main'"

This reverts merge request !5341
This commit is contained in:
Luca Bacci 2022-12-20 13:23:51 +00:00
parent 09691ead4c
commit 59df956f4f
3 changed files with 44 additions and 3821 deletions

View File

@ -70,10 +70,6 @@ for f in get_files('ui', '.ui'):
xml += '\n'
xml += '''
<file compressed="true">icons/hicolor.index.theme</file>
'''
for s in ['16x16', '32x32', '64x64', 'scalable']:
for c in ['actions', 'categories', 'emblems', 'emotes', 'devices', 'mimetypes', 'places', 'status']:
icons_dir = 'icons/{0}/{1}'.format(s,c)

View File

@ -1703,6 +1703,49 @@ gtk_icon_theme_get_theme_name (GtkIconTheme *self)
return theme_name;
}
static const char builtin_hicolor_index[] =
"[Icon Theme]\n"
"Name=Hicolor\n"
"Hidden=True\n"
"Directories=16x16/actions,16x16/status,22x22/actions,24x24/actions,24x24/status,32x32/actions,32x32/status,48x48/status,64x64/actions,scalable/status,scalable/actions\n"
"[16x16/actions]\n"
"Size=16\n"
"Type=Threshold\n"
"[16x16/status]\n"
"Size=16\n"
"Type=Threshold\n"
"[22x22/actions]\n"
"Size=22\n"
"Type=Threshold\n"
"[24x24/actions]\n"
"Size=24\n"
"Type=Threshold\n"
"[24x24/status]\n"
"Size=24\n"
"Type=Threshold\n"
"[32x32/actions]\n"
"Size=32\n"
"Type=Threshold\n"
"[32x32/status]\n"
"Size=32\n"
"Type=Threshold\n"
"[48x48/status]\n"
"Size=48\n"
"Type=Threshold\n"
"[64x64/actions]\n"
"Size=64\n"
"Type=Threshold\n"
"[scalable/status]\n"
"MinSize=1\n"
"Size=128\n"
"MaxSize=256\n"
"Type=Scalable\n"
"[scalable/actions]\n"
"MinSize=1\n"
"Size=128\n"
"MaxSize=256\n"
"Type=Scalable\n";
static void
insert_theme (GtkIconTheme *self,
const char *theme_name)
@ -1769,20 +1812,9 @@ insert_theme (GtkIconTheme *self,
{
if (strcmp (theme_name, FALLBACK_ICON_THEME) == 0)
{
const char *resource_path = "/org/gtk/libgtk/icons/hicolor.index.theme";
GBytes *index;
index = g_resources_lookup_data (resource_path,
G_RESOURCE_LOOKUP_FLAGS_NONE,
NULL);
if (!index)
g_error ("Cannot find resource %s", resource_path);
theme_file = g_key_file_new ();
g_key_file_set_list_separator (theme_file, ',');
g_key_file_load_from_bytes (theme_file, index, G_KEY_FILE_NONE, NULL);
g_bytes_unref (index);
g_key_file_load_from_data (theme_file, builtin_hicolor_index, -1, 0, NULL);
}
else
return;

File diff suppressed because one or more lines are too long