Commit Graph

58345 Commits

Author SHA1 Message Date
Matthias Clasen
e64e9cd520 simplify: Add a testcase for templates 2019-05-31 19:42:18 +00:00
Matthias Clasen
21491d27bb simplify: Add a testcase for dialogs 2019-05-31 19:39:17 +00:00
Piotr Drąg
4db41b01a5 Update POTFILES.in 2019-05-31 20:43:51 +02:00
Lubomir Rintel
8799e5798b builder-tool: Rewrite GtkDialog
Changes

  <object class="GtkDialog">
    <child internal-child="vbox">
      <...>
        <child internal-child="action_area">...</child>
        ...
      </...>
      <packing />
    </child>
  <object>

to

  <object class="GtkDialog">
    <child internal-child="content_area">
      <...>
        ...
      </...>
    </child>
    <child internal-child="action_area">...</child>
  <object>
2019-05-31 17:03:12 +00:00
Matthias Clasen
173ffbb547 Merge branch 'overlay-scrolling-setting' into 'master'
Overlay scrolling setting

See merge request GNOME/gtk!873
2019-05-31 15:32:49 +00:00
Matthias Clasen
97e15b8718 scrolled window: respect overlay-scrolling setting
If the gtk-overlay-scrolling setting is FALSE,
don't use overlay scrollbars.
2019-05-31 15:04:23 +00:00
Matthias Clasen
2ae6f1a741 Add a gtk-overlay-scrolling setting
This is in preparation for letting user opt out of
overlay scrolling in the control-center.
2019-05-31 14:07:15 +00:00
Matthias Clasen
8145872e27 Merge branch 'wip/chergert/remove-cclosure' into 'master'
gtk: rely on default marshallers

See merge request GNOME/gtk!893
2019-05-31 10:57:27 +00:00
Benjamin Otte
4df049e81c Merge branch 'for-master' into 'master'
For master

See merge request GNOME/gtk!892
2019-05-31 04:07:11 +00:00
Christian Hergert
bd26cce812 gtk: rely on default marshallers
Similar to previous removals of g_cclosure_marshal_VOID__VOID we can remove
other marshallers for which are a simple G_TYPE_NONE with single parameter.
In those cases, GLib will setup both a c_marshaller and va_marshaller for
us. Before this commit, we would not get a va_marshaller because the
c_marshaller is set.

Related to GNOME/Initiatives#10
2019-05-30 20:56:50 -07:00
Benjamin Otte
6b2518a190 widget: fix CSS transforms with margins
The CSS transform should operate on the border-box, not the margin box.
So we need to shrink the bounds by the margin before we apply the CSS
transform.
2019-05-31 05:36:50 +02:00
Benjamin Otte
6b1cfd0bca gtk-demo: Fix sliding puzzle demo
1. Menubuttons aren't buttons

2. For paintables without aspect ratios, use 1.0
2019-05-31 05:36:44 +02:00
Niels De Graef
8925c17297 Merge branch 'wip/nielsdg/fix-gir-warnings' into 'master'
Fix some GObject introspection annotations

See merge request GNOME/gtk!891
2019-05-30 18:49:48 +00:00
Niels De Graef
df9aed6c61 Fix some GObject introspection annotations
Fixes several warnings by the GIR compiler.
2019-05-30 20:34:43 +02:00
Matthias Clasen
2eb0333017 Add a testcase
This tests the fix in 1e7225aa1c.
2019-05-30 14:12:07 -04:00
Benjamin Otte
22e0785802 build: Make script interpreter optional
Running the tests needs it though, so it's only optional without tests.
2019-05-30 18:34:51 +02:00
Benjamin Otte
7a3ffec762 docs: Fix build 2019-05-30 18:26:32 +02:00
Benjamin Otte
b9dc13ad99 Merge branch 'cairo-script-interpreter' into 'master'
rendernodeparser: Parse cairo script

See merge request GNOME/gtk!876
2019-05-30 15:48:02 +00:00
Benjamin Otte
53f23f8ae9 rendernodeparser: Handle empty Cairo nodes
Cairo nodes can contain a NULL surface if they have never been drawn to.
Make this the default Cairo node.
2019-05-30 15:32:36 +02:00
Benjamin Otte
1e0c0c0ba7 rendernodeparser: Parse cairo script
Use cairo-script-interpreter to parse the scripts that generate cairo
nodes.

This requires libcairoscriptinterpreter.so to work properly, but if
it isn't found we disable this (unimportant for normal functioning)
code and just emits a parser warning.
The testsuite requires it however or it will fail.

A new test is included that tests all of this.
2019-05-30 15:32:36 +02:00
Matthias Clasen
2f37207487 Remove leftover debug spew 2019-05-30 08:19:08 -04:00
Matthias Clasen
d71bf4d35c Add gtknative.h to public headers 2019-05-30 08:18:29 -04:00
Matthias Clasen
93a34eb62d Merge branch 'lr/builder-tool-templates' into 'master'
builder-tool: Rewrite GtkBuilder templates too

See merge request GNOME/gtk!888
2019-05-30 11:56:05 +00:00
Matthias Clasen
dad5da8028 Merge branch 'lr/builder-tool-assistant-crash' into 'master'
builder-tool: Set the parent of newly created GtkAssistantPage

See merge request GNOME/gtk!890
2019-05-30 11:48:59 +00:00
Lubomir Rintel
1e7225aa1c builder-tool: Set the parent of newly created GtkAssistantPage
...and its property. Otherwise simplify_element() blows up when looking
up the hierarchy to determine a property type.

  $ gtk4-builder-tool simplify --3to4 /dev/stdin <<EOF
  > <?xml version="1.0" encoding="UTF-8"?>
  > <!-- Generated with glade 3.20.2 -->
  > <interface domain="nm-applet">
  >   <object class="GtkAssistant">
  >     <child>
  >       <object class="GtkBox" id="confirm_page">
  >       </object>
  >       <packing>
  >         <property name="page_type">confirm</property>
  >         <property name="complete">True</property>
  >       </packing>
  >     </child>
  >   </object>
  > </interface>
  > EOF
  /dev/stdin: Packing property GtkAssistant::page_type not found
  /dev/stdin: Packing property GtkAssistant::complete not found
  Segmentation fault (core dumped)
2019-05-30 11:39:09 +02:00
Lubomir Rintel
2d55fce23d builder-tool: Rewrite GtkBuilder templates too 2019-05-30 10:34:24 +02:00
Timm Bäder
78ee4c0677 gl renderer: Properly flip scaled fallback nodes
Fixes cairo nodes in hidpi setups
2019-05-30 09:12:45 +02:00
Matthias Clasen
d691393f5f Merge branch 'wip/baedert/nodeeditor-fuckery' into 'master'
node editor: Add a quick way to save a testcase

See merge request GNOME/gtk!880
2019-05-30 03:28:41 +00:00
Matthias Clasen
3f6b64fc1d Merge branch 'wip/chergert/sysprof-3' into 'master'
profiler: port GdkProfiler to sysprof-3

See merge request GNOME/gtk!886
2019-05-30 03:26:59 +00:00
Christian Hergert
3a0beeadc5 profiler: port GdkProfiler to sysprof-3
This uses the new sysprof-3 ABI to implement the capture writer. It also
uses the statically linked libsysprof-capture-3.a that is provided with
Sysprof for the capture writing to ensure that we do not leak any symbols
nor depend on any additional libraries.

The GTK_TRACE_FD can be used to pass a FD for tracing into Gtk. Sysprof
uses this when the Gtk instrument is selected for recording.
2019-05-29 19:02:30 -07:00
Matthias Clasen
853e832702 Merge branch 'shortcuts-sizing' into 'master'
Fix shortcuts window sizing

