~ubuntu-branches/ubuntu/trusty/rygel/trusty

« back to all changes in this revision

Viewing changes to src/plugins/tracker/rygel-tracker-query-triplets.vala

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson
  • Date: 2011-12-16 15:21:25 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20111216152125-qgn31dkfmhouhrf0
Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
            str += this[i].to_string (include_subject);
47
47
 
48
48
            if (i < this.size - 1) {
49
 
                include_subject = this[i].subject != this[i + 1].subject;
 
49
                include_subject = this[i].subject != this[i + 1].subject ||
 
50
                                  this.check_graph_change (i);
50
51
 
51
52
                if (include_subject) {
52
53
                    str += " . ";
66
67
            this.add (triplet);
67
68
        }
68
69
    }
 
70
 
 
71
    private bool check_graph_change (int i) {
 
72
        return (this[i].graph == null && this[i + 1].graph != null) ||
 
73
               (this[i].graph != null && this[i + 1].graph == null) ||
 
74
               (this[i].graph != this[i + 1].graph);
 
75
    }
69
76
}