Commit Graph
742 Commits
Author SHA1 Message Date
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
Christopher Davis 832b9132a2 window, calendar-button: Make text buttons shrinkable
Lets buttons shrink to fit the size they're given. This
is important for text buttons so they don't cause our
content to overflow our window.
2023-06-17 20:18:07 +00:00
Christopher Davis 34bf2f8e50 window: Use AdwNavigationSplitView and AdwBreakpoint
Replaces our leaflet with the new AdwNavigationSplitView
widget and AdwBreakpoint.
2023-06-17 20:18:07 +00:00
Christopher Davis 5b528032db window, toolbar-end: ToolbarEnd Fixes
* Use the sidebar's search entry for search shortcut when folded
* Set context on the sidebar's search entry
* Drop context GtkExpression from gcal-toolbar-end.ui
2023-06-17 20:18:07 +00:00
Hari Rana ef88f27b4e calendars-page: Restrain borders of listbox
This restrains borders of the "Add Calendar…" row to its hitbox, making
it draw the borders accurately when increasing the size of the window.
2023-06-17 09:21:18 -04:00
Hari Rana 0a061fe6d1 new-calendar: Port to AdwEntryRow 2023-06-10 12:49:40 -04:00
Titouan Real cf1d70e6c7 Add condition to reset 2023-05-31 12:25:36 +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 bd042ba4e8 calendar-button: Workaround listbox style
Use the 'modelbutton' CSS name to mimic the style of model buttons.

Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/849
2023-05-23 19:14:42 -03:00
Georges Basile Stavracas Neto 3c672e0784 Move sync indicator into a separate widget
And move the new widget into the headerbar itself, instead of
the calendars button.
2023-05-23 19:01:19 -03:00
Shubh-1-am f6b5586191 gcal-event-popover: Fix for wrapping title text in event popover summary
Previously, the event title header text in the details popover was being ellipsized(truncated) instead of wrapping, making it difficult to read longer titles.
This commit updates the gcal-event-popover.ui file to set the "wrap" and "wrap-mode" properties to "true" and "word-char", respectively, for the summary label object.
This ensures that the event title header text is wrapped and more readable in the summary popover.

Fixes #1016.
2023-05-23 21:26:41 +00:00
Georges Basile Stavracas Neto b5c9d5b73f window: Use AdwToolbarView to look prettier
We're fashion now.
2023-05-23 17:01:54 -03:00
Georges Basile Stavracas Neto db38ae0012 event-popover: Remove leftover debug code 2023-05-11 17:25:20 -03:00
Georges Basile Stavracas Neto 8170ee0455 search: Remove artificial limits
Now that we use a widget that appropriately handles infinite items,
we don't need to limit anything anymore.

Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/624
2023-04-22 10:22:57 +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
Georges Basile Stavracas Neto 5d9d0dec7c event-popover: Set better default focus widget
When mapped, move focus to either the first meeting row - if any - or
to the edit button.

Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/980
2023-03-17 23:54:46 -03:00
Georges Basile Stavracas Neto 6df87fb5c1 meeting-row: Implement grab_focus()
We'll use this in the next commit to properly grab focus of the
first meeting row, if any.
2023-03-17 23:54:01 -03:00
Georges Basile Stavracas Neto 5e1ffbcbf6 meeting-row: Remove leftover layout code
It's not necessary anymore.
2023-03-17 23:52:06 -03:00
Georges Basile Stavracas Neto 430e429551 event-popover: Set default widget
Helps: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/980
2023-03-17 23:46:41 -03:00
Georges Basile Stavracas Neto 1700902a63 meeting-row: Make row unfocusable
But child widgets are. That is, the Join button.

Helps: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/980
2023-03-17 23:45:53 -03:00
Georges Basile Stavracas Neto f04c4fb119 event-popover: Update to GtkUriLauncher
And bump the GTK dependency to 4.10
2023-03-16 17:28:17 -03:00
Georges Basile Stavracas Neto ac526c5a22 calendar-management: Switch to GtkColorDialogButton 2023-03-16 12:30:15 +00:00
Georges Basile Stavracas Neto 4df39fa2ce calendar-manager/new: Switch to GtkFileDialog
Cleans up a few more compiler warnings.
2023-03-16 12:30:15 +00:00
Georges Basile Stavracas Neto 501347f797 views/month: Cleanup math
The Month view is a complicated beast when it comes to allocating
events, but it's unnecessarily complicated since it tries to take
margins of events into accounts. With GTK4, that's not necessary
anymore, as GTK4 will independently and correctly apply margins
in widgets by itself, we don't have to do manually anymore.

