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

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Patrick
Hi all,

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.

As I can understand, the default calendar is not set.
Is anybody able to use this app as It should do ?

Bye !
Patrick


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

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

Riccardo Mottola-5
Hi Patrick

On 2018-07-12 14:09:47 +0000 Patrick CARDONA
<[hidden email]> wrote:

> Hi all,
>
> 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.
>
> As I can understand, the default calendar is not set.
> Is anybody able to use this app as It should do ?

Yes, I can.
I admit, that the first time I started the app it worked, then the
second time I had the same issue as you. THe issue are the calendars.

Try to:
1. Open Preferences
2. Go to Calendar Factory
3. add calendars, I used "Local File". Add e.g. "Personal" and "Work"

then you should be able to create and assign tasks and appointments.

you can also add Appointments through drag-and-drop on the view.

Riccardo


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

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

Yavor Doganov-3
In reply to this post by Patrick
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.

_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

storefile.patch (736 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Patrick
On 2018-07-13 08:11:36 +0200 Yavor Doganov <[hidden email]> 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


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

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

Yavor Doganov-3
В Fri, 13 Jul 2018 15:56:43 +0200, Patrick CARDONA написа:

> I hope you will forgive my poor knowledge about testing the patch.

No problem at all.  Not all users have these skills, and that's perfectly
fine.

> 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.

Most probably you have to duplicate your "deb" entries with "deb-src",
IOW if you have in /etc/apt/sources.list:

deb http://archive.ubuntu.com/ubuntu bionic universe multiverse

Add another line:

deb-src http://archive.ubuntu.com/ubuntu bionic universe multiverse

Then run "apt update" and you can "apt-get source" any package that is in
the official Bionic archive.  (All of this is untested as I don't have
access to an Ubuntu system and have never used it myself.)

> https://help.ubuntu.com/community/CompilingEasyHowTo

This is about compiling random software the usual way.  That is in some
cases more difficult.  I thought rebuilding the *debian* package would be
easier.  Anyway.

> and got the tarball
> here : https://packages.ubuntu.com/source/bionic/agenda.app

Using that link, grab the source package with this command (you must have
devscripts installed):

dget -u http://archive.ubuntu.com/ubuntu/pool/universe/a/agenda.app/
agenda.app_0.44-1build1.dsc

Then the instructions are the same as for textedit.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.

Right, there is no debian directory if you unpacked only the upstream
tarball.  In this case, apply the patch like this:

$ patch -p1 </path/to/storefile.patch

You can build and test (without installing the app):

$ sudo apt-get build-dep agenda.app
$ ./configure
$ make
$ defaults delete SimpleAgenda
$ ./SimpleAgenda.app/SimpleAgenda

Make sure to delete the defaults as the store is marked read-only.


_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep