diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-01-30 18:51:01 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-01-30 18:51:01 +0100 |
commit | be442a9bac980e5a276d014f53dbf19b7353c66a (patch) | |
tree | f451a5802b3bf8a94f50c91afb23a27ec9e71f59 /wallpapers.c | |
parent | d1c5102c04a4f2745eb808682e575a4f12faa6e1 (diff) |
Added options for recursive and non-recursive directory updating.
Diffstat (limited to 'wallpapers.c')
-rw-r--r-- | wallpapers.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wallpapers.c b/wallpapers.c index 25a6578..67c9cef 100644 --- a/wallpapers.c +++ b/wallpapers.c @@ -13,7 +13,7 @@ #include "wallpapers.h" -void add_dir_recursive(const gchar *path, sqlite_uint64 parent, GtkStatusbar *statusbar) { +void wallpapers_add_dir(const gchar *path, sqlite_uint64 parent, GtkStatusbar *statusbar, gboolean recursive ) { static guint context_id = 0; GDir *dir; const gchar *filename; @@ -73,7 +73,8 @@ void add_dir_recursive(const gchar *path, sqlite_uint64 parent, GtkStatusbar *st g_free(filepath); continue; } - add_dir_recursive(filepath, dirid, statusbar); + if(recursive) + wallpapers_add_dir(filepath, dirid, statusbar, recursive); g_free(filepath); gdk_threads_enter(); gtk_statusbar_pop(statusbar, context_id); |