Commit Graph

42278 Commits

Author SHA1 Message Date
Jordi Mas
1c007e4196 Upload Catalan translation 2015-03-22 04:18:27 -04:00
Matthias Clasen
ca41bb440d Add an index for new api to the docs 2015-03-22 02:11:03 -04:00
Matthias Clasen
5c5464a469 radio-menu-item: Add join_group()
The other Radio* widgets have this convenience method that removes the
memory management of the opaque GSList used to handle the group from the
API usable from language bindings (especially the ones not based on
introspection).

This commit adds gtk_radio_menu_item_join_group().

https://bugzilla.gnome.org/show_bug.cgi?id=671362
2015-03-22 02:10:38 -04:00
Matthias Clasen
ad05d84897 radio-menu-item: Allow arguments to be NULL
Some arguments, like the group and the label of a RadioMenuItem, can be
NULL: the RadioMenuItem has all the code to deal with them. The argument
validation is too strict, though, for instance doing:

  return_if_fail (IS_RADIO_MENU_ITEM (foo))

  if (foo != NULL)
    set_foo (foo)

Which is obviously incorrect.

This commit also modifies the annotations of the API, to ensure that
language bindings do the right thing.

https://bugzilla.gnome.org/show_bug.cgi?id=671362
2015-03-22 02:10:38 -04:00
Emmanuele Bassi
955aed9227 radio-menu-item: Handle a !NULL group
If we create a RadioMenuItem without a group, and then set a group, the
menu item will still be set as active, which means an inconsistently
drawn radio menu item - as the RadioMenuItem will set the active flag on
itself, but then it won't reset it when it gets a new group.

https://bugzilla.gnome.org/show_bug.cgi?id=671362
2015-03-22 02:10:37 -04:00
Matthias Clasen
c16acff3ea Start 3.17 development
Bump the version to 3.17.0 and add version macros.
2015-03-22 02:10:23 -04:00
Olivier Fourdan
03213b9509 Improve CSD decorations without a compositor
It turned out that using mwm hints to instruct wms to
create border-only decorations is not really working
universally. So, instead of doing this, render a solid
frame without shadow on the client-side to handle this
case.

https://bugzilla.gnome.org/show_bug.cgi?id=746222

Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
2015-03-22 01:34:37 -04:00
Matthias Clasen
bae97a4c6b image: Optimize non-resize changes
When the image content is changed, only queue a resize
if the size is actually changing, otherwise just a
redraw. Suggested by Owen in

https://bugzilla.gnome.org/show_bug.cgi?id=613833
2015-03-21 22:40:46 -04:00
Christian Hergert
7bb3d9557f a11y: handle atk race condition where widget has been destroyed
If the widget has been destroyed since a DBus message had been sent,
we could be in a condition that the widget pointer exists but it does
not have a window.

This bails as if the widget didn't exist if there is no available
GdkWindow.

We also set the extents to 0 to be defensive since this is a vfunc
implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=746586
2015-03-21 20:05:08 -04:00
Muhammet Kara
9e9c0a133e Updated Turkish translation 2015-03-21 21:25:38 +00:00
Alexander Larsson
8e032622c8 box-shadow: For top/bottom and left/right parts, repeat a single line
Since these part really are the same in all of the x or y direction
and we don't blur in that direction we can just blur one line and
repeat it during drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=746468
2015-03-21 21:39:15 +01:00
Alexander Larsson
967cb56275 shadow-box: Blur only horizontally/vertically for the non-corner parts
There is no need to e.g. blur in the x-direction for the top part
of a box shadow. Also, there is no need to extend the mask in the
non-blurred direction.

https://bugzilla.gnome.org/show_bug.cgi?id=746468
2015-03-21 21:31:49 +01:00
Alexander Larsson
9c2a16fb3b shadow-box: Bail out blur early if radius is 1px
For radius 1px the current implementation rounds down to a 1 px box
filter which is a no-op. Rather than creating useless shadow masks
in this case we bail out blurring early.

Another alternative would be to make radius 1px round up to a 2 px box
filter, but that would change the rendering of Adwaita which is probably
not a great idea this late in the cycle.

https://bugzilla.gnome.org/show_bug.cgi?id=746468
2015-03-21 21:07:26 +01:00
Alexander Larsson
d0dc1f52cc gtkcairoblur: Unroll inner loop for common radius values
This unrolls the inner blur loop for radius 1-10, allowing
the compiler to use a divide-by-constant operation instead
of a generic division.

Here is the blur-performance output before:

Radius  1: 124.95 msec, 32.01 kpixels/msec:
Radius  2: 117.27 msec, 34.11 kpixels/msec:
Radius  3: 123.57 msec, 32.37 kpixels/msec:
Radius  4: 118.17 msec, 33.85 kpixels/msec:
Radius  5: 119.32 msec, 33.52 kpixels/msec:
Radius  6: 124.17 msec, 32.21 kpixels/msec:
Radius  7: 121.04 msec, 33.05 kpixels/msec:
Radius  8: 130.64 msec, 30.62 kpixels/msec:
Radius  9: 119.47 msec, 33.48 kpixels/msec:
Radius 10: 117.95 msec, 33.91 kpixels/msec:
Radius 11: 122.38 msec, 32.68 kpixels/msec:
Radius 12: 121.92 msec, 32.81 kpixels/msec:
Radius 13: 125.45 msec, 31.89 kpixels/msec:
Radius 14: 121.63 msec, 32.89 kpixels/msec:
Radius 15: 120.18 msec, 33.28 kpixels/msec:

