Matthias Clasen
03f145e868
filechooserbutton: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
1b44a64ef7
expander: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
37e381e95d
combobox: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
e0f95844c1
actionbar: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
539f06147a
Merge branch 'misc-cleanups' into 'master'
...
Misc cleanups
See merge request GNOME/gtk!1832
2020-05-05 21:02:25 +00:00
Matthias Clasen
d2b55dff2d
Merge branch 'wip/exalm/controls-dispose' into 'master'
...
windowcontrols: Unparent children in dispose rather than finalize
See merge request GNOME/gtk!1831
2020-05-05 18:19:00 +00:00
Matthias Clasen
e33da18577
window: Lower the visible focus timeout
...
Five seconds felt too long for some people in
initial feedback, so lets lower the timeout to
3 seconds.
2020-05-05 10:45:47 -04:00
Matthias Clasen
cda1a25a5a
assistant: Drop the Private struct
2020-05-05 10:45:47 -04:00
Matthias Clasen
a9103ccd7c
placesview: Drop the Private struct
2020-05-05 10:45:47 -04:00
Matthias Clasen
8effa10e79
searchbar: Drop the Private struct
2020-05-05 10:45:47 -04:00
Alexander Mikhaylenko
7906f09c75
windowcontrols: Unparent children in dispose rather than finalize
2020-05-05 19:43:55 +05:00
Jakub Steiner
4cdb9ed322
Merge branch 'wip/jimmac/notebook-tab-focus' into 'master'
...
Adwaita: notebook tab focus ring
See merge request GNOME/gtk!1830
2020-05-05 13:42:25 +00:00
Matthias Clasen
b74a3de299
Merge branch 'bin-removal' into 'master'
...
Bin removal
See merge request GNOME/gtk!1820
2020-05-05 12:55:50 +00:00
Jakub Steiner
774d61c682
Adwaita: notebook tab focus ring
...
- prelight the tab, not a label (visually)
2020-05-05 13:57:33 +02:00
Jakub Steiner
d827fe711d
Adwaita: old style toolbar buttons
...
- style toolbar buttons
2020-05-05 10:55:14 +02:00
Timm Bäder
d328374c94
shortcutcontroller: Check for NULL GtkNative of widget
...
And just continue in that case.
2020-05-05 08:20:10 +02:00
Timm Bäder
7f009b9952
label: Be more defensive against non-existant focus_link
2020-05-05 08:20:10 +02:00
Timm Bäder
0e73bfa202
shortcutmanager: Speed up default_remove_controller a bit
...
Only call get_n_items on the model once and remove two unnecessary
casts.
2020-05-05 08:20:10 +02:00
Timm Bäder
fb9b54d4b2
shortcutcontroller: Use a GArray instead of a linked list
2020-05-05 08:20:10 +02:00
Timm Bäder
cdb4d71125
cssprovider: Pass a GtkArray around when matching
...
We just use the resulting GPtrArray to set the values on a GtkCssLookup
and it had mostly a size of 1, in extremes a size of 11.
2020-05-05 08:20:10 +02:00
Timm Bäder
4996097219
cssselector: Use a GtkArray to count exact matches
...
The list here is at most 3 elements long in my tests.
2020-05-05 08:20:10 +02:00
Timm Bäder
0c4dcd9d57
add GtkArray
...
Try to use stack space if we can and only fall back to the GPtrArray if
we must.
2020-05-05 08:20:10 +02:00
Timm Bäder
aaecb3d84b
main: Save some type checks
...
We already have the typecheck-less versions of get_realized(),
get_parent() and is_sensitive() in gtkwidgetprivate.h, so use them here.
2020-05-05 08:20:10 +02:00
Timm Bäder
771b3ea6f3
eventcontroller: Remove some unnecessary casts
...
Instead of comparing two GtkWidget*s by casting the two GtkNative*s, we
can as well compare two GtkNative*s. Also if gtk_widget_get_native()
returns NULL, the code previously failed.
2020-05-05 08:20:10 +02:00
Timm Bäder
75e202f02b
widget: Use an unchecked cast in _get_native()
...
This is either no chagne because we know for a fact that the returned
value is a GtkNative - after all thats's the type we pass to
gtk_widget_get_ancestor().
Or it is a bug fix since casting NULL to a GtkNative using GTK_NATIVE()
is not going to work, but the API contract of gtk_widget_get_native()
explicitly allows a NULL return value.
2020-05-05 08:20:10 +02:00
Timm Bäder
94d3fd84b5
window: Remove unused private function
2020-05-05 08:20:10 +02:00
Timm Bäder
a40abcf74d
scalebutton: Shorten finalize() implementation
2020-05-05 08:20:09 +02:00
Timm Bäder
9f90eb41c8
scalebutton: Remove unused click_id member
2020-05-05 08:20:09 +02:00
Timm Bäder
4b9e5304cc
widget: Save controllers list in a GPtrArray
2020-05-05 08:20:09 +02:00
Timm Bäder
ef623aaabc
widget: Only do a IS_ROOT type check if the parent is unset
...
So we do less type checks
2020-05-05 08:20:09 +02:00
Timm Bäder
de40b0b061
placesview: Remove frame
...
We don't need a double border here.
2020-05-05 08:20:09 +02:00
Timm Bäder
356dea3349
cssselector: Avoid some GList allocations
2020-05-05 08:20:09 +02:00
Timm Bäder
63bbc79f48
icontheme: Save dir_mtimes in a GArray, not a GList
2020-05-05 08:20:09 +02:00
Timm Bäder
d80c130d7f
GdkEvent: Save history in a GArray
...
Instead of a less efficient GList.
2020-05-05 08:20:09 +02:00
Timm Bäder
14b27446a3
stylecontext: Remove _list_classes() from public API
...
Applications can use gtk_widget_get_css_classes these days.
2020-05-05 08:20:09 +02:00
Timm Bäder
289b157e32
textchild: Return an array from get_widgets
...
Yay, one GList less.
2020-05-05 08:20:09 +02:00
Timm Bäder
61195df7a3
widget: Use early-out style in gtk_widget_realize()
...
This is much more common in the current code base and reduces the
indentation level by one.
2020-05-05 08:20:09 +02:00
Timm Bäder
ce07c0559d
shorthandproperty: Use alloca() when parsing properties
2020-05-05 08:20:09 +02:00
Timm Bäder
f4edbdfc1f
shorthandproperty: Return unset/initial/inherit as-is
...
We don't even need an array value these days.
2020-05-05 08:20:09 +02:00
Timm Bäder
526187d36c
shorthandproperty: Use alloc a for data array
2020-05-05 08:20:09 +02:00
Timm Bäder
96673d5106
popover: Remove an unused gtk_widget_get_allocation() call
2020-05-05 08:20:09 +02:00
Timm Bäder
88f5d4547c
label: Remove a debug leftover
2020-05-05 08:20:09 +02:00
Timm Bäder
34976a791c
gskpango: Make get_color a bit shorter
...
Don't copy from crenderer->fg_color just to override from the local
color again.
2020-05-05 08:20:09 +02:00
Timm Bäder
ad73afcd79
label: Unref style_attrs list
2020-05-05 08:20:09 +02:00
Matthias Clasen
3c165b3b77
Drop GtkBin
...
It is no longer used anywhere.
2020-05-04 22:53:08 -04:00
Matthias Clasen
8d0773fad0
inspector: Derive recorder from GtkWidget
2020-05-04 22:53:08 -04:00
Matthias Clasen
dec5707ca9
builder-tool: Convert former bin children
...
Convert from <child> elements to <property name="child">
for former GtkBin subclasses. Update test results
to match.
2020-05-04 22:53:08 -04:00
Matthias Clasen
0ec5a3f0d9
tooltipwindow: Derive from GtkWidget
2020-05-04 22:53:08 -04:00
Matthias Clasen
aae25c4fa0
combobox: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
ec394e805b
Use gtk_combo_box_set_child throughout
2020-05-04 22:53:08 -04:00
Matthias Clasen
5d26af06e4
combobox: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
b96d7b62d1
Add gtk_overlay_remove_overlay
...
Now that GtkOverlay is not a container anymore,
gtk_container_remove can't be used for this anymore,
so add a separate api.
2020-05-04 22:53:08 -04:00
Matthias Clasen
edd5d36159
overlay: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
77af8e303d
Use gtk_overlay_set_child throughout
...
Replace all uses of gtk_container_add on overlays
by gtk_overlay_set_child.
2020-05-04 22:53:08 -04:00
Matthias Clasen
53f9737dcf
overlay: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
3a9883b3ca
searchbar: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
We have to implement GtkBuildable, in order to keep
the <child> element in ui files working for search bars.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
99ef14b59f
Use gtk_search_bar_set_child throughout
2020-05-04 22:53:08 -04:00
Matthias Clasen
e2abe6dd29
searchbar: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
12ecbd1508
listboxrow: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
b8d1a9eb0d
flowboxchild: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
41322e2a7a
revealer: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
649ae635a7
Use gtk_revealer_set_child throughout
...
Replace all uses of gtk_container_add on revealers
with gtk_revealer_set_child.
2020-05-04 22:53:08 -04:00
Matthias Clasen
686be577d5
revealer: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
9a65ed9ada
window: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
Update the accessible implementation to match, remove
remnants of container implementations in GtkWindow
subclasses, and fix livecycle issues around destroy
vs dispose in GtkAssistant.
After this commit, using gtk_container_add on window
subclasses is not allowed anymore, but adding childing
with <child> in ui files still works.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
f59f355190
Use gtk_window_set_child throughout
...
Replace all uses of gtk_container_add on windows
by gtk_window_set_child.
2020-05-04 22:53:08 -04:00
Matthias Clasen
b9b1bf85e1
window: Add a child property
2020-05-04 22:53:07 -04:00
Matthias Clasen
4aa5fba0b5
button: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
We have to implement GtkBuildable, in order to keep
the <child> element in ui files working for buttons.
See #2681
2020-05-04 22:53:07 -04:00
Matthias Clasen
183431c918
checkbutton: Modernize
...
Stop implementing GtkContainer, and just use a box layout
instead of doing our own thing manually.
2020-05-04 22:53:07 -04:00
Matthias Clasen
af6e0ee2b3
Use gtk_button_set_child throughout
...
Replace all uses of gtk_container_add on buttons
by gtk_button_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
04e4a02cd0
button: Add a child property
2020-05-04 22:53:07 -04:00
Matthias Clasen
9d7b77f874
scrolledwindow: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
We have to implement GtkBuildable, in order to keep
the <child> element in ui files working for aspect
frames.
See #2681
2020-05-04 22:53:07 -04:00
Matthias Clasen
67759d4c3e
Use gtk_scrolled_window_set_child throughout
...
Replace all uses of gtk_container_add on popovers
by gtk_scrolled_window_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
54b613392b
scrolledwindow: Add a child property
2020-05-04 22:53:07 -04:00
Matthias Clasen
ee1f8d8d06
popover: Derive from GtkWidget
2020-05-04 22:53:07 -04:00
Matthias Clasen
8e261056b9
Use gtk_popover_set_child throughout
...
Replace all uses of gtk_container_add on popovers
by gtk_popover_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
ee284a560a
popover: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
e098ffb88d
viewport: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
We have to implement GtkBuildable in order to keep
the <child> element working for viewports in ui files.
See #2681
2020-05-04 17:01:18 -04:00
Matthias Clasen
e9ddf0fda5
Use gtk_viewport_set_child throughout
...
Replace all uses of gtk_container_add on viewports
by gtk_viewport_set_child.
2020-05-04 17:01:18 -04:00
Matthias Clasen
937c94bab5
viewport: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
5b06b08a0e
aspectframe: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
We have to implement GtkBuildable, in order to keep
the <child> element in ui files working for aspect
frames.
See #2681
2020-05-04 17:01:18 -04:00
Matthias Clasen
e137152520
aspectframe: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
25826eafe3
frame: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
See #2681
2020-05-04 17:01:18 -04:00
Matthias Clasen
1706b80815
Use gtk_frame_set_child throughout
...
Replace all uses of gtk_container_add for
frames with gtk_frame_set_child.
2020-05-04 17:01:18 -04:00
Matthias Clasen
7f975472a7
frame: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
8c1072fad1
Merge branch 'wip/jimmac/notebook-focus' into 'master'
...
Adwaita: notebook tab focus
See merge request GNOME/gtk!1825
2020-05-04 20:10:46 +00:00
Matthias Clasen
188a61f02d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1826
2020-05-04 19:02:40 +00:00
Jakub Steiner
9dfac6fe3f
Adwaita: colorswatch focus rings
...
- there used to be different outline color for light and dark buttons,
but it's complexity I can live without. blue focus rings fit all.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2695
2020-05-04 18:16:08 +02:00
Jakub Steiner
a3f042b5b4
Adwaita: notebook tab focus
...
- just like entries tabs need to be handled with focus-within
2020-05-04 17:54:12 +02:00
Matthias Clasen
53d86d411a
Adwaita: Style .toolbar
...
We don't have GtkToolbar anymore, so we are more likely
to meet a .toolbar style class, than a toolbar element.
2020-05-04 10:51:11 -04:00
Alexander Mikhaylenko
d2b5beffbf
Adwaita: Convert entries to the new focus rings
2020-05-04 19:24:24 +05:00
Matthias Clasen
837b141747
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1823
2020-05-04 12:31:25 +00:00
Matthias Clasen
130ae89e54
frame: Fix xalign handling
...
SEtting a nonzero xalign on frames had no
effect, since we were always using the full
allocation with here, instead of what the label
needs. Found by using testframe for a second.
2020-05-04 07:37:31 -04:00
Matthias Clasen
77cf6cd406
frame: Don't queue a resize if xalign changes
...
We only need to allocate children in this case.
While we touch it, rewrite the setter to modern
style.
2020-05-04 07:37:25 -04:00
Jakub Steiner
8127d70b8a
Adwaita: make transition offset more subtle
...
- be less like wobbly windows
2020-05-04 11:29:19 +02:00
Jakub Steiner
ab0ad4a0d7
Merge branch 'wip/jimmac/emphasize-focus-change' into 'master'
...
Adwaita: bring more attention to focus change
See merge request GNOME/gtk!1803
2020-05-04 08:49:40 +00:00
Matthias Clasen
b4d5ddcae5
Merge branch 'filechooser-translation' into 'master'
...
filechooser: Translate type column
Closes #2690
See merge request GNOME/gtk!1816
2020-05-03 01:10:24 +00:00
Matthias Clasen
817112ab3c
filechooser: Translate type column
...
When the code for this was copied from nautilus,
we forgot to adapt it for running in a library
instead of an application - gettext() doesn't work
in a library.
Fixes : #2690
2020-05-02 19:57:38 -04:00
Alexander Mikhaylenko
80867acf94
appchooserdialog: Don't show subtitle label when subtitle is null
...
Looks like 67822d0c9a
and
3f1bd3722d
collided, and subtitle can be null
now. Add a check so that we don't end up with empty label in that case.
2020-05-02 23:35:44 +05:00
Matthias Clasen
fd1fe0eed5
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Add more detail to the drawing overview
See merge request GNOME/gtk!1811
2020-05-01 21:09:38 +00:00
Benjamin Otte
fa90747815
Merge branch 'wip/exalm/headerbar-title' into 'master'
...
Headerbar title/subtitle cleanups
See merge request GNOME/gtk!1807
2020-05-01 19:39:27 +00:00