Commit Graph

49329 Commits

Author SHA1 Message Date
Benjamin Otte
da207c9fdd snapshot: Add a snapshot function to GtkCssCustomGadget 2016-11-15 17:48:45 +01:00
Benjamin Otte
4e06d8f73c snapshot: Add gtk_css_gadget_snapshot()
Including a snpahsot() vfunc, wee!
2016-11-15 17:48:45 +01:00
Benjamin Otte
ae2477b1bc container: Add snapshot() implementation
Note that this implementation does not respect GDK windows at all. If
your widget requires respecting them, you should write your own
snapshot implementation and not chain up.
2016-11-15 17:48:45 +01:00
Benjamin Otte
2cd9e5170e widget: Add more sophisticated detection of rendering method
We now look at which of get_render_mode, draw or snapshot vfuncs is the
latest to have been overwritten in the class tree and then use that one.

This allows GtkContainerClass and GtkBinClass to override all of them
for without screwing things up.
2016-11-15 17:48:45 +01:00
Benjamin Otte
79d2d0e40d snapshot: Add gtk_snapshot_render_background()
and gtk_snapshot_render_frame() to be direct replacements for the
old gtk_render_*() functions.

Use them to replace Cairo usage completely in gtk_window_snapshot().
2016-11-15 17:48:45 +01:00
Benjamin Otte
9006e697fb flowbox: children per line may not be 0 2016-11-15 17:48:45 +01:00
Benjamin Otte
d1fec79c00 snapshot: Completely reengineer API
We now try to emulate cairo_t:

We keep a stack of nodes via push/pop and a transform matrix.

So whenever a new node is added to the snapshot, we transform it
by the current transform matrix and append it to the current node.
2016-11-15 17:48:45 +01:00
Benjamin Otte
956edd83a7 gsk: Add implementation for gsk_render_node_get_transform() 2016-11-15 17:48:45 +01:00
Benjamin Otte
bb9626dc29 window: Implement snapshot() 2016-11-15 17:48:45 +01:00
Benjamin Otte
b1154be1c4 widget: Add GtkWidgetClass.snapshot() vfunc
Does the same thing as the render vfunc, only that it uses a different
prototype.
2016-11-15 17:48:45 +01:00
Benjamin Otte
93cbba6c3e gtk: Add gtk_widget_snapshot()
It's functionally equivalent to gtk_widget_get_render_node() but uses a
GtkSnapshot argument to carry the state.
2016-11-15 17:48:45 +01:00
Carlos Garnacho
f90dcb33f9 gdk: Fix win32 build typo
We've left libgdk-3 behind. Noticed by Andrew Chadwick, spotted
by Emmanuele Bassi.
2016-11-15 17:09:30 +01:00
Marek Cernocky
4c7f907d16 Updated Czech translation 2016-11-15 14:39:46 +01:00
Matthias Clasen
d462c31233 entry: Avoid recursion in gtk_entry_ensure_layout
This was unintentional, and lead to a memory leak.
2016-11-14 15:17:41 -05:00
Lauri Kasanen
8b75268d1c recent-manager: Fix a memory leak caused by "recent-manager: Add a limit to the list's size"
Signed-off-by: Lauri Kasanen <curaga@operamail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=773587
2016-11-14 14:26:34 -05:00
Matthias Clasen
34e26017e3 appchooser: Plug a memory leak
We were not dropping the reference that the model gives us.

https://bugzilla.gnome.org/show_bug.cgi?id=774352
2016-11-14 14:19:58 -05:00
Andrew Chadwick
83712a48f4 win32: remove an unused func operating on GdkColor
https://bugzilla.gnome.org/show_bug.cgi?id=774347
2016-11-14 14:11:36 -05:00
Matthias Clasen
23354ff6e7 widget-factory: Better progressbar testing
Hook the two top progressbars up to the scale with marks.
Your turn, Lapo.
2016-11-14 08:21:31 -05:00
Olivier Fourdan
03b8a8a880 gtkstack: reorder size_allocate and move_window
Unlike other container widgets, GtkStack would allocate its children
prior to moving its windows, which might prevent further valid size
allocation signals to be emitted.

Re-order the size allocation of child widgets to be performed after
moving the GtkStack windows.

Thanks to Owen for spotting the real issue here.

https://bugzilla.gnome.org/show_bug.cgi?id=767713
2016-11-14 12:24:18 +01:00
Olivier Fourdan
4ae1eab3b1 Revert "gdkwindow: configure native windows in move_native_children()"
This reverts commit 9e2b1ad39e.
2016-11-14 12:24:18 +01:00
Olivier Fourdan
5ccc570cca Revert "gdk: Get rid of unused variables"
This reverts commit 7016409e9f.
2016-11-14 12:24:18 +01:00
Matthias Clasen
2520662d13 Allow replacing input file in gtk-builder-tool simplify 2016-11-12 22:33:01 -05:00
Timm Bäder
c944bf7330 Call gtk_widget_set_has_window for missing windowed widgets 2016-11-12 21:48:23 +01:00
Timm Bäder
4e445e8e53 window: Properly propagate for_size=-1 2016-11-12 20:37:30 +01:00
Timm Bäder
0d88fe65ba stack: Use gtk_widget_measure 2016-11-12 20:37:22 +01:00
Timm Bäder
95eed97586 listbox: Use gtk_widget_measure 2016-11-12 20:37:18 +01:00
Timm Bäder
9a0513d911 window: Use gtk_widget_measure 2016-11-12 20:37:14 +01:00
Timm Bäder
997fd3c81e grid: Use gtk_wiget_measure 2016-11-12 20:37:10 +01:00
Timm Bäder
26746c8369 toolitemgroup: Remove style properties
Replace them with their default values
2016-11-12 08:10:02 +01:00
Timm Bäder
fdc0c6426b combobox: Remove appears-as-list style property
Remove all the code handling the appears-as-list=TRUE case.
2016-11-12 08:10:02 +01:00
Timm Bäder
5e06701f53 treeview: Remove style properties
Replace them with the Adwaita default values
2016-11-12 08:09:58 +01:00
Chun-wei Fan
fcd216a409 gdkscreen-win32.c: Also define _WIN32_WINNT
As in the last commit on gdkdisplay-win32.c, we need to define that to be
0x0600 (Vista) or later so that the items needed in the Windows headers be
activated.

