Commit Graph

33936 Commits

Author SHA1 Message Date
Timm Bäder
093eac9441 calendar: Keep a GDateTime around
Instead of a year/month/day triple.
2020-02-07 13:16:32 -05:00
Timm Bäder
93c6f2256f calendar: Return a GDateTime from get_date() 2020-02-07 13:16:32 -05:00
Timm Bäder
1151da5cf3 calendar: Use GDateTime to select days 2020-02-07 13:16:32 -05:00
Timm Bäder
a6f9052cf1 calendar: Use widgets for everything 2020-02-07 13:16:32 -05:00
Timm Bäder
a437162f6d calendar: Try to avoid changing size when changing the year 2020-02-07 13:16:32 -05:00
Timm Bäder
9ecd448682 calendar: Remove spinning code
This is dead code
2020-02-07 13:16:32 -05:00
Timm Bäder
74cb1ca2f5 calendar: Add accessors for display properties
Instead of having a display flags enum and bitfield, just add proper
accessors for the properties, which is what we do everywhere else.
2020-02-07 13:16:32 -05:00
Timm Bäder
4cceba06bc calendar: Remove details
This is an unused feature that's way too complicated for a default
calendar widget and complicates the implementation a lot. Since we want
to eventually replace this with actual widgets, remove the details
support now.
2020-02-07 13:16:32 -05:00
Timm Bäder
ab84b17c1a calendar: Fix an uninitialized value
Values pased to gtk_widget_measure must be initialized to 0. This failed
if the header widget of the calendar was invisible.
2020-02-07 13:16:32 -05:00
Timm Bäder
7fd06cacbd Adwaita: Fix levelbar styling
The block nodes are inside a trough node.
2020-02-07 13:16:32 -05:00
Timm Bäder
b471158e38 {box,grid}layout: Access border spacing directly
Instead of going through the style context
2020-02-07 13:16:32 -05:00
Timm Bäder
4cfac3b91c snapshot: Remove new_with_parent
Unneeded now that we have push_collect()/pop_collect()
2020-02-07 13:16:32 -05:00
Timm Bäder
17ddae5bf9 textlayout: Use gtk_snapshot_{push,pop}_collect() 2020-02-07 13:16:32 -05:00
Timm Bäder
47b8facca4 widget: Use gtk_snapshot_{push,pop})_collect
So we avoid allocating a new snapshot just for that.
2020-02-07 13:16:32 -05:00
Timm Bäder
bf8fb2c1a5 snapshot: Add _push_collect() and _pop_collect()
These will replace the previous gtk_snapshot_new_with_parent(), which
allocated an entirely new GObject just to push()/pop() some state. This
is already a problem but will be more important in the future as we
start using this more.
2020-02-07 13:16:32 -05:00
Timm Bäder
b7ee2cbc28 Start using GtkWidget's new style class API 2020-02-07 13:16:32 -05:00
Timm Bäder
b1d64a6b3a renderborder: Make simple border case more obvious
When reaching this point, it is impossible that all border styles are
HIDDEN or NONE, but up to 3 of them can still be that style. In any
case, the "none or solid" border style is the most common on there is,
so try to make this simpler here by just appending a border node
directly instead of going through the snapshot_border path.
2020-02-07 13:15:59 -05:00
Timm Bäder
60095ade9b Move GTK_BORDER_STYLE_HIDDEN before GTK_BORDER_STYLE_SOLID
The simple case when drawing border is "solid or nothing", which we can
now check for as simple as "style <= GTK_BORDER_STYE_SOLID".
2020-02-07 13:15:59 -05:00
Timm Bäder
64c6229f54 searchbar: Use proper getter in _get_property()
Instead of retuning a seemingly random boolean, just use
gtk_search_bar_get_search_mode().
2020-02-07 13:15:59 -05:00
Timm Bäder
60be37d63a searchbar: Use g_object_notify_by_pspec
We already keep the pspecs around, so use them.
2020-02-07 13:15:59 -05:00
Timm Bäder
e044656d99 progressbar: Remove a few unneeded queue_resize() calls
This will happen automatically when adding style classes, setting the
label text, etc.
2020-02-07 13:15:59 -05:00
Timm Bäder
c0fef36692 Window: inline function into only caller 2020-02-07 13:15:59 -05:00
Timm Bäder
a67bd7a04e widget: Fix a from_string/try_string mixup 2020-02-07 13:15:59 -05:00
Timm Bäder
e152d25ac0 widget: Speed up verify_invariants()
Hide the expensive GTK_IS_ROOT() checks behind the cheaper realized,
mapped, etc. checks. This way we only check for the widget being a root
if the invariant does not hold.

