mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-13 04:10:13 +00:00
Merge branch 'matthiasc/for-main' into 'main'
inspector: Look for icon themes in system data dirs See merge request GNOME/gtk!5567
This commit is contained in:
commit
2a862c05a1
@ -630,6 +630,8 @@ fill_icons (const char *path,
|
||||
const char *dir_entry;
|
||||
GDir *dir;
|
||||
|
||||
g_print ("fill icons from %s\n", path);
|
||||
|
||||
dir = g_dir_open (path, 0, NULL);
|
||||
if (!dir)
|
||||
return;
|
||||
@ -658,6 +660,7 @@ init_icons (GtkInspectorVisual *vis)
|
||||
GList *list, *l;
|
||||
int i;
|
||||
GtkStringList *names;
|
||||
const char * const *dirs;
|
||||
|
||||
t = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
|
||||
|
||||
@ -669,6 +672,14 @@ init_icons (GtkInspectorVisual *vis)
|
||||
fill_icons (path, t);
|
||||
g_free (path);
|
||||
|
||||
dirs = g_get_system_data_dirs ();
|
||||
for (i = 0; dirs[i]; i++)
|
||||
{
|
||||
path = g_build_filename (dirs[i], "icons", NULL);
|
||||
fill_icons (path, t);
|
||||
g_free (path);
|
||||
}
|
||||
|
||||
list = NULL;
|
||||
g_hash_table_iter_init (&iter, t);
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *)&theme, NULL))
|
||||
@ -723,6 +734,7 @@ init_cursors (GtkInspectorVisual *vis)
|
||||
GList *list, *l;
|
||||
GtkStringList *names;
|
||||
int i;
|
||||
const char * const *dirs;
|
||||
|
||||
t = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
|
||||
|
||||
@ -734,6 +746,14 @@ init_cursors (GtkInspectorVisual *vis)
|
||||
fill_cursors (path, t);
|
||||
g_free (path);
|
||||
|
||||
dirs = g_get_system_data_dirs ();
|
||||
for (i = 0; dirs[i]; i++)
|
||||
{
|
||||
path = g_build_filename (dirs[i], "icons", NULL);
|
||||
fill_cursors (path, t);
|
||||
g_free (path);
|
||||
}
|
||||
|
||||
list = NULL;
|
||||
g_hash_table_iter_init (&iter, t);
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *)&theme, NULL))
|
||||
|
Loading…
Reference in New Issue
Block a user