Commit Graph

42597 Commits

Author SHA1 Message Date
Matthias Clasen
4de444ca61 placessidebar: Simplify some code
Use existing functions, instead of open-coding manipulation
of string arrays.
2015-05-30 09:20:27 -04:00
Benjamin Otte
5984bc78ee flowbox: Fix compiler warnings
Introduced in e59e38b581
2015-05-30 06:00:14 +02:00
Benjamin Otte
91fac8b5aa cssnode: Fix position invalidation
The previous code was overly complicated and wrong.
2015-05-30 05:50:31 +02:00
Matthias Clasen
e59e38b581 GtkFlowBox: support positional css selectors
As in the previous commit for GtkListBox, support :first-child,
:last-child, :nth-child() and :last-nth-child() selectors here.
2015-05-29 23:37:42 -04:00
Christian Hergert
aa07c40748 listbox: add support for :first-child, :last-child and others
This applies the proper CSS child ordering semantics using GtkCssNode to
GtkListBox. You can now use :first-child, :last-child, :nth-child(), and
:last-nth-child() selectors.

For example, this allows styling row separators using CSS while ignoring
the separator on the last row.

 GtkListBoxRow {
   border-bottom: 1px solid @borders;
 }
 GtkListBoxRow:last-child {
   border-bottom: none;
 }

When the sort ordering of the listbox changes, we also update the CSS
node ordering.
2015-05-29 20:03:11 -07:00
Cédric Valmary
bb93c1cecd Updated Occitan translation 2015-05-29 21:50:59 +00:00
John Ralls
205db2013c Fix DnD Introspection on Quartz Backend.
Don't exclude the -quartz.c files from introspection_files.
2015-05-29 13:27:39 -07:00
Timm Bäder
4d75d62033 GtkStack: Interpolate between size changes 2015-05-29 17:37:04 +02:00
Timm Bäder
0eddfcedb9 GtkStack: Remove some useless function calls
We will call gtk_widget_queue_resize anyway later when finishing the
(maybe non-running) transition, which will also cause the stack to be
repainted.
2015-05-29 17:37:04 +02:00
Timm Bäder
24193a38f0 GtkStack: Keep the last_visible_child around during transitions
We need it later.
2015-05-29 17:37:04 +02:00
Timm Bäder
dc55a895ed GtkStack: Misc indentation fixes 2015-05-29 17:37:04 +02:00
Timm Bäder
6d25e52a4d GtkStack: Remove useless cast 2015-05-29 17:37:04 +02:00
Timm Bäder
c0d535a718 GtkStack: Remove useless function calls
These both just use the default values anyway.
2015-05-29 17:37:04 +02:00
Timm Bäder
bdabea3ae3 GtkStack: Save last visible widget size
When interpolating the stack size, we compute the current size by using
the prefered/minimum current size and the last size. We can't use the
last_visible_surface_allocation because that is not available until the
first _draw call and it doesn't include the child's margins.
2015-05-29 17:37:04 +02:00
Timm Bäder
b3bbe99001 GtkStack: Remove gtk_widget_set_opacity call
The corresponding call with 0.999 opacity is gone, so we don't need to
reset the opacity anymore.
2015-05-29 17:37:04 +02:00
Timm Bäder
d3a18de97e gtkpopover: Update the menu's alignment
... when the popover position changes.
2015-05-29 17:37:04 +02:00
Chun-wei Fan
36c65c1aca Fix GDK MSVC Projects
We need to link to dwmapi.lib for all configs, not just the Broadway
ones, so fix the build.
2015-05-29 18:10:59 +08:00
Matthias Clasen
02e2f7dc56 Fix a cornercase crash
If gtk_text_layout_move_cursor_visually is called with a
count of 0, we were passing NULL to a free function that
can't handle it. Don't do that.

https://bugzilla.gnome.org/show_bug.cgi?id=750058
2015-05-28 23:42:14 -04:00
Benjamin Otte
03312371da cssmatcher: Speed up common matching
first-child and last-child are the most common usages of the nth-child
machinery, so special-casing them makes sense.
2015-05-28 17:41:47 +02:00
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