Commit Graph

31416 Commits

Author SHA1 Message Date
Matthias Clasen
c7467b4e76 assistant: Fix the default value of has-padding
This was showing up in the defaultvalue test.
2019-02-08 08:21:42 -05:00
Matthias Clasen
81055ca7d9 Fix compiler warnings
Fallout from recent GtkStackPage changes.
2019-02-08 07:55:41 -05:00
Matthias Clasen
b675597075 builder-tool: Convert assistant pages too
Do the same transformation for GtkAssistantPage that
we already do for GtkStackPage, to transform GTK 3 .ui
files to GTK 4 ways of doing things.
2019-02-08 00:09:44 -05:00
Matthias Clasen
ce60089f46 assistant: Convert child properties to a child meta object
Turn GtkAssistantPage into a public object holding the
former child properties.
2019-02-08 00:09:44 -05:00
Matthias Clasen
4ace873046 Update ui files to new stack syntax
This conversion was done with the help of gtk4-builder-tool.
2019-02-08 00:09:44 -05:00
Matthias Clasen
72b6644223 builder tool: Operate on multiple files
There is no strong reason to disallow this, when
the --replace option is used.
2019-02-08 00:09:44 -05:00
Matthias Clasen
59152b8a8d builder tool: Rewrite the simplify command
Rewrite the builder-tool simplify command to have
a full parse tree around, and perform simplifications
on that tree. This lets us rewrite GtkStack and turn
child properties into child meta objects.
2019-02-08 00:09:44 -05:00
Matthias Clasen
addcf2e526 tools: Split gtk-builder-tool
Put each command into its own file. This is in
preparation for redoing the simplify command.
2019-02-08 00:09:44 -05:00
Matthias Clasen
ed3b9669b3 builder: Allow specifying objects inline
In addition to <property name="foo">bar</property> referring
to an object with ID bar, we now also parse
<property name="foo"><object>...
to specify a property 'inline'.
2019-02-08 00:09:44 -05:00
Matthias Clasen
ad9c2a624f stack: Convert child properties to a child meta object
Create a GtkStackPage public object which holds the former
child properties of GtkStack.

Adjust all callers.
2019-02-08 00:09:44 -05:00
Jakub Steiner
a3e517aa9c Adwaita: menu border-radius fix from gtk3
- avoid painting over the rounded corners with background
2019-02-06 14:34:55 +01:00
Jakub Steiner
8d537379ed Adwaita: sync with stable styling
- fold over changes in teh stable brnch to get the same look

fixes issue #1656
2019-02-06 14:01:38 +01:00
Emmanuele Bassi
1668496359 docs: Fix GTK links and locations 2019-02-06 10:39:27 +01:00
Rico Tzschichholz
d2d35e52c3 Adjust some more pkg-config references for gtk+ to gtk rename
See https://gitlab.gnome.org/GNOME/gtk/issues/1439
2019-02-06 09:56:08 +01:00
Matthias Clasen
e91144f6c9 Make GtkInvisible private
We can't quite get rid of its use in the inspector,
but we can make it private.
2019-02-06 02:06:19 -05:00
Matthias Clasen
a75dcce707 Make the invisible invisible
The change to make widgets visible by default broke GtkInvisibles
special-cased state handling and that in turn caused picking in
the inspector to break with another recent change.

This change makes the inspector pick button work again.
2019-02-05 16:55:07 -05:00
Matthias Clasen
785373ce2a printoperation-win32: Stop using an invisible
We can just as well use a GtkWindow here. We just need
a handle. Untested.
2019-02-05 10:56:40 -05:00
Matthias Clasen
aad44999f3 filechoosernativeportal: Stop using an invisible
A label works just as well here, it turns out.
2019-02-05 10:46:48 -05:00
Matthias Clasen
721e598e99 Reduce includes of gtkinvisible.h
We want to get rid of GtkInvisible.
2019-02-05 10:46:33 -05:00
Timm Bäder
9d950087ef inspector: Remove window icon
The property does not exist anymore and the window icon has never been
used on non-x11 backends.
2019-02-05 15:14:19 +01:00
Timm Bäder
1674b6e269 main: Prefer implicit grab widget to target widget for motion events
When an implcit grab is going on, we don't need to consider other
widgets for motion (etc.) events.
2019-02-05 15:13:01 +01:00
Timm Bäder
33ac41bc94 infobar: Remove an unused variable 2019-02-05 15:09:59 +01:00
Timm Bäder
057144cfdd window: Inline function into only caller 2019-02-05 08:11:43 -05:00
Timm Bäder
9b91041025 window: Remove remaining icon_list handling 2019-02-05 08:11:43 -05:00
Timm Bäder
b215384064 window: Remove default_icon_serial
Now unused.
2019-02-05 08:11:43 -05:00
Timm Bäder
e6c5b9348d window: Remove default icon list 2019-02-05 08:11:43 -05:00
Timm Bäder
55b99e9916 window: Remove icon list 2019-02-05 08:11:43 -05:00
Timm Bäder
131e8d8905 Remove some unnecessary gtkwindow.h includes 2019-02-05 08:11:43 -05:00
Timm Bäder
e82d97f069 window: Remove set_default_icon 2019-02-05 08:11:43 -05:00
Timm Bäder
490bb4c2ea window: Remove icon property 2019-02-05 08:11:43 -05:00
Timm Bäder
79664567c4 window: Remove _set_default_icon_from_file 2019-02-05 08:11:43 -05:00
Timm Bäder
7abcd5ba3b window: Remove set_icon_from_file
Not all backends support setting window icons from raw pixel data, so
remove the public API in GtkWindow for it.
2019-02-05 08:11:43 -05:00
Matthias Clasen
3489ed087d Merge branch 'kill-buttonbox' into 'master'
Drop GtkButtonBox