This gets pop_verify_invariants() from 16% to 6% when running the
scrolling benchmark in the widget-factory.
2020-02-07 13:15:59 -05:00
Timm Bäder
b561eb8299 widget: Remove verify_child_invariants
Just calls verify_invariants() anyway.
2020-02-07 13:15:59 -05:00
Benjamin Otte
44e153d8a8 GtkToolbar: remove 2020-02-07 14:08:26 +01:00
Benjamin Otte
e00030dff2 css: Remove .primary-toolbar
It's not used anywhere anymore.
2020-02-07 14:08:08 +01:00
Benjamin Otte
9cccb944ef css: Remove .inline-toolbar
It's not used anywhere anymore.
2020-02-07 14:08:08 +01:00
Benjamin Otte
3d9e622fda print: Don't use a toolbar in the custom paper dialog
Use a regular linked box instead.
2020-02-07 14:08:08 +01:00
Benjamin Otte
645af0917c cssnode: Remove leftover vfunc 2020-02-07 14:06:20 +01:00
Matthias Clasen
c247e7680b Remove accidentally added files 2020-02-07 08:05:45 -05:00
Matthias Clasen
c7ab02d38c Merge branch 'wip/carlosg/implicit-grabs-on-leave' into 'master'
Handle implicit grabs on leave events

Closes #13

See merge request GNOME/gtk!1397
2020-02-07 07:06:45 +00:00
Carlos Garnacho
e67f0bfcfd gtkmain: Wait for GDK_CROSSING_UNGRAB leave event with implicit grabs
If there is a passive grab and the pointer leaves the window we would
receive a GDK_CROSSING_NORMAL event when the pointer moves outside
the window, and a GDK_CROSSING_UNGRAB event when we do release the
button and the implicit grab.

We currently would react to the first, but want to react to the
second. In the time between both events, the client would still receive
pointer motion that will reach the implicitly grabbed widget.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/13
2020-02-07 01:02:47 +01:00
Carlos Garnacho
56dc99a9fb gtkroot: Make enum a typedef
Seems a typo, and prevents building as GtkRootProperties is deemed
to be defined multiple times.
2020-02-07 01:00:52 +01:00
Matthias Clasen
769dae2c71 infobar: Implement forall
As a container, that is what you have to do.
2020-02-06 18:04:36 -05:00
Matthias Clasen
bc682bef74 colorchooser: Use a composite accessible
This makes the content show up in the a11y tree again.
2020-02-06 16:54:59 -05:00
Matthias Clasen
145ccfe1c4 stackswitcher: Use a composite accessible
This makes the buttons show up in the a11y tree again.
2020-02-06 16:54:59 -05:00
Matthias Clasen
d01070d472 a11y: Add an accessible for widgets with children
We've started to turns containers into widgets which
just happen to have children, and some of these need
to be exposed to the a11y stack.

This adds a very minimal implementation, it does not
currently emit change notification when children are
added or removed.
2020-02-06 16:54:59 -05:00
Matthias Clasen
b3f5243aeb a11y: Report children of widgets
We want children of composite accessibles to be
reported.
2020-02-06 16:54:59 -05:00
Matthias Clasen
5c594fc46a Merge branch 'WindowsPrintDriverPreferencesMaster' into 'master'
Fixed bug that prevented GTK from storing printer driver preferences in the…

See merge request GNOME/gtk!397
2020-02-06 13:07:13 +00:00
Matthias Clasen
b6e2699409 notebook: Update arrows when text direction changes
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/103
2020-02-06 07:13:10 -05:00
Matthias Clasen
2f369b6d7a Merge branch 'kill-simple-search' into 'master'
Remove simple search engine

See merge request GNOME/gtk!1393
2020-02-06 06:38:17 +00:00
Matthias Clasen
9746b728ca Merge branch 'public-emojichooser' into 'master'
emojichooser: Make public

See merge request GNOME/gtk!1382
2020-02-05 18:04:42 +00:00
Benjamin Otte
0ad791277a Merge branch 'wip/otte/css' into 'master'
Some CSS cleanup

See merge request GNOME/gtk!1389
2020-02-05 14:04:12 +00:00
Matthias Clasen
54f6515005 emojichooser: Add profiler marks for loading
This is a long-running operation, and worth showing
in traces.
2020-02-05 06:28:39 -05:00
Matthias Clasen
25c25ba5c1 icontheme: Fix various memory leaks
Tasks need to be unreffed too.
2020-02-05 06:28:39 -05:00
Matthias Clasen
fac435ba98 widget: Fix a memory leak with class actions
This code was doing the wrong thing even if the parent class
doesn't have actions.
2020-02-05 06:28:39 -05:00
Matthias Clasen
1cb575a138 icontheme: Remove some dead code 2020-02-05 06:28:39 -05:00
Matthias Clasen
955305a034 treestore: Silence compiler warnings
This was causing compiler warnings in release builds.
2020-02-05 01:01:47 -05:00
Matthias Clasen
b1d5de78e1 notebook: Don't trigger criticals in dispose
When we dismantle our children in dispose, we
trigger a11y children-changed signals which end
up calling back into the notebook. Handle this
without critical warnings.
2020-02-05 01:01:47 -05:00