summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-icon-info.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-07-06 23:16:48 +0200
committerraveit65 <[email protected]>2016-07-11 12:53:14 +0200
commit80d463a721ce9191efdada8f1b041baea1af1643 (patch)
tree697e5c281256716e2526260655a2910e3f515da7 /libcaja-private/caja-icon-info.c
parentd866d7a3a5b778cbd413eaa67ad69c80e9277c6b (diff)
downloadcaja-80d463a721ce9191efdada8f1b041baea1af1643.tar.bz2
caja-80d463a721ce9191efdada8f1b041baea1af1643.tar.xz
all: don't use deprecated GMutex/GThread API
Also, threads area always enabled, so we can remove the G_THREADS_ENABLED conditionals. Require GLib 2.31 for this. taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-4&id=0594aa1 Note, this fixes a Wimplicit-function-declaration warning in caja-search-engine-simple
Diffstat (limited to 'libcaja-private/caja-icon-info.c')
-rw-r--r--libcaja-private/caja-icon-info.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libcaja-private/caja-icon-info.c b/libcaja-private/caja-icon-info.c
index 0adbd90c..1a55ab47 100644
--- a/libcaja-private/caja-icon-info.c
+++ b/libcaja-private/caja-icon-info.c
@@ -31,7 +31,7 @@ struct _CajaIconInfo
GObject parent;
gboolean sole_owner;
- guint64 last_use_time;
+ gint64 last_use_time;
GdkPixbuf *pixbuf;
gboolean got_embedded_rect;
@@ -56,7 +56,7 @@ G_DEFINE_TYPE (CajaIconInfo,
static void
caja_icon_info_init (CajaIconInfo *icon)
{
- icon->last_use_time = g_get_monotonic_time () * 1000;
+ icon->last_use_time = g_get_monotonic_time ();
icon->sole_owner = TRUE;
}
@@ -79,7 +79,7 @@ pixbuf_toggle_notify (gpointer info,
g_object_remove_toggle_ref (object,
pixbuf_toggle_notify,
info);
- icon->last_use_time = g_get_monotonic_time () * 1000;
+ icon->last_use_time = g_get_monotonic_time ();
schedule_reap_cache ();
}
}
@@ -191,7 +191,7 @@ static GHashTable *loadable_icon_cache = NULL;
static GHashTable *themed_icon_cache = NULL;
static guint reap_cache_timeout = 0;
-#define NSEC_PER_SEC ((guint64)1000000000L)
+#define MICROSEC_PER_SEC ((guint64)1000000L)
static guint time_now;
@@ -205,7 +205,7 @@ reap_old_icon (gpointer key,
if (icon->sole_owner)
{
- if (time_now - icon->last_use_time > 30 * NSEC_PER_SEC)
+ if (time_now - icon->last_use_time > 30 * MICROSEC_PER_SEC)
{
/* This went unused 30 secs ago. reap */
return TRUE;
@@ -227,7 +227,7 @@ reap_cache (gpointer data)
reapable_icons_left = TRUE;
- time_now = g_get_monotonic_time () * 1000;
+ time_now = g_get_monotonic_time ();
if (loadable_icon_cache)
{