See merge request GNOME/gtk!554
2019-02-05 13:06:09 +00:00
Matthias Clasen
32e61b955a Drop gtkboxprivate.h
Not needed anymore.
2019-02-05 07:54:35 -05:00
Emmanuele Bassi
f6c07a0ddb glade: Drop the "plus"
From documentation and catalog description.
2019-02-05 11:26:54 +01:00
Emmanuele Bassi
25fd230327 gtk: Drop the "plus"
Source names should use "[gtk]" without the plus.
2019-02-05 11:26:20 +01:00
Emmanuele Bassi
866d0c4fb9 themes: Drop the "plus"
Comments and documentation.
2019-02-05 11:25:41 +01:00
Emmanuele Bassi
4569bc6358 inspector: Drop the "plus"
From user-visible strings, mostly.
2019-02-05 11:25:15 +01:00
Matthias Clasen
179e85f803 about dialog: Stop setting secondary
We no longer use a button box, so this is not available.
2019-02-05 03:46:31 -05:00
Matthias Clasen
99c5a3d72c gtk: Stop using deprecated pango api 2019-02-04 18:28:31 -05:00
Matthias Clasen
dbd360262c Add an explicit fribidi dep
We will use fribidi api to determine text direction.
2019-02-04 18:28:31 -05:00
Matthias Clasen
5120748981 Drop GtkButtonBox
This widget does not seem worth keeping,
and we want to get rid of child properties.
2019-02-04 12:44:55 -05:00
Timm Bäder
257df1d8b5 tooltip: Get the pointer position relative to the toplevel widget
Since we position the tooltip window relative to the toplevel widget and
not actually relative to the effective_toplevel, we shouldn't get the
pointer position relative to the effective_toplevel.

We previously used the pointer position (relative to the
effective_toplevel) and the anchor rect (relative to the toplevel
widget) together to calculate x_distance. This leads to wrong values in
cases where get_surface (new_tooltip_widget) != get_surface (toplevel)

Fixes #1427 in master
2019-02-04 17:05:30 +01:00
Timm Bäder
47ba423eca tooltip: Use gtk_widget_compute_bounds to get tootip widget anchor
Instead of using gtk_widget_get_allocated_width/height, which might
return the wrong box for the tooltip widget.
2019-02-04 17:05:30 +01:00
Timm Bäder
489e87baea main: Rename local variable
Make it a little clearer that this is the event widget and not just any
widget.
2019-02-04 17:05:30 +01:00
Timm Bäder
43234eec42 gtkmain: Rename event_widget to target_widget in do_event
The event_widget is the widget that the surface belongs to which got
this event. The target widget is the one that will receive the event.
The previous terminology was confusing.
2019-02-04 17:05:30 +01:00
Matthias Clasen
268fcbb838 Drop GtkPopoverMenu::position
This is another unnecessary position child property.
2019-02-04 10:47:18 -05:00
Emmanuele Bassi
4040f76529 Use @basename@ in enumeration type templates
The @filename@ directive will use the full path of the file being parsed
for enumeration types; we should use @basename@, instead, as it improves
the reproducibility of the build by using only the file name.
2019-02-04 14:02:45 +01:00
Timm Bäder
4dca2f9604 recorder: Don't try to print info about a NULL list model 2019-01-31 17:00:50 +01:00
Timm Bäder
5852a5ece8 switch: Notify :state by pspec 2019-01-30 17:46:08 +01:00
Emmanuele Bassi
a7fa1cf6f2 Merge branch '1480-critical-csd-close-button' into 'master'
gtkmain: Avoid critical messages on closing window

Closes #1480

