1 /* vim: set sw=4 ts=4 et: */
3 * This file is part of Live Wallpaper (livewp)
5 * Copyright (C) 2010 Vlad Vasiliev
6 * Copyright (C) 2010 Tanya Makova
9 * This software is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
14 * This software is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this software; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24 /*******************************************************************************/
25 #include "livewp-exthemes.h"
26 /*******************************************************************************/
29 parse_theme(gchar *file){
31 hash = g_hash_table_new(g_str_hash, g_str_equal);
32 g_hash_table_insert(hash, g_strdup("name"), g_strdup("Xsnow"));
33 g_hash_table_insert(hash, g_strdup("exec_path"), g_strdup("/usr/bin/xsnow"));
38 get_list_exthemes(void){
43 dir_fd = opendir(EXTHEME_PATH);
46 while((dp = readdir(dir_fd))){
48 if(!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
50 if(dp->d_type == DT_REG || dp->d_type == DT_LNK){
51 store = g_slist_append(store, parse_theme(dp->d_name));