Skip to content

Commit

Permalink
fix #70 and #63, this is v0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbannon committed Aug 17, 2018
1 parent bfd0ffb commit 4f69c9a
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 43 deletions.
2 changes: 1 addition & 1 deletion doc/tomboy-ng.1
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Create or use an alternative config. That config could, for example, specify an

.TP
.BR \-o ", " \-\-open-note=\fIPATH_to_NOTE\fR
Open a note in single note mode. In this mode, a seperate process runs, it does not have access to the normal notes location, nor sync but can read, display and write back to a stand alone note. If the note name does not exist, a new note is created. If the note name specifies a plain text file or a rtf file, the contents of that file will be imported into a new note and that note will be named as specified on the command line but with an extension of ".note". In this mode, the note remains in its existing location, it is not moved to the tomboy-ng notes location, it is not synced, nor searched by tomboy-ng in its normal mode. Note that this switches are optional, "tomboy-ng some.note" will works as well.
Open a note in single note mode. In this mode, a seperate process runs, it does not have access to the normal notes location, nor sync but can read, display and write back to a stand alone note. If the note name does not exist, a new note is created. If the note name specifies a plain text file or a rtf file, the contents of that file will be imported into a new note and that note will be named as specified on the command line but with an extension of ".note". In this mode, the note remains in its existing location, it is not moved to the tomboy-ng notes location, it is not synced, nor searched by tomboy-ng in its normal mode. Note that the switch (-o or --open-note) is optional, "tomboy-ng some.note" will works as well.

.SH DEBUGGING
tomboy-ng accepts a couple of debug switches as noted above. They will write detailed progress reports relating to their section of the application to the console. However, Windows does not, for this purpose, have a console. But it can be told to capture this log info to a file using another command line switch or by setting an env variable that specifies a file name. Please ensure you have permission to write to the location specified.
Expand Down
3 changes: 2 additions & 1 deletion package/package_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ function DebianPackage () {
echo "Architecture: $1" >> BUILD/DEBIAN/control
echo "Maintainer: $WHOAMI" >> BUILD/DEBIAN/control
echo "Installed-Size: 4096" >> BUILD/DEBIAN/control
echo "Depends: libgtk2.0-0 (>= 2.6), libc6 (>= 2.14)" >> BUILD/DEBIAN/control
# We don't use libcanberra-gtk-module but binary complains when on an OS that does not have it, sigh ...
echo "Depends: libgtk2.0-0 (>= 2.6), libc6 (>= 2.14), libcanberra-gtk-module" >> BUILD/DEBIAN/control
echo "Priority: optional" >> BUILD/DEBIAN/control
echo "Homepage: https://wiki.gnome.org/Apps/Tomboy" >> BUILD/DEBIAN/control
echo "Section: x11" >> BUILD/DEBIAN/control
Expand Down
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.17d
0.18
11 changes: 8 additions & 3 deletions tomboy-ng/backupview.pas
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
2018/07/03 Finished the recver a backup note code
2018/08/14 Update the last-metadata-change-date instead of last-change-date
when restoring a Backup file. See Sync spec.
2018/08/16 We now update both last-metadata-change-date AND last-change-date
when restoring a backup file.
}

