Commit Graph

42828 Commits

Author SHA1 Message Date
Benjamin Otte
59a7739fce cssmatcher: Rewrite nth-child matcher
Instead of trying to be smart, be stupid but correct.

Fixes nth-child reftest.
2015-05-28 17:12:57 +02:00
Benjamin Otte
4847eff6c4 cssmatcher: Simplify code
Instead of copy/paste, pass the only difference as an argument

The code still doesn't work right, but at least it's easier to fix now.
2015-05-28 17:07:25 +02:00
Benjamin Otte
9df707da22 gtk: Add deprecation guards for newest pango deprecations 2015-05-28 16:54:03 +02:00
Benjamin Otte
d921a4fe84 testsuite: Add deprecation guards 2015-05-28 16:53:53 +02:00
Daniel Mustieles
d8885777a1 Updated Spanish translation 2015-05-28 06:42:39 +00:00
Matthias Clasen
a75754ef93 3.17.3 2015-05-27 17:19:56 -04:00
Daniel Mustieles
65299b55b2 Updated Spanish translation 2015-05-27 15:23:53 +00:00
Matthias Clasen
fe6e5d3116 3.17.2 2015-05-26 14:58:15 -04:00
Matthias Clasen
43ba6a492e Dist the gtk-builder-tool test script 2015-05-26 14:58:15 -04:00
Emmanuele Bassi
9aae351487 examples: Clean up the standalone Makefiles
Do not hardcode GCC as the compiler; use $(shell) expansion instead of
backticks; split the built source into its own variable.
2015-05-26 18:01:39 +01:00
Carlos Garnacho
9ff5d2e1ac entry: Set up text drag icon within drag_begin()
the drag_begin() vmethod is meant for this, and the internal DnD code
will set up a drag icon if ::drag_begin didn't do so, which means
we are first getting a "default" icon, and then replacing it with the
text surface.

This is completely harmless in X11, but causes issues on wayland as
the DnD icon window is expected to remain unchanged during DnD there.

https://bugzilla.gnome.org/show_bug.cgi?id=748763
2015-05-26 18:05:36 +02:00
Carlos Garnacho
3e60650fa8 notebook: Fix assert in ::drag-motion
The drag destination might be empty, we shouldn't be checking whether
it contains pages at all. Instead, check the source notebook, which
ought to have a selected page if you're dragging something from there.

https://bugzilla.gnome.org/show_bug.cgi?id=749893
2015-05-26 18:05:36 +02:00
Christian Kirbach
6724ea1331 Updated German translation 2015-05-25 11:26:25 +00:00
Cosimo Cecchi
345f2a484b Use built-in gtk-update-icon-cache
To generate the icon cache files.

We want to avoid a dependency loop if possible; additionally, on some
Debian-based systems gtk-update-icon-cache maps to the GTK2 version of
the utility and the GTK3 version is renamed to
gtk-update-icon-cache-3.0.

To avoid a build dependency on GTK2, use the binary that we just built
in-tree.

https://bugzilla.gnome.org/show_bug.cgi?id=749593
2015-05-24 12:08:33 -07:00
Cosimo Cecchi
02be88983e parse-sass: don't hardcode bash path
It's /bin/bash on some systems; just use /bin/sh instead.

https://bugzilla.gnome.org/show_bug.cgi?id=749593
2015-05-24 12:08:33 -07:00
Cosimo Cecchi
cfbd862aae tests: wait for draw before fetching tree view style
On some slower machines (e.g. an ARM OBS builder), this test is failing
with a race condition where we're trying to fetch the style before it's
applied.

https://bugzilla.gnome.org/show_bug.cgi?id=749593
2015-05-24 12:08:33 -07:00
Cosimo Cecchi
6ff19bcedc scrolledwindow: fix copy/paste typo
fc28303948 refactored code into the
get_scroll_unit() function but introduced a copy/paste typo.
2015-05-24 12:06:42 -07:00
Cosimo Cecchi
e0b1ea11cc placessidebar: escape tooltip text before setting it
gtk_tree_view_set_tooltip_column() specifies that markup in the text
should be escaped.
This fixes critical warnings when hovering over items in the sidebar for
bookmarks that have markup characters in their names.

https://bugzilla.gnome.org/show_bug.cgi?id=719683
2015-05-24 12:04:22 -07:00
Carlos Garnacho
48bfabe59e scrolledwindow: Trigger builtin kinetic deceleration on libinput devices
The libinput driver will send a 0/0 scroll event on touchpads and other
devices where it knows scrolling stopped for sure. Use these events to
trigger kinetic scrolling from there.

The mechanism is similar to GtkGestureSwipe, we keep a backlog of the
latest dx/dy till a previous point in time, and calculate the final
velocities from there, with the difference we're dealing with scroll
units, and not pixel distances.

