Permalink
Browse files

Merge branch 'master' of github.com:dyadix/TimeCult

  • Loading branch information...
2 parents d18ca5b + c5e0d9f commit 3ff23b3d75b15f8a483374ad1ee56edd770fb14c @dyadix committed Jul 26, 2011
Showing with 17 additions and 16 deletions.
  1. +2 −2 main/build.number
  2. +15 −14 main/src/net/sf/timecult/ui/swt/SWTTimeLogTableView.java
View
4 main/build.number
@@ -1,4 +1,4 @@
#Generated automatically. Don't change!
-#Sun, 10 Jul 2011 13:34:25 +0400
+#Tue, 12 Jul 2011 20:45:54 +0400
#Tue Oct 26 20:06:45 MSD 2010
-build.number=003
+build.number=005
View
29 main/src/net/sf/timecult/ui/swt/SWTTimeLogTableView.java
@@ -352,35 +352,36 @@ public void addNewEntry() {
editDialog.open();
}
}
-
-
+
+
private void setData(TableItem item, TimeRecord timeRec) {
TimeRecordFilter filter = TimeTracker.getInstance().getFilter();
TimeRecord filteredRec = TimeUtil.getFilteredTimeRec(filter, timeRec);
if (timeRec.getTask().getItemType() == ItemType.IDLE_TASK) {
item.setImage(this.idleImage);
- }
- else {
+ } else {
if (filteredRec != timeRec) {
item.setImage(this.partialRecImage);
- }
- else {
+ } else {
item.setImage(this.normalRecImage);
}
}
- Project proj = filteredRec.getTask().getProject();
- String projectPath = proj.getName();
- while(proj.getParent() != null) {
- proj = proj.getParent();
- projectPath = proj.getName() + " -> " + projectPath;
- }
+ Project proj = filteredRec.getTask().getProject();
+ String projectPath = "N/A";
+ if (proj != null) {
+ projectPath = proj.getName();
+ while (proj.getParent() != null) {
+ proj = proj.getParent();
+ projectPath = proj.getName() + " -> " + projectPath;
+ }
+ }
item.setText(1, projectPath);
- item.setText(2, filteredRec.getTask().toString());
+ item.setText(2, filteredRec.getTask().toString());
item.setText(3, Formatter.toDateString(filteredRec.getStart()));
item.setText(4, Formatter.toTimeString(filteredRec.getStart()));
item.setText(5, filteredRec.getDuration().toString());
- String notes = timeRec.getNotes();
+ String notes = timeRec.getNotes();
if (notes == null)
notes = "";
item.setText(6, notes);

0 comments on commit 3ff23b3

Please sign in to comment.