]> git.lyx.org Git - lyx.git/blobdiff - src/BranchList.C
LFUN_UNICODE_INSERT - unicode-insert
[lyx.git] / src / BranchList.C
index 75f183a0aa50408d45a42738b7c6289c617605c3..90aabdc0350638b90d47aa66871d685af470f37a 100644 (file)
 
 #include "BranchList.h"
 #include "LColor.h"
-#include "frontends/lyx_gui.h"
+
+#include "frontends/Application.h"
+
 #include <algorithm>
 
+
+namespace lyx {
+
 using std::string;
 
 
 Branch::Branch()
 {
-       lyx_gui::getRGBColor(LColor::background, color_);
+       theApp->getRgbColor(LColor::background, color_);
 }
 
 
@@ -51,13 +56,13 @@ bool Branch::setSelected(bool b)
 }
 
 
-lyx::RGBColor const & Branch::getColor() const
+RGBColor const & Branch::getColor() const
 {
        return color_;
 }
 
 
-void Branch::setColor(lyx::RGBColor const & c)
+void Branch::setColor(RGBColor const & c)
 {
        color_ = c;
 }
@@ -66,10 +71,10 @@ void Branch::setColor(lyx::RGBColor const & c)
 void Branch::setColor(string const & c)
 {
        if (c.size() == 7 && c[0] == '#')
-               color_ = lyx::RGBColor(c);
+               color_ = RGBColor(c);
        else
                // no color set or invalid color - use normal background
-               lyx_gui::getRGBColor(LColor::background, color_);
+               theApp->getRgbColor(LColor::background, color_);
 }
 
 
@@ -121,7 +126,10 @@ bool BranchList::add(string const & s)
 
 bool BranchList::remove(string const & s)
 {
-       List::size_type const size = list.size();
+       size_t const size = list.size();
        list.remove_if(BranchNamesEqual(s));
        return size != list.size();
 }
+
+
+} // namespace lyx