Commit Graph

47251 Commits

Author SHA1 Message Date
Matthias Clasen
00d1f73204 gtk-demo: Fix revealer demo
This only used by luck before. We are changing a property from the
::notify handler for that property. Now that GtkRevealer is notifying
the property when it stops animations on unmap, we end up in a life
lock situation where we never make it out of the notify queue.

Fix this by not restarting the animation if the widget is unmapped.
2016-05-19 12:37:54 -04:00
Matthias Clasen
9a60a3659f scale css node test: Adapt to changes
The style classes are reflected in the output here.
2016-05-19 12:27:08 -04:00
Matthias Clasen
fcbb6b7fe3 wayland: Survive lack of settings
This can be made to happen eg by setting XDG_DATA_DIRS and
XDG_DATA_HOME to /. Not a useful value, but not a good reason
to crash either.
2016-05-19 12:10:07 -04:00
Matthew Waters
246385a8e7 gdk/wayland: use the multi-thread safe wayland API
This is required for proper integration with any other library/application that
may perform wayland API calls and poll() the wayland fd from multiple threads.
Using wl_display_dispatch{_queue}() is thread-safe if not mixed with custom
poll() usage, which GSource/GMainContext does.

Essentially, the problem is that multiple threads polling and reading
the same fd is extremely racy.  Use the wayland provided API for allowing
concurrent access to the wayland display fd.

See the wayland man pages for wl_display_prepare_read(),
wl_display_cancel_read() and wl_display_read_events() for more details.

https://bugzilla.gnome.org/show_bug.cgi?id=763852
2016-05-19 12:10:07 -04:00
Debarshi Ray
1e2bde6971 scrolledwindow: Fix typo in get_preferred_height calculation
When we are beginning to calculate the height, if the vscrollbar_policy
is not GTK_POLICY_NEVER, and there is no min-content-height, then we
need some small non-zero value to get started. The idea is to always
ask for at least enough to fit the horizontal scrollbar.

Simply put, this should be the mirror image of the corresponding width
calculation code.

Those who got used to the buggy behaviour might notice that their
GtkScrolledWindows are not as tall as they used to be.

Fall out from 55196a705f

https://bugzilla.gnome.org/show_bug.cgi?id=766530
2016-05-19 12:10:07 -04:00
Matthias Clasen
7d2f54f0f3 icon theme: Add a warning
Warn about the situation when we've found a resource or file path,
but gdk-pixbuf fails to give us a pixbuf. This generally means that
either pixbuf loaders are not found or the shared-mime database
is missing.
2016-05-19 12:10:07 -04:00
Timm Bäder
706b3ffc82 stack: Don't underallocate the last_child 2016-05-19 12:10:07 -04:00
Timm Bäder
f5b76a1f56 stack: Remove some code duplication 2016-05-19 12:10:07 -04:00
Matthias Clasen
8601c0eccd places sidebar: Avoid markup confusion in tooltips
At one point, the sidebar was using gtk_treeview_set_tooltip_column,
which expects tooltips to be markup. With the listbox-based sidebar,
we don't do that anymore. So don't escape the tooltip text.

https://bugzilla.gnome.org/show_bug.cgi?id=766175
2016-05-19 12:10:07 -04:00
Matthias Clasen
8e2cf127e6 x11: Trap possible X error
XIGetClientPointer can generate X errors (e.g. when the X server
does not support XI2. Trap them and carry on.

https://bugzilla.gnome.org/show_bug.cgi?id=766233
2016-05-19 12:10:07 -04:00
Timm Bäder
077e1999b3 scale: Remove double nullable annotation
Being both (allow-none) and (nullable) at the same time is a bit much.
Was from 591e7f5ef8.
2016-05-19 12:10:07 -04:00
Timm Bäder
5fb18692e0 widget: Add Since annotation to gtk_widget_queue_allocate 2016-05-19 12:10:07 -04:00
Benjamin Otte
dcb4b48b29 scrolledwindow: Remove child before destroying self
Children tend to call back into the scrolled window while being removed
and that doesn't work too well if the scrolled window is destroyed
already as Christian Hergert found out.
2016-05-19 12:10:07 -04:00
Benjamin Otte
e7e55d13a4 cssimage: Make it possible to shrink builtin check/optionmarks
... below 7px of size.
2016-05-19 12:10:07 -04:00
Matthias Clasen
adcbd8add9 gtk3-demo: Add a close button to the markup window 2016-05-19 12:10:07 -04:00
Matthias Clasen
13a14d071a gtk-demo: Don't duplicate text in markup example
I forgot to clear the buffer before inserting the new markup. Oops.
2016-05-19 12:10:07 -04:00
Matthieu Gautier
2cb24c7975 revealer: emit notify::child-revealed when animation stops
Depending of float rounding during target calculation, the size of the
GtkRevealer can be set to zero will the animation is not finished.
If the GtkRevealer is in a GtkPaned, it will be hidden and so the animation
will be stopped before it is finished.

In this case, force the emission of the child-revealed signal to let
client code know the animation is finished.

https://bugzilla.gnome.org/show_bug.cgi?id=765973
2016-05-19 12:10:07 -04:00
Timm Bäder
0377a8c408 infobar: Fix typo
Style class names are prefixed with a '.'
2016-05-19 12:10:07 -04:00
Lapo Calamandrei
101c06da53 Adwaita: fix scale theming
rely on toplevel styleclass for scale with marks.

See https://bugzilla.gnome.org/show_bug.cgi?id=766440
2016-05-19 17:27:00 +02:00
Lapo Calamandrei
fb3e626400 color scale: Really sync style classes with GtkScale
sync the alpha scale styleclass too.
2016-05-19 17:24:51 +02:00
Matthias Clasen
6170149393 color scale: Sync style classes with GtkScale
We should use the same style classes here, to avoid theme
confusion.
2016-05-19 11:06:51 -04:00
Ignacio Casal Quinteiro
ee841a282b gtkselectionprivate: minor style fix
This seems to make some issue with the gtk# scanner.
2016-05-19 16:57:55 +02:00
Matthias Clasen
1fde631031 scale: Use more succinct names for style classes
Use .marks-before/after to indicate the presence of marks.
As Lapo points out, compatibility with the previous names
is not really that important, since everything else changed
around it.

https://bugzilla.gnome.org/show_bug.cgi?id=766440
2016-05-19 09:50:23 -04:00
Matthias Clasen
e441c17a0a scale: Bring back marks-related style classes
It turns out that it is too hard (and in some cases, impossible)
to get this information from node positioning, so bring back the
.scale-has-marks-above/below style classes on the main node.

This should allow us to fix the 'pointy sliders'.

https://bugzilla.gnome.org/show_bug.cgi?id=766440
2016-05-18 13:02:11 -04:00
Carlos Garnacho
aec4dbfa94 x11/dnd: Ignore grab broken events from other devices than our DnD device.
The GdkDragContext should only listen to GDK_GRAB_BROKEN events sent to
its own pointer device. It turns out that the passive key grabs mistake
GDK into sending a GdkEventGrabBroken on the master keyboard, which the
DnD machinery mistakes as a signal to cancel the operation.

https://bugzilla.gnome.org/show_bug.cgi?id=766442
2016-05-18 13:09:55 +02:00
Baurzhan Muftakhidinov
d1585a7a60 Updated Kazakh translation 2016-05-17 10:18:52 +00:00
Matthias Clasen
b893b62d7a Docs: Clarify life cycle issue
gtk_gesture_get_last_event() wasn't very clear about how long
it is safe to use the returned pointer.

(cherry picked from commit c891ceb31d)
2016-05-17 10:30:56 +02:00
Matthias Clasen
e006f3ca98 DND: Avoid a use-after-free
Cancelling the gesture causes the last_event pointer to become
invalid. Make a copy of the event so we can keep using it
regardless of the gesture state.

(cherry picked from commit 358eec2972)
2016-05-17 10:30:44 +02:00
Tiago Santos
4424bf8135 Updated Portuguese translation 2016-05-15 21:42:16 +00:00
Tiago Santos
818266a805 Updated Portuguese translation 2016-05-15 21:25:26 +00:00
Chun-wei Fan
1994f37481 Visual Studio builds: Refine "installation" process
Split out the part where we generate/update the caches for the GSchemas
and the icons, so that it is easier to ensure that things continue to
function correctly when we have GlibEtcInstallRoot != CopyDir.
2016-05-10 13:33:40 +08:00
Matthias Clasen
13f45bd4cd 3.20.4 3.20.4 2016-05-09 14:33:41 -04:00
Matthias Clasen
1b07cf6522 Update css node tests for removal of .slider from GtkSwitch 2016-05-09 14:33:41 -04:00
Emmanuele Bassi
1e7ded6a47 docs: Update examples of matching key bindings
The selector for matching GtkEntry has changed to `entry` after 3.20.

https://bugzilla.gnome.org/show_bug.cgi?id=766166
2016-05-09 12:46:35 +01:00
Rafael Fontenelle
207b793316 Updated Brazilian Portuguese translation 2016-05-08 14:25:31 +00:00
Lapo Calamandrei
4ece50a13c Adwaita: relocate a selector
relocate treview acceleditor > label in the treeview section and
add a comment for a testcase.
2016-05-06 18:50:37 +02:00
Lapo Calamandrei
659329c168 Adwaita: tidy treeview style properties...
...removing a double definition in the process.
2016-05-06 15:42:07 +02:00
Matthias Clasen
162e41633d scale: Fix mark positioning at the left/top edge
We were failing to take the widget allocation.x/y into account
when deciding whether we need to push in the mark.

https://bugzilla.gnome.org/show_bug.cgi?id=765922
2016-05-05 15:19:15 -04:00
Carlos Garnacho
6f2187270e x11: Rely on passive keyboard grabs with XI2 for DnD
The active keyboard grab can be spared then. This way the passive
key grabs allow other key combinations (eg. alt-tab) that are not
mandatory to grab here.
2016-05-05 15:04:02 -04:00
Carlos Garnacho
c509a104b7 searchenginetracker: Quote fts match so it's seen as a single phrase
FTS5 has a complex enough syntax that it makes not much sense to wrap
in simple search boxes.

https://bugzilla.gnome.org/show_bug.cgi?id=765981
2016-05-05 15:04:02 -04:00
Matthias Clasen
08e508889f css names are always set
No need to check for it, we set the css name on GtkWidgetClass
ourselves.
2016-05-05 15:04:02 -04:00
Timm Bäder
e9713145f9 switch: Remove .slider from slider gadget
As the documentation states, neither the switch nor the slider gadget
should be using any style classes.
2016-05-05 15:04:02 -04:00
Timm Bäder
f203f7ccc0 switch: Create less pango layouts
Instead of creating 2 pango layouts in every draw() and on in
_get_content_size (and calling into gettext twice in both cases), just
keep the layouts around and create them in only one place.
2016-05-05 15:04:02 -04:00
Timm Bäder
b9926f65a3 label: Also initialize text
So gtk_label_get_text returns the default value of "". Broke the
GtkModelButton default value test.
2016-05-05 15:04:02 -04:00
Timm Bäder
efcfa0ec94 label: don't use set_text in gtk_label_new
It would just set up lots of things with the default values, but a
common case is that a few gtk_label_set_* calls follow.
2016-05-05 15:04:02 -04:00
Timm Bäder
200ed52e92 label: minimum/natural size parameters are not nullable
Stop comparing them to NULL.
2016-05-05 15:04:02 -04:00
Timm Bäder
304e2d5711 label: Don't set out parameters twice
We set them later again when we calculate the vertical size, so just
move the general assignment to -1 into the horizontal branch.
2016-05-05 15:04:02 -04:00
Timm Bäder
0a3122b541 widget: Remove useless NULL check
We are checking for allocation != NULL at the beginning of the function
already. This also means that the allocation parameter is not nullable.
2016-05-05 15:04:01 -04:00
Benjamin Otte
1bac6684f1 cssimagebuiltin: Remove icons that don't draw anything anymore 2016-05-05 15:04:01 -04:00
Benjamin Otte
9d1a64455b cssimagebuiltin: Remove unused variables 2016-05-05 15:04:01 -04:00