Commit Graph

44136 Commits

Author SHA1 Message Date
Christian Hergert
eefbb8aee4 filechooserbutton: add some spacing between icon and text
These were a bit crammed, which doesn't match well with spacing used in
various other parts of gtk.
2015-12-04 21:09:20 -05:00
Timm Bäder
bdfa6ebc2b Add some more missing nullable annotations 2015-12-04 21:09:20 -05:00
Timm Bäder
895c8db5da GtkWidget: Add some missing nullable annotations 2015-12-04 21:09:20 -05:00
Matthias Clasen
8b261439d4 testentryicons: Use an existing icon name
dialog-info is not an existing icon.
2015-12-04 21:09:20 -05:00
Sébastien Wilmet
b325d0a98a textiter: fix bug in case insensitive backward search
'win.lines' contains the same content as the GtkTextBuffer, so to find
@match_start, forward_chars_with_skipping() is called with
skip_decomp=FALSE (the last parameter). So far so good.

On the other hand, the content 'lines' (the needle split in lines) is
casefolded and normalized for a case insensitive search. So,
forward_chars_with_skipping(..., skip_decomp=TRUE) must be called only
for the portion of text containing the needle.

Since 'start_tmp' contains the location at the start of the match, we
can simply begin at that location to find the end of the match.

Unit tests are added.

https://bugzilla.gnome.org/show_bug.cgi?id=758698
2015-12-04 21:09:20 -05:00
Timm Bäder
0682094e81 icon-browser: Stop using GtkMisc properties
Instead of xpad/ypad of 4 for every widget, just increase the
row-spacing and column-spacing by 8.

https://bugzilla.gnome.org/show_bug.cgi?id=758790
2015-12-04 21:09:20 -05:00
Timm Bäder
462240b9fc icon-browser: Use proper "times" character
https://bugzilla.gnome.org/show_bug.cgi?id=758790
2015-12-04 21:09:20 -05:00
Timm Bäder
6790837f47 icon-browser: baseline-align the icon size labels
https://bugzilla.gnome.org/show_bug.cgi?id=758790
2015-12-04 21:09:20 -05:00
Emmanuele Bassi
55f9dd9907 scalebutton: Annotate the return type
Instead of just listing the return type of get_plus_button() and
get_minus_button() in the documentation, we can use the (type)
annotation to ensure that the introspection data reflects the actual
type of the returned widget.
2015-12-04 21:09:20 -05:00
Timm Bäder
c8c2e4e110 GtkScaleButton: _get_(plus|minus)_button returns a GtkButton
https://bugzilla.gnome.org/show_bug.cgi?id=539944
2015-12-04 21:09:20 -05:00
Руслан Ижбулатов
448e72d9ff GDK W32: Add a comment for clarity
This is a copy of a similar comment in another place, which explains
why WS_EX_TRANSPARENT windows get a special treatment.

https://bugzilla.gnome.org/show_bug.cgi?id=758484
2015-12-04 21:09:20 -05:00
Руслан Ижбулатов
19c39742c7 GDK W32: Clarify the use of the second argument to SetWindowPos()
https://bugzilla.gnome.org/show_bug.cgi?id=758484
2015-12-04 21:09:20 -05:00
Руслан Ижбулатов
0b5d6138c7 GDK W32: Don't use SetWindowLong() to set/unset WS_EX_TOPMOST
While searching for the cause of bug 746745 it was discovered that one could
not set WS_EX_TOPMOST extended window style with SetWindowLong(),
but must use SetWindowPos() for that purpose.

This was never a problem most likely because it is highly unlikely for windows
to acquire/lose WS_EX_TOPMOST after they are created, by means other
than SetWindowPos() (which GTK does use to raise/lower windows and
set/remove keep_above), and because trying to set/unset WS_EX_TOPMOST with
SetWindowLong() results in WS_EX_TOPMOST merely not being set/unset (that is,
other styles are still set/unset within the same call and no error is
signalled).

https://bugzilla.gnome.org/show_bug.cgi?id=758483
2015-12-04 21:09:20 -05:00
Matthias Clasen
74228e0ead places view: Fix up docs 2015-12-04 21:09:20 -05:00
Matthias Clasen
cad27e76dd Tweak the gtk-font-name setting docs
Clarify that only parts of the font name are used.

https://bugzilla.gnome.org/show_bug.cgi?id=758367
2015-12-04 21:09:20 -05:00
Руслан Ижбулатов
e981730fc0 GDK W32: Only restack windows with matching always-on-top status
This prevents normal application windows (and other kinds of windows)
from being moved up in Z-order to be above windows that have the
always-on-top bit set. Doing so would make the previously-normal windows
in question also always-on-top implicitly.
Windows that are already always-on-top will be restacked on top of other
always-on-top windows too.

https://bugzilla.gnome.org/show_bug.cgi?id=746745
2015-12-04 21:09:20 -05:00
Руслан Ижбулатов
3c0d60702e GDK W32: Refactor restacking functions a bit 2015-12-04 21:09:20 -05:00
Jonas Ådahl
db3c824c5c wayland: Set a null cursor surface when cursor buffer is null
If the buffer of a cursor is NULL, for example if its an empty cursor,
just set the cursor surface to NULL as well. Not doing this we'll use
uninitialized hotspot coordinates, dimensions and scales.

https://bugzilla.gnome.org/show_bug.cgi?id=758025
2015-12-04 21:09:20 -05:00
Matthias Clasen
14119f985d Work around g_test_dbus annoyance
Without iterating a mainloop for a bit, g_test_dbus_down() will
give us an error.
2015-12-04 21:09:20 -05:00
Phillip Wood
863abe697e Fix character entities
These are not supposed to be supported by gtk-doc¹

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

https://bugzilla.gnome.org/show_bug.cgi?id=758175
2015-12-04 21:09:20 -05:00
Emmanuele Bassi
53e734f2b3 Do not use the GPL v3 blurb for LGPL v2.1 files
GTK+ is licensed under the terms of the GNU LGPL v2.1+.
2015-12-04 21:09:20 -05:00
Emmanuele Bassi
c8153e7f83 Do not use the LGPL v3 blurb for LGPL v2.1 files
GTK+ is released under the terms of the GNU LGPL v2.1+.
2015-12-04 21:09:20 -05:00
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