Commit Graph
42 Commits
Author SHA1 Message Date
Federico Mena Quintero 42b00ec052 Fix cut&paste error
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/550>
2025-08-27 19:59:16 -03:00
Federico Mena Quintero 72762ee11d GcalEventWidget: remove the date-end property; it is unused
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/550>
2025-08-27 19:59:16 -03:00
Federico Mena Quintero 7a814cc1f3 Move explanatory comment
Analogous to date-start

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/550>
2025-08-27 19:59:16 -03:00
Federico Mena Quintero 6e10e746c3 GCalEventWidget: remove the date-start property; it is never used
Setting and getting the value always happens through
gcal_event_widget_set_date_start() and gcal_event_widget_get_date_start().

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/550>
2025-08-27 19:59:16 -03:00
Federico Mena Quintero 2f86a7a77b Move explanatory comment
We'll remove the date-start property, so put its description in the
corresponding setter function.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/550>
2025-08-27 19:59:15 -03:00
Daniele Ziaco 1f86255e33 gcal-event-widget: Update labels when time-format changes
When the time format changes in Settings,
events in the week/month views did not update at runtime.

This connects the appropriate signal so the widget updates immediately.

Fixes #1373

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/625>
2025-08-20 23:29:44 +00: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
Hari Rana 6ab0ef7386 gui/event-widget: Set child depending on the orientation
Commit https://gitlab.gnome.org/GNOME/gnome-calendar/-/commit/73abcf19b0e70fb6fdd45394169b00e21ea0734a
introduced a bug where it uses the wrong widget on
vertical orientation.

This patch fixes that bug by using the correct widget
for their respective orientation. It also removes the use of
AdwClamp, as it was clamping labels above a certain height requested.

Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1414

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/607>
2025-06-30 15:00:59 -04:00
Hari Rana 73abcf19b0 gui/event-widget: Use AdwClamp
AdwSqueezer is deprecated.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/587>
2025-06-28 14:01:11 -04:00
Hari Rana e8249e9e43 gui/event-widget: Update pressed state
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/587>
2025-06-28 14:01:08 -04:00
Hari Rana 73e1baad04 gui/event-widget: Set accessible role as toggle button
Since it's a toggleable button with a popup, it makes more sense
to set its accessible role as GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/587>
2025-06-28 13:49:08 -04:00
Hari Rana ff17056108 gui/event-widget: Use GtkBoxLayout
The GTK inspector would always target and inspect the `main_widget`
box rather than the parent widget, which became repetitive to keep
pressing the "Parent widget" button when working with accessibility,
as the parent widget contained the accessible properties and states.
GtkBoxLayout solves that by allowing us to get rid of the box
completely, which exclusively makes it inspect the widget we
actually want to target.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/587>
2025-06-28 13:48:59 -04:00
Federico Mena Quintero b03eabb7b7 gui/event-widget: Mark a variable as unused
The actual parsed guri is unused here; the code just does the parsing
as a way to tell whether the event's location refers to a URI/service
or not (e.g. a physical location or address).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/581>
2025-05-28 18:08:54 +00:00
Hari Rana a3fb57939a gui/event-widget: Implement button features
This implements button functionality to make it able to focus
and activate it. This also sets the appropriate accessibility
role and labels/descriptions.

Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1036
2025-04-30 21:23:44 -03:00
Georges Basile Stavracas Neto 1fbcc79313 gui/event: Add some assertions 2025-03-19 12:22:28 -03:00
Georges Basile Stavracas Neto 44e12da104 gui/event: Initialize autoptr variables
A good practice in general.
2025-03-19 12:21:13 -03:00
Georges Basile Stavracas Neto de342e5606 gui/event-widget: Properly handle read-only events
Handle it internally, as it should be.
2025-03-11 17:52:14 -03:00
Brage Fuglseth 9007534114 i18n: Fix date format explanations for translators
The comments explaining date formatting to translators have a couple of typos related to the day name variables (%A and %a).

This commit fixes them.

Closes #1377
2025-03-01 13:30:45 +00:00
Titouan Real 0097ab9794 Mark date formats as translatable
Fix #1204
2025-02-06 16:49:10 +01:00
Georges Basile Stavracas Neto 75a42c7d83 event-widget: Truncate the correct string
I shouldn't write code in a hurry
2024-07-09 17:40:01 -03:00
Georges Basile Stavracas Neto 06bf58d5fa event-widget: Don't modify translated strings 2024-07-09 17:35:48 -03:00
Otávio Silva 7cebd2bf95 event-widget: Use "On..." in tooltip when location is a meeting service
In the tooltip, the event location always has the preposition "At ...".
This changes it to "On ..." when the location is a known meeting
service.
2024-07-09 16:26:29 -03:00
Otávio Silva f3359d0246 event-widget: Display meeting service name in event tooltip
In case the location is an URL, it is irrelevant to display the full
link,
as it is not clickable. So, this shows the meeting service provider if
it
is known or reduces the text in the tooltip, preventing it from covering
other information in the calendar.