See merge request GNOME/gtk!442
2019-01-30 11:53:12 +00:00
Timm Bäder
d9d4879623 Merge branch 'wip/carlosg/texthandles-position' into 'master'
gtkentry: Fix text handle coordinates calculation

See merge request GNOME/gtk!542
2019-01-29 13:36:43 +00:00
Carlos Garnacho
a15325ef44 gtkentry: Fix text handle coordinates calculation
The text allocation is already in widget-local coordinates, involving the
GtkAllocation here is not right.
2019-01-29 12:00:07 +01:00
Jakub Steiner
5765d47568 Merge branch 'expander-row-padding' into 'master'
adwaita: Fix the greediness of row:not(.expander)

See merge request GNOME/gtk!526
2019-01-29 09:46:34 +00:00
Jakub Steiner
7286ede490 Merge branch 'adwaita-osd-spinbutton-entry-fix-master' into 'master'
Horizontal OSD spinbutton entry fix

See merge request GNOME/gtk!332
2019-01-29 09:39:57 +00:00
Timm Bäder
4a333f826a Merge branch 'wip/matthiasc/event-signal' into 'master'
Remove vestigial ::event support

See merge request GNOME/gtk!538
2019-01-29 08:33:40 +00:00
Timm Bäder
8c4dc3de4d widget: Also propagate ACTIVE state when unsetting 2019-01-29 07:19:54 +01:00
Timm Bäder
0a5362a7d9 gtkmain: Remove comment mentioning GDK_PROPERTY_NOTIFY
... which doesn't exist anymore.
2019-01-29 07:19:54 +01:00
Timm Bäder
245cebec1d widget: Ignore events on unmapped widgets
There was a special case for GtkSearchBar, so remove that one.
2019-01-29 07:19:54 +01:00
Benjamin Otte
bde2332a1a main: Report correct target for button release events
Button release events should not go to the widget below the pointer, but
to the widget that received the original button press.

Fixes #24
2019-01-29 07:19:54 +01:00
Timm Bäder
20429f4764 Remove :active state handling on widgets 2019-01-29 07:19:54 +01:00
Timm Bäder
1b504a3303 Automatically set :active state on button press/release 2019-01-29 07:19:54 +01:00
Timm Bäder
61ec2ab5c9 widget: Propagate PRELIGHT state when unsetting it
Without this, disabling a widget that's being hovered and is a child
widget of the widget we're disabling (e.g. the GtkImage child of a
GtkButton) will retain its :hover state even though it should be
insensitive to any sort of input now.
2019-01-29 07:19:54 +01:00
Timm Bäder
611964d915 widget: Avoid some type checks when picking 2019-01-29 05:03:26 +01:00
Timm Bäder
16481734c1 csstransformvalue: Convert skew values to radians 2019-01-29 05:03:26 +01:00
Timm Bäder
d54cccfdd5 label: Use pango_layout_get_log_attrs_readonly
No need to memdup the log attrs in this case.
2019-01-29 05:03:26 +01:00
Timm Bäder
7f4b7c48e8 cssparser: Make _gtk_css_parser_try a macro
We almost always pass a constant string to it, so use a macro and try to
trick the compiler into evaluating the 2(!) strlen() calls at compile
time.
2019-01-29 05:03:26 +01:00
Timm Bäder
df1f036a95 cssanimatedstyle: Avoid some type checks and unnecessary work 2019-01-29 05:03:26 +01:00
Timm Bäder
f3c51cdf5f scrolledwindow: Don't NULL the indicator widget in unmap
We still have the widget, so just keep the pointer to it.
2019-01-29 05:03:26 +01:00
Matthias Clasen
8a667a5f1d Remove vestigial ::event support
The signal is gone, no need to keep the vfunc around.
2019-01-26 15:36:55 -05:00
Matthias Clasen
a3801299f5 Merge branch 'tabular-menus' into 'master'
Drop tabular menus

See merge request GNOME/gtk!527
2019-01-25 17:32:41 +00:00
Matthias Clasen
c5f90fc20d switch: Use icons
This works better than glyphs, avoiding the
uncertainties of font availability and fallback..
2019-01-24 20:43:12 -05:00
Matthias Clasen
1528e7eabf Add switch icons
These will be used in GtkSwitch in the future.
2019-01-24 20:43:12 -05:00
Matthias Clasen
9dee863217 menu: Drop the child properties
These were only there in support of tabular menus.
2019-01-23 23:36:04 -05:00
Matthias Clasen
e31a96123e Drop gtk_menu_attach
We no longer support tabular menus.
2019-01-23 23:30:18 -05:00
Matthias Clasen
a65f5c2e73 tree menu: Drop support for grids
This was only used in GtkComboBox, and it no longer
supports grids,
2019-01-23 23:20:22 -05:00
Matthias Clasen
a5ba0d46c2 combobox: Drop support for grids
This is pretty much unued, and we want to get rid of it.