And after:

Radius  1: 42.26 msec, 94.65 kpixels/msec:
Radius  2: 59.15 msec, 67.62 kpixels/msec:
Radius  3: 60.29 msec, 66.35 kpixels/msec:
Radius  4: 64.53 msec, 61.99 kpixels/msec:
Radius  5: 60.07 msec, 66.59 kpixels/msec:
Radius  6: 62.43 msec, 64.07 kpixels/msec:
Radius  7: 60.36 msec, 66.27 kpixels/msec:
Radius  8: 59.59 msec, 67.13 kpixels/msec:
Radius  9: 76.17 msec, 52.51 kpixels/msec:
Radius 10: 79.41 msec, 50.37 kpixels/msec:
Radius 11: 118.92 msec, 33.64 kpixels/msec:
Radius 12: 121.31 msec, 32.97 kpixels/msec:
Radius 13: 118.30 msec, 33.81 kpixels/msec:
Radius 14: 116.82 msec, 34.24 kpixels/msec:
Radius 15: 116.99 msec, 34.19 kpixels/msec:

I.e. almost double performance for the unrolled radius values.

https://bugzilla.gnome.org/show_bug.cgi?id=746468
2015-03-21 21:07:26 +01:00
Alexander Larsson
ae21e08782 gtkcairoblur: Minor restructure
This just moves get_box_filter_size to the top and makes
it a macro (so it can be used as a constant later).

https://bugzilla.gnome.org/show_bug.cgi?id=746468
2015-03-21 20:59:57 +01:00
Alexander Larsson
9ba185b749 Add performance test for gtkcairoblur
This just creates a large cairo surface and times bluring it
at various values of radius.

https://bugzilla.gnome.org/show_bug.cgi?id=746468
2015-03-21 20:59:57 +01:00
hanniedu
dd1af9bbdd Updated Dutch translation gtk and gtk-properties master 3.16 2015-03-21 18:25:17 +01:00
Matthias Clasen
8c8e6588dc HighContrast: Fix a typo
Commit 0a39d7d9 introduced a selected_bg_color with a missing $
in front of it.
2015-03-20 20:49:56 -04:00
Gábor Kelemen
4a2b44467b Updated Hungarian translation 2015-03-20 23:23:24 +00:00
Balázs Úr
5f52a2c8c9 Updated Hungarian translation 2015-03-20 22:57:03 +00:00
Matthias Clasen
40bb2a1616 reftests: Add a way to compare different runs
gtk-reftest already had an --output=DIR option to tell it where
to save all the resulting images. Now you can combine this with
the --compare-with=DIR option in a second run to make gtk-reftest
compare the .out.png files from the first run with the .out.png
files of the current run, instead of producing .ref.png files.

The intended use for this is to verify that changes do not affect
the generated output.
2015-03-20 16:42:04 -04:00
Rico Tzschichholz
db8e6aa497 mir: Fix version annotation, the mir-backend is available since 3.16 2015-03-20 20:23:01 +01:00
Jakub Steiner
3f13349f27 fix insensitive and backdrop states
- checkboxes, labels and buttons were a mixed bag for
  :insensitive and :backdrop

https://bugzilla.gnome.org/show_bug.cgi?id=746188
2015-03-20 13:25:52 +01:00
Matthias Clasen
d6bfc2b9c9 HighContrast: fix insensitive labels
Make insensitive labels differerent from regular labels.

https://bugzilla.gnome.org/show_bug.cgi?id=746493
2015-03-20 06:20:30 -04:00
Matthias Clasen
fa1bb8972a gtk-demo: Plug a memory leak 2015-03-19 22:57:10 -04:00
Matthias Clasen
8e82d0fba2 widget-factory: Fix toolbar on page 3
Set toolbar-style to 'icons' to avoid rectangular buttons.
2015-03-19 19:11:39 -04:00
Kjartan Maraas
7b1ff7c215 Updated Norwegian bokmål translation. 2015-03-19 21:13:10 +01:00
Vadim Rutkovsky
3211e82b59 inspector: show accessible name and description 2015-03-19 17:01:23 +01:00
Carlos Garnacho
6c8c37abbb wayland: Silence warnings on clipboard data sending cancellation
During copy/paste, it may be common that we receive several property changes
around the selection atom, this results in warnings when cancelling the previous
write attempt. We already honor the last request properly, so we should just
cancel silently.
2015-03-19 16:05:04 +01:00
Carlos Garnacho
d5160bb950 wayland: Ensure we re-request the target if the fd changes
If we receive wl_data_source.target before .send, the target would already
be cached, but we'd take no action on the new fd.
2015-03-19 16:05:04 +01:00
Carlos Garnacho
a59fd4a9ad wayland: Don't accept the "TARGETS" target on the wl_data_offer
This is handled separately through the data already cached from the
wl_data_offer.offer handler, we can avoid this request entirely then.
2015-03-19 16:05:04 +01:00
Милош Поповић
4d0e1e0b88 Updated Serbian translation 2015-03-19 13:20:12 +00:00
Benjamin Otte
d48ba486ee Adwaita: Fix context menu shadows not showing up 2015-03-19 03:55:06 +01:00
Bastien Nocera
7dac38f841 inspector: Make it easier to cut'n'paste advice message
The message says "Enable statistics with GOBJECT_DEBUG=instance-count"
but the message itself isn't selectable, making it hard to cut'n'paste.

