Commit 059a8ad3 authored by Colin Walters's avatar Colin Walters

Update to new GMutex API

parent 5a91a994
......@@ -112,7 +112,7 @@ dnl it too, or it will never make it into the spec file!
GDK_PIXBUF_REQUIRED=2.21.3
GTK_REQUIRED=3.3.6
GLIB_REQUIRED=2.19.1
GLIB_REQUIRED=2.33.3
XRANDR_REQUIRED=1.3
GSETTINGS_DESKTOP_SCHEMAS_REQUIRED=0.1.4
XEXT_REQUIRED=1.1
......
......@@ -49,7 +49,7 @@
struct _GnomeDesktopThumbnailFactoryPrivate {
GnomeDesktopThumbnailSize size;
GMutex *lock;
GMutex lock;
GList *thumbnailers;
GHashTable *mime_types_map;
......@@ -451,11 +451,7 @@ gnome_desktop_thumbnail_factory_finalize (GObject *object)
priv->monitors = NULL;
}
if (priv->lock)
{
g_mutex_free (priv->lock);
priv->lock = NULL;
}
g_mutex_clear (&priv->lock);
if (priv->disabled_types)
{
......@@ -540,7 +536,7 @@ update_or_create_thumbnailer (GnomeDesktopThumbnailFactory *factory,
Thumbnailer *thumb;
gboolean found = FALSE;
g_mutex_lock (priv->lock);
g_mutex_lock (&priv->lock);
for (l = priv->thumbnailers; l && !found; l = g_list_next (l))
{
......@@ -568,7 +564,7 @@ update_or_create_thumbnailer (GnomeDesktopThumbnailFactory *factory,
gnome_desktop_thumbnail_factory_add_thumbnailer (factory, thumb);
}
g_mutex_unlock (priv->lock);
g_mutex_unlock (&priv->lock);
}
static void
......@@ -579,7 +575,7 @@ remove_thumbnailer (GnomeDesktopThumbnailFactory *factory,
GList *l;
Thumbnailer *thumb;
g_mutex_lock (priv->lock);
g_mutex_lock (&priv->lock);
for (l = priv->thumbnailers; l; l = g_list_next (l))
{
......@@ -597,7 +593,7 @@ remove_thumbnailer (GnomeDesktopThumbnailFactory *factory,
}
}
g_mutex_unlock (priv->lock);
g_mutex_unlock (&priv->lock);
}
static void
......@@ -699,7 +695,7 @@ external_thumbnailers_disabled_all_changed_cb (GSettings *set
{
GnomeDesktopThumbnailFactoryPrivate *priv = factory->priv;
g_mutex_lock (priv->lock);
g_mutex_lock (&priv->lock);
priv->disabled = g_settings_get_boolean (priv->settings, "disable-all");
if (priv->disabled)
......@@ -713,7 +709,7 @@ external_thumbnailers_disabled_all_changed_cb (GSettings *set
gnome_desktop_thumbnail_factory_load_thumbnailers (factory);
}
g_mutex_unlock (priv->lock);
g_mutex_unlock (&priv->lock);
}
static void
......@@ -723,14 +719,14 @@ external_thumbnailers_disabled_changed_cb (GSettings *setting
{
GnomeDesktopThumbnailFactoryPrivate *priv = factory->priv;
g_mutex_lock (priv->lock);
g_mutex_lock (&priv->lock);
if (priv->disabled)
return;
g_strfreev (priv->disabled_types);
priv->disabled_types = g_settings_get_strv (priv->settings, "disable");
g_mutex_unlock (priv->lock);
g_mutex_unlock (&priv->lock);
}
static void
......@@ -749,7 +745,7 @@ gnome_desktop_thumbnail_factory_init (GnomeDesktopThumbnailFactory *factory)
(GDestroyNotify)g_free,
(GDestroyNotify)thumbnailer_unref);
priv->lock = g_mutex_new ();
g_mutex_init (&priv->lock);
priv->settings = g_settings_new ("org.gnome.desktop.thumbnailers");
priv->disabled = g_settings_get_boolean (priv->settings, "disable-all");
......@@ -1004,7 +1000,7 @@ gnome_desktop_thumbnail_factory_can_thumbnail (GnomeDesktopThumbnailFactory *fac
if (!mime_type)
return FALSE;
g_mutex_lock (factory->priv->lock);
g_mutex_lock (&factory->priv->lock);
if (!gnome_desktop_thumbnail_factory_is_disabled (factory, mime_type))
{
Thumbnailer *thumb;
......@@ -1012,7 +1008,7 @@ gnome_desktop_thumbnail_factory_can_thumbnail (GnomeDesktopThumbnailFactory *fac
thumb = g_hash_table_lookup (factory->priv->mime_types_map, mime_type);
have_script = thumbnailer_try_exec (thumb);
}
g_mutex_unlock (factory->priv->lock);
g_mutex_unlock (&factory->priv->lock);
if (have_script || mimetype_supported_by_gdk_pixbuf (mime_type))
{
......@@ -1135,7 +1131,7 @@ gnome_desktop_thumbnail_factory_generate_thumbnail (GnomeDesktopThumbnailFactory
pixbuf = NULL;
script = NULL;
g_mutex_lock (factory->priv->lock);
g_mutex_lock (&factory->priv->lock);
if (!gnome_desktop_thumbnail_factory_is_disabled (factory, mime_type))
{
Thumbnailer *thumb;
......@@ -1144,7 +1140,7 @@ gnome_desktop_thumbnail_factory_generate_thumbnail (GnomeDesktopThumbnailFactory
if (thumb)
script = g_strdup (thumb->command);
}
g_mutex_unlock (factory->priv->lock);
g_mutex_unlock (&factory->priv->lock);
if (script)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment