Commit Graph

44114 Commits

Author SHA1 Message Date
Emmanuele Bassi
43f8719a53 Fix the license version in GtkTrashMonitor
There is no GNU Lesser General Public License version 2; it's either GNU
Library General Public License version 2, or GNU Lesser General Public
License version 2.1.
2015-12-04 21:09:20 -05:00
Emmanuele Bassi
10729e4589 Fix license version for GtkFileChooserWidget private header
Since it's using Lesser GPL, use version 2.1; there is no Lesser GPL v2,
as it was called 'Library GPL' prior to v2.1.
2015-12-04 21:09:20 -05:00
Emmanuele Bassi
9cdb0bb8b1 Fix the licensing blurb of GtkBookmarksManager
Copy-pasta from GPL instead of LGPL.

Also, there is no GNU Lesser General Public License version 2; either
it's the GNU Library General Public License version 2, or it's the GNU
Lesser General Public License version 2.1.
2015-12-04 21:09:20 -05:00
Emmanuele Bassi
d368b396d4 Fix the licensing blurb in GtkPlacesSidebar
The code is released under the terms of the LGPL v2.1+, as is the rest
of the GTK+ code.
2015-12-04 21:09:20 -05:00
Matthias Clasen
438f2f1ba5 Fix license header
I didn't meant to make this different from any other file
in GTK+ when I added it.
2015-12-04 21:09:20 -05:00
Matthias Clasen
f8b24884b5 Document GDK_TOUCHPAD_GESTURE_MASK 2015-12-04 21:09:20 -05:00
Matthias Clasen
049eb3f769 popover: Avoid a crash when no relative-to widget is set
This was showing up in glade, which creates freestanding
popovers.
2015-12-04 21:09:20 -05:00
Rui Matos
8de0d15d8a wayland: Translate virtual modifiers too
Wayland allows us to receive virtual modifiers too so we can just use
them directly if the compositor does send them.

https://bugzilla.gnome.org/show_bug.cgi?id=748904
2015-12-04 21:09:20 -05:00
Carlos Garnacho
a0c2ae4709 wayland: Invert drop_finished/button release call order
If we "release" the button first, the drag will be eventually cancelled,
we must first signal GDK_DROP_FINISHED, and then release the button so
the success status prevails.
2015-12-03 12:37:27 +01:00
Carlos Garnacho
c52c4f94d5 wayland: Store requested target on GdkWaylandSelection
It doesn't make a lot of sense to have this stored as data offer data,
rather together with the source_targets array, which is what we're
poking here in the end.

https://bugzilla.gnome.org/show_bug.cgi?id=758713
2015-12-03 12:37:27 +01:00
Carlos Garnacho
9db511f677 wayland: Refactor selection ownership
Dissociate ownership from our maintenance of wl_data_source objects.
The only place where ownership must be updated together is
data_source.cancelled, for the other places GDK should take care of
setting up the right ownership, even if at a different order than
we'd expect here.

This fixes GTK+ apps on wayland being locally confused about the
current selection ownership. Because gtk_selection_add_targets()
results in a wl_data_source being created, and ownership being
updated right away, early callers of this will change the ownership
even if the widget it's being called on didn't explicitly request
the selection ownership yet.

https://bugzilla.gnome.org/show_bug.cgi?id=758660
2015-11-30 20:39:07 +01:00
Piotr Drąg
21b0a3c8fe Updated Polish translation 2015-11-27 23:30:07 +01:00
Carlos Garnacho
8662985ebb GtkWindow: Reset gestures after triggering right click titlebar action
Just like it happens for window dragging, we're likely to not see the
matching button release for this event, so we must reset the controller
manually here.

https://bugzilla.gnome.org/show_bug.cgi?id=758661
2015-11-25 22:01:27 +01:00
Carlos Garnacho
48fa89f979 wayland: Do not store the grab cursor separately
After the grab is finished, we would expect an enter event, and
GDK updating internally the cursor for that window and device.
This means there is no need at all to store it separately in the
backend.

As a side effect, animated cursors are now also possible on grab
icons.

https://bugzilla.gnome.org/show_bug.cgi?id=735847
2015-11-25 15:28:18 +01:00
Carlos Garnacho
f3e1c088a7 device: Fix dispose
The way master devices detach from their other master counterpart is
vulnerable to infinite recursion due to the way we first recurse on
the other device before clearing the pointer, this may happen if
that last reference to the other master device is held by the
device->associated field.

https://bugzilla.gnome.org/show_bug.cgi?id=732742
2015-11-25 15:28:18 +01:00
Carlos Garnacho
0adf040152 wayland: Plug surface leak
Other backends take care of the cairo surface destruction in
GdkWindow::destroy. We must do the same here, or the cairo_surface
and its corresponding wl_buffer are left dangling.

https://bugzilla.gnome.org/show_bug.cgi?id=747295
2015-11-25 15:28:18 +01:00
Carlos Garnacho
41bed12fe0 searchenginetracker: Remove astray ");" closing a function
Sad face for me.
2015-11-23 18:21:29 +01:00
Carlos Garnacho
3f1e8c6883 searchenginetracker: Optimize direct/recursive folder lookups
tracker:uri-is-descendant/parent has the unfortunate side effect of
rendering the collation mechanisms in the database useless, so those
require full table scans to be validated.

Performing these as pure string comparisons will perform much better,
as those allow the underlying sqlite to rely on its own collation
to perform the search, which can be significantly faster with many
elements in the database.

https://bugzilla.gnome.org/show_bug.cgi?id=758407
2015-11-23 18:01:45 +01:00
Carlos Garnacho
dec6e119af searchenginetracker: ensure nie:url is bound
This could produce strange warnings as it is currently passed to
tracker:uri-is-* sparql functions, as these expect no NULLs.

https://bugzilla.gnome.org/show_bug.cgi?id=758407
2015-11-23 18:01:45 +01:00
Benjamin Otte
ba6934366d cssstyle: Don't crash if properties are added at runtime
Just return the default value for those properties.

Testcase included.

https://bugzilla.redhat.com/show_bug.cgi?id=1281234
2015-11-20 21:10:59 +01:00
Matthias Clasen
1e30fe1c3b wayland: Avoid a crash
We can end up in situations where NULL gets passed to
get_transient_parent(). Embrace it instead of avoiding it.

https://bugzilla.gnome.org/show_bug.cgi?id=758327
2015-11-20 16:16:00 +01:00
Christian Hergert
bd3ea23655 entry: ensure valid GdkWindow before set_invisible_cursor()
If the window has not yet been created, then we can't set the invisible
cursor yet. This can happen in situations where the widget is in a
revealer with type-to-search functionality.
2015-11-18 15:16:15 -08:00
Carlos Garnacho
386303ec66 wayland: Move additional pointer buttons after the old 4-7 scrolling ones
We were using that range for the extra buttons after left/right/middle,
while this is harmless for clients not handling extra buttons (we
used to translate those button events into scroll events in x11 anyway)
this will be unexpected for clients that do handle additional mouse
buttons themselves (eg. back/forward buttons present in some mice).

In order to remain compatible with X11, those need to be assigned from
button 8 onwards.

Also, include input.h, and stop using magic numbers here.

https://bugzilla.gnome.org/show_bug.cgi?id=758072
2015-11-17 22:44:36 +01:00
Carlos Garnacho
1d3f93f277 x11: Add "pointer" to the is-not-a-touchscreen device name checks
Commit 1266d15c4 also broke Xwayland, as it does the same trick
than VMWare pointers. Let's extend the heuristic to check for "pointer"
in the device name, what can possibly go wrong...

https://bugzilla.gnome.org/show_bug.cgi?id=757358
2015-11-17 16:31:10 +01:00
Carlos Garnacho
ed692f9a0b x11: Do not misdetect mice with abs axes as touchscreens
VMWare seems to create mouse devices with abs axes which confuses
our detection of single-touch touchscreens. Those have though a
name we can match on ("VirtualPS/2 VMware VMMouse"), it should
be pretty safe to assume that no real touchscreens have "mouse"
in their name...

https://bugzilla.gnome.org/show_bug.cgi?id=757358
2015-11-17 16:31:10 +01:00
Matthias Clasen
a1a0ead018 x11: Try harder to find a core pointer
We currently just look for a master device with input source MOUSE.
After recent changes to the way input devices are classified, xwayland
on my system comes up with a virtual core pointer that has input
source TOUCHSCREEN. This was causing assertion failures. Be a little
more careful and accept a touchscreen as core pointer, if there is
no mouse.
2015-11-17 07:02:18 -05:00
Matthias Clasen
b71d2864c8 3.18.5 3.18.5 2015-11-16 15:22:36 -05:00
Benjamin Otte
f16292ea02 cssprovider: Only push a new scanner when none exists
For @import, we want to emit the error as part of the @import statement,
not as part of the new file.
2015-11-16 19:36:21 +01:00
Paolo Borelli
80a362c3c3 filechooser: ignore double clicks on the selected item
Since we are now interpreting button press events and
make our own double-click determination, we should not
handle double-click events that are generated by GDK.

https://bugzilla.gnome.org/show_bug.cgi?id=757950
2015-11-16 11:46:41 -05:00
Benjamin Otte
edff6fa652 cssprovider: Have a section on import error
When loading a nonexisting CSS file using
gtk_css_provider_load_from_file() or gtk_css_provider_load_from_path()
we would emit the error using a NULL scanner. Don't do that, because
we'll have a NULL section in that case and error handlers don't like
that.

Testcase attached.

https://bugzilla.redhat.com/show_bug.cgi?id=1277959
2015-11-16 17:40:59 +01:00
Benjamin Otte
0099b0820d cssprovider: Have a section when parsing style properties
Signal handlers expect a section to be present, so provide them with
one.

New testcase included.

https://bugzilla.gnome.org/show_bug.cgi?id=757240
2015-11-16 17:40:59 +01:00
Carlos Soriano
15cf978d5a gtkplacessidebar: improve heuristics for external drives
Since the change to use GtkPlacesView we don't want to show
internal storage on the sidebar.

In our case we were checking for drive_can_eject and
drive_is_media_removable.

However for some external hard drives it's reported that they
are not ejectable nor the have removable media. So the only
attribute that they have different from internal drives is that
they can be stopped.
So check for if the drive can be stopped to decide if it is
external or internal.

On the way realized we don't need to check for the mounts associated
with the volume to know if the volume can be ejected or not. So remove
that code.

https://bugzilla.gnome.org/show_bug.cgi?id=756589
2015-11-16 11:05:23 +01:00
YunQiang Su
2d1a793d57 Us ... instead of … for zh_CN 2015-11-14 21:59:24 +08:00
Ignacio Casal Quinteiro
7be06688ff win32: do not use g_clear_pointer to destroy the window
DestroyWindow expects a different calling convenction so
we endup getting an error at runtime
2015-11-13 12:54:54 +01:00
Matthias Clasen
9a7c95234c 3.18.4 3.18.4 2015-11-12 12:52:48 -05:00
Colomban Wendling
91a91b69b9 cssnode: Fix style updating when the CSS node ID changes
Since 4ebb5781ea ID has a specific value,
while it used to be the same as NAME.  Thus, explicitly list ID as a
radical change just like NAME.

https://bugzilla.gnome.org/show_bug.cgi?id=757397
2015-11-12 12:52:16 -05:00
Sébastien Wilmet
511bd4fee7 Revert "inspector: remove gtk_text_buffer_get_iter_at_line_index() workaround"
This reverts commit 1536710dba.

Because of the revert at
commit 0dc66f5125.
2015-11-12 17:23:16 +01:00
Matthias Clasen
0dc66f5125 Revert "textbuffer: nicer get_iter functions"
This reverts commit cf51c4f6db.

This change broke binding api.
2015-11-12 10:36:26 -05:00
Mingye Wang (Arthur2e5)
a875a84846 update zh_CN translation 2015-11-12 23:17:28 +08:00
Ignacio Casal Quinteiro
e0f951a76a win32: chain up on display dispose 2015-11-12 16:01:39 +01:00
Matthias Clasen
3c331ba78d 3.18.3 3.18.3 2015-11-09 11:12:58 -05:00
Alexander Larsson
040a209031 gdk: Fix invalidation w/ pixel cache when changing child window geometry.
When moving/scrolling a child window we can't use the current clip
region to limit what is invalidated, because there may be a pixel
cache that listens for changes outside the clip region. Instead
invalidate the entire area and rely on the invalidation code to limit
the repaint to the actually visible area.
2015-11-09 11:12:58 -05:00
Benjamin Otte
2e09bddb41 placesview: Don't export API
This is a private object, don't export its symbols.

https://bugzilla.gnome.org/show_bug.cgi?id=756978
2015-11-09 10:29:27 -05:00
Matthias Clasen
9883f592b0 Avoid excessive property notification for GtkStack::interpolate-size
make check checks this for writable properties, and fails now that
we've made this property writable.
2015-11-09 09:28:21 -05:00
Alexander Larsson
e33f4b1fef TreeModelFilter: Fix uninitialized memory read.
We were copying an iterator that sometimes was not initialized,
which caused debugger warnings in VS2015.
2015-11-09 08:49:22 -05:00
Emmanuele Bassi
ebf4ac8a5b docs: Point at for_scale() variants
Using lookup_icon() and lookup_by_gicon() with a size multiplied by a
scaling factor is almost certainly going to get worse results than using
their for_scale() variants.
2015-11-09 08:48:42 -05:00
Emmanuele Bassi
ac823cf070 docs: Clarify gtk_render_icon()'s behaviour
A GdkPixbuf has no scaling factor, so drawing directly from it can only
using a scale of 1, to avoid blurry, fuzzy icons.

You should be using gtk_render_icon_surface() anyway.
2015-11-09 08:48:36 -05:00
Emmanuele Bassi
afb6265530 docs: Fix typo in gdk_screen_get_scale_factor() 2015-11-09 08:48:30 -05:00
Christian Hergert
d1dda37f8c stack: GtkStack:interpolate-size should be read/write
It looks like the param spec for interpolate-size was
copied from the line above it, which is a read only property.

There is a setter for interpolate-size, and it is implemented in
set_property().
2015-11-09 08:48:10 -05:00
Christian Hergert
80ae3fe6f2 headerbar: remove G_PARAM_CONSTRUCT from custom-title
This fixes the ability to sublcass GtkHeaderBar from a UI template which
contains a custom <child type="title"> element.

https://bugzilla.gnome.org/show_bug.cgi?id=757544
2015-11-09 08:47:54 -05:00