https://bugzilla.gnome.org/show_bug.cgi?id=749770
2015-05-24 16:58:35 +02:00
Carlos Garnacho
fc28303948 scrolledwindow: Refactor scroll unit guessing into a separate function
Makes it clearer, and will be used in further places.

https://bugzilla.gnome.org/show_bug.cgi?id=749770
2015-05-24 16:58:35 +02:00
Jordi Mas
eb6b72424c Fixes to Catalan translation 2015-05-24 14:16:58 +02:00
Carlos Garnacho
f00214e922 scrolledwindow: reset more Indicator state on ::unmap
If a GtkScrolledWindow is just unmapped and promptly mapped again, the
indicators are left in a semi-visible state, so the GdkWindow isn't raised
properly above scrolledwindow content. This inconsistent state went away
the next time the indicator is hidden.

So, reset all state about indicator window visibility, animation
progress and conceil timer on ::unmap, this will be enough to make the
indicators start out hidden like on newly created scrolledwindows.
2015-05-22 21:16:36 +02:00
Krzesimir Nowak
39f91d7cdb gdk: Fix a typo 2015-05-22 14:39:53 +02:00
Matthias Clasen
9dad9378f2 Fix primary monitor determination with XRANDR 1.5
This was an oversight in the previous patch.
2015-05-22 06:56:23 -04:00
Dave Airlie
e670720d19 gtk3: add randr 1.5 monitor support
This patch introduces support for using the newly introduced
monitor objects in the XRandR protocol. These objects are meant
to be used to denote a set of rectangles representing a logical
monitor, and are used to hide details like monitor tiling and
virtual gpu outputs.

This uses the new objects instead of crtc/outputs objects when
they are available to create the monitor lists. X server 1.18
is required on the server side for randr 1.5.

https://bugzilla.gnome.org/show_bug.cgi?id=749561
2015-05-21 23:09:04 -04:00
Carlos Garnacho
61cc10760d iconview: Avoid usage of gdk_window_get_device_position() during DnD
Just use the last coordinates given on XdndPosition/drag_motion() in
order to trigger scrolling.

When running on Xwayland, the pointer position is unknown at this
stage on the X11 side, so the coordinates given here are bogus.
This change avoids both roundtrips and this situation.

https://bugzilla.gnome.org/show_bug.cgi?id=749679
2015-05-21 18:11:21 +02:00
Carlos Garnacho
b666f14ef8 treeview: Avoid usage of gdk_window_get_device_position() during DnD
Just use the last coordinates given on XdndPosition/drag_motion() in
order to trigger scrolling.

When running on Xwayland, the pointer position is unknown at this
stage on the X11 side, so the coordinates given here are bogus.
This change avoids both roundtrips and this situation.

https://bugzilla.gnome.org/show_bug.cgi?id=749679
2015-05-21 18:11:21 +02:00
Carlos Garnacho
b54031d505 textview: Avoid usage of gdk_window_get_device_position() during DnD
Just use the last coordinates given on XdndPosition/drag_motion() in
order to trigger scrolling.

When running on Xwayland, the pointer position is unknown at this
stage on the X11 side, so the coordinates given here are bogus.
This change avoids both roundtrips and this situation.

https://bugzilla.gnome.org/show_bug.cgi?id=749679
2015-05-21 18:11:21 +02:00
Chun-wei Fan
2ba7977114 gtk3-demo: Fix Visual Studio Builds
Add the new cursors demo to the projects, so that gtk-demo will properly
build.
2015-05-20 17:36:44 +08:00
Руслан Ижбулатов
26c24328d5 GDK: Add cursor theme support to W32 backend
Load themed cursors from the same places they are loaded on freedesktop systems,
but use W32 API functions to do so (works for .cur/.ani cursors instead of X
cursors).

Refactor the code for cursor handling. Prefer loading cursors by name.

Do not load actual cursors when loading the theme. Find the files and remember
the arguments/calls for loading them instead. Keeping HCURSOR instance in the
hashmap would result in multiple GdkCursors using the same HCURSOR. Given that
we use DestroyCursor() to off them, this would cause problems (at the very
least - DestroyCursor() would fail).

Store GdkCursor instances in a cache. Update cached cursors when theme changes.

Recognize "system" theme as a special (and default) case. When it is set,
prefer system cursors and fall back to Adwaita cursors and (as a last resort)
built-in X cursors. Otherwise prefer theme cursors and fall back to system and
X cursors.

Force GTK to use "left_ptr" cursor when no cursor is set. Using NULL makes
it use the system default "arrow", which is not the intended behaviour when
a non-system theme is selected.

Ignore cursor size setting and query the OS for the required cursor size, as
Windows (almost) does not allow setting cursors of arbitrary size.

