Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #15 from rmyorston/master

Change file colour on modification (issue 161)
  • Loading branch information...
commit 12b01de91d0cd5dfdd25fca69a1166070fbb1041 2 parents 46243b0 + 5cc7817
Andrew Caudwell authored

Showing 3 changed files with 10 additions and 0 deletions. Show diff stats Hide diff stats

  1. +4 0 src/file.cpp
  2. +1 0  src/file.h
  3. +5 0 src/gource.cpp
4 src/file.cpp
@@ -161,6 +161,10 @@ const vec3& RFile::getNameColour() const{
161 161 return selected ? gGourceSettings.selection_colour : namecol;
162 162 }
163 163
  164 +void RFile::setFileColour(const vec3 & colour) {
  165 + file_colour = colour;
  166 +}
  167 +
164 168 const vec3 & RFile::getFileColour() const{
165 169 return file_colour;
166 170 }
1  src/file.h
@@ -61,6 +61,7 @@ class RFile : public Pawn {
61 61
62 62 bool overlaps(const vec2& pos) const;
63 63
  64 + void setFileColour(const vec3 & colour);
64 65 const vec3 & getFileColour() const;
65 66 vec3 getColour() const;
66 67 void colourize();
5 src/gource.cpp
@@ -1120,6 +1120,11 @@ void Gource::processCommit(RCommit& commit, float t) {
1120 1120
1121 1121 if(!file) continue;
1122 1122 }
  1123 + else {
  1124 + if (cf.action == "M") {
  1125 + file->setFileColour(cf.colour);
  1126 + }
  1127 + }
1123 1128
1124 1129 addFileAction(commit.username, cf.action, file, t);
1125 1130 }

0 comments on commit 12b01de

Please sign in to comment.
Something went wrong with that request. Please try again.