Georges Basile Stavracas Neto
a527bbe5dc
views: Sketch out new month view
...
Nothing really works here, this is very WIP. It doesn't even show
events. Let's build from here.
2023-08-11 15:13:44 -03:00
Georges Basile Stavracas Neto
e47ee2dc17
views/week: Simplify variable with g_autoptr
2023-08-02 11:04:25 -03:00
Georges Basile Stavracas Neto
07dd7780ad
view: Cosmetics
2023-08-02 11:04:12 -03:00
Christopher Davis
3ee8a3ae82
week-header: Ellipsize month
2023-06-17 20:18:07 +00: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
b5c9d5b73f
window: Use AdwToolbarView to look prettier
...
We're fashion now.
2023-05-23 17:01:54 -03: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
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
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
Georges Basile Stavracas Neto
1359465c62
views/week-header: Use new signal helpers
2023-03-02 21:49:27 -03:00
Georges Basile Stavracas Neto
cdb80cfd3a
views/view: Cosmetics
2023-03-02 21:49:27 -03:00
Georges Basile Stavracas Neto
5d5709122f
views/view: Add private signal helpers
...
They'll be useful to stop hijacking view signals.
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
a77f6e39e4
views/view: Store signal id
...
This will be used by next commits
2023-03-02 21:14:02 -03:00
Yosef Or Boczko
cb21ded772
gcal-agenda-view: Mark a string to be translatable
...
Signed-off-by: Yosef Or Boczko <yoseforb@gmail.com >
2023-01-05 11:44:39 +00: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
Yosef Or Boczko
17bb795846
gcal-week-grid: Fix wrong x postion for events in RTL
...
Every event in RTL languages is drawn in the
wrong place. As a result the week view is totally unusable.
Fix this.
#817
Signed-off-by: Yosef Or Boczko <yoseforb@gmail.com >
2022-10-12 20:35:52 +03:00
Milan Crha
11a34a1d28
Misc: Fix GObject property types for GLabel::xalign/yalign properties
...
When running under valgrind, it claims that there's used uninitialized
memory, which is set as GObject property in the code. It's for
GtkLabel::xalign. The problem was that the value in the code is
an integer, but the property itself expects float type. This fixes
the place and where a floating point is already used it annotates
the value to be float, not a double.
2022-10-06 13:36:10 +02:00
Milan Crha
df3587752d
gcal-month-view: Use gcal_view_set_date() to update date on scroll
...
This way the content of the view is updated properly, otherwise only
internal GDateTime structure had been updated, but not the view itself.
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/868
2022-10-05 15:10:47 +00:00
Georges Basile Stavracas Neto
fb1ca515e9
agenda-view: Fix translatable strings
2022-09-15 12:30:13 -03:00
Adrien Plazas
6b39f7552b
week-view: Allow zooming with Ctrl+Scroll
...
So it's possible to zoom even if the device doesn't support pinching to
do so.
2022-06-23 19:29:17 +02:00
Adrien Plazas
7b19a0fca7
week-view: Split zooming into dedicating functions
...
This will help zooming with in other ways like Ctrl+Scroll.
2022-06-23 17:09:15 +00:00
Adrien Plazas
f0021fcffb
week-view: Add a zoom gesture
...
This will help the week view work well on small touchscreens and it also
works with touchpads.
2022-06-22 12:04:21 +00:00
Adrien Plazas
06aab9952a
Add GcalAgendaView
2022-06-16 08:34:25 -03: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
9c641fa597
week-grid: Allocate event widgets a valid size
...
This ensures event widgets are allocated at least their size request,
fixing critical errors and visual glitches.
2022-06-15 11:34:03 -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
Adrien Plazas
2fd20f72a8
Drop the now unused year view
...
We don't need this anymore.
2022-05-06 20:30:05 +02:00
Adrien Plazas
595523f688
year-view: Fix a signal connection
...
Parameters were swapped in the connection but not in the callback.
2022-04-27 12:41:51 +02: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
fd023e0a28
year-view: Port to GTK4
2022-02-12 13:08:50 -03:00
Georges Basile Stavracas Neto
1cbce60c4a
month-view: Port to GTK4
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