gnome-control-center r8828 - trunk/capplets/sound
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-control-center r8828 - trunk/capplets/sound
- Date: Tue, 29 Jul 2008 22:45:18 +0000 (UTC)
Author: hadess
Date: Tue Jul 29 22:45:18 2008
New Revision: 8828
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=8828&view=rev
Log:
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)
Modified:
trunk/capplets/sound/ChangeLog
trunk/capplets/sound/sound-theme-file-utils.c
trunk/capplets/sound/sound-theme-file-utils.h
trunk/capplets/sound/sound-theme.c
Modified: trunk/capplets/sound/sound-theme-file-utils.c
==============================================================================
--- trunk/capplets/sound/sound-theme-file-utils.c (original)
+++ trunk/capplets/sound/sound-theme-file-utils.c Tue Jul 29 22:45:18 2008
@@ -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)
{
Modified: trunk/capplets/sound/sound-theme-file-utils.h
==============================================================================
--- trunk/capplets/sound/sound-theme-file-utils.h (original)
+++ trunk/capplets/sound/sound-theme-file-utils.h Tue Jul 29 22:45:18 2008
@@ -33,4 +33,6 @@
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__ */
Modified: trunk/capplets/sound/sound-theme.c
==============================================================================
--- trunk/capplets/sound/sound-theme.c (original)
+++ trunk/capplets/sound/sound-theme.c Tue Jul 29 22:45:18 2008
@@ -656,6 +656,8 @@
g_file_set_contents (path, data, -1, NULL);
g_free (path);
g_free (data);
+
+ custom_theme_update_time ();
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]