"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
This commit is contained in:
parent
7a1896a34b
commit
4bede81a0a
4 changed files with 25 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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__ */
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue