Skip to content

Commit

Permalink
Changes:
Browse files Browse the repository at this point in the history
1. Added the ability to set a comment received from an editor as "Dealt with", a visual indicator in the chapter list shows it is dealt with.

2. Added the ability to have "tools" for each chapter item, which are a set of controls added to the button bar for each chapter item when displayed.

3. Information about comments dealt with is stored in the project comments properties field as a map of comment id to date/time dealt with.

4. Only a single item can now be displayed (the popup) in the editor chapter panel.

5. Edit complete markers are no longer shown in the chapter list or icon column for an editor project.

6. The editors schema version has been updated, the only change is a change to the message view (message.v) which now extracts the properties for the message.
  • Loading branch information
garybentley committed Nov 9, 2016
1 parent db97ddf commit 13f585d
Show file tree
Hide file tree
Showing 27 changed files with 1,126 additions and 802 deletions.
24 changes: 12 additions & 12 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<classpath>
<fileset dir="./3rd-party-jars/"
includes="*.jar" />
<fileset dir="./3rd-party-jars/docx4j-jars"
<fileset dir="./3rd-party-jars/docx4j"
includes="*.jar" />
</classpath>
</java>
Expand All @@ -101,7 +101,7 @@
<classpath>
<fileset dir="./3rd-party-jars/"
includes="*.jar" />
<fileset dir="./3rd-party-jars/docx4j-jars"
<fileset dir="./3rd-party-jars/docx4j"
includes="*.jar" />
</classpath>
</java>
Expand All @@ -117,7 +117,7 @@
<classpath>
<fileset dir="./3rd-party-jars/"
includes="*.jar" />
<fileset dir="./3rd-party-jars/docx4j-jars"
<fileset dir="./3rd-party-jars/docx4j"
includes="*.jar" />
<fileset dir="./installer"
includes="log4j.xml" />
Expand Down Expand Up @@ -382,7 +382,7 @@
<classpath>
<fileset dir="./3rd-party-jars/"
includes="*.jar" />
<fileset dir="./3rd-party-jars/docx4j-jars"
<fileset dir="./3rd-party-jars/docx4j"
includes="*.jar" />
</classpath>
</javac>
Expand Down Expand Up @@ -412,7 +412,7 @@
<classpath>
<fileset dir="./3rd-party-jars/"
includes="*.jar" />
<fileset dir="./3rd-party-jars/docx4j-jars"
<fileset dir="./3rd-party-jars/docx4j"
includes="*.jar" />
</classpath>

Expand All @@ -435,7 +435,7 @@
<classpath>
<fileset dir="./3rd-party-jars/"
includes="*.jar" />
<fileset dir="./3rd-party-jars/docx4j-jars"
<fileset dir="./3rd-party-jars/docx4j"
includes="*.jar" />
</classpath>
</java>
Expand All @@ -450,7 +450,7 @@
<classpath>
<fileset dir="./3rd-party-jars/"
includes="*.jar" />
<fileset dir="./3rd-party-jars/docx4j-jars"
<fileset dir="./3rd-party-jars/docx4j"
includes="*.jar" />
</classpath>
</java>
Expand All @@ -465,7 +465,7 @@
<classpath>
<fileset dir="./3rd-party-jars/"
includes="*.jar" />
<fileset dir="./3rd-party-jars/docx4j-jars"
<fileset dir="./3rd-party-jars/docx4j"
includes="*.jar" />
</classpath>
</java>
Expand All @@ -481,7 +481,7 @@
<classpath>
<fileset dir="./3rd-party-jars/"
includes="*.jar" />
<fileset dir="./3rd-party-jars/docx4j-jars"
<fileset dir="./3rd-party-jars/docx4j"
includes="*.jar" />
</classpath>
</javac>
Expand All @@ -493,7 +493,7 @@
<classpath>
<fileset dir="./3rd-party-jars/"
includes="*.jar" />
<fileset dir="./3rd-party-jars/docx4j-jars"
<fileset dir="./3rd-party-jars/docx4j"
includes="*.jar" />
</classpath>
</java>
Expand All @@ -510,7 +510,7 @@
includes="*.jar" />
<fileset dir="./3rd-party-jars/"
includes="*.jar" />
<fileset dir="./3rd-party-jars/docx4j-jars"
<fileset dir="./3rd-party-jars/docx4j"
includes="*.jar" />
</classpath>
<formatter type="plain" />
Expand Down Expand Up @@ -540,7 +540,7 @@
includes="*.jar" />
<fileset dir="./3rd-party-jars/"
includes="*.jar" />
<fileset dir="./3rd-party-jars/docx4j-jars"
<fileset dir="./3rd-party-jars/docx4j"
includes="*.jar" />
<fileset dir="${testBinDir}"
includes="*.jar" />
Expand Down
1 change: 1 addition & 0 deletions data/editor-schema/views/message.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ SELECT m.dbkey dbkey,
d.datecreated datecreated,
d.objecttype objecttype,
d.id id,
d.properties properties,
m.editordbkey editordbkey
FROM dataobject d,
message m
Expand Down
2 changes: 1 addition & 1 deletion data/editors-schema-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2
3
2 changes: 1 addition & 1 deletion data/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.2
2.5.4
2 changes: 2 additions & 0 deletions src/com/quollwriter/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,8 @@ public class Constants
public static final String STAR_ICON_NAME = "star";
public static final String SORT_ICON_NAME = "sort";
public static final String TARGET_ICON_NAME = "goals";
public static final String SET_DEALT_WITH_ICON_NAME = "save" ;//"accepted";
public static final String SET_UNDEALT_WITH_ICON_NAME = "cancel"; //"clear";

