mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-05 21:46:53 +02:00
gdesktopappinfo: remove global_defaults_cache
...and some related functions. This variable is also used for nothing at all.
This commit is contained in:
parent
b95ef4aad4
commit
5e59ab8e8c
@ -2840,7 +2840,6 @@ typedef struct {
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
GList *dirs; /* mimeinfo.cache and defaults.list */
|
GList *dirs; /* mimeinfo.cache and defaults.list */
|
||||||
GHashTable *global_defaults_cache; /* global results of defaults.list lookup and validation */
|
|
||||||
time_t last_stat_time;
|
time_t last_stat_time;
|
||||||
} MimeInfoCache;
|
} MimeInfoCache;
|
||||||
|
|
||||||
@ -2892,22 +2891,6 @@ mime_info_cache_dir_out_of_date (MimeInfoCacheDir *dir,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Call with lock held */
|
/* Call with lock held */
|
||||||
static gboolean
|
|
||||||
remove_all (gpointer key,
|
|
||||||
gpointer value,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
mime_info_cache_blow_global_cache (void)
|
|
||||||
{
|
|
||||||
g_hash_table_foreach_remove (mime_info_cache->global_defaults_cache,
|
|
||||||
remove_all, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
mime_info_cache_dir_init (MimeInfoCacheDir *dir)
|
mime_info_cache_dir_init (MimeInfoCacheDir *dir)
|
||||||
{
|
{
|
||||||
@ -3312,7 +3295,6 @@ mime_info_cache_update_dir_lists (void)
|
|||||||
MimeInfoCacheDir *dir = (MimeInfoCacheDir *) tmp->data;
|
MimeInfoCacheDir *dir = (MimeInfoCacheDir *) tmp->data;
|
||||||
|
|
||||||
/* No need to do this if we had file monitors... */
|
/* No need to do this if we had file monitors... */
|
||||||
mime_info_cache_blow_global_cache ();
|
|
||||||
mime_info_cache_dir_init (dir);
|
mime_info_cache_dir_init (dir);
|
||||||
mime_info_cache_dir_init_defaults_list (dir);
|
mime_info_cache_dir_init_defaults_list (dir);
|
||||||
mime_info_cache_dir_init_mimeapps_list (dir);
|
mime_info_cache_dir_init_mimeapps_list (dir);
|
||||||
@ -3349,9 +3331,6 @@ mime_info_cache_new (void)
|
|||||||
|
|
||||||
cache = g_new0 (MimeInfoCache, 1);
|
cache = g_new0 (MimeInfoCache, 1);
|
||||||
|
|
||||||
cache->global_defaults_cache = g_hash_table_new_full (g_str_hash, g_str_equal,
|
|
||||||
(GDestroyNotify) g_free,
|
|
||||||
(GDestroyNotify) g_free);
|
|
||||||
return cache;
|
return cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3362,7 +3341,6 @@ mime_info_cache_free (MimeInfoCache *cache)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
g_list_free_full (cache->dirs, (GDestroyNotify) mime_info_cache_dir_free);
|
g_list_free_full (cache->dirs, (GDestroyNotify) mime_info_cache_dir_free);
|
||||||
g_hash_table_destroy (cache->global_defaults_cache);
|
|
||||||
g_free (cache);
|
g_free (cache);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user