Georges Basile Stavracas Neto
df8526f471
event-editor: Cleanup some code
...
Remove the constructed() override, we can do that in init().
2024-01-27 12:40:23 -03:00
Georges Basile Stavracas Neto
b52b27eace
event-editor: Turn into an AdwDialog
2024-01-27 12:38:35 -03:00
Hari Rana
315d47350f
summary-section: Use AdwEntryRow class
2023-12-17 22:33:34 +00:00
Hari Rana
57cb3a7650
alarm-row: Remove GtkBox
...
Uses valign in all buttons, instead of using GtkBox
2023-12-14 00:11:56 +00:00
Georges Basile Stavracas Neto
1043917ecf
event-editor/time-selector: Don't change dropdown on callback
...
The 'update_time' function shouldn't try to update the dropdown,
as it is actually invoked by the dropdown itself. This causes a
cyclic loop with signal emission.
Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1133
2023-12-13 19:41:41 -03:00
Georges Basile Stavracas Neto
3b9bf55dd5
event-editor/time-selector: Properly diff times
...
Helps: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1133
2023-12-13 19:41:41 -03:00
Felipe Kinoshita
fc48929233
gcal-time-selector: Use GtkDropDown
...
GtkComboBoxText is deprecated, let's port it to the recommended Widget.
2023-11-25 11:51:10 -03:00
Georges Basile Stavracas Neto
a944aafa00
gui/date-chooser: Use translated weekday abbreviations
...
It matches what GNOME Shell does, and makes the app more localizable.
Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1122
2023-11-17 13:47:48 -03:00
Daniel García Moreno
adb56d9c29
event-editor: Do not apply section that doesn't changed
...
Fix https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1028
2023-11-12 21:29:07 +01:00
Georges Basile Stavracas Neto
82a6fa364e
event-editor/date-selector: Use portal for week dates
...
Closes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1022
2023-11-07 18:55:05 +00:00
Georges Basile Stavracas Neto
da84b727b3
core/subscriber: Pass old event on update
...
Now that we keep precise control over GcalEvent instances, and
can use simple pointer comparisons everywhere, GcalMonthView
implemented its update function as a simple remove + add pair.
The problem is that we're not passing the old event instance,
so removals never actually happen, since the new instance is
not yet available to subscribers.
Pass old event in additio to the new one, and use it where it
makes sense.
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1073
2023-08-18 10:41:41 -03:00
Hari Rana
d80536c83b
summary-section: Remove find-location button
2023-08-15 18:28:58 -04:00
Hari Rana
3c5a1cf870
notes-section: Disable Tab
2023-08-03 11:26:19 +00:00
Georges Basile Stavracas Neto
a7f0af6e8a
event-editor: Shuffle some code
...
Declaring the entries struct inline saves us a few
lines of code.
2023-08-02 11:03:50 -03:00
Hari Rana
21bfed06e9
schedule-section: Show date when selecting the same day next week
2023-08-02 12:38:53 +00:00
Hari Rana
be337bfe70
event-editor-dialog: Various keyboard improvements
...
- Add Esc as shortcut to close window
- Add mnemonics for Cancel and Done buttons
2023-07-23 14:14:33 +00:00
Christopher Davis
ec54dc0ba7
event-editor-dialog: Port to AdwToolbarView
...
All windows in an app should be using AdwToolbarView.
2023-06-18 22:44:40 -04:00
Christopher Davis
0c2b8261c2
event-editor-dialog: Use AdwWindow instead of GtkDialog
...
GtkDialog is being deprecated. Instead of using it,
we want to subclass AdwWindow. As part of this change
the content and headerbar are put together in one box.
2023-06-18 22:44:40 -04:00
Titouan Real
cf1d70e6c7
Add condition to reset
2023-05-31 12:25:36 +00:00
Cyber Phantom
e2e7305971
gcal-schedule-section: Port "Repeat" to AdwComboRow
...
GtkComboBox is going to be deprecated in GTK 4.10.
This commit updates the "Repeat" rows in new schedule window to use AdwComboRow.
2023-04-22 10:14:22 +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
40fa82deab
event-editor/dialog: Check if calendars changed too
...
In addition to checking if any event fields changed, check if the
caledar changed too.
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/924
2023-02-06 22:48:40 +00:00
Jean-François Fortin Tam
aa333722af
Set a better default size (height and width) for the event editor dialog
...
These are still hardcoded instead of measuring the available space,
but it's better than nothing in the meantime.
Decent WMs size the window correctly if width/height exceed the screen.
Also, allow the Notes field to expand vertically, to fill the space.
Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/602
2023-01-02 16:24:44 -05:00
Milan Crha
21e5396bf5
event-editor: Fix possible use-after-free of recurrence until date
...
The GcalDateSelector returns an internal instance, while the 'until' date/time
is meant to be an own instance, which is freed by the GcalRecurrence instance
in its free function. That means the 'until' date/time is supposed to be reffed
when being assigned into the GcalRecurrence structure.
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/892
2022-10-31 12:25:11 +00:00
Georges Basile Stavracas Neto
502b381975
event-editor/dialog: Properly handle editing recurrent events
...
When a recurrent event is edited, we now are able to only offer the
MOD_ALL option when it actually will work. However, we're still left
with the problem that we end up applying the instance-specific data
onto the main event, through an old hack.
The views already aren't able to offer the MOD_ALL property, since
they all change the dates of events, but GcalEventEditorDialog can,
and it must handle that properly.
For now, do the simplest possible approach, which is: retrive the
template event and apply all properties that can be applied to it,
without letting the start and end days leak into it. We already only
allow passing MOD_ALL on situations where the dates aren't really
modified, so it should be safe.
Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/882
2022-10-17 23:37:13 -03:00
Georges Basile Stavracas Neto
102346534a
event-editor/dialog: Improve detection of MOD_ALL exclusion cases
2022-10-17 23:37:13 -03:00
Georges Basile Stavracas Neto
679a392b71
event-editor/dialog: Don't hide dialog on cancelling operation
...
If the user clicks the "Cancel" button, it obviously means "cancel",
so let's cancel.
2022-10-17 23:37:13 -03:00
Georges Basile Stavracas Neto
23dedc0fc8
event-editor/schedule: Trivial autoptr cleanup
2022-10-17 23:37:13 -03:00
Georges Basile Stavracas Neto
185490e272
event-editor/dialog: Don't ask mod type if event wasn't recurrent
2022-10-17 23:37:13 -03:00
Georges Basile Stavracas Neto
966411843a
event-editor/dialog: Don't show MOD_ALL if schedule changed
...
We get into seriously tricky situations if we try and change the
date & time of an event with recurrency, and pass MOD_ALL. That's
because it is ambioguous *where* the change must be applied.
Don't allow selecting MOD_ALL when the scheduling of the recurrent
event changes.
Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/882
2022-10-17 23:37:13 -03:00
Georges Basile Stavracas Neto
df5b9e7821
event-editor/dialog: Don't apply changes if nothing changed
...
This saves some cycles by not doing anything when nothing needs to
be done.
2022-10-17 23:37:13 -03:00
Georges Basile Stavracas Neto
82d8ec31ca
event-editor/sections: Add vfunc to check for changes
...
This will be useful for next commits where we will need to check
if the schedule section actually changed something.
2022-10-17 23:37:13 -03:00
Georges Basile Stavracas Neto
dbd2f0df58
event-editor/dialog: Don't apply changes to readonly events
...
In practice this never does anything relevant, because widgets are
insensitive, but it's better not to nonetheless.
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
Milan Crha
5e72aa53f2
gcal-event-editor-dialog: Use user-chosen mode in on_ask_recurrence_response_save_cb()
...
...to do what the user asked for.
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/871
2022-10-05 15:39:57 +00:00
Milan Crha
15ce841a6c
gcal-date-chooser: Update also combined_choice in set_date()
...
Thus it's in sync with the rest of the date chooser.
Also use a common function to replace `self->date` value.
Related to https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/868
2022-10-05 15:10:47 +00:00
Florian Müllner
80d803d125
date-chooser: Update combined-choice on date changes
...
Otherwise the header will not reflect the active date.
https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/876
2022-10-05 14:59:22 +00:00
Christopher Davis
905128cc69
event-editor: Use AdwEntryRow
2022-07-07 12:53:22 -04:00
Adrien Plazas
051212f44b
multi-choice: Fix the indentation
...
It was left purposefully broken in the previous commit.
2022-06-16 08:23:45 -03:00
Adrien Plazas
b031c9591a
multi-choice: Add the popover property
...
This allows a multi choice's label to be clicked to reveal a popover. It
is needed by the date chooser, to have a combined month and year choice
that can be split in two via a popover.
This leaves the indendation purposefully broken to ease reviewing the
actual changes.
2022-06-16 08:23:45 -03:00
Adrien Plazas
78931df46c
date-chooser: Add the split-month-year property
...
This allows unifying the month and year selectors into a single month
and year selector by setting it to false.
2022-06-16 08:23:44 -03:00
Adrien Plazas
db0f07136c
date-chooser: Implement GcalView
...
This also replace the date property by the overridden active-date one
ans adds the context property.
2022-06-16 08:22:45 -03:00
Adrien Plazas
6cb57b0ad5
date-chooser: Add the show-events property
...
This allows showing events from the timeline via a dot.
2022-06-16 08:19:49 -03:00
Adrien Plazas
b5d8575445
date-chooser: Implement GcalTimelineSubscriber
...
This allows the date chooser to receive events from the timeline, and
will allow it to show them via a dot.
2022-06-16 08:19:47 -03:00
Adrien Plazas
9911386706
date-chooser: Add the show-selected-week property
...
If enabled, the selected week will be made visible.
2022-06-16 08:16:04 -03:00
Adrien Plazas
7b5a934250
date-chooser: Use ROWS and COLS macros
...
This makes the code easier to read and update.
2022-06-16 08:16:04 -03:00
Adrien Plazas
54e0a5784c
date-chooser-day: Add .non-workday class to the current day
...
This will help making the non worked days let prominent.
2022-06-16 08:15:51 -03:00
Adrien Plazas
21895416f3
date-chooser-day: Add the .today style class to the current day
...
This will help making the current day pop out a bit.
2022-06-16 08:14:54 -03:00
Adrien Plazas
d76617f809
date-chooser-day: Automatically free the string
2022-06-16 09:29:16 +02:00
Adrien Plazas
7198ce41f9
date-chooser-day: Add the has-dot and dot-visible properties
...
This allows the days to display events.
2022-06-16 09:29:16 +02:00