summaryrefslogtreecommitdiff
path: root/src/eom-list-store.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-05-17 15:52:02 +0200
committerinfirit <[email protected]>2014-07-24 18:05:54 +0200
commitd69408760eaa86d0532068c66c92847f2c12379c (patch)
tree7002cd155f7589524afbe198d7dcbcbbfeef06fe /src/eom-list-store.c
parent7654cb5af09a0e7522f1fdffce5ab6b469303790 (diff)
downloadeom-d69408760eaa86d0532068c66c92847f2c12379c.tar.bz2
eom-d69408760eaa86d0532068c66c92847f2c12379c.tar.xz
Use new GLib threading API
Based on eog commit by Felix Riemann <[email protected]> Url: https://git.gnome.org/browse/eog/commit/?id=b5f61d90d0478378cf7cf21bf5ade9eded0ae9f2
Diffstat (limited to 'src/eom-list-store.c')
-rw-r--r--src/eom-list-store.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/eom-list-store.c b/src/eom-list-store.c
index 00de631..445c01e 100644
--- a/src/eom-list-store.c
+++ b/src/eom-list-store.c
@@ -39,7 +39,7 @@ struct _EomListStorePrivate {
gint initial_image; /* The image that should be selected firstly by the view. */
GdkPixbuf *busy_image; /* Loading image icon */
GdkPixbuf *missing_image; /* Missing image icon */
- GMutex *mutex; /* Mutex for saving the jobs in the model */
+ GMutex mutex; /* Mutex for saving the jobs in the model */
};
static void
@@ -83,7 +83,7 @@ eom_list_store_dispose (GObject *object)
store->priv->missing_image = NULL;
}
- g_mutex_free (store->priv->mutex);
+ g_mutex_clear (&store->priv->mutex);
G_OBJECT_CLASS (eom_list_store_parent_class)->dispose (object);
}
@@ -174,7 +174,7 @@ eom_list_store_init (EomListStore *self)
self->priv->busy_image = eom_list_store_get_icon ("image-loading");
self->priv->missing_image = eom_list_store_get_icon ("image-missing");
- self->priv->mutex = g_mutex_new ();
+ g_mutex_init (&self->priv->mutex);
gtk_tree_sortable_set_default_sort_func (GTK_TREE_SORTABLE (self),
eom_list_store_compare_func,
@@ -816,12 +816,12 @@ eom_list_store_remove_thumbnail_job (EomListStore *store,
-1);
if (job != NULL) {
- g_mutex_lock (store->priv->mutex);
+ g_mutex_lock (&store->priv->mutex);
eom_job_queue_remove_job (job);
gtk_list_store_set (GTK_LIST_STORE (store), iter,
EOM_LIST_STORE_EOM_JOB, NULL,
-1);
- g_mutex_unlock (store->priv->mutex);
+ g_mutex_unlock (&store->priv->mutex);
}
@@ -850,12 +850,12 @@ eom_list_store_add_thumbnail_job (EomListStore *store, GtkTreeIter *iter)
G_CALLBACK (eom_job_thumbnail_cb),
store);
- g_mutex_lock (store->priv->mutex);
+ g_mutex_lock (&store->priv->mutex);
gtk_list_store_set (GTK_LIST_STORE (store), iter,
EOM_LIST_STORE_EOM_JOB, job,
-1);
eom_job_queue_add_job (job);
- g_mutex_unlock (store->priv->mutex);
+ g_mutex_unlock (&store->priv->mutex);
g_object_unref (job);
g_object_unref (image);
}