Georges Basile Stavracas Neto
c0127fa2af
views/week-header: Reuse event widgets using the new pool
...
Same deal as the Month view.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/758 >
2026-05-19 22:20:10 +00:00
Georges Basile Stavracas Neto
16a67b7f60
views/week-header: Use gdkarrayimpl.c as backing store
...
Same deal. It's faster.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/757 >
2026-05-03 15:30:20 -03:00
Georges Basile Stavracas Neto
34e28e31fe
views/week: Port week header to GListModel
...
Rework the add/remove functions to make them internal. The remove
function can now operate on GcalEvent* instead of gchar* uuid,
since it's not bound to GcalTimelineSubscriber anymore.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/742 >
2026-05-03 16:57:52 +00:00
Georges Basile Stavracas Neto
c635db3495
views/week: Port to GPtrArray
...
GLists are an artifact of times immemorial and we should
avoid using them as much as possible. In this commit, for
example, there were a couple of accidentally quadratic
pieces of code.
Port (mostly of) the week view header to GPtrArray.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/742 >
2026-05-03 16:57:51 +00:00
Hari Rana
037ffd3700
gui/event-widget: Replace "context" property with context getter method
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:30:02 +00:00
Hari Rana
d9f02cee20
views/week-view: Replace "context" property with context getter method
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/702 >
2026-03-23 19:29:59 +00:00
Hari Rana
50e048c7e0
utils: Turn number of weekdays into a macro
...
While "7" may be obvious in the context of calendaring that
it represents the number of week days, it often gives me the
impression of it being a magic number when I'm hyperfocused on certain
parts of the codebase for several consecutive hours. Turning the
number into a macro helps me scan functions much more easily.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/674 >
2026-03-08 21:53:40 -04:00
Adrien Plazas
9c1a7fecfc
week-header: Fix end of week comparison
...
This fixes comparison of an event to the end of the week, so "end" can't
incorrectly be 7 anymore.
Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/835
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/672 >
2025-12-03 20:50:15 +01:00
Philipp Sauberzweig
fc90d259b2
gui/views: Fix event margins in week header
...
Margins are already applied to the event widget itself through CSS.
This commit removes unnecessary margins and row spacing to bring
it in line with the month view.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/649 >
2025-10-17 12:27:03 -04:00
Hari Rana
be0ba51481
gui: Replace dim-label with dimmed style class
...
`dim-label` is deprecated.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/624 >
2025-08-18 18:37:25 -04:00
Federico Mena Quintero
e56ce53ea5
gui/views/week-header: Remove superfluous assignment
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/581 >
2025-05-28 18:08:54 +00:00
Federico Mena Quintero
81c8900076
gui/views/week-header: Remove unused variable
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/581 >
2025-05-28 18:08:54 +00:00
Federico Mena Quintero
bc53f169eb
gui/views/week-header: Remove unused variable
...
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/581 >
2025-05-28 18:08:54 +00:00
Hari Rana
6cd138974f
views/week-header: Port to gtk_widget_compute_point
...
`gtk_widget_translate_coordinates` is deprecated.
2025-05-21 01:21:38 -03:00
Georges Basile Stavracas Neto
340081d431
views/week: Remove shared size group
2025-04-04 21:00:30 -03:00
Georges Basile Stavracas Neto
9048fe939f
views/week: Move expand header button to week view
2025-04-04 21:00:30 -03:00
Georges Basile Stavracas Neto
c0dfe588ae
views/week: Add 'can-expand' property
2025-04-04 21:00:29 -03:00
Georges Basile Stavracas Neto
f653dcd9e6
views/week: Add 'expanded' property
2025-04-04 21:00:29 -03:00
Georges Basile Stavracas Neto
a07d80cccf
views/week: Extract headers into GcalWeekView
...
Instead of handling them in GcalWeekHeader
2025-04-04 21:00:29 -03:00
Georges Basile Stavracas Neto
65f793b59e
views/week: Use widget for DnD
2025-04-04 21:00:29 -03:00
Georges Basile Stavracas Neto
f4ef9a29c3
views/week: Use anonymous struct for DnD
2025-04-04 21:00:29 -03:00
Georges Basile Stavracas Neto
cbfada052d
views/week: Use widget to draw selection
...
Same as week grid.
2025-04-04 21:00:29 -03:00
Georges Basile Stavracas Neto
e94600668c
weeks/view: Add anonymous struct for selection
...
Same as the grid view.
2025-04-04 21:00:29 -03:00
Georges Basile Stavracas Neto
ea23581cf5
views/week: Use g_autoptr more
...
And remove an unused variable.
2025-04-04 21:00:29 -03:00
Georges Basile Stavracas Neto
82fa42ec9e
views/week: Replace chain up by manual snapshotting
...
Should make it easier to spot mistakes in the future.
2025-04-04 21:00:29 -03:00
Georges Basile Stavracas Neto
fb52dae400
views/week: Turn GcalWeekHeader into a GtkWidget
...
No functional changes so far.
2025-04-04 21:00:29 -03:00
Georges Basile Stavracas Neto
f9ad1c2e7e
views/week: Cleanup line rendering code
...
Remove copied style context calls, pass less arguments.
2025-03-19 19:23:58 -03:00
Austin Pringle
11db394643
gcal-week-header: Change week header capitalization on week number heading.
2024-10-22 11:48:15 +00:00
Felipe Kinoshita
be73ecf175
gcal-week-header: Stop using gtk_widget_get_allocation
...
gtk_widget_get_allocation is deprecated, let's use
gtk_widget_get_width/gtk_widget_get_height instead.
2023-12-05 21:09:23 +00:00
Georges Basile Stavracas Neto
c8543aa822
views/week/header: Use en dash
...
Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1107
2023-09-22 11:47:47 -03:00
Georges Basile Stavracas Neto
d5a36d4ad2
view: Operate on ranges
...
This is the data struct we should be using everywhere now.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
b9d4405e69
views/week-header: Check for NULL child
...
I'm not sure if this is actually correct, but I'm too tired to
think the week header through, so let's just be slightly more
protective for now.
2023-08-11 15:13:44 -03:00
Christopher Davis
3f366ad19c
week-header: Ellipsize "Other %d events" label
...
This label can be too wide for our view.
2023-06-17 20:18:07 +00:00
Felipe Kinoshita
72eb199f84
general: Stop using get_allocated_width/height
...
gtk_widget_get_allocated_width and gtk_widget_get_allocated_height are
deprecated, let's use the recommended functions.
2023-05-30 05:13:34 -03:00
Georges Basile Stavracas Neto
f751803e07
views/week-header: Use minute granurality
...
We end up losing minutes information when running through this code
path. Technically it's fine, because we copy the minutes from the
event, but it's better nonetheless to operate on the level of
granularity that Calendar supports.
2023-03-16 12:27:09 +00:00
Georges Basile Stavracas Neto
8b9af9241e
views/week-header: Don't change all day state
...
I don't know what I had in mind when I wrote this, since 2017 self
did not bother adding a proper commit message, but 2023 me is pretty
convinced we never want to change the event length when dragging it
around.
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/896
2023-03-16 12:27:09 +00:00
Felipe Kinoshita
2805b414f8
general: Use gtk_widget_set_visible
...
A lot of places were using gtk_widget_show/gtk_widget_hide, but those
methods are deprecated since Gtk 4.10.
Let's use gtk_widget_set_visible instead.
2023-03-03 19:14:09 -03:00
Georges Basile Stavracas Neto
1359465c62
views/week-header: Use new signal helpers
2023-03-02 21:49:27 -03:00
Georges Basile Stavracas Neto
5a028471e9
views/week-header: Cosmetics
2023-03-02 21:25:02 -03:00
Georges Basile Stavracas Neto
5329c2297b
views: Don't show MOD_ALL
...
The only field that views may change using DnD is the start date
field (and, consequently, the end date), and that's exactly what
we must not show the MOD_ALL option for.
Don't show it.
Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/882
2022-10-17 23:37:13 -03:00
Georges Basile Stavracas Neto
6a5c0229b9
utils: Add boolean flag for showing MOD_ALL
...
This will be used by next commit to more finely control editing
of recurrent events.
2022-10-17 23:37:13 -03:00
Christopher Davis
c974500186
week-header: Don't dim selected labels
...
The contrast of .dim-label and .accent isn't optimal.
To preserve proper contrast of selected weeks,
remove .dim-label while .accent is applied.
2022-02-15 17:12:21 -08:00
Georges Basile Stavracas Neto
ee5acbd493
Reimplement event drag n' drop
...
Reintroduce the code using GTK4 tooling for in-process DnD.
This is looking much better!
2022-02-12 13:08:50 -03:00
Georges Basile Stavracas Neto
b31b16da17
week-view: Port to GTK4
2022-02-12 13:08:50 -03:00
Georges Basile Stavracas Neto
a146b9050d
project: Silence CI warnings
2020-10-31 16:55:06 -03:00
Georges Basile Stavracas Neto
e67ebcfc50
project: Move all UI-related files to src/gui/
...
So we can have a nice separation.
2020-10-30 14:44:33 -03:00