Skip to content

Commit

Permalink
singlenotemode crash when deleting note, fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbannon committed Jul 23, 2018
1 parent b695bdf commit 9e2f500
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
5 changes: 5 additions & 0 deletions doc/tomboy-ng.1
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tomboy-ng \- manage a collection of notes using a simple markup
[\fB\-g\fR]
[\fB-\-gnome3\fR]
[\fB\-\-debug\-sync\fR]
[\fB\-\-debug\-index\fR]
[\fB\-\-config\-dir\fR=\fIPATH_to_DIR\fR]
[\fB\-o\fR \fIPATH_to_NOTE\fR]
[\fB\-\-open-note\fR=\fIPATH_to_NOTE\fR]
Expand All @@ -33,6 +34,10 @@ Run gnome3 mode, needed on Linux releases based on gnome3 3.28 or later but not
.BR \-\-debug-sync
Generate a lot of logging information on the console during a sync process. Intended for debugging.

.TP
.BR \-\-debug-index
Generate a lot of logging information on the console while indexing the notes repo. Intended for debugging.

.TP
.BR \-c ", " \-\-config\-dir=\fIPATH_to_DIR\fR
Create or use an alternative config. That config could, for example, specify an alterative location to store notes and sync against a different file sync repository.
Expand Down
8 changes: 4 additions & 4 deletions package/package_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ LAZ_DIR=/home/dbannon/lazarus/lazarus_1_8_4
function BuildIt () {
cd $SOURCE_DIR
echo "Building x86_64 Linux"
$LAZ_DIR/lazbuild $BUILDOPTS --cpu="x86_64" --build-mode=Release --os="linux" Tomboy_NG.lpi
lazbuild $BUILDOPTS --cpu="x86_64" --build-mode=Release --os="linux" Tomboy_NG.lpi
echo "Building i386 Linux"
$LAZ_DIR/lazbuild $BUILDOPTS --cpu="i386" --build-mode=ReleaseLin32 --os="linux" Tomboy_NG.lpi
lazbuild $BUILDOPTS --cpu="i386" --build-mode=ReleaseLin32 --os="linux" Tomboy_NG.lpi
echo "Building x86_64 Windows"
$LAZ_DIR/lazbuild $BUILDOPTS --cpu="x86_64" --build-mode=ReleaseWin64 --os="win64" Tomboy_NG.lpi
lazbuild $BUILDOPTS --cpu="x86_64" --build-mode=ReleaseWin64 --os="win64" Tomboy_NG.lpi
echo "Building i386 Windows"
$LAZ_DIR/lazbuild $BUILDOPTS --cpu="i386" --build-mode=ReleaseWin32 --os="win32" Tomboy_NG.lpi
lazbuild $BUILDOPTS --cpu="i386" --build-mode=ReleaseWin32 --os="win32" Tomboy_NG.lpi
echo "Building x86_64 Linux"
# Todo - should check we now have binaries with todays date.
echo "------------- FINISHED BUILDING -----------------"
Expand Down
5 changes: 4 additions & 1 deletion tomboy-ng/editbox.pas
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
2018/07/20 Force copy on selection paste to always paste to left of a newline.
2018/07/23 If a note has no title in content but does have one in xml, caption is
left blank and that crashes things that look for * in first char. Fixed
2018/07/23 Fixed a bug that crashed when deleting a note in SingleNoteMode.
}


Expand Down Expand Up @@ -386,7 +387,9 @@ procedure TEditBoxForm.ButtDeleteClick(Sender: TObject);
if IDYES = Application.MessageBox('Delete this Note', PChar(St),
MB_ICONQUESTION + MB_YESNO) then begin
TimerSave.Enabled := False;
if NoteFileName <> '' then
if SingleNoteMode then
DeleteFileUTF8(NoteFileName)
else if NoteFileName <> '' then
SearchForm.DeleteNote(NoteFileName);
Dirty := False;
Close;
Expand Down

0 comments on commit 9e2f500

Please sign in to comment.