{$mode objfpc}{$H+}
Expand Down Expand Up @@ -122,9 +124,12 @@ procedure TFormBackupView.ButtonRecoverClick(Sender: TObject);
Rewrite(OutFile);
while not eof(InFile) do begin
readln(InFile, InString);
if Pos('<last-metadata-change-date>', InString) > 0 then
writeln(OutFile, ' <last-metadata-change-date>' + Sett.GetLocalTime() + '</last-metadata-change-date>')
else writeln(OutFile, InString);
if (Pos('<last-metadata-change-date>', InString) > 0) or
(Pos('<last-change-date>', InString) > 0) then begin
if (Pos('<last-metadata-change-date>', InString) > 0) then
writeln(OutFile, ' <last-metadata-change-date>' + Sett.GetLocalTime() + '</last-metadata-change-date>')
else writeln(OutFile, ' <last-change-date>' + Sett.GetLocalTime() + '</last-change-date>');
end else writeln(OutFile, InString);
end;
finally
CloseFile(OutFile);
Expand Down
2 changes: 1 addition & 1 deletion tomboy-ng/searchunit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ procedure TSearchForm.UpdateList(const Title, LastChange, FullFileName : ANSIStr
if NoteLister = Nil then exit; // we are quitting the app !
// Can we find line with passed file name ? If so, apply new data.
if not NoteLister.AlterNote(ExtractFileNameOnly(FullFileName), LastChange, Title) then begin
DebugLn('Assuming a new note ', FullFileName, ' [', Title, ']');
// DebugLn('Assuming a new note ', FullFileName, ' [', Title, ']');
NoteLister.AddNote(ExtractFileNameOnly(FullFileName)+'.note', Title, LastChange);
end;
NoteLister.ThisNoteIsOpen(FullFileName, TheForm);
Expand Down
73 changes: 37 additions & 36 deletions tomboy-ng/settings.lfm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
object Sett: TSett
Left = 512
Left = 551
Height = 431
Top = 233
Top = 166
Width = 525
BorderIcons = []
Caption = 'KTomboy-NG Settings'
Expand All @@ -12,25 +12,26 @@ object Sett: TSett
OnDestroy = FormDestroy
OnHide = FormHide
OnShow = FormShow
LCLVersion = '1.8.0.6'
LCLVersion = '1.8.4.0'
object PageControl1: TPageControl
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ButtonHide
Left = 0
Height = 373
Height = 371
Top = 0
Width = 525
ActivePage = TabBackUp
ActivePage = TabSync
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Bottom = 2
TabIndex = 3
TabIndex = 2
TabOrder = 0
OnChange = PageControl1Change
object TabBasic: TTabSheet
Caption = 'Basic'
ClientHeight = 338
ClientHeight = 336
ClientWidth = 519
object ButtonSetNotePath: TButton
Left = 8
Expand Down Expand Up @@ -127,7 +128,7 @@ object Sett: TSett
end
object TabDisplay: TTabSheet
Caption = 'Display'
ClientHeight = 338
ClientHeight = 336
ClientWidth = 519
object GroupBox5: TGroupBox
Left = 56
Expand Down Expand Up @@ -191,7 +192,7 @@ object Sett: TSett
end
object TabSync: TTabSheet
Caption = 'Sync'
ClientHeight = 338
ClientHeight = 336
ClientWidth = 519
object GroupBox3: TGroupBox
Left = 8
Expand All @@ -206,7 +207,7 @@ object Sett: TSett
Left = 56
Height = 22
Top = 0
Width = 215
Width = 209
Caption = 'File Sync using shared drive.'
Checked = True
TabOrder = 0
Expand All @@ -216,7 +217,7 @@ object Sett: TSett
Left = 56
Height = 22
Top = 24
Width = 229
Width = 225
Caption = 'Network Server - not available'
Enabled = False
TabOrder = 1
Expand All @@ -235,23 +236,23 @@ object Sett: TSett
Left = 40
Height = 17
Top = 8
Width = 355
Width = 347
Caption = 'when a conflict is detected between a local note and'
ParentColor = False
end
object Label4: TLabel
Left = 40
Height = 17
Top = 24
Width = 335
Width = 323
Caption = 'a note on the configured synchronisation server :'
ParentColor = False
end
object RadioAlwaysAsk: TRadioButton
Left = 8
Height = 22
Top = 48
Width = 203
Width = 200
Caption = 'Always ask me what to do.'
Checked = True
TabOrder = 0
Expand All @@ -261,15 +262,15 @@ object Sett: TSett
Left = 9
Height = 22
Top = 70
Width = 307
Width = 301
Caption = 'Use Local note and overwrite server note.'
TabOrder = 1
end
object RadioUseServer: TRadioButton
Left = 9
Height = 22
Top = 92
Width = 282
Width = 277
Caption = 'Use server note and rename local one.'
TabOrder = 2
end
Expand All @@ -287,15 +288,15 @@ object Sett: TSett
Left = 16
Height = 17
Top = 144
Width = 89
Width = 86
Caption = 'LocalConfig :'
ParentColor = False
end
object LabelLocalConfig: TLabel
Left = 16
Height = 17
Top = 160
Width = 119
Width = 116
Caption = 'LabelLocalConfig'
ParentColor = False
end
Expand All @@ -310,14 +311,14 @@ object Sett: TSett
Left = 272
Height = 17
Top = 88
Width = 123
Width = 122
Caption = 'LabelWaitForSync'
ParentColor = False
end
end
object TabBackUp: TTabSheet
Caption = 'BackUp'
ClientHeight = 338
ClientHeight = 336
ClientWidth = 519
object Panel1: TPanel
AnchorSideLeft.Control = TabBackUp
Expand All @@ -336,23 +337,23 @@ object Sett: TSett
Left = 33
Height = 17
Top = 33
Width = 438
Width = 428
Caption = 'Backup files are made when you delete a note or the sync system'
ParentColor = False
end
object Label7: TLabel
Left = 32
Height = 17
Top = 52
Width = 179
Width = 175
Caption = 'is about to overwrite one. '
ParentColor = False
end
object Label8: TLabel
Left = 32
Height = 17
Top = 72
Width = 407
Width = 396
Caption = 'They remain, for ever, unless you do something about them.'
ParentColor = False
end
Expand All @@ -375,12 +376,12 @@ object Sett: TSett
AnchorSideBottom.Control = TabBackUp
AnchorSideBottom.Side = asrBottom
Left = 0
Height = 188
Height = 186
Top = 150
Width = 519
Anchors = [akTop, akLeft, akRight, akBottom]
Caption = 'Panel2'
ClientHeight = 188
ClientHeight = 186
ClientWidth = 519
TabOrder = 1
object StringGridBackUp: TStringGrid
Expand All @@ -391,7 +392,7 @@ object Sett: TSett
AnchorSideBottom.Control = Panel2
AnchorSideBottom.Side = asrBottom
Left = 1
Height = 186
Height = 184
Top = 1
Width = 517
Anchors = [akTop, akLeft, akRight, akBottom]
Expand All @@ -408,7 +409,7 @@ object Sett: TSett
end
object TabSnapshot: TTabSheet
Caption = 'SnapShot'
ClientHeight = 338
ClientHeight = 336
ClientWidth = 519
object Label9: TLabel
Left = 36
Expand Down Expand Up @@ -437,21 +438,21 @@ object Sett: TSett
end
object TabSpell: TTabSheet
Caption = 'Spell'
ClientHeight = 338
ClientHeight = 336
ClientWidth = 519
object Label13: TLabel
Left = 12
Height = 17
Top = 19
Width = 319
Width = 312
Caption = 'Spell Check requires the Hunspell Libraries and'
ParentColor = False
end
object Label14: TLabel
Left = 12
Height = 17
Top = 40
Width = 268
Width = 262
Caption = 'an appropriate Hunspell Dictionary set.'
ParentColor = False
end
Expand All @@ -470,7 +471,7 @@ object Sett: TSett
Left = 16
Height = 17
Top = 288
Width = 73
Width = 72
Caption = 'LabelError'
ParentColor = False
end
Expand All @@ -490,15 +491,15 @@ object Sett: TSett
Left = 16
Height = 17
Top = 96
Width = 129
Width = 128
Caption = 'LabelLibraryStatus'
ParentColor = False
end
object LabelDicStatus: TLabel
Left = 16
Height = 17
Top = 200
Width = 103
Width = 101
Caption = 'LabelDicStatus'
ParentColor = False
end
Expand All @@ -514,7 +515,7 @@ object Sett: TSett
Left = 16
Height = 17
Top = 216
Width = 59
Width = 58
Caption = 'LabelDic'
ParentColor = False
end
Expand All @@ -533,7 +534,7 @@ object Sett: TSett
Left = 376
Height = 17
Top = 112
Width = 111
Width = 110
Caption = 'LabelDicPrompt'
ParentColor = False
end
Expand All @@ -549,7 +550,7 @@ object Sett: TSett
Hint = 'Unsaved setting will remain for this session only'
Top = 373
Width = 113
Anchors = [akTop, akLeft, akRight, akBottom]
Anchors = [akRight, akBottom]
BorderSpacing.Right = 4
BorderSpacing.Bottom = 2
Caption = 'Close'
Expand Down

0 comments on commit 4f69c9a

Please sign in to comment.