Commit Graph

32173 Commits

Author SHA1 Message Date
Matthias Clasen
e1c1c46e34 inspector: Style the property list
Make the property list look more like a list.
2019-05-07 22:04:41 +00:00
Matthias Clasen
725e7c7470 emoji chooser: Name the idle
We recently added an idle that does quite a bit of work.
It should have a name.
2019-05-07 18:41:22 +00:00
Matthias Clasen
18127be3bd GtkApplication: Add a profiler dbus api
Implement the org.gnome.Sysprof2.Profiler D-Bus
api to let sysprof start and stop tracing at runtime,
and get the data directly, via a passed fd.
2019-05-07 09:37:59 -07:00
Matthias Clasen
4ff578db10 Fix the compiler warning, again 2019-05-07 14:57:53 +00:00
Matthias Clasen
248c07c65e Fix a compiler warning 2019-05-07 04:01:21 +00:00
Matthias Clasen
77b7817266 a11y: Stop using child-notify
This was showing up in the accessibility tests failing.
2019-05-07 02:21:30 +00:00
Matthias Clasen
c6a42e92bb widget: Revert the event translation change
This is a temporary revert to make menus work
in the 3.96 release, until we land the popup
surface work and port menus to it.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1755
2019-05-06 22:20:51 +00:00
Matthias Clasen
a8aa7afa13 Merge branch 'header-bar-leak4' into 'master'
GtkHeaderBar: Don't leak decoration layout

See merge request GNOME/gtk!822
2019-05-06 14:17:17 +00:00
Emmanuele Bassi
fe473dbef8 Make get_layout_manager_type() public
The inspector, and other tools introspecting the widget structure like
gtk-builder-tool and Glade, may very well want to access the default
layout manager used by a class, especially if there are layout
properties involved, without having a whitelist of widget/layout manager
associations.
2019-05-06 12:15:21 +01:00
Emmanuele Bassi
59c6862a03 Use gtk_widget_class_set_layout_manager_type()
Instead of manually creating the layout manager inside the instance
initialization function, we can let GtkWidget do that for us.
2019-05-06 12:06:27 +01:00
Guido Günther
e98973e2c0 GtkHeaderBar: Don't leak decoration layout
Currently we leak priv->decoration_layout if the layout is set
multiple times.
2019-05-06 12:59:20 +02:00
Emmanuele Bassi
c6b2184aa0 Allow specifying the layout manager for a widget type
Some widgets have a well-defined layout manager created alongside their
own instance; if they do, we can handle the layout manager creation at
the GtkWidget instantiation.
2019-05-06 11:57:32 +01:00
Benjamin Otte
562e492056 csstokenizer: Consume the \ when encountering an error
Otherwise we infinitely end up with the error again.

Testcases added.
2019-05-06 05:56:06 +02:00
Matthias Clasen
15b8ee4564 Merge branch 'simplify-tests' into 'master'
Simplify tests

See merge request GNOME/gtk!820
2019-05-05 20:19:13 +00:00
Matthias Clasen
d8e92d4859 builder-tool: Handle layout properties more properly
Change things so we first rewrite the whole tree,
and then simplify the rewritten tree. And look
for paramspecs for layout properties.
2019-05-05 17:13:38 +00:00
Matthias Clasen
4eb00a3e41 builder-tool: Stop warnings for stack rewrites
When rewriting a GtkStack from 3 to 4, we were emitting
warnings for missing child properties. Stop doing that.
2019-05-05 17:13:38 +00:00
Matthias Clasen
84d3848c01 Merge branch 'focus-fixes' into 'master'
Focus fixes

See merge request GNOME/gtk!819
2019-05-05 14:20:04 +00:00
Matthias Clasen
c4013eeb26 Merge branch 'builder-tool-fixes' into 'master'
Builder tool fixes

See merge request GNOME/gtk!817
2019-05-05 06:57:21 +00:00
Matthias Clasen
96cce3ae23 Merge branch 'emoji-chooser-fixes' into 'master'
Emoji chooser fixes

See merge request GNOME/gtk!816
2019-05-05 06:41:31 +00:00
Matthias Clasen
09b6dbb7ef builder-tool: Handle default values changing
The default value of GtkWidget::visible changed
from FALSE to TRUE from GTK 3 to 4. Make --3to4
deal with this by ensuring the visible property
is explicitly set, before simplifying.
2019-05-04 23:41:30 -07:00
Benjamin Otte
6594ccf716 gsk: Export gsk_gl_renderer_new() 2019-05-05 07:18:39 +02:00
Benjamin Otte
3c6aa84e44 cssparser: Add gtk_css_parser_has_number() 2019-05-05 07:18:39 +02:00
Matthias Clasen
44b0a893fc entry: Drop our own Emoji chooser
We were using one Emoji chooser when triggered
via the context menu, and another one when
triggered via the icon.

Change things to always use the same Emoji
chooser instance.
2019-05-04 18:54:37 +00:00
Matthias Clasen
32fd55a66d window: Stop duplicating focus change events
We had code in gtkwindow.c that generated duplicate,
and defective, focus-change events, in the following
way:
- gtkmain.c generates a chain of focus-change events
  for moving focus from one window to another
- gtkwindow.c catches a focus-in event in the middle
  of this chain and sets itself as 'active'
- and then it proceeds to generate focus-change
  events towards its own focus widget without a
  related target
