jens-maus / yam

:mailbox_with_mail: YAM (short for 'Yet Another Mailer') is a MIME-compliant open-source Internet email client written for Amiga-based computer systems (AmigaOS4, AmigaOS3, MorphOS, AROS). It supports POP3, SMTP, TLSv1/SSLv3 connection security, multiple users, multiple identities, PGPv2/v5 encryption, unlimited hierarchical folders, an ARexx interface, etc...
https://yam.ch
GNU General Public License v2.0
61 stars 18 forks source link

Notification icon/image not shown (wrong path) #656

Closed javierdlr closed 7 years ago

javierdlr commented 7 years ago

Submission type

YAM version

YAM 2.10-dev (30-03-2017)

Used operating system

AmigaOS4/PPC

Used Amiga system

Sam406ex

Expected behaviour you didn't see

Notification should show yam notify icon/image <../Themes/default/notify"

Unexpected behaviour you saw

no image is shown. Snoopy output: 00758 : RinghioServer : FAIL = Lock("Utilidades:Comm/YAM/Themes/default/notify",SHARED) [162uS]

"RESOURCE" path is missing between "" and "Themes"

Steps to reproduce the problem

Have notification server enabled in AOS4.1 and in YAM. Get mail.

tboeckel commented 7 years ago

YAM first checks if "PROGDIR:Resources/Themes" exists. If it doesn't it will fall back to "PROGDIR:Themes".

Note that YAM uses the hardcoded "PROGDIR:" in its path for the themes. I don't know whether this gets resolved by Snoopy to the real path or not. But at least it seems you have no "Resources" directory on the same level as the YAM executable.

javierdlr commented 7 years ago

YAM exec and RESOURCES drawer are on the same level on my system:

SDH1:Comm/YAM/

dir

 resources (dir)
 Folders (dir)
 Rexx (dir)

.addressbook .addressbook.BAK .config .config.BAK .config20120814 .emailcache .folders .glossary .spamdata .uidl_0a548357 .uidl_4e1883b8 .uidl_7415f15f .updatestate .users YAM YAM_Debugging.html YAM.info YAM.os4 #

dir resources/themes/

 AISS (dir)
 default (dir)

ReadMe #

I'm using DEFAULT theme

tboeckel commented 7 years ago

Please try the debug version of the upcoming nightly build. The used theme directory path will be printed out right at the top of the STARTUP debug log.

javierdlr commented 7 years ago

YAM 2.10-dev [OS4/PPC, 62df0e3e, GCC 5.4.0] build: 20170628 startup **** Exec version: v53.94 no ENV:yamdebug variable found set debug classes/flags (env:yamdebug): 000000fe/00000003 set debug files: '' ** Normal processing follows *** 00:D|00:00:00.000000| YAM.c:229:InitLib: library intuition.library v54.26 with iface 'main' v1 successfully opened. 00:D|00:00:00.000000| YAM.c:229:InitLib: library icon.library v54.6 with iface 'main' v1 successfully opened. 00:D|00:00:00.000000| YAM.c:229:InitLib: library utility.library v54.1 with iface 'main' v1 successfully opened. 00:D|00:00:00.000000| YAM.c:229:InitLib: library diskfont.library v53.9 with iface 'main' v1 successfully opened. 00:D|00:00:00.000000| NewReadArgs.c:471:ReadArgs() okay 00:D|00:00:00.000000|YAM.c:2563:ProgDir.: 'Utilidades:Comm/YAM' 00:D|00:00:00.000000|YAM.c:2564:ProgName: 'YAM.debug' 00:D|00:00:00.000000|YAM.c:2570:using themes directory 'PROGDIR:Resources/Themes' 00:D|00:00:00.000000| YAM.c:229:InitLib: library locale.library v54.2 with iface 'main' v1 successfully opened. [_impl_InitResident] Initializing native autoinit codesets.library V6, priority 0 [_impl_InitResident] codesets.library V6 initialized ...

And Snoopy shows: 00756 : NotificationServer : FAIL = Lock("Utilidades:Comm/YAM/Themes/default/notify",SHARED) [127uS]

RESOURCES drawer is missing.

javierdlr commented 7 years ago

Maybe is NotificationServer (AEON version) fault?

tboeckel commented 7 years ago

This is definitely not the fault of any Enhancer Package, but of YAM itself. I finally took the chance to look up the section of the code which sets up the notification and then I noticed that YAM was in fact using the 'old style' path "<YAM's path>/Themes/default/notify" instead of the 'new style' path "<YAM's path>/Resources/Themes/default/notify". It seems all my YAM test installations still had both path's available. At least that would explain why I never experienced this problem myself.

I will fix that immediately.

javierdlr commented 7 years ago

Ok now path its correct, but still fails, seems 'cos its using PROGDIR:

00310 : NotificationServer : o.k. = [exec] OpenLibrary("datatypes.library",44) [31uS] 00311 : NotificationServer : o.k. = [exec] OpenLibrary("dos.library",0) [6uS] 00312 : NotificationServer : FAIL = Lock("PROGDIR:Resources/Themes/default/notify",SHARED) [114uS] ...

And NotifictionServer maybe looks on "his" PROGDIR: (in my case "#SDH6:EnhancerSoftware/Installation_Files/System/NotificationServer")

Can you resolve PROGDIR: path and send "real" path (in my case SDH1:Comm/YAM)?

TIA

tboeckel commented 7 years ago

Stupid me. Yes, you are 100% right. The NotificationServer is a different process and hence has its own PROGDIR: which of course is different from YAM's PROGDIR:. YAM must use an absolute path.

javierdlr commented 7 years ago

Confiermed with latest nighlty build 01.07.2017 now notify image shows correctly.

THX A LOT!!!!