[eog] Update mtime when setting remote images as wallpaper
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Update mtime when setting remote images as wallpaper
- Date: Wed, 18 Jan 2012 19:12:46 +0000 (UTC)
commit 5b3d916f694433e99432329dab96cbb7e9da66a1
Author: Felix Riemann <friemann gnome org>
Date: Wed Jan 18 20:09:07 2012 +0100
Update mtime when setting remote images as wallpaper
Otherwise libgnome-desktop's wallpaper cache might not pick up the new
background if a local copy already existed.
https://bugzilla.gnome.org/show_bug.cgi?id=664747
src/eog-window.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index 09149f2..487199a 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -2893,6 +2893,7 @@ eog_job_copy_cb (EogJobCopy *job, gpointer user_data)
gchar *filepath, *basename, *filename, *extension;
GtkAction *action;
GFile *source_file, *dest_file;
+ GTimeVal mtime;
/* Create source GFile */
basename = g_file_get_basename (job->images->data);
@@ -2912,6 +2913,16 @@ eog_job_copy_cb (EogJobCopy *job, gpointer user_data)
g_file_move (source_file, dest_file, G_FILE_COPY_OVERWRITE,
NULL, NULL, NULL, NULL);
+ /* Update mtime, see bug 664747 */
+ g_get_current_time (&mtime);
+ g_file_set_attribute_uint64 (dest_file, G_FILE_ATTRIBUTE_TIME_MODIFIED,
+ mtime.tv_sec, G_FILE_QUERY_INFO_NONE,
+ NULL, NULL);
+ g_file_set_attribute_uint32 (dest_file,
+ G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC,
+ mtime.tv_usec, G_FILE_QUERY_INFO_NONE,
+ NULL, NULL);
+
/* Set the wallpaper */
eog_window_set_wallpaper (window, filepath, basename);
g_free (basename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]