You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DateTime.Widgets.Grid: public void set_focus_to_today () { if (grid_range == null) { return; } Gee.List<GLib.DateTime> dates = grid_range.to_list (); for (int i = 0; i < dates.size; i++) { var date = dates[i]; GridDay? day = data[day_hash (date)]; if (day != null && day.name == "today") { day.grab_focus_force (); return; } } }
Think about it, it looks like that's where the problem is. I haven't checked yet, but it seems that you need to abandon the reference to "name=today", and directly access the desired day (via day_hash), and so that the old day is not lost, write it to a variable.
Perhaps tomorrow in my fork I will fix this error, you can do it by analogy.
The problem turned out to be a little wider than I originally thought. There are two ways to solve it, in my opinion:
the simple way is to reset the carousel when opening the widget. the carousel will be built again and correctly determine the current day
a difficult way (in my opinion, more correct), to determine the current day at the level of the CalendarView (now you have at the level of CalendarGrid's). This will take much more time, unfortunately, I am not ready to transfer my conjectures to the main branch, but you can take this commit as a vector: Dirli/wingpanel-indicator-datetime@93f5a14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #253