Page MenuHomePhabricator

elementary calendar - generates marks for weekend days
Needs RevisionPublic

Authored by rafspiny on May 24 2020, 7:24 AM.

Details

Reviewers
raster
CHAN
Summary

Generates marks for each Saturday and Sunday of the displayed month.
There is already a function that send the correspective signal to EDJE
for the theme to properly render a weekend.
Also removing deprecated _text_day_color_update

Diff Detail

Repository
rEFL core/efl
Branch
feature/elm_weekend_signal
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16825
Build 11186: arc lint + arc unit
rafspiny created this revision.May 24 2020, 7:24 AM
rafspiny requested review of this revision.May 24 2020, 7:24 AM
rafspiny updated this revision to Diff 30393.May 25 2020, 1:54 PM

Rspect codeconvetion.

rafspiny updated this revision to Diff 30394.May 25 2020, 1:58 PM

I messed up with code convetion. Again.

CHAN requested changes to this revision.Jun 11 2020, 7:53 PM
CHAN added a subscriber: CHAN.

Im not sure we can remove _text_day_color_update...

It is different in the country to define the weekend.
There is no signal matching on the weekend.

This revision now requires changes to proceed.Jun 11 2020, 7:53 PM
In D11874#228286, @CHAN wrote:

Im not sure we can remove _text_day_color_update...

It is different in the country to define the weekend.
There is no signal matching on the weekend.

Hi!
I am not sure I follow. I get that the definition of the weekend (start and stop) can be different across countries but it eludes me how _text_day_color_update is correctly handling that.
Are we populating day_color in a way that the correct days defining the weekend are marked as DAY_SATURDAY and DAY_SUNDAY?
I am sorry I fail to see how _text_day_color_update is helping in the situation you mentioned. Can you elaborate more on this?

For the missing signal handler in the theme, you are correct. I only added the relativ part in the EDJE in the flat theme. I shall add the same in the default theme.

CHAN added a comment.Jul 9 2020, 5:07 PM

@rafspiny sorry im late.

I think we can remove _text_day_color_update(). i meant im not sure we can remove related APIs such as elm_calendar_text_saturday_color_set/get

https://phab.enlightenment.org/D4148
This patch can be answer for your question.

@CHAN Sorry for the absence. I looked at the code again. I understand you know.
If I am not mistaken, we have no information on when the weekend starts in the Elm_Calendar_Data structure.
Perhaps I could add something like that:

Elm_Calendar_Weekday     first_weekend_day;
int                      weekend_length;

I still need to figure out how I can read the clock configuration about weekends (weekend.start and weekend.len)and use it here.

Anyhow, I believe that until the change on the calendar ejde (https://phab.enlightenment.org/D11875) file is not merged, the calendar widget will still work.