https://bugzilla.gnome.org/show_bug.cgi?id=746391
2015-03-18 22:05:46 -04:00
Benjamin Otte
ec57c6c10b csspathnode: Handle context going away
Sometimes path nodes can survive longer than the style context that
created them. Don't crash in those cases.

Fixes startup of mutter.

Testcase included.

https://bugzilla.gnome.org/show_bug.cgi?id=746407
2015-03-18 18:24:45 +01:00
Benjamin Otte
d55c261079 inspector: Add a new page that lists the CSS node tree 2015-03-18 15:23:33 +01:00
Benjamin Otte
8640bc47b1 cssnode: Add properties 2015-03-18 15:23:33 +01:00
Benjamin Otte
d0d9f5a302 csswidgetnode: Use style_changed signal instead of update_style vfunc 2015-03-18 15:23:33 +01:00
Benjamin Otte
10d39171d9 cssnode: Add a style-changed signal
The signal gets emitted whenever the style needs to be changed.
2015-03-18 15:23:33 +01:00
Benjamin Otte
6988f9b818 cssnode: Add node-added and node-removed signal
This allows monitoring the CSS tree. For now, moving a child to a
different position relative to its siblings while keeping the same
parent will cause a child-added + child-removed emission.
2015-03-18 15:23:33 +01:00
Benjamin Otte
c7fba52a36 cssnode: Track invalid children
We need to properly track if a node needs to propagate invalidation
state information to its children. We didn't do this properly before and
that could lead to us forgetting to invalidate nodes in corner cases.
2015-03-18 15:23:33 +01:00
Benjamin Otte
7395dddd47 csswidgetnode: Avoid creating a stylecontext
If the widget doesn't have a style context, don't create one. Instead,
call functions on the widget directly.
2015-03-18 15:23:33 +01:00
Benjamin Otte
d785820c53 cssnode: Change the way we invalidate timestamps
Do not propagate the TIMESTAMP change through the node tree, as that
causes lots of uneeded markings of nodes as invalid.

Instead, walk the node tree and find the nodes that have a non-static
style and only invalidate timestamps on those.
2015-03-18 15:23:33 +01:00
Benjamin Otte
759d8dafd9 cssstyle: Add gtk_css_style_is_static()
Gets rid of the need to do

  if (ANIMATED_STYLE() &&
      animated_style_is_static(ANIMATED_STYLE(style))
2015-03-18 15:23:33 +01:00
Benjamin Otte
d9727290cf cssnode: Special-case TIMESTAMP invalidations
Only invalidate timestamps if the node is marked as invalid. We overload
the meaning of "invalid" as "tracks timestamps".

While I don't like the way this is written, it is an important
optimization because 95+% of nodes don't animate so timestamps don't
matter to them. But timestamps are invalidated 60x per second.
2015-03-18 15:23:33 +01:00
Benjamin Otte
68b8f792d6 cssnode: Redo style changed tracking
We don't return a NULL style to mean "no changes" anymore, instead
we check new_style == old_style to mean that.

Make sure the code reflects this, otherwise we'll send
GTK_CSS_CHANGE_PARENT_STYLE invalidations everywhere and screw up
performance.
2015-03-18 15:23:32 +01:00
Benjamin Otte
776d99ac51 stylecontext: Call get_style(), not create_style()
We want to ensure that the style is created properly.

This also allows making the create_Style() function private.
2015-03-18 15:23:32 +01:00
Benjamin Otte
092ff983f7 cssnode: Merge the 2 places that compute styles
Now that the widget node recomputes styles on update_style() we can just
call it during validate(). That way, we don't need the widget node to
manually compute its style.
2015-03-18 15:23:32 +01:00
Benjamin Otte
df51bc836b cssnode: Always return correct style values
If CSS values are queried from a widget, recompute them if necessary. Do
not emit style-updated until the validation phase however.

This way, we don't run into performance traps when style-update causes
invalidations that cause new style-updated to be emitted.
2015-03-18 15:23:32 +01:00
Benjamin Otte
3d1e2a0558 cssstyle: Add optimization
There is no difference between a style and itself.
2015-03-18 15:23:32 +01:00