File tree 5 files changed +6
-4
lines changed
5 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -232,7 +232,7 @@ void App::Run()
232
232
if (testing) {
233
233
themeName = testtheme;
234
234
} else {
235
- themebase = string (THEMESDIR ) + " /" ;
235
+ themebase = cfg. getOption ( " themes_dir " ) + " /" ;
236
236
themeName = cfg.getOption (" current_theme" );
237
237
string::size_type pos;
238
238
if ((pos = themeName.find (" ," )) != string::npos) {
@@ -1252,7 +1252,7 @@ string App::findValidRandomTheme(const string & set)
1252
1252
int sel = Util::random () % themes.size ();
1253
1253
1254
1254
name = Cfg::Trim (themes[sel]);
1255
- themefile = string (THEMESDIR ) + " /" + name + THEMESFILE;
1255
+ themefile = cfg. getOption ( " themes_dir " ) + " /" + name + THEMESFILE;
1256
1256
if (stat (themefile.c_str (), &buf) != 0 ) {
1257
1257
themes.erase (find (themes.begin (), themes.end (), name));
1258
1258
logStream << APPNAME << " : Invalid theme in config: " << name
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ Cfg::Cfg() : currentSession(-1)
56
56
options.insert (option (" default_user" , " " ));
57
57
options.insert (option (" focus_password" , " no" ));
58
58
options.insert (option (" auto_login" , " no" ));
59
+ options.insert (option (" themes_dir" , PKGDATADIR " /themes" ));
59
60
options.insert (option (" current_theme" , " default" ));
60
61
options.insert (option (" lockfile" , " /var/run/slim.lock" ));
61
62
options.insert (option (" logfile" , " /dev/stderr" ));
Original file line number Diff line number Diff line change 19
19
#define INPUT_MAXLENGTH_PASSWD 50
20
20
21
21
#define CFGFILE SYSCONFDIR " /slim.conf"
22
- #define THEMESDIR PKGDATADIR " /themes"
23
22
#define THEMESFILE " /slim.theme"
24
23
25
24
class Cfg
Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ reboot_msg The system is rebooting...
92
92
# the password. Set to "yes" to enable this feature
93
93
#auto_login no
94
94
95
+ # Directory containing themes
96
+ #themes_dir /usr/share/slim/themes
95
97
96
98
# current theme, use comma separated list to specify a set to
97
99
# randomly choose from
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ int main(int argc, char ** argv)
112
112
string themefile = " " ;
113
113
string themedir = " " ;
114
114
themeName = " " ;
115
- themebase = string (THEMESDIR ) + " /" ;
115
+ themebase = cfg. getOption ( " themes_dir " ) + " /" ;
116
116
themeName = cfg.getOption (" current_theme" );
117
117
string::size_type pos;
118
118
if ((pos = themeName.find (" ," )) != string::npos) {
You can’t perform that action at this time.
0 commit comments