This removes support for wrap-width, row-span-column
and column-span-column properties.
2019-01-23 22:52:36 -05:00
Matthias Clasen
d339a43634 header bar: Drop the position child property
There is no particular need to have this, and we want
to get rid of child properties.
2019-01-23 20:05:28 -05:00
Matthias Clasen
003eefe8bf action bar: Drop the position child property
There is no particular need to have this, and we want
to get rid of child properties.
2019-01-23 19:30:47 -05:00
Matthias Clasen
f3f5a896de box: Avoid position in the reorder api
Change the reorder api to insert after a sibling,
so that moving to first place becomes reorder (... NULL).

And add a insert_after api that can replace the common
container_add / reorder_after (... NULL) combination.

Update all callers.
2019-01-23 19:30:47 -05:00
Matthias Clasen
883d5d8584 box: Remove the position child property
The position child property is problematic, since it
requires us to emit notification for all children when
inserting a child early in the list of children.

Remove the property from all ui files.
2019-01-23 19:30:47 -05:00
Timm Bäder
e9e40ddb42 box: Remove gtk_box_pack_start 2019-01-23 19:30:46 -05:00
Timm Bäder
a543ed84f6 box: Remove gtk_box_pack_end 2019-01-23 19:30:46 -05:00
Timm Bäder
3d34b91453 box: Simplify documentation
Remove all references to any sort of "packing".
2019-01-23 19:30:46 -05:00
Timm Bäder
1ccba26de9 box: Remove children list
GtkWidget saves a widget list for us, so we don't need to keep track of
them ourselves. This is okay now that we don't have a pack-type child
property anymore.
2019-01-23 19:30:46 -05:00
Timm Bäder
28c51175d8 box: Remove pack-type child property 2019-01-23 19:30:46 -05:00
Timm Bäder
99738e7059 assistant: Fix button order in ui file 2019-01-23 19:30:46 -05:00
Timm Bäder
494e9d750a dialog: Expose the content area as a separate GtkBox child
This way, the "vbox" internal child does not contain anything by
default. It previously did contain "internal" widgetry like the action
area.
2019-01-23 19:30:46 -05:00
Timm Bäder
3a13515777 Stop using GtkBox's pack-type child prop in UI files 2019-01-23 19:30:46 -05:00
Timm Bäder
ab6a67dbeb combobox: Stop using GtkBox's pack-type property
Reorder the child widgets accordingly instead.
2019-01-23 19:30:46 -05:00
Timm Bäder
d7756dc62b scalebutton: Stop relying on GtkBox's pack-type child prop 2019-01-23 19:30:46 -05:00
Timm Bäder
bd71e744d2 Stop using gtk_box_pack_end
It might soon go away!
2019-01-23 19:30:46 -05:00
Timm Bäder
4349e33d4e shortcutssection: Use a center box as footer 2019-01-23 19:30:46 -05:00
Matthias Clasen
c1f79a935c switch: Avoid problems with glyph availability
If none of the glyphs we want are available, fall
back to using empty strings here, rather than causing
critical warnings.
2019-01-23 15:47:02 -05:00
Adrien Plazas
636a9a6ea7 adwaita: Fix the greediness of row:not(.expander)
This avoids list rows (e.g. the ones in a stack sidebar) to be
accidentally selected and see their padding messed up.
2019-01-23 21:41:58 +01:00
Adrien Plazas
773efe41a9 adwaita: Fix the padding of row.expander
This will allow to implement the expanding rows pattern.
2019-01-22 12:44:33 +01:00
Benjamin Otte
359bc7695c build: Reintroduce warning flags from autotools
Some of the flags got lost in the meson transition or were demoted from
error flags to warning flags.
This commit reintroduces them.

It also includes fixes for the code that had warnings with those flags.
The big one being -Wshadow.
2019-01-22 04:33:12 +01:00
Benjamin Otte
c875465477 imcontextwayland: Get rid of global variable
Attach it to the GdkDisplay.
Also fixes -Wshadow complaining about "global" being shadowed.
2019-01-22 04:33:11 +01:00
Benjamin Otte
7978e04963 immodule: Clean up loading code
Remove the unneeded is_platform() check and just go by extension point
priority.

Also g_error() out if no im module exists, because "simple" is compiled
in and should always exist.
2019-01-22 04:33:11 +01:00
Benjamin Otte
bbd1532f84 imcontext: Fix priorities of modules
All built-in backend modules get a priority of 0 because they are the
default ones.
GtkIMContextSimple gets a priority of G_MININT because it's the fallback
one.

This mirrors the media modules code.
2019-01-22 04:33:11 +01:00