public static final String SHOW_FIND_ACTION = "find-show";

Expand Down
42 changes: 21 additions & 21 deletions src/com/quollwriter/Startup.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class Startup

public static void main (String[] argv)
{

if ((argv != null) &&
(argv.length > 0))
{
Expand All @@ -31,7 +31,7 @@ public static void main (String[] argv)
}

SplashScreen ss = null;

try
{

Expand All @@ -45,20 +45,20 @@ public static void main (String[] argv)

if (Environment.isFirstUse ())
{

new FirstUseWizard ().init ();

return;

}

if (Environment.getAllProjectInfos ().size () == 0)
{

ss.finish ();

Environment.showLanding ();

return;

}
Expand All @@ -69,21 +69,21 @@ public static void main (String[] argv)
{

Environment.showLanding ();

}

// See if the user property is to open the last edited project.
if (UserProperties.getAsBoolean (Constants.OPEN_LAST_EDITED_PROJECT_PROPERTY_NAME))
{

try
{

if (!Environment.openLastEditedProject ())
{

showError = true;

}

} catch (Exception e)
Expand All @@ -93,7 +93,7 @@ public static void main (String[] argv)

}

}
}

// Need to do this here since, if there is no visible frame (somewhere) then showErrorMessage will throw an error that crashes the jvm... nice...
if (showError)
Expand All @@ -106,30 +106,30 @@ public static void main (String[] argv)
"Unable to open last edited {project}, please select another {project} or create a new one.");

}

} catch (Exception eee)
{

if (eee instanceof OverlappingFileLockException)
{

UIUtils.showErrorMessage (null,
"It appears that Quoll Writer is already running. Please close the other instance before starting Quoll Writer again.");


} else {

Environment.logError ("Unable to open Quoll Writer",
eee);

UIUtils.showErrorMessage (null,
"Unable to start Quoll Writer");

}

} finally
{
{

if (ss != null)
{

Expand All @@ -138,7 +138,7 @@ public static void main (String[] argv)
}

Environment.startupComplete ();

}

}
Expand Down
7 changes: 7 additions & 0 deletions src/com/quollwriter/data/Project.java
Original file line number Diff line number Diff line change
Expand Up @@ -1774,6 +1774,13 @@ public boolean equals (Object o)

Project po = (Project) o;

if (this.projectDirectory == null)
{

return false;

}

return this.projectDirectory.equals (po.projectDirectory);

}
Expand Down
3 changes: 2 additions & 1 deletion src/com/quollwriter/db/EditorMessageDataHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
public class EditorMessageDataHandler implements DataHandler<EditorMessage, EditorEditor>
{

private static final String STD_SELECT_PREFIX = "SELECT dbkey, type, when, sentbyme, editordbkey, forprojectid, messageid, message, dealtwith FROM message_v";
private static final String STD_SELECT_PREFIX = "SELECT dbkey, type, when, sentbyme, editordbkey, forprojectid, messageid, message, properties, dealtwith FROM message_v";

private ObjectManager objectManager = null;

Expand Down Expand Up @@ -358,6 +358,7 @@ private EditorMessage getMessage (ResultSet rs)
am.setForProjectId (rs.getString (ind++));
am.setMessageId (rs.getString (ind++));
am.setMessage (rs.getString (ind++));
am.setPropertiesAsString (rs.getString (ind++));
am.setDealtWith (rs.getBoolean (ind++));

this.messageCache.put (key,
Expand Down
1 change: 0 additions & 1 deletion src/com/quollwriter/db/EditorProjectDataHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ private EditorProject getEditorProject (ResultSet rs)

p.setKey (key);
p.setId (rs.getString (ind++));
Environment.logMessage ("GOT PROJ ID AT LOAD: " + p.getId ());
p.setName (rs.getString (ind++));

String genres = rs.getString (ind++);
Expand Down
53 changes: 53 additions & 0 deletions src/com/quollwriter/editors/messages/ProjectCommentsMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class ProjectCommentsMessage extends EditorMessage
private Set<Note> comments = null;
private String generalComment = null;
private ProjectVersion projVer = null;
private Map<String, Date> commentsDealtWith = new HashMap ();

public ProjectCommentsMessage ()
{
Expand Down Expand Up @@ -65,6 +66,58 @@ public ProjectCommentsMessage (Project project,

}

@Override
public void setPropertiesAsString (String p)
throws Exception
{

super.setPropertiesAsString (p);

String d = this.getProperty ("dealtwithcomments");

if (d != null)
{

// Decode the json.
Map m = (Map) JSONDecoder.decode (d);

this.commentsDealtWith.putAll (m);

}

}

public void setCommentDealtWith (String id,
Date date)
throws Exception
{

Map<String, Date> dealtWith = this.getCommentsDealtWith ();

if (date == null)
{

dealtWith.remove (id);

} else {

dealtWith.put (id,
date);

}

this.setProperty ("dealtwithcomments",
JSONEncoder.encode (dealtWith));

}

public Map<String, Date> getCommentsDealtWith ()
{

return this.commentsDealtWith;

}

@Override
public void fillToStringProperties (Map<String, Object> props)
{
Expand Down
3 changes: 3 additions & 0 deletions src/com/quollwriter/editors/ui/EditorsUIUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -5096,6 +5096,9 @@ public void actionPerformed (ActionEvent ev)

kchaps.put (c.getId (),
c);

c.setEditPosition (-1);
c.setEditComplete (false);

}

Expand Down
Loading

0 comments on commit 13f585d

Please sign in to comment.