summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2008-07-29 22:45:18 +0000
committerBastien Nocera <hadess@src.gnome.org>2008-07-29 22:45:18 +0000
commit4bede81a0a67a3a21affc88b8ab0ce13610115f7 (patch)
tree6c5433b1aac36f4a14eac1d51b557def9223561d /capplets
parent7a1896a34b97cabbfaad05cf61ef1b14858833e9 (diff)
downloadgnome-control-center-4bede81a0a67a3a21affc88b8ab0ce13610115f7.tar.gz
"touch" the custom theme directory every time we make a change (Closes:
2008-07-29 Bastien Nocera <hadess@hadess.net> * 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
Diffstat (limited to 'capplets')
-rw-r--r--capplets/sound/ChangeLog7
-rw-r--r--capplets/sound/sound-theme-file-utils.c14
-rw-r--r--capplets/sound/sound-theme-file-utils.h2
-rw-r--r--capplets/sound/sound-theme.c2
4 files changed, 25 insertions, 0 deletions
diff --git a/capplets/sound/ChangeLog b/capplets/sound/ChangeLog
index 58d2c4bb4..f3d0c6c01 100644
--- a/capplets/sound/ChangeLog
+++ b/capplets/sound/ChangeLog
@@ -1,5 +1,12 @@
2008-07-29 Bastien Nocera <hadess@hadess.net>
+ * 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 <hadess@hadess.net>
+
* sound-theme.c (setup_sound_theme_custom): Never mind, the define is
actually used
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 <config.h>
#include <glib/gstdio.h>
#include <gio/gio.h>
+#include <utime.h>
+#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