Closes: #1232
2024-07-09 16:26:00 -03:00
Georges Basile Stavracas Neto ac8c7d6c4f gui/event-widget: Set weak ref on preview popover
So that when it's destroyed, the internal ref becomes NULL and we then
can safely call g_clear_pointer() on it.

Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1154
2024-02-18 17:25:42 -03:00
Georges Basile Stavracas Neto 1fbd5e0621 event-widget: Use GtkInscription for summary text
It's slightly more performant than a GtkLabel, which is demonstrably
the widget dominating the perf profile of the app.

Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1125
2023-12-17 22:32:18 +00:00
Georges Basile Stavracas Neto 38108ffa7a event-widget: Fetch 24h setting from context
Instead of using the auxiliary function.
2023-09-23 02:39:07 -03:00
Georges Basile Stavracas Neto 77c908b394 event-widget: Properly unparent preview popover
GcalEventWidget currently doesn't track the preview popover, and
that can easily crash Calendar upon destruction.

Track that, and unparent on dispose.

Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/986
2023-09-14 12:09:11 -03:00
Georges Basile Stavracas Neto 1bb834e110 event-widget: Properly dispose template children 2022-10-17 23:37:13 -03:00
Adrien Plazas bed7f9e027 event-widget: Use .dim-label instead of a hard-coded opacity
This uses the standard opacity for events of lower importance and
ensures the opacity difference is lower in HighContrast, helping
accessibility.
2022-06-23 16:51:56 +00:00
Adrien Plazas b68f7a0083 event-widget: Style overhaul
This reworks the style of the event widgets to make them match the
latest designs. This also supports the light and dark theme preferences
and fixes some spacing inconsistencies and errors.
- The orientation of events only affects how their content is laid out,
  not their style.
- Events are fully colored accordingly to their calendar's color.
- Timed events have a semi-transparent background and a kind of opaque
  knob on their left.
- Timed events have their text colored according to the theme.
- Lasting events are fully opaque, with no knob.
- Lasting events have their text colored according to their calendar's
  color.

This purposefully leaves the indentation broken to help reviewing the
changes.
2022-06-22 12:49:38 +00:00
Adrien Plazas cb439095a5 event-widget: Add the timestamp-policy property
This gives some control on what time is displayed on the widget. It will
be used to show the time of the end of an event in the agenda view.
2022-06-16 08:23:45 -03:00
Adrien Plazas 0d27b08803 event-widget: Set the squeezer's margin via CSS
This ensure the style is consistent and updates itself automatically as
the CSS classes change, and also makes the code simpler.
2022-06-16 08:23:45 -03:00
Adrien Plazas 2baa96d29f event-widget: Properly overflow
This explicitely allows the hour widget and the content as a whole to
overflow horizontally, and hides what overflows, keeping the data within
the boundaries of the widget while still allowing it to reach very
narrow sizes without error messages.

This purposefully leaves the indentation broken to help reviewing the
actual changes.
2022-06-15 11:34:03 -03:00
Adrien Plazas 6b649b8ef7 event-widget: Use a vertical AdwSqueezer
This replaces the GtkStack and some custom code by a AdwSqueezer and way
less custom code to achieve the same result, making the code simpler.
2022-06-15 11:25:19 -03:00
Adrien Plazas aecfebcc9d Use gtk_widget_add/remove_css_class() where possible
This makes the code simpler and more idiomatic to GTK 4.
2022-05-10 13:01:25 +02:00
Georges Basile Stavracas Neto 132d4435f6 event-widget: Port to GTK4 2022-02-11 09:18:42 -03:00
Georges Basile Stavracas Neto 68160348dc Introduce GcalEventPopover
GcalEventPopover gives a preview of the event, and handy access
to the event description and information. It also allows easily
joining meetings if any one if available.

The list of supported meeting URLs is small now, but I hope
more people will contribute as we go.

It is also possible to edit the event through an edit button.
2021-06-27 18:45:12 -03:00
Georges Basile Stavracas Neto f052cb6589 event-widget: Remove idle on destroy
Finalize may be too late for us, since a widget
may be destroyed long before it's finalized.

Remove the idle timer on destroy then.
2020-04-01 21:06:51 -03:00
Georges Basile Stavracas Neto b772349c3f Move UI files to src/
Keep it in sync with what To Do and Settings do.
2019-12-02 16:41:56 -03:00
Michael Catanzaro 18ae67cb59 Use more g_signal_connect_object()
Most of these are probably paranoid, not bugs. I haven't done an
exhaustive review to see what really needs it: that would be
time-consuming and require significant familiarity with the Calendar
codebase. This was just a quick check. Anyway, I vote for paranoid
when it comes to using g_signal_connect() regardless. It's dangerous,
and there's no reason to ever leave a signal connected after the user
data object has been destroyed.

Fixes #423
2019-09-14 23:28:42 +00:00
Milan Crha a0cae4356a Port to libecal-2.0
Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/merge_requests/70
2019-05-17 21:58:55 +02:00
Georges Basile Stavracas Neto f55b4531ef project: Move ui-related classes to gui/ 2019-05-04 12:14:05 -03:00