Commit Graph

27807 Commits

Author SHA1 Message Date
Matthias Clasen
95834ad1e1 Revert "filechooser portal: Make sure we can save"
This reverts commit 4875c689a0.

This was a thinko. Writable is not actually settable from the
application side, but only for the user, from the backend side.
2017-01-17 14:14:44 -05:00
Matthias Clasen
4875c689a0 filechooser portal: Make sure we can save
Explicitly request files for saving to be writable, otherwise
we are at the mercy of the portal, which currently gets it wrong.
2017-01-17 14:09:55 -05:00
Timm Bäder
239f14cc96 switch: Fix build
Partial revert of 2b6b5c1c8f, which
removed a little too much.
2017-01-16 21:01:59 +01:00
Timm Bäder
2b6b5c1c8f switch: Remove some unused code 2017-01-16 18:17:28 +01:00
Timm Bäder
ca889b6e21 gtkentryprivate: Remove unused prototype 2017-01-16 17:23:01 +01:00
Timm Bäder
28a3dd539d scalebutton: Use GtkButon:icon-name in the ui file 2017-01-16 17:22:53 +01:00
Timm Bäder
3cfcbe2ccf spinbutton: Restore gtk3 focus behavior
Focus the spinbutton on button press, never focus the buttons.
2017-01-16 17:22:45 +01:00
Timm Bäder
132f2721ce inspector: Use GtkButton:icon-name in ui files 2017-01-16 17:22:38 +01:00
Timm Bäder
f4afa000a1 entry: Remove unused struct member 2017-01-16 17:22:29 +01:00
Daniel Boles
5e816f7283 grid: Fix plural error in docs' @Short_description 2017-01-15 20:37:49 +00:00
Benjamin Otte
87497ca2e1 snapshot: Rename gtk_snapshot_translate_2d()
It's now called gtk_snapshot_offset().
2017-01-13 14:37:48 +01:00
Benjamin Otte
6055028c96 snapshot: Rename append APIs
Instead of having gtk_snapshot_append_foo_node(), just have
gtk_snapshot_append_foo(). Nobody needs to know that this internally
uses nodes.
2017-01-13 04:46:09 +01:00
Benjamin Otte
e5e5beafa5 cssimage: Fallback images have no aspect ratio
The aspect ratio for fallback image was incorrectly set to 1.

Reftest is included.
2017-01-13 03:38:36 +01:00
Benjamin Otte
a06b1ea1ba cssimage: Scale images to contain, not cover
Images with just an aspect ratio, but without a size, should be scaled
to be fully visible in the given area.
But we scaled them to completely cover the given area, which made them
partially invisible.

Reftest included.
2017-01-13 03:38:36 +01:00
Benjamin Otte
b58de2d16c snapshot: Redo pop() API
gtk_snapshot_pop() => removed
gtk_snapshot_pop_and_append() => gtk_snapshot_pop()

So now there is no way to get a rendernode out of the snapshotting API
until you gtk_snapshot_finish().
2017-01-13 03:38:36 +01:00
Benjamin Otte
bc3ba68641 snapshot: Add gtk_snapshot_push_blend()
and use it for backgrounds.
2017-01-13 03:38:36 +01:00
Benjamin Otte
4668e6dc63 stack: Build stored render node with custom Snapshot object
This is in preparation for API changes in GtkSnapshot.
2017-01-13 03:38:36 +01:00
Benjamin Otte
d9b0685b49 Add gtk_snapshot_push_cross_fade()
... and use it.

The function is a bit awkward because it requires 2 calls to
gtk_snapshot_pop(), but once you accept that, it's very convenient to
use, as can be seen by the 2 implementations.
2017-01-13 03:38:36 +01:00
Matthias Clasen
3024956df1 about dialog: Add a "system" tab
This is a free-form tab that can contain information about the
system environment. To see it, set GtkAboutDialog::system-information
to a non-NULL value.

https://bugzilla.gnome.org/show_bug.cgi?id=776604
2017-01-12 15:29:56 -05:00
Timm Bäder
e08918cce0 actionbar: Notify when :revealed changes 2017-01-12 15:14:25 +01:00
Timm Bäder
db12128d35 infobar: Fix copy&paste error in documentation
Of course you shouldn't call gtk_dialog_response on a GtkInfoBar.
2017-01-12 09:18:55 +01:00
Timm Bäder
1bb4f1e9d9 infobar: Add :revealed property 2017-01-12 09:16:02 +01:00
Timm Bäder
e3871c4424 infobar: Keep GParamSpecs around
So we can use them in notify_by_pspec
2017-01-12 09:13:38 +01:00
Benjamin Otte
b8371a1d61 shortcutswindow: Make dispose work properly 2017-01-11 18:33:09 +01:00
Alexander Larsson
c00f8dce9f GtkSnapshot: Always use int for the translation
We already take ints when setting the translation, so it can't
currently take any other values. Additionally, I was seeing large
costs in int -> double -> int for the rects in
gtk_snapshot_clips_rect(), as all callers really are ints (widget
allocations) and the clip region is int-based.