Closes #11

See merge request GNOME/gtk!885
2019-05-29 21:18:46 +00:00
Matthias Clasen
e0cc72e94f Fix shortcuts window sizing
We were deferring the reflow until map, but this
leads to the section initially having an enormous
height and the window picks up that size before
we have a chance to reflow, This could be seen
in the "Builder" demo in gtk4-demo.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/11
2019-05-29 17:06:27 -04:00
Christian Hergert
82afe850e8 marshallers: add missing g_cclosure_marshal_VOID__VOID fixes 2019-05-29 13:48:33 -07:00
Matthias Clasen
164e362ec2 Merge branch 'wip/chergert/marshal-gtk4' into 'master'
marshallers: ensure g_cclosure_marshal_VOID__VOIDv is used

See merge request GNOME/gtk!883
2019-05-29 20:38:51 +00:00
Christian Hergert
f507a79056 marshallers: ensure g_cclosure_marshal_VOID__VOIDv is used
If we set c_marshaller manually, then g_signal_newv() will not setup a
va_marshaller for us. However, if we provide c_marshaller as NULL, it will
setup both the c_marshaller (to g_cclosure_marshal_VOID__VOID) and
va_marshaller (to g_cclosure_marshal_VOID__VOIDv) for us.
2019-05-29 13:22:31 -07:00
Matthias Clasen
90f330e27a Merge branch 'gesture-click' into 'master'
Rename GtkGestureMultiPress to GtkGestureClick

See merge request GNOME/gtk!878
2019-05-29 18:39:09 +00:00
Timm Bäder
3874f37395 node editor: Add a quick way to save a testcase 2019-05-29 20:30:21 +02:00
Matthias Clasen
2be733497b Merge branch 'global-coords' into 'master'
Drop global coordinates

See merge request GNOME/gtk!879
2019-05-29 18:29:57 +00:00
Matthias Clasen
200373f435 Mention event controller API in the migration guide 2019-05-29 14:17:07 -04:00
Matthias Clasen
d47434bdb6 Mention global coordinates in the migration guide 2019-05-29 18:11:57 +00:00
Matthias Clasen
792d578f4b Cosmetics
Remove a doc comment for no-longer-public api.
2019-05-29 18:04:15 +00:00
Matthias Clasen
9ecd906b7f Cosmetics
Drop a leftover declaration.
2019-05-29 18:04:13 +00:00
Matthias Clasen
51396533a1 Fix the win32 build
gdk_display_get_monitor_at_point was used
in this backend.
2019-05-29 18:04:13 +00:00
Matthias Clasen
b867cbe0d8 Cosmetics
Remove an unused variable.
2019-05-29 18:04:08 +00:00
Matthias Clasen
8ed27d6e3b Drop gdk_surface_move
And its cousin, gdk_surface_move_resize.
These APIs are expecting global coordinates,
which are going away. GTK is not using them
anymore.
2019-05-29 18:04:08 +00:00
Matthias Clasen
956e94a8d4 Remove a misleading comment
We don't have windowed widgets anymore, and
gdk_surface_move_resize is about to go away.
2019-05-29 18:04:08 +00:00
Matthias Clasen
2081bf346e window: Remove move unused fields
position_constraints_changed is never used.
2019-05-29 18:04:08 +00:00
Matthias Clasen
74db7cbe00 window: Never call gdk_surface_move
With gtk_window_set_position gone, we should never
come up with a new position to set in this code.

Leave a warning in place and remove the gdk_surface_move
calls.
2019-05-29 18:04:08 +00:00
Matthias Clasen
d6d5d60703 Drop an empty function
gtk_window_constrain_position is not doing anything
anymore, so no need to call it.
2019-05-29 18:04:08 +00:00
Matthias Clasen
ece7fff339 window: Drop more unused fields
need_default_position is never used.
2019-05-29 18:04:08 +00:00