33 #include "YSettings.h"
34 #include "YUIException.h"
36 #define YUILogComponent "ui"
38 #include "Libyui_config.h"
42 std::string YSettings::progSubDir =
"";
43 std::string YSettings::progIconDir =
"";
44 std::string YSettings::progThemeDir =
"";
46 YSettings::YSettings()
50 YSettings::~YSettings ()
56 if ( progSubDir.empty() )
58 progSubDir = directory;
59 yuiMilestone () <<
"Set progSubDir to \"" << directory <<
"\"" << endl;
60 yuiMilestone () <<
"progSubDir is now locked." << endl;
64 yuiMilestone () <<
"Can't set progSubDir to \"" << directory <<
"\"" << endl;
65 yuiMilestone () <<
"It is locked to: \"" << progSubDir <<
"\"" << endl;
66 YUI_THROW (
YUIException (
"progSubDir is locked to: \"" + progSubDir +
"\"" ) );
72 yuiMilestone () <<
"progSubDir: \"" << progSubDir <<
"\"" << endl;
80 if ( progIconDir.empty() )
82 progIconDir = directory;
83 yuiMilestone () <<
"Set progIconDir to \"" << directory <<
"\"" << endl;
84 yuiMilestone () <<
"progIconDir is now locked." << endl;
88 yuiMilestone () <<
"Can't set progIconDir to \"" << directory <<
"\"" << endl;
89 yuiMilestone () <<
"It is locked to: \"" << progIconDir <<
"\"" << endl;
90 YUI_THROW (
YUIException (
"progIconDir is locked to: \"" + progIconDir +
"\"" ) );
96 if (progIconDir.size())
98 yuiMilestone () <<
"progIconDir: \"" << progIconDir <<
"\"" << endl;
101 else if (progSubDir.size())
102 return progSubDir +
"/icons/";
104 return THEMEDIR
"/icons/";
109 if ( progThemeDir.empty() )
111 progThemeDir = directory;
112 yuiMilestone () <<
"Set progThemeDir to \"" << directory <<
"\"" << endl;
113 yuiMilestone () <<
"progThemeDir is now locked." << endl;
117 yuiMilestone () <<
"Can't set progThemeDir to \"" << directory <<
"\"" << endl;
118 yuiMilestone () <<
"It is locked to: \"" << progThemeDir <<
"\"" << endl;
119 YUI_THROW (
YUIException (
"progThemeDir is locked to: \"" + progThemeDir +
"\"" ) );
125 if (progThemeDir.size())
127 yuiMilestone () <<
"progThemeDir: \"" << progThemeDir <<
"\"" << endl;
130 else if (progSubDir.size())
133 return progSubDir +
"/theme/current/wizard/";
136 return THEMEDIR
"/current/wizard/";