See: https://bugzilla.gnome.org/show_bug.cgi?id=768081#c62
2016-11-11 21:06:01 +08:00
Chun-wei Fan
718efc2f59 gdkdisplay-win32.c: Define _WIN32_WINNT
... to be for Vista (0x0600) or later.  This is so that the necessary
items in the Windows headers be activated so that the code will build
properly on mingw-w64, and we already require Vista or later for GTK+.

Thanks Ting-Wei Lan for pointing this out.

See: https://bugzilla.gnome.org/show_bug.cgi?id=768081#c62
2016-11-11 20:58:16 +08:00
Lauri Kasanen
0d364173f6 recent-manager: Add a limit to the list's size
This fixes a DOS where any app can cause all running gtk apps
to use arbitrary amounts of memory.

Originally reported against mate-panel, where running a big slideshow
in eye-of-mate caused increasing RAM usage in mate-panel.

v2: Hardcode the value
Signed-off-by: Lauri Kasanen <curaga@operamail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=773587
2016-11-10 17:09:45 -05:00
Matthias Clasen
3c27774a5d places sidebar: Don't leak a reference
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774185
2016-11-10 15:16:05 -05:00
Matthias Clasen
5e19e06dcc Fix a copy-paste error
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774185#c3
2016-11-10 15:07:08 -05:00
Matthias Clasen
547970b0bc headerbar: Don't leak widgets
We were not properly freeing separators that we end up
not using.

https://bugzilla.gnome.org/show_bug.cgi?id=774066
2016-11-10 15:03:35 -05:00
Matthias Clasen
c7d119614f spinbutton: Fix some gadget handling issues
We were not adding the down_button gadget to the parent,
and we were not unreffing the button gadgets.

https://bugzilla.gnome.org/show_bug.cgi?id=774046
2016-11-10 14:46:21 -05:00
Massimo Valentini
8121860251 GdkGLContext: chain finalize handler
https://bugzilla.gnome.org/show_bug.cgi?id=773979
2016-11-10 14:34:31 -05:00
Thibaut Girka
641b42f9f5 Fix loading cached compose tables
https://bugzilla.gnome.org/show_bug.cgi?id=773916
2016-11-10 14:32:59 -05:00
Gustavo Noronha Silva
942e904bcc cssshadowvalue: scale the blur surface by the same factor as the target
Making sure the surfaces are using the same scale factor makes it more
likely a fast path will be used when pixman gets involved, as pointed
out by Benjamin Otte.

https://bugzilla.gnome.org/show_bug.cgi?id=772075
2016-11-10 16:47:13 -02:00
Carlos Garcia Campos
c836be0508 printing: Do not truncate job names in GtkPrintOperation
We are currently truncating job names to 255 bytes, because that's the
maximum allowed length of job-name attribute in CUPS. This is a CUPS
limitation that GtkPrintOperation shouldn't need to know, and it
shouldn't affect other backends, that might have other limitations or
even no limitation at all. This has another side effect, that what you
set as GtkPrintOperation:job-name could be different to what you get if
the property is truncated, this is not documented in
gtk_print_operation_set_job_name(). So, I think the job name should be
truncated by the CUPS backend, right before setting the job-name
attribute.

https://bugzilla.gnome.org/show_bug.cgi?id=774097
2016-11-10 16:57:30 +01:00
Matthias Clasen
7b2313a6df Avoid criticals in gtk_image_get_render_node
These nodes can be NULL, we need to handle that.
2016-11-10 08:26:37 -05:00
Florian Müllner
38a8e4ee7c wayland: Set startup ID from GApplication platform data
The GApplication platform data may contain a startup ID that on X11
is used to set the startup notification ID when activated. Do the
same on the wayland backend to make startup notifications work for
DBus-activated applications where the DESKTOP_STARTUP_ID environment
variable is not set.

https://bugzilla.gnome.org/show_bug.cgi?id=768531
2016-11-09 14:18:14 -05:00
Florian Müllner
d163aba030 gdkdisplay-wayland: Add API to set startup notification ID
For wayland clients, the startup notification ID is currently only set
from the DESKTOP_STARTUP_ID environment variable. As that variable is
only set for clients launched via exec(), startup completion is not
indicated correctly for DBus-activated applications unless an explicit
ID is specified - usually that is not the case, as the default handling
uses gdk_notify_startup_complete().
To address this, we need API to set the startup notification ID from GTK
as we have on X11.

https://bugzilla.gnome.org/show_bug.cgi?id=768531
2016-11-09 14:18:14 -05:00
Benjamin Otte
1259a489f2 iconhelper: Add support for GskTexture
... and use that in GtkImage.
2016-11-08 20:31:34 +01:00
Benjamin Otte
09359197a7 gsk: Implement textures for the Cairo renderer 2016-11-08 20:31:34 +01:00
Benjamin Otte
46eb2c1be9 gsk: Add GskTexture 2016-11-08 20:31:34 +01:00
Marek Cernocky
71aeb8075b Updated Czech translation 2016-11-08 12:38:32 +01:00
Piotr Drąg
7c55830d02 Update POTFILES.skip 2016-11-08 10:08:14 +01:00