[Debian GNUstep maintainers] Bug#903684: SimpleAgenda 0.44 - No way to add new task or new appointment
Yavor Doganov
yavor at gnu.org
Fri Jul 13 07:11:36 BST 2018
Package: agenda.app
Version: 0.44-1
Severity: important
Tags: patch
Patrick CARDONA wrote:
> When I try to add a new task (#t) - or a new appointment - within
> SimpleAgenda.app, the OK button is disabled in the "Edit task" panel
> and the Store list is empty. So I cannot save anything.
Thanks for reporting this bug, it is easily reproducible on a fresh
installation (simulated by deleting the app defaults and
~/GNUstep/Library/Simplegenda).
In LocalStore -initWithName:, [[self config] objectForKey: ST_FILE]
returns nil so _globalFile ends up the same as _globalPath. It then
attempts to save the file which is identical to the newly created
directory and that fails, naturally. Which in turn sets the store as
non-writable in the -write method so you get the OK button disabled.
Riccardo's workaround actually works because adding a local calendar
file explicitly from the Preferences invokes +registerWithName: which
sets the object for that key.
The attached patch works for me.
-------------- next part --------------
--- agenda.app-0.44.orig/LocalStore.m
+++ agenda.app-0.44/LocalStore.m
@@ -27,9 +27,11 @@
{
self = [super initWithName:name];
if (self) {
+ ConfigManager *gc = [ConfigManager globalConfig];
+
_globalPath = [[[NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) lastObject]
stringByAppendingPathComponent:@"SimpleAgenda"] retain];
- _globalFile = [[_globalPath stringByAppendingPathComponent:[[self config] objectForKey:ST_FILE]] retain];
+ _globalFile = [[_globalPath stringByAppendingPathComponent:[[gc objectForKey:name] objectForKey:ST_FILE]] retain];
_globalTaskFile = [[NSString stringWithFormat:@"%@.tasks", _globalFile] retain];
[self read];
}
More information about the pkg-GNUstep-maintainers
mailing list