Clean that up.
2023-03-16 12:30:15 +00:00
Georges Basile Stavracas Neto 21412ea3ba search-button: Port results to GtkListView
Port the search results list to GtkListview. Use bindings to set
the title, icon, and subtitle of each row. Remove GcalSearchHitRow
as it's unused now.
2023-03-16 09:28:30 -03:00
Georges Basile Stavracas Neto dbfc1c030a search-button: Cleanup unused shortcut controller 2023-03-16 09:28:30 -03:00
Georges Basile Stavracas Neto 89d9a96c6f search-button: React to 'stop-search' signal
Quit the search entry state when the search entry emits stop-search,
usually that's when Escape is pressed when the search entry is
focused.

Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/830
2023-03-16 09:28:30 -03:00
Georges Basile Stavracas Neto b4f11ce052 search-button: Don't do anything when popover closes
It's, at best, annoying. Also stop resetting the entry text when
hiding suggestions, as it may loop with the text changed callback.
2023-03-16 09:28:30 -03:00
Georges Basile Stavracas Neto 4b15e7647c search-button: Use 'search-changed' signal
It uses a 150ms delay, which helps with reducing the number of
queries we do.
2023-03-16 09:28:30 -03:00
Georges Basile Stavracas Neto 485a6cf5a7 search-button: Instrument some functions 2023-03-16 09:28:30 -03:00
Georges Basile Stavracas Neto bd97430bf3 search-button: Use GtkSearchEntry
Allows us to cleanup style a bit. Next commits will use search entry
functionality better.
2023-03-16 09:28:30 -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
Georges Basile Stavracas Neto 0650c89ee2 views/week: Cleanup unused struct field
We don't use 'scroll_scale' anymore
2023-03-16 12:26:28 +00:00
Georges Basile Stavracas Neto e1616039d6 views/week: Special case discrete events
They behave slightly differently from smooth scroll events, and
they don't emit 'scroll-begin' nor 'scroll-end', so we have to
execute that the callbacks of these signals do inside the scroll
callback itself.
2023-03-16 12:26:28 +00:00
Georges Basile Stavracas Neto a55bf69dfb views/week: Don't swap callback arguments
No function changes
2023-03-16 12:26:28 +00:00
Georges Basile Stavracas Neto 189c809271 views/week: Store and restore zoom level
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/916
2023-03-16 12:26:28 +00:00
Georges Basile Stavracas Neto a9e4a5ae12 views/week: Connect to 'scroll-begin'
The scroll-begin callback is being connected to the 'scroll' signal.
This is an obvious oversight.

Connect to the right signal.
2023-03-16 12:26:28 +00:00
Georges Basile Stavracas Neto 8d92808992 views/week: Operate on zoom levels
Instead of freely using heights and pixel sizes, operate on zoom
levels.
2023-03-16 12:26:28 +00:00
Georges Basile Stavracas Neto b93aa0dd23 calendar-button: Stop spinning when not synchronizing
GtkSpinner queues relayouts even when the stack is not displaying
it, and this causes excessive redrawing. This button design looks
obsolete and should eventually be reworked, but for now, let's
just stop spinning when the spinner is invisible.

Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/971
2023-03-16 12:25:15 +00:00
Georges Basile Stavracas Neto 9ea2ceef1a gui: Fix search from Shell overview 2023-03-05 11:53:50 -03:00
Georges Basile Stavracas Neto d6a216d0fa gui: Propagate context to GcalSearchButton
The people who introduced this code were not careful enough to
make sure the code they removed from GcalWindow was added back
in GcalToolbarEnd.

They also simply commented out some code instead of properly
reimplementing that.

I regret having trusted their code :(

Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/880
2023-03-05 11:41:35 -03:00
Georges Basile Stavracas Neto 0e8332b07b calendar-management/new: Switch to a GtkDialog
The implementation of the credentials popover has relied on a hack,
and sadly this hack doesn't work anymore.

It's too late for a redesign, so for now, just put it into a dialog
and show it on top of the calendar management dialog.
2023-03-03 19:50:30 -03:00
Georges Basile Stavracas Neto 4f9d7de032 calendar-management/new: Dispose template 2023-03-03 19:50:30 -03: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 69728fc814 views/agenda: Properly activate events
The code that activates event is just a sad FIXME in the file, and
the implementation is simple enough.

Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/897
2023-03-02 21:49:27 -03:00
Georges Basile Stavracas Neto e13eb17816 views/agenda: Cleanup unused Week View (!!!)
This is to show how much I suck at reviewing code. Look at this
massive gold nugget of garbage. Nobody on their serious mind would
have let that pass code review.

But I did. And now I deserve the punishment to deal with this.

Of course, the author didn't seem to have spared more than a fraction
of a second of their brain power to even consider what they were
doing here. But that's what code review is for - preventing garbage
like this from landing. And yet, here we are, removing an invisible
Week view from the sidebar.
2023-03-02 21:49:27 -03:00
Georges Basile Stavracas Neto bd9ff41a37 views/month-view: Use new signal helpers 2023-03-02 21:49:27 -03:00
Georges Basile Stavracas Neto bedf4e610d views/week-grid: Use new signal helpers 2023-03-02 21:49:27 -03:00
Georges Basile Stavracas Neto c80c06c86e views/week-view: Use new signal helpers 2023-03-02 21:49:27 -03:00