This change completely cleared a 2% rectangle_init_from_graphene from
the profile and is likely to have nice performance effects elsewhere
too.
2017-01-11 16:14:03 +01:00
Alexander Larsson
275185d415 widget: Avoid typechecks when accessing ->clip and ->allocation 2017-01-11 15:30:30 +01:00
Alexander Larsson
8cabfef9c9 GtkCSSImage: Avoid some type checks
The width/height/aspect getters are called a lot, and almost all
callers already verify it from _gtk_css_image_get_concrete_size (),
so just skip these checks.
2017-01-11 15:28:35 +01:00
Alexander Larsson
7bee22bcb6 Avoid some more type checks for internal calls 2017-01-11 15:27:51 +01:00
Alexander Larsson
68a27a9951 gtkcssgadget: Use private non-checking versions of gtk_widget calls
This avoids a lot of checking overhead.
2017-01-11 12:05:44 +01:00
Alexander Larsson
6341fab985 GtkSnapshot: Reuse snapshot state objects
Rather than allocate new ones all the time we reuse the previous ones.
We just clear them and save them in the parent for later reuse.
2017-01-11 11:41:46 +01:00
Alexander Larsson
f67ae85b7a GtkSnapshot: Move collect data to a union in the state
This means we allocate the collect data with the state, avoiding
an extra allocation. Also, a union means every state object
is the same size and we could reuse the state objects.
2017-01-11 11:21:27 +01:00
Alexander Larsson
65ad2541d7 Snapshot: Only record names if inspector is recording
Otherwise we do a lot of allocations and vprintf calls which are
not used.
2017-01-11 10:22:40 +01:00
Alexander Larsson
882290b479 Skip dynamic type check in css value getters
This gets called a lot during snapshotting, and this change
alone brings down snapshot time by almost 10% in a syntethic
snapshot test.
2017-01-11 09:20:30 +01:00
Benjamin Otte
4c7ddbf519 cssimage: Fix cross-fade
Simgle image cross-fade opacity was computed the wrong way, which caused
weird fade-in/out animations, for example in flat buttons.

I messed this up when porting cross-fades to snapshot().
2017-01-11 02:53:12 +01:00
Matthias Clasen
9133ec5cd4 Remove an unnecessary check
Since the demise of theme engines, we can no longer hit
the case of id >= GTK_CSS_PROPERTY_N_PROPERTIES. So don't
check for this in a very frequently called function.
2017-01-10 19:56:21 -05:00
Matthias Clasen
c1dc36dff0 Use an internal parameter check here as well
We should not slow down the core parts of the css machinery
with type checks.
2017-01-10 19:56:16 -05:00
Matthias Clasen
ecd0ce3993 Use gtk_internal_return_val_if_fail here
It seems odd to have checks in just a few functions,
so switch everything over to use the internal versions.
2017-01-10 19:56:09 -05:00
Matthias Clasen
a013a16d1c Use _gtk_widget_get_window more
This avoids type checks in places where we know it is safe.
2017-01-10 19:56:02 -05:00
Matthias Clasen
d9bc675cba Refactor some css transition code slightly
Reshuffling things a bit to avoid a bunch of NULL and
type checks.
2017-01-10 19:55:57 -05:00
Matthias Clasen
4f0cf475a5 Use the .symbolic.png assets in Adwaita
Using an image() fallback from svg to png doesn't make too
much sense, since the svg is always used (unless librsvg is
not present), while the png icon is faster and cheaper to
load and thus preferable.
2017-01-10 17:16:10 -05:00
Daniel Boles
0b7542bad1 revealer: Fix a typo in a function doc
Also, "ie" wasn't very clear, but fixing that to "i.e." would cause
truncation of the summary when processed by bindings using doxygen. So,
I replaced it with "in other words", which is no _less_ clear, at least.
2017-01-09 22:44:46 +00:00
Chun-wei Fan
ea58ebe76d Visual Studio builds: Move project files to win32/
It was suggested that the project files to be moved to win32/, so that we can
have one less layer of directories we need to go down into to reach the project files.
2017-01-09 15:38:48 +08:00
Benjamin Otte
dcb15d6728 cssgadget: Compute clip correctly
We were computing it relative to the gadget allocation, but it should be
relative to the widget allocation.
2017-01-09 01:12:06 +01:00
Timm Bäder
deb458c656 widget: Document child/sibling accessors 2017-01-08 16:58:27 +01:00
Timm Bäder
545fb271b7 switch: Use a widget as slider 2017-01-08 16:54:34 +01:00
Timm Bäder
9b76badb50 widget: Add construct-only css-name property
So we can set the css name of a widget to something that's not related
to the class name. If the css-name property is set to NULL, we will
still fall back to the one set using gtk_widget_class_set_css_name which
is alwasys non-NULL since GtkWidget itself sets it to "widget".
2017-01-08 16:44:46 +01:00
Timm Bäder
d15ca3b2b4 actionbar: Fix class and instance struct parent member 2017-01-08 15:12:45 +01:00
Timm Bäder
3d5a62a0c9 actionbar: Add revealed property
So we can show and hide it with a transition as well as bind another
property to it.
2017-01-08 14:57:11 +01:00
Timm Bäder
c392f41bb2 builderparser: Shuffle if-statements around once more
The previous reordering broke the builderparser test case.
2017-01-08 13:07:12 +01:00
Timm Bäder
de6b788a91 printunixdialog: Remove leftover draw handler 2017-01-08 11:06:49 +01:00