mate-desktop / mate-panel

MATE panel
https://mate-desktop.org
GNU General Public License v2.0
184 stars 118 forks source link

[Feature request] In the Clock/calendar applet, mark holidays/closed days in red #1347

Open CHJ85 opened 1 year ago

CHJ85 commented 1 year ago

Hi there. Honestly, I'm surprised this hasn't been done yet, because it's such a basic yet useful feature. And Mate/Gnome 2 has been around for many years now. I'm a bit shocked that this feature hasn't been added. I don't know if this is an easy implementation or not. Guess it depends on what API you guys are using for collecting the calendar data. I hope somebody with the know-how can look into this. Please and thank you!

lukefromdc commented 1 year ago

Note that Evolution integration w the calandar was removed a very long time ago, possibly sometime between the original fork from GNOME 2 and the curent team being formed. No idea the original reason but that means the calendar is just a passive calendar without support for listing events, etc.

CHJ85 commented 1 year ago

@lukefromdc So you're saying it used to have those features? If that's the case, maybe it's time to integrate Evolution again. It's already a required package, integrated with a bunch of different stuff. Maybe back then it wasn't.

lukefromdc commented 1 year ago

Not in MATE, in GNOME 2, provided by Evolution which was and is a GNOME suite of office programs. https://help.gnome.org/users/evolution/stable/ The codebase has now diverged way too far to simply revert its removal, some years ago I was NOT successful in re-inserting support for it as an option. If this is to be part of MATE's calendar, someone more skilled than I will have to write it.

https://github.com/mate-desktop/mate-panel/issues/480

This commit removed Evolution support-but also handled the gsettings migration so reverting it would have to be done totally by hand.

https://github.com/mate-desktop/mate-panel/commit/cf41dc3d28c3daa30f04962718b468cf46830828

Worse yet, widgets from evolution itself were used in the calendar, meaning a build dependency on Evolution. At least it appears from the code that was a build-time option, but ideally this would be something mate-calendar could use if present but not crash if it is absent

The evolution build dependency was the reason cited for its removal, would be a rewrite from scratch to use native GTK widgets instead

lukefromdc commented 1 year ago

Also I was unable to work on Evolution integration because configuring Evolution requires having an email account that could be accessed by it, and I do not have any of those types of email account, as I do not use anything either paid or supported by ads. Thus I was unable to run Evolution and had to abandon this, and no other dev took it up

CHJ85 commented 1 year ago

I see. But wouldn't it be possibly to just integrate a completely different calendar? Perhaps something like this: https://github.com/Azeemaj101/React-Full-Calendar-with-Events

lukefromdc commented 1 year ago

I will have to leave that to someone with more time, as the chaos in my country has reduced the amount of time I've had to work on MATE. For me it would be a spinup from scratch to start a major project now. Hopefully one of the other team members can have a look at it.

CHJ85 commented 1 year ago

Aigh. Thanks anyway, @lukefromdc

zhuyaliang commented 1 year ago

This is a lot of work. need to rewrite the calendar

CHJ85 commented 1 year ago

@zhuyaliang I realize that. But if you're able and willing to do it, tell me where to donate and the amount. Because if you have to rewrite everything in the first place, it might as well be replaced with a fully featured calendar. The calendar I liked above seem to have everything it needs. Although obviously the gui frontent needs to be redone for proper MATE integration.

zhuyaliang commented 1 year ago

I can try to finish this work. I don't have much free time. You may have to wait,I'll let you know if it goes well

CHJ85 commented 1 year ago

@zhuyaliang Thank you. I appreciate that a lot.

mbkma commented 1 year ago

@CHJ85 You also may want to have a look at the Ayatana Indicator Project: https://github.com/AyatanaIndicators/ I think the ayatana-indicator-datetime applet includes a calendar with evolution integration. It is included by default in Ubuntu MATE. If you are using Arch you can install it from the AUR: https://tari.in/www/articles/ayatana/

CHJ85 commented 1 year ago

@mbkma That package is already installed. But for whatever reason, only the Clock applet is showing in my "Add to panel" dialog window.

mbkma commented 1 year ago

Which distro do you use? Could you provide version numbers, name of the applet you added to the panel and maybe a screenshot?

CHJ85 commented 1 year ago

Ubuntu Mate 22.04 Name of applet is just Clock, version 1.26.2. Screenshot: https://i.imgur.com/5Hsa3db.png

mbkma commented 1 year ago

This is the wrong applet. You'll want the Indicator Applet Complete.

mbkma commented 1 year ago

I think you have it already, but you need to enable the clock in that applet.

CHJ85 commented 1 year ago

The "complete" applet has the same calendar though. It still doesn't show holidays. And the clock is stuck on 12 hours, with no 24 hour option.

mbkma commented 1 year ago

You can download an .ics file with all holidays from your country and import it to Evolution. These holidays are then shown in the calendar, as is every other appointment from Evolution.

CHJ85 commented 1 year ago

@mbkma Well. That is an optional workaround. I'm not gonna look into how I'd go about doing that, as I do not use Evolution. Although, I hope standard features like this will eventually be implemented by default. At least in the standard applet. I don't think a lot of people are gonna have Evolution installed.