Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change file colour on modification (issue 161)

  • Loading branch information...
commit 5cc781716cbe47fcf15d0bf4dc8acda45fd03703 1 parent 46243b0
@rmyorston rmyorston authored
Showing with 10 additions and 0 deletions.
  1. +4 −0 src/file.cpp
  2. +1 −0  src/file.h
  3. +5 −0 src/gource.cpp
View
4 src/file.cpp
@@ -161,6 +161,10 @@ const vec3& RFile::getNameColour() const{
return selected ? gGourceSettings.selection_colour : namecol;
}
+void RFile::setFileColour(const vec3 & colour) {
+ file_colour = colour;
+}
+
const vec3 & RFile::getFileColour() const{
return file_colour;
}
View
1  src/file.h
@@ -61,6 +61,7 @@ class RFile : public Pawn {
bool overlaps(const vec2& pos) const;
+ void setFileColour(const vec3 & colour);
const vec3 & getFileColour() const;
vec3 getColour() const;
void colourize();
View
5 src/gource.cpp
@@ -1120,6 +1120,11 @@ void Gource::processCommit(RCommit& commit, float t) {
if(!file) continue;
}
+ else {
+ if (cf.action == "M") {
+ file->setFileColour(cf.colour);
+ }
+ }
addFileAction(commit.username, cf.action, file, t);
}
Please sign in to comment.
Something went wrong with that request. Please try again.