https://bugzilla.gnome.org/show_bug.cgi?id=749287
2015-05-20 08:42:24 +00:00
Руслан Ижбулатов
641fbd86d7 GDK: Use GdkCursor objects to keep track of W32 cursors, not HCURSOR
In particular this means that cursors are disposed of by the way of
g_object_unref(), not DestroyCursor (which is documented to not to be
used on certain kinds of cursors, and we can't tell which is which).

It should also alleviate any concerns about destroying cursors that
are still in use by other windows, except for cases where we would
somehow get our hands on a HCURSOR that someone else is using and we
make a GdkCursor out of it and later unref and finalize it while it
is still in use.

It also removes the need to call CopyCursor(), which makes animated
cursors into non-animated ones as a side-effect (supposed to be a bug,
but try explaining that to MS). Now cursors should be animated (if
the are set up as such in the OS).

https://bugzilla.gnome.org/show_bug.cgi?id=697477
2015-05-20 08:40:43 +00:00
Jonas Ådahl
7fef713224 wayland: Use on globals closure for loading cursor themes
Instead of putting a 'load cursor themes' call when receiving an wl_shm
global, make it a closure that is prepared during initialization.

https://bugzilla.gnome.org/show_bug.cgi?id=719819
2015-05-20 11:45:13 +08:00
Jonas Ådahl
4e9be39518 wayland: Add global object depedency tracking
Some features need certain globals to initialize. In order to deal with
these dependencies, add a way to postpone closures that depend on a
certain set of globals, that later will be invoked when required
globals are all received.

https://bugzilla.gnome.org/show_bug.cgi?id=719819
2015-05-20 11:45:13 +08:00
Jonas Ådahl
181e4399f6 wayland: Don't round trip recursively during initialization
Instead use asynchronous round trips that is synchronized in the end of
the initialization. This makes it easier to track state, as we won't
dispatch arbitrary Wayland messages while processing globals.

https://bugzilla.gnome.org/show_bug.cgi?id=719819
2015-05-20 10:59:47 +08:00
Dušan Kazik
688dcadafa Updated Slovak translation 2015-05-19 07:18:55 +00:00
Jonas Ådahl
f6d021512a GtkWindow: Don't assume no shadow width even when not supported
Even if a window doesn't support client side shadow
(gtk_window_supports_client_shadow returns FALSE), don't assume the
shadow width is zero, as CSD may have been enabled anyway (meaning
priv->client_decorated is TRUE). In that case we still need to report
the correct width.

https://bugzilla.gnome.org/show_bug.cgi?id=749451
2015-05-18 07:46:43 -04:00
Marek Černocký
fdcb076b64 Updated Czech translation 2015-05-17 10:33:31 +02:00
Matthias Clasen
3ae953092a Don't force an icon window
We were inadvertently forcing the use of an icon window
in all cases. This patch makes it so that we once again
use a combined cursor when possible.
2015-05-16 23:55:09 -04:00
Matthias Clasen
8b902d58b9 Remove some useless comments 2015-05-16 18:04:40 -04:00
Matthias Clasen
0a5e216d42 DND: Move private api to a private header 2015-05-16 17:54:01 -04:00
Matthias Clasen
987da43e71 Remove multi-screen handling in DND code
We only have one screen nowadays. No need to carry around
code for handling screen changes.
2015-05-16 17:26:45 -04:00
Pietro Gagliardi
3c8b80dce2 Implemented most of the GDK named cursors on Mac OS X.
Only "wait" and "all-scroll" are not implemented properly. OS X does not
seem to have a proper interface to either cursor. Approximations are used
instead; see the code.

See bug 749178.
2015-05-16 17:11:44 -04:00
Matthias Clasen
924a8eb405 GtkQuery: Drop unused mimetype functions
These are not used, so drop them.
2015-05-16 00:48:36 -04:00
Matthias Clasen
41fee7e569 GtkQuery: Cleanups
Strip leading underscores from GtkQuery api, and
clean up the sources a bit.
2015-05-16 00:48:36 -04:00
Matthias Clasen
3f0f68e6ad GtkFileChooser: Show remote search results too
There is no reason not to show them. Removing this
makes search on remote locations just work.
2015-05-16 00:48:36 -04:00
Matthias Clasen
43e1eea1bb Rewrite search to be more similar to nautilus
The main advantage here is that this code works for remote
locations as well.
2015-05-16 00:48:36 -04:00
Cédric Valmary
3b6af25454 Updated Occitan translation 2015-05-15 16:13:45 +00:00
Piotr Drąg
989221251e Updated Polish translation 2015-05-15 17:56:58 +02:00
Kjell Ahlstedt
12ccebe2a4 gtkwindow: Fix a memory leak
The private data GtkGesture* drag_gesture was added by commit
13e22e2030, but it's never destroyed.
Unref it in gtk_window_finalize().

https://bugzilla.gnome.org/show_bug.cgi?id=749425
2015-05-15 15:39:04 +02:00
Matthias Clasen
90a8118838 Add a main category to desktop files
This makes desktop-file-validate happy.
2015-05-14 15:28:22 -04:00