diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-01-15 00:57:01 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-01-15 00:57:01 +0100 |
commit | 7b50864826349fedd3d035d068c6aa41497033a2 (patch) | |
tree | ea1b551baecbd4f7b326107ed20e9d937981aaa3 /src/options.c | |
parent | d2ac8a9c8f5a3a3c3455241339dd65fac750db44 (diff) |
Read themes from ~/.config/feh/themes, don't autocreate for now
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/src/options.c b/src/options.c index 2206f3e..400b43e 100644 --- a/src/options.c +++ b/src/options.c @@ -28,7 +28,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "options.h" static void check_options(void); -static void feh_create_default_config(char *rcfile); static void feh_parse_option_array(int argc, char **argv); static void feh_parse_environment_options(void); static void feh_check_theme_options(int arg, char **argv); @@ -163,15 +162,12 @@ static void feh_load_options_for_theme(char *theme) if (!home) eprintf("D'oh! Please define HOME in your environment! " "It would really help me out...\n"); - rcpath = estrjoin("/", home, ".fehrc", NULL); + rcpath = estrjoin("/", home, ".config/feh/themes", NULL); D(("Trying %s for config\n", rcpath)); fp = fopen(rcpath, "r"); if (!fp && ((fp = fopen("/etc/fehrc", "r")) == NULL)) { - feh_create_default_config(rcpath); - - if ((fp = fopen(rcpath, "r")) == NULL) - return; + return; } free(rcpath); @@ -861,20 +857,3 @@ static void show_usage(void) , stdout); exit(0); } - -static void feh_create_default_config(char *rcfile) -{ - FILE *fp; - - if ((fp = fopen(rcfile, "w")) == NULL) { - weprintf("Unable to create default config file %s\n", rcfile); - return; - } - - fputs( -#include "fehrc.inc" - , fp); - fclose(fp); - - return; -} |