From 4bede81a0a67a3a21affc88b8ab0ce13610115f7 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 29 Jul 2008 22:45:18 +0000 Subject: [PATCH] "touch" the custom theme directory every time we make a change (Closes: 2008-07-29 Bastien Nocera * sound-theme-file-utils.c (custom_theme_update_time): * sound-theme-file-utils.h: * sound-theme.c (save_custom_theme): "touch" the custom theme directory every time we make a change (Closes: #545373) svn path=/trunk/; revision=8828 --- capplets/sound/ChangeLog | 7 +++++++ capplets/sound/sound-theme-file-utils.c | 14 ++++++++++++++ capplets/sound/sound-theme-file-utils.h | 2 ++ capplets/sound/sound-theme.c | 2 ++ 4 files changed, 25 insertions(+) diff --git a/capplets/sound/ChangeLog b/capplets/sound/ChangeLog index 58d2c4bb4..f3d0c6c01 100644 --- a/capplets/sound/ChangeLog +++ b/capplets/sound/ChangeLog @@ -1,3 +1,10 @@ +2008-07-29 Bastien Nocera + + * sound-theme-file-utils.c (custom_theme_update_time): + * sound-theme-file-utils.h: + * sound-theme.c (save_custom_theme): "touch" the custom theme + directory every time we make a change (Closes: #545373) + 2008-07-29 Bastien Nocera * sound-theme.c (setup_sound_theme_custom): Never mind, the define is diff --git a/capplets/sound/sound-theme-file-utils.c b/capplets/sound/sound-theme-file-utils.c index 8e1b083fd..3d9062fe8 100644 --- a/capplets/sound/sound-theme-file-utils.c +++ b/capplets/sound/sound-theme-file-utils.c @@ -23,11 +23,25 @@ #include #include #include +#include +#include "sound-theme-file-utils.h" #include "capplet-util.h" #define CUSTOM_THEME_NAME "__custom" +/* This function needs to be called after each individual + * changeset to the theme */ +void +custom_theme_update_time (void) +{ + char *path; + + path = custom_theme_dir_path (NULL); + utime (path, NULL); + g_free (path); +} + char * custom_theme_dir_path (const char *child) { diff --git a/capplets/sound/sound-theme-file-utils.h b/capplets/sound/sound-theme-file-utils.h index bbdf71c6c..9d2fb9b49 100644 --- a/capplets/sound/sound-theme-file-utils.h +++ b/capplets/sound/sound-theme-file-utils.h @@ -33,4 +33,6 @@ void delete_disabled_files (char **sounds); void add_disabled_file (char **sounds); void add_custom_file (char **sounds, const char *filename); +void custom_theme_update_time (void); + #endif /* __SOUND_THEME_FILE_UTILS_HH__ */ diff --git a/capplets/sound/sound-theme.c b/capplets/sound/sound-theme.c index 7f8c25aae..6148efe75 100644 --- a/capplets/sound/sound-theme.c +++ b/capplets/sound/sound-theme.c @@ -656,6 +656,8 @@ save_custom_theme (GtkTreeModel *model, const char *parent) g_file_set_contents (path, data, -1, NULL); g_free (path); g_free (data); + + custom_theme_update_time (); } static gboolean