aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/colours.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-17 19:34:27 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-17 19:34:27 +0100
commitcb75f47b4cb9e01cffe10037dfbd3e5955d882d3 (patch)
tree90514b263b18b7872e99e329d4adf9a9b5132b18 /src/clients/cave/colours.cc
parentd38a317c4ea3bb6e577802ca3a8e70500252f549 (diff)
downloadpaludis-cb75f47b4cb9e01cffe10037dfbd3e5955d882d3.tar.gz
paludis-cb75f47b4cb9e01cffe10037dfbd3e5955d882d3.tar.xz
Defer config file loading
Diffstat (limited to 'src/clients/cave/colours.cc')
-rw-r--r--src/clients/cave/colours.cc62
1 files changed, 34 insertions, 28 deletions
diff --git a/src/clients/cave/colours.cc b/src/clients/cave/colours.cc
index 87b61d941..61aef05e7 100644
--- a/src/clients/cave/colours.cc
+++ b/src/clients/cave/colours.cc
@@ -24,67 +24,67 @@
using namespace paludis;
using namespace cave;
-const std::string
+const Colour
paludis::cave::c::bold_blue()
{
- return FormatUserConfigFile::get_instance()->fetch("bold_blue", 0, "");
+ return Colour{"bold_blue"};
}
-const std::string
+const Colour
paludis::cave::c::blue()
{
- return FormatUserConfigFile::get_instance()->fetch("blue", 0, "");
+ return Colour{"blue"};
}
-const std::string
+const Colour
paludis::cave::c::bold_green()
{
- return FormatUserConfigFile::get_instance()->fetch("bold_green", 0, "");
+ return Colour{"bold_green"};
}
-const std::string
+const Colour
paludis::cave::c::green()
{
- return FormatUserConfigFile::get_instance()->fetch("green", 0, "");
+ return Colour{"green"};
}
-const std::string
+const Colour
paludis::cave::c::red()
{
- return FormatUserConfigFile::get_instance()->fetch("red", 0, "");
+ return Colour{"red"};
}
-const std::string
+const Colour
paludis::cave::c::bold_red()
{
- return FormatUserConfigFile::get_instance()->fetch("bold_red", 0, "");
+ return Colour{"bold_red"};
}
-const std::string
+const Colour
paludis::cave::c::yellow()
{
- return FormatUserConfigFile::get_instance()->fetch("yellow", 0, "");
+ return Colour{"yellow"};
}
-const std::string
+const Colour
paludis::cave::c::bold_yellow()
{
- return FormatUserConfigFile::get_instance()->fetch("bold_yellow", 0, "");
+ return Colour{"bold_yellow"};
}
-const std::string
+const Colour
paludis::cave::c::pink()
{
- return FormatUserConfigFile::get_instance()->fetch("pink", 0, "");
+ return Colour{"pink"};
}
-const std::string
+const Colour
paludis::cave::c::bold_pink()
{
- return FormatUserConfigFile::get_instance()->fetch("bold_pink", 0, "");
+ return Colour{"bold_pink"};
}
-const std::string
+const Colour
paludis::cave::c::bold_blue_or_pink()
{
#if PALUDIS_COLOUR_PINK
@@ -94,7 +94,7 @@ paludis::cave::c::bold_blue_or_pink()
#endif
}
-const std::string
+const Colour
paludis::cave::c::blue_or_pink()
{
#if PALUDIS_COLOUR_PINK
@@ -104,7 +104,7 @@ paludis::cave::c::blue_or_pink()
#endif
}
-const std::string
+const Colour
paludis::cave::c::bold_green_or_pink()
{
#if PALUDIS_COLOUR_PINK
@@ -114,7 +114,7 @@ paludis::cave::c::bold_green_or_pink()
#endif
}
-const std::string
+const Colour
paludis::cave::c::green_or_pink()
{
#if PALUDIS_COLOUR_PINK
@@ -124,15 +124,21 @@ paludis::cave::c::green_or_pink()
#endif
}
-const std::string
+const Colour
paludis::cave::c::normal()
{
- return FormatUserConfigFile::get_instance()->fetch("normal", 0, "");
+ return Colour{"normal"};
}
-const std::string
+const Colour
paludis::cave::c::bold_normal()
{
- return FormatUserConfigFile::get_instance()->fetch("bold_normal", 0, "");
+ return Colour{"bold_normal"};
+}
+
+std::string
+Colour::colour_string() const
+{
+ return FormatUserConfigFile::get_instance()->fetch(name, 0, "");
}