Hi, After experimenting with the Foreign files feature (from bug #2712), I have to say it works pretty well :) Just one little nitpick: if the foreign file changes (an appointment is added/removed/changed in it during Orage's currently displayed month), the calendar days markings don't get updated. This happens both if the Orage calendar was shown or hidden; if Orage wasn't started, it works correctly :)
True. Orage does not know that the file has been changed. Alarms also do not get refreshed. I would need to add some kind of file modification monitoring to fix that....
Hi, Maybe using inotify or some thing like that would be a bit overkill for this feature (and would also require dependancies, I believe), but maybe a scanning function, fired intermittently by g_timeout and stat()ing the files, could be OK? I suppose a 30 or 60 second interval check would be enough, to avoid doing unnecessary context switches most of the time... If this second solution is ok with you, I can give a try to a patch if you want :)
Yes, I was planning also that scanner every minute or so. If you have time to do the patch, I am happy to accept it. Your quality last time was great. But I doubt I can add it before the weekend...
Ok, i'll look at it one of this week's evenings if everything goes well :) Thanks!
Created attachment 1062 Patch to survey mtimes Hi, Here's a patch that checks ical files every minute for change. It relies on the mtime field to do so, this has the advantage of being a fast operation. This patch doesn't solve the corner case of an added or removed foreign file: as it wasn't in the f_ical[] array before, or won't be anymore, the calendar isn't updated. This is the object of a second patch.
Created attachment 1063 Refresh after foreign file add/remove This patch fixes the calendar update after adding/removing a foreign file.
Actually I think patch 2 is not needed; it should work already. Everything goes through refresh_foreign_files and it calls orage_mark_appointments but it misses xfical_alarm_build_list(FALSE); which I need to add. But patch1 looks good and is very welcomed. You are fast! I will apply it soon. Thanks a million!
and the second patch is needed also since it does nto work when file is added from command line :)
(In reply to comment #8) > and the second patch is needed also since it does nto work when file is > added from command line :) Ah yes, that was my problem, you're right - it worked from the GUI only :)
(In reply to comment #7) > But patch1 looks good and is very welcomed. You are fast! I will apply it soon. Wife got an unexpected best-friend-phone-call yesterday evening, I jumped on the chance ;-)) > Thanks a million! Thank you!
Added these fixes into 4.5.9.1 (svn revision 25318). There were similar issues with import and fixed those, too.
in 4.5.9