Skip to content

Commit

Permalink
This is version 0.22
Browse files Browse the repository at this point in the history
  • Loading branch information
David Bannon committed Apr 19, 2019
1 parent a2cf85f commit 814a833
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 57 deletions.
40 changes: 21 additions & 19 deletions package/package_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ WHOAMI="David Bannon <[email protected]>"
MANUALS_DIR="BUILD/usr/share/doc/$PRODUCT/"
MANUALS=`cat note-files`

# BUILDOPTS=" -B --quiet --quiet"
BUILDOPTS=" -B --quiet"
BUILDOPTS=" -B --quiet --quiet"
# BUILDOPTS=" -B --quiet"
BUILDDATE=`date -R`
LAZ_FULL_DIR="$1"
LAZ_DIR=`basename "$LAZ_FULL_DIR"`
Expand Down Expand Up @@ -160,22 +160,24 @@ function DoZipping {

rm *.zip
rm -Rf "$PRODUCT"_"$VERSION"
mkdir "$PRODUCT"_"$VERSION"
cp ../tomboy-ng/tomboy-ng64.exe "$PRODUCT"_"$VERSION/."
cp ../../DLL_64bit/libhunspell.dll "$PRODUCT"_"$VERSION/."
cp ../../DLL_64bit/libhunspell.license "$PRODUCT"_"$VERSION/."
cp ../COPYING "$PRODUCT"_"$VERSION/."
cp AfterInstall.txt "$PRODUCT"_"$VERSION/."
sed "s/MyAppVersion \"0.21\"/MyAppVersion \"$VERSION\"/" tomboy-ng.iss > "$PRODUCT"_"$VERSION/tomboy-ng.iss"
for i in $MANUALS; do
cp ../doc/$i "$PRODUCT"_"$VERSION/."
done;
MANWIDTH=70 man -l ../doc/tomboy-ng.1 > "$PRODUCT"_"$VERSION/readme.txt"
unix2dos "$PRODUCT"_"$VERSION/readme.txt"
zip "$PRODUCT"_win64_"$VERSION.zip" "$PRODUCT"_"$VERSION"/*

cp ../tomboy-ng/tomboy-ng32.exe .
zip "$PRODUCT"_win32_"$VERSION.zip" tomboy-ng32.exe
# we don't make individual win zip files anymore.
# mkdir "$PRODUCT"_"$VERSION"
# cp ../tomboy-ng/tomboy-ng64.exe "$PRODUCT"_"$VERSION/."
# cp ../../DLL_64bit/libhunspell.dll "$PRODUCT"_"$VERSION/."
# cp ../../DLL_64bit/libhunspell.license "$PRODUCT"_"$VERSION/."
# cp ../COPYING "$PRODUCT"_"$VERSION/."
# cp AfterInstall.txt "$PRODUCT"_"$VERSION/."
# sed "s/MyAppVersion \"REPLACEME\"/MyAppVersion \"$VERSION\"/" tomboy-ng.iss > "$PRODUCT"_"$VERSION/tomboy-ng.iss"
# for i in $MANUALS; do
# cp ../doc/$i "$PRODUCT"_"$VERSION/."
# done;
# MANWIDTH=70 man -l ../doc/tomboy-ng.1 > "$PRODUCT"_"$VERSION/readme.txt"
# unix2dos "$PRODUCT"_"$VERSION/readme.txt"
# zip "$PRODUCT"_win64_"$VERSION.zip" "$PRODUCT"_"$VERSION"/*
# cp ../tomboy-ng/tomboy-ng32.exe .
# zip "$PRODUCT"_win32_"$VERSION.zip" tomboy-ng32.exe


# Make a zip containing everything we need to make a 32/64bit Inno Setup installer for Windows
rm -Rf WinPre_"$VERSION"
Expand All @@ -185,15 +187,15 @@ function DoZipping {
cp ../../DLL_64bit/libhunspell.license WinPre_"$VERSION/."
cp ../COPYING WinPre_"$VERSION/."
cp AfterInstall.txt WinPre_"$VERSION/."
sed "s/MyAppVersion \"0.21\"/MyAppVersion \"$VERSION\"/" tomboy-ng.iss > WinPre_"$VERSION/tomboy-ng.iss"
sed "s/MyAppVersion \"REPLACEME\"/MyAppVersion \"$VERSION\"/" tomboy-ng.iss > WinPre_"$VERSION/tomboy-ng.iss"
for i in $MANUALS; do
cp ../doc/$i WinPre_"$VERSION/."
done;
MANWIDTH=70 man -l ../doc/tomboy-ng.1 > WinPre_"$VERSION/readme.txt"
cp ../tomboy-ng/tomboy-ng32.exe WinPre_"$VERSION"/.
unix2dos WinPre_"$VERSION/readme.txt"
ls -la WinPre_"$VERSION"
zip WinPre_"$VERSION.zip" WinPre_"$VERSION"/*
# zip WinPre_"$VERSION.zip" WinPre_"$VERSION"/*

echo "--------------- FINISHED ZIPPING ----------------"
ls -l *.gz *.zip
Expand Down
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.21b
0.22
13 changes: 6 additions & 7 deletions tomboy-ng/Tomboy_NG.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@
<CompilerMessages>
<IgnoredMessages idx5024="True"/>
</CompilerMessages>
<OtherDefines Count="4">
<Define0 Value="DisableLCLGIF"/>
<Define1 Value="DisableLCLJPEG"/>
<Define2 Value="DisableLCLPNM"/>
<Define3 Value="DisableLCLTIFF"/>
</OtherDefines>
</Other>
</CompilerOptions>
</Item2>
Expand Down Expand Up @@ -574,7 +568,7 @@
<PackageName Value="LCL"/>
</Item3>
</RequiredPackages>
<Units Count="17">
<Units Count="18">
<Unit0>
<Filename Value="Tomboy_NG.lpr"/>
<IsPartOfProject Value="True"/>
Expand Down Expand Up @@ -689,6 +683,11 @@
<Filename Value="autostart.pas"/>
<IsPartOfProject Value="True"/>
</Unit16>
<Unit17>
<Filename Value="note_lister.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="Note_Lister"/>
</Unit17>
</Units>
</ProjectOptions>
<CompilerOptions>
Expand Down
12 changes: 7 additions & 5 deletions tomboy-ng/mainunit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ TMainForm = class(TForm)
function CommandLineError() : boolean;
// responds to any main or mainPopup menu clicks except recent note ones.
procedure FileMenuClicked(Sender: TObject);
function FindHelpFiles(): integer;
procedure FindHelpFiles();
procedure ShowAbout();
procedure TestDarkThemeInUse();

Expand Down Expand Up @@ -338,6 +338,8 @@ procedure TMainForm.FormShow(Sender: TObject);
if Sett.CheckShowSearchAtStart.Checked then
SearchForm.Show;
end;
if UseTrayMenu then
TrayIcon.Show;
end;

resourcestring
Expand Down Expand Up @@ -372,8 +374,6 @@ procedure TMainForm.UpdateNotesFound(Numb : integer);

if (ImageConfigTick.Visible and ImageNotesDirTick.Visible) then begin
ButtonDismiss.Enabled := AllowDismiss;
if UseTrayMenu then
TrayIcon.Show;
end;
end;

Expand Down Expand Up @@ -517,15 +517,17 @@ procedure TMainForm.ButtonConfigClick(Sender: TObject);

{ ------------- M E N U M E T H O D S ----------------}

function TMainForm.FindHelpFiles() : integer;
procedure TMainForm.FindHelpFiles();
// Todo : this uses about 300K, 3% of extra memory, better to code up a simpler model ?
var
NoteTitle : string;
begin
if HelpNotes = Nil then begin
HelpNotes := TNoteLister.Create; // freed in OnClose event.
HelpNotes.DebugMode := Application.HasOption('debug-index');
HelpNotes.WorkingDir:=HelpNotesPath;
Result := HelpNotes.GetNotes('', true);
HelpNotes.GetNotes('', true);
end;
HelpNotes.StartSearch();
while HelpNotes.NextNoteTitle(NoteTitle) do
AddMenuItem(NoteTitle, mtHelp, @FileMenuClicked, mkHelpMenu);
Expand Down
43 changes: 21 additions & 22 deletions tomboy-ng/note_lister.pas
Original file line number Diff line number Diff line change
Expand Up @@ -503,13 +503,13 @@ procedure TNoteLister.CleanupList(const Lst : TNoteList);
for Index := 0 to Lst.count -1 do begin;
while UTF8length(Lst.Items[Index]^.CreateDate) < 20 do
Lst.Items[Index]^.CreateDate := Lst.Items[Index]^.CreateDate + ' ';
Lst.Items[Index]^.CreateDate := copy(Lst.Items[Index]^.CreateDate, 1, 19);
Lst.Items[Index]^.CreateDate[11] := ' ';
while UTF8length(Lst.Items[Index]^.LastChange) < 20 do
Lst.Items[Index]^.LastChange := Lst.Items[Index]^.LastChange + ' ';
Lst.Items[Index]^.LastChange := copy(Lst.Items[Index]^.LastChange, 1, 19);
Lst.Items[Index]^.LastChange[11] := ' ';
end;
Lst.Items[Index]^.CreateDate := copy(Lst.Items[Index]^.CreateDate, 1, 19);
Lst.Items[Index]^.CreateDate[11] := ' ';
while UTF8length(Lst.Items[Index]^.LastChange) < 20 do
Lst.Items[Index]^.LastChange := Lst.Items[Index]^.LastChange + ' ';
Lst.Items[Index]^.LastChange := copy(Lst.Items[Index]^.LastChange, 1, 19);
Lst.Items[Index]^.LastChange[11] := ' ';
end;
end;

procedure TNoteLister.GetNoteDetails(const Dir, FileName: ANSIString; const SearchTerm: ANSIString; DontTestName : boolean = false);
Expand All @@ -533,7 +533,7 @@ procedure TNoteLister.GetNoteDetails(const Dir, FileName: ANSIString; const Sear
new(NoteP);
NoteP^.IsTemplate := False;
try
try
try
NoteP^.ID:=FileName;
ReadXMLFile(Doc, Dir + FileName);
Node := Doc.DocumentElement.FindNode('title');
Expand All @@ -544,7 +544,6 @@ procedure TNoteLister.GetNoteDetails(const Dir, FileName: ANSIString; const Sear
NoteP^.OpenNote := nil;
Node := Doc.DocumentElement.FindNode('create-date');
NoteP^.CreateDate := Node.FirstChild.NodeValue;

Node := Doc.DocumentElement.FindNode('tags');
if Assigned(Node) then begin
for J := 0 to Node.ChildNodes.Count-1 do
Expand All @@ -553,19 +552,19 @@ procedure TNoteLister.GetNoteDetails(const Dir, FileName: ANSIString; const Sear
for J := 0 to Node.ChildNodes.Count-1 do
if UTF8pos('system:notebook', Node.ChildNodes.Item[J].TextContent) > 0 then
NoteBookList.Add(Filename, UTF8Copy(Node.ChildNodes.Item[J].TextContent, 17, 1000), NoteP^.IsTemplate);
// Node.ChildNodes.Item[J].TextContent) may be something like -
// * system:notebook:DavosNotebook - this note belongs to DavosNotebook
// * system:template - this note is a template, if does not also have a
// Notebook tag its the StartHere note, otherwise its the Template for
// for the mentioned Notebook.
// Node.ChildNodes.Item[J].TextContent) may be something like -
// * system:notebook:DavosNotebook - this note belongs to DavosNotebook
// * system:template - this note is a template, if does not also have a
// Notebook tag its the StartHere note, otherwise its the Template for
// for the mentioned Notebook.
end;
except on E: EXMLReadError do begin
DebugLn(E.Message);
XMLError := True;
dispose(NoteP);
ErrorNotes.Append(FileName + ', ' + E.Message);
exit();
end;
DebugLn('XML ERROR' + E.Message);
XMLError := True;
dispose(NoteP);
ErrorNotes.Append(FileName + ', ' + E.Message);
exit();
end;
on EAccessViolation do DebugLn('Access Violation ' + FileName);
end;
if NoteP^.IsTemplate then begin // Don't show templates in normal note list
Expand Down Expand Up @@ -815,8 +814,8 @@ procedure TNoteLister.ThisNoteIsOpen(const ID : ANSIString; const TheForm: TForm
if NoteList = NIl then
exit;
if NoteList.Count < 1 then begin
DebugLn('Called ThisNoteIsOpen() with empty but not NIL list. Count is '
+ inttostr(NoteList.Count) + ' ' + ID);
//DebugLn('Called ThisNoteIsOpen() with empty but not NIL list. Count is '
// + inttostr(NoteList.Count) + ' ' + ID);
// Occasionally I think we see a non reproducable error here.
// I believe is legal to start the for loop below with an empty list but ....
// When we are creating the very first note in a dir, this haappens. Count should be exactly zero.
Expand Down
6 changes: 3 additions & 3 deletions tomboy-ng/searchunit.lfm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
object SearchForm: TSearchForm
Left = 157
Left = 483
Height = 401
Top = 190
Top = 291
Width = 824
Caption = 'SearchForm'
ClientHeight = 401
Expand Down Expand Up @@ -52,7 +52,7 @@ object SearchForm: TSearchForm
end
object Panel1: TPanel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Edit1
AnchorSideTop.Control = SpeedButton1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Expand Down

0 comments on commit 814a833

Please sign in to comment.