From 9e979a98771c90c9fb2cb878ed5d905058dc4eae Mon Sep 17 00:00:00 2001 From: Gerhard Gonter <ggonter@gmail.com> Date: Sun, 2 Sep 2018 14:23:20 +0200 Subject: [PATCH] notebooks should probably be lists --- perl/Gnome-Tomboy/lib/Tomboy/Directory.pm | 2 +- perl/Gnome-Tomboy/lib/Tomboy/Note/Simple.pm | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/perl/Gnome-Tomboy/lib/Tomboy/Directory.pm b/perl/Gnome-Tomboy/lib/Tomboy/Directory.pm index 1c48383..b590c8d 100644 --- a/perl/Gnome-Tomboy/lib/Tomboy/Directory.pm +++ b/perl/Gnome-Tomboy/lib/Tomboy/Directory.pm @@ -176,7 +176,7 @@ print __LINE__, " scan_dir: quick=[$quick]\n"; closedir (DIR); # TODO: list dropped/deleted files - print __LINE__, " fnm: ", Dumper (\%fnm); + # print __LINE__, " fnm: ", Dumper (\%fnm); foreach my $fp (keys %fnm) { print "DEL: ", $fp, "\n"; diff --git a/perl/Gnome-Tomboy/lib/Tomboy/Note/Simple.pm b/perl/Gnome-Tomboy/lib/Tomboy/Note/Simple.pm index bd68103..c203ba2 100755 --- a/perl/Gnome-Tomboy/lib/Tomboy/Note/Simple.pm +++ b/perl/Gnome-Tomboy/lib/Tomboy/Note/Simple.pm @@ -549,13 +549,22 @@ sub save # print "tags: ", Dumper ($note->{'tags'}); my @tags= (); push (@tags, 'system:template') if ($is_template); - if ($nb_list) - { - foreach my $nb_name (@$nb_list) + +print __LINE__, " nb_list=[$nb_list]\n"; + if (scalar ($nb_list) eq 'ARRAY') + { # hmm... how can this be a list? + if ($nb_list) { - push (@tags, 'system:notebook:'. $nb_name) + foreach my $nb_name (@$nb_list) + { + push (@tags, 'system:notebook:'. $nb_name) + } } } + else + { + push (@tags, 'system:notebook:'. $nb_list) + } unless (defined ($fnm_out)) { -- GitLab