This is not necessary since we gtkmain.c already
generates a complete sequence of focus-change events.
So stop doing it.
2019-05-04 18:22:33 +00:00
Matthias Clasen
9af01bea5e window: Make _gtk_window_set_is_active static
It is not used outside gtkwindow.c.
2019-05-04 18:22:28 +00:00
Matthias Clasen
40fe3d94ac builder-tool: Handle GtkWidget::visible properly
This property has a 'smart' default that depends
on the class of the object we're creating. Take
that into account when deciding whether to omit
properties that are set to their default value.
2019-05-04 18:18:42 +00:00
Matthias Clasen
6fe203d0e2 emoji chooser: Make Escape work again
Escape is expected to close the Emoji chooser.
2019-05-04 18:18:20 +00:00
Matthias Clasen
7b6f652630 emoji chooser: Fix handling of no recent Emoji
If the recent section is empty, we want to hide
it, make its button insensitive, and select the
next section, initially. This was not working
properly, since nothing was ever setting the
section box to invisible.
2019-05-04 18:18:09 +00:00
Matthias Clasen
67e6d1087e emoji chooser: populate incrementally
It takes half a second on my system to initially
populate the Emoji chooser. That is too long. Do
the work in 8 millisecond chunks to give GTK a
chance to get some frames done.
2019-05-04 02:12:02 +00:00
Timm Bäder
d702bfe7b7 filechooserbutton: Clean up finalize & destroy 2019-05-03 20:06:25 +02:00
Timm Bäder
596c9a3c0b filechooserbutton: Clear model in destroy()
Since we're destroying priv->chooser right after. We can't wait until
finalize() since clearing the model will try to work with priv->chooser.
2019-05-03 20:06:23 +02:00
Timm Bäder
c675d1c9e1 filechooserbutton: Use a bin layout 2019-05-03 20:06:10 +02:00
Matthias Clasen
1c9a486d60 css: Use multiple font-family values
Pango API to support this, so we can implement
this very easily.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1854
2019-05-03 01:44:02 +00:00
Matthias Clasen
299422994a fixup! event controller: Don't deliver events to insensitive widgets 2019-05-02 20:20:20 +00:00
Matthias Clasen
b1d90cc171 spin button: Listen for ::cancel on gestures
Otherwise, we keep spinning when we should stop.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1861
2019-05-02 15:54:17 -04:00
Matthias Clasen
af2207bc0b widget: Reset controllers when going numb
Reset event controllers when their
widget is going insensitive. This is
the expected behavior.
2019-05-02 15:53:30 -04:00
Matthias Clasen
522bbc182d gesture: Chain up in filter_event
This is the right thing to do.
We want to exclude more events.
2019-05-02 15:53:30 -04:00
Matthias Clasen
65233726f8 event controller: Don't deliver events to insensitive widgets
This is another way to avoid delivering events
to insensitive widgets.
2019-05-02 15:50:44 -04:00
Matthias Clasen
ed52c029a0 gtk: Small documentation fixes 2019-05-01 23:24:14 -04:00
Matthias Clasen
7b1201cd4d box layout: Documentation additions 2019-05-01 23:24:14 -04:00
Matthias Clasen
eff4b6377d Merge branch 'inspector-menus' into 'master'
inspector: Fix showing of menus

See merge request GNOME/gtk!810
2019-05-02 02:12:28 +00:00
Matthias Clasen
a18647af0e Merge branch 'inspector-actions' into 'master'
inspector: Show the default.activate action

See merge request GNOME/gtk!809
2019-05-02 02:09:03 +00:00
Matthias Clasen
c7df0c907a inspector: Fix showing of menus
We were hitting an assertion in some leftover
code that assumed property editors are popovers.
2019-05-02 02:05:46 +00:00
Matthias Clasen
b74407a343 Merge branch 'filechooser-save-again' into 'master'
Make file chooser saving work again

See merge request GNOME/gtk!808
2019-05-02 01:55:28 +00:00
Matthias Clasen
cd5c39834d inspector: Show the default.activate action
We were hardcoding that GtkApplicationWindow only
has a single action group with prefix 'win', but
that is no longer the case. Simply use the code
for the general widget case that can handle multiple
action groups.
2019-05-02 01:53:57 +00:00
Matthias Clasen
6e0b13b81f Make file chooser saving work again
I was a little overzealous when going
for the new default handling here. We
can't switch to gtk_widget_activate_default
before we actually handle the default.activate
action.
2019-05-02 01:41:23 +00:00
Matthias Clasen
bea8025fb5 Drop the GtkWidget::display-changed signal
Display changes now happen exclusively through
the ::root and ::unroot vfuncs. Third parties
can observe display changes by listening
for notify::root.
2019-05-02 01:33:41 +00:00
Matthias Clasen
965d0e04d1 gtk: Use root/unroot instead of display-changed
The display-changed signal is going away
2019-05-02 01:33:41 +00:00
Matthias Clasen
d7c54920ee menu: Listen only for notify::root
We no longer emit the display-changed signal,
so stop listening.
2019-05-01 23:05:09 +00:00
Matthias Clasen
33a8108f19 window: Implement display change via root/unroot
Export gtk_widget_root/unroot privately,
make them work on roots, and use them in
gtk_window_set_display. This gets us to a
single way to listen for display changes,
the root property.
2019-05-01 23:05:09 +00:00