discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SimpleAgenda 0.44 - No way to add new task or new appointment


From: Patrick CARDONA
Subject: Re: SimpleAgenda 0.44 - No way to add new task or new appointment
Date: Fri, 13 Jul 2018 15:56:43 +0200
User-agent: GNUMail (Version 1.2.3)

On 2018-07-13 08:11:36 +0200 Yavor Doganov <yavor@gnu.org> wrote:

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.
--- 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];
   }


Hi Yavor and Riccardo,

I hope you will forgive my poor knowledge about testing the patch.
So I did not found any way to add dev repository matching Agenda.app dev archive : when I add dev sources within Ubuntu repositories, none leading to gnustep. Because I only found .tgz source, I tried to go this way :
https://help.ubuntu.com/community/CompilingEasyHowTo
and got the tarball here :
https://packages.ubuntu.com/source/bionic/agenda.app

But now, since I am inside the directory, I do not find where to apply the patch. In the previous example, you gave me a debian path and here there is not such a path. I thought it sould apply on another directory or file, but did not find it.

Bye!
Patrick

P.S. about the previous patch about TextEdit, I will try it on another computer which is not updated, so I could reproduce the bug. I shall tell you as soon as possible. I will be out there for a few days since the evening and I will be back i a few days.But when about to apply the patch, I did not found




reply via email to

[Prev in Thread] Current Thread [Next in Thread]