1 /* setstyle.c - loads style related options to wmaker
3 * WindowMaker window manager
5 * Copyright (c) 1997, 1998 Alfredo K. Kojima
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
30 #include "../src/wconfig.h"
35 defaultsPathForDomain(char *domain
)
40 gspath
= getenv("GNUSTEP_USER_ROOT");
47 home
= getenv("HOME");
49 printf("%s:could not get HOME environment variable!\n", ProgName
);
54 strcat(path
, "/GNUstep/");
56 strcat(path
, DEFAULTS_DIR
);
60 tmp
= malloc(strlen(path
)+2);
68 main(int argc
, char **argv
)
70 proplist_t prop
, style
;
76 printf("Syntax:\n%s <style file>\n", argv
[0]);
80 path
= defaultsPathForDomain("WindowMaker");
82 prop
= PLGetProplistWithPath(path
);
84 printf("%s:could not load WindowMaker configuration file \"%s\".\n",
89 style
= PLGetProplistWithPath(argv
[1]);
91 printf("%s:could not load style file \"%s\".\n", ProgName
, argv
[1]);
95 PLMergeDictionaries(prop
, style
);