Permalink
Browse files

Merge pull request #15 from rmyorston/master

Change file colour on modification (issue 161)
  • Loading branch information...
2 parents 46243b0 + 5cc7817 commit 12b01de91d0cd5dfdd25fca69a1166070fbb1041 @acaudwell committed Nov 3, 2012
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
@@ -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
@@ -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
@@ -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);
}

0 comments on commit 12b01de

Please sign in to comment.