Commit Graph

51286 Commits

Author SHA1 Message Date
Daniel Boles
cbe53fec07 CenterBox: Add missing nullable annotations
https://bugzilla.gnome.org/show_bug.cgi?id=785280
2017-08-05 18:56:01 +01:00
Daniel Boles
4accb9f167 CenterBox: Guard against directly including header
https://bugzilla.gnome.org/show_bug.cgi?id=785280
2017-08-05 18:44:02 +01:00
Kjell Ahlstedt
8f22078787 centerbox: Add G_BEGIN_DECLS and G_END_DECLS
https://bugzilla.gnome.org/show_bug.cgi?id=785280
2017-08-05 11:26:42 +02:00
Matthias Clasen
72695773c2 Add support for entering emoji by name
This commit adds some basic support for entering emoji by name
to GtkIMContextSimple. To begin an emoji sequence, use Ctrl-Shift-e
instead of Ctrl-Shift-u that is used for hex input. Otherwise, the
behavior is the same: you can can let go of the modifier keys and
end the sequence with space or enter, or hold on to the modifier
keys and end the sequence by releasing them.

Only a limited, fixed set of names is supported at this time, see
the GtkIMContextSimple docs for a full list.
2017-08-04 14:54:26 -04:00
Daniel Boles
0740fb5c64 gskrendernodeimpl: Fix leak of cairo_pattern_t
It was not destroyed after setting it on the cairo_context_t, as it is
in every other case.

https://bugzilla.gnome.org/show_bug.cgi?id=785793
2017-08-04 00:59:33 +01:00
Daniel Boles
01e587da22 Window: Also quote Window address in Popover error
This is symmetrical with how we already do that for the Popover, and it
could be useful for debugging.
2017-08-03 21:10:22 +01:00
Daniel Boles
1f1e156007 widget-factory: Add tooltip to Entry icon
just to show we can.
2017-08-03 20:43:03 +01:00
Daniel Boles
bae6d3d45c Fix some nullable Returns annotations
based on reports and patches by Iñaki García Etxebarria:

https://bugzilla.gnome.org/show_bug.cgi?id=781246
https://bugzilla.gnome.org/show_bug.cgi?id=785423
2017-08-03 20:27:29 +01:00
Timm Bäder
edbe6b3360 inspector: Fix object title label alignment
Re-center it after the center-child removal in GtkBox and the addition
of GtkCenterBox.
2017-08-03 18:25:51 +02:00
Daniel Boles
01fe6b4a83 GtkFixed: Update documentation intro
• Add GtkLayout as a @See_also since it includes fixed-pos functionality
• Drop mention of the long-gone Linux framebuffer port
• Explain how to work around the problems with RTL text
2017-08-03 13:03:05 +01:00
Marek Cernocky
a14b3dd3a9 Updated Czech translation 2017-08-03 11:51:09 +02:00
Daniel Boles
06da814863 Layout: Tweak documentation blurb
Being addable to a ScrolledWindow is not interesting; now that SW
auto-adds a Viewport if needed, so can DrawingArea and any other widget.

Mention GtkFixed in case the reader just wants that bit of functionality
2017-08-03 10:19:13 +01:00
Timm Bäder
5cafa2b1ce entry: get_icon_area returns in entry coordinates
This fixes the popover positions in the gtk4-demo/popovers, and it also
just makes sense. Also document what the returned coordinates are
relatiev to.
2017-08-03 11:14:53 +02:00
Timm Bäder
765aff3f0e popover: Fix arrow position
Remove all the manual css margin handling since that's being done for us
automatically now.
2017-08-03 11:07:59 +02:00
Piotr Drąg
552e883bdf Update POTFILES.in 2017-08-02 18:05:30 +02:00
Benjamin Otte
47fe08528d eventbox: Remove 2017-08-02 16:59:09 +01:00
Benjamin Otte
18c086a46c texthandle: Don't use GtkEventBox 2017-08-02 16:58:47 +01:00
Benjamin Otte
77c9ef1b7b testsuite: Don't use GtkEventBox in gestures test 2017-08-02 16:58:17 +01:00
Benjamin Otte
212c46e20a a11y: Remove check for GtkEventBox 2017-08-02 16:58:05 +01:00
Benjamin Otte
cdba1b8ac8 docs: Don't use GtkEventBox 2017-08-02 16:55:25 +01:00
Benjamin Otte
b6efd89225 testsuite: Remove GtkEventBox from a11y test 2017-08-02 16:47:39 +01:00
Benjamin Otte
b555638600 iconbrowser: Remove GtkEventBox usage 2017-08-02 14:50:19 +01:00
Benjamin Otte
5be94c1fd7 gtk-demo: Get rid of GtkEventBox 2017-08-02 14:05:02 +01:00
Benjamin Otte
711bf38d90 cellaccel: Get rid of GtkEventBox
Can't test the code atm because treeview editing is broken, let's hope
it works once that's fixed.
2017-08-02 14:05:02 +01:00
Benjamin Otte
6b7503b83e placessidebar: Remove EventBox usage 2017-08-02 14:05:02 +01:00
Benjamin Otte
464ffad23e placesview: Remove event box usage 2017-08-02 14:05:02 +01:00
Emmanuele Bassi
b4b2fa4a98 meson: Add missing Wayland protocol
GDK depends on a new Wayland protocol.
2017-08-02 12:31:30 +01:00
Olivier Fourdan
ac61aedae9 wayland: add shortcut inhibitor support
This adds support for the shortcut inhibitor protocol in gdk/wayland
backend.

A shortcut inhibitor request is issued from the gdk wayland backend for
both the older, deprecated API gdk_device_grab() and the new gdk seat
API gdk_seat_grab(), but only if the requested capability is for the
keyboard only.

https://bugzilla.gnome.org/show_bug.cgi?id=783343
2017-08-02 12:37:23 +02:00
Benjamin Otte
9ec22d6652 reftests: Always wait for rendering to settle
We wait for a few 100ms for rendering to settle in various WMs. So far
we only did that for windows that were controlled by the WM (aka
toplevels).

With modern compositing gnome-shell however, this now also applies to
override-redirect windows, so we now wait there, too.

This makes the reftests a lot slower, but they now actually work when
running make check in gnome-shell.
2017-08-02 11:34:57 +01:00
Benjamin Otte
64b7308328 reftests: Remove event box usage 2017-08-02 11:34:57 +01:00
Benjamin Otte
bb238894dc testuite: Remove EventBox from builder test 2017-08-02 11:34:57 +01:00
Matej Urbančič
88cd0886bd Updated Slovenian translation 2017-08-02 10:42:45 +02:00
Timm Bäder
e70a3fab0d widget: Constify state parameter of propagate_state
Makes sense.
2017-08-02 08:58:30 +02:00
Timm Bäder
8c08a33220 widget: Don't try to propagate 0 state flags
This happens quite often and has no effect anyway.
2017-08-02 08:58:30 +02:00
Timm Bäder
9a3049009e widget: Fix size_allocate's out_clip annotation 2017-08-02 08:58:30 +02:00
Benjamin Otte
29b0954c45 testgtk: Actually expand the scrolled window 2017-08-02 00:23:43 +01:00
Benjamin Otte
7297aeb54c testgtk: Get rid of GtkEventBox 2017-08-02 00:23:30 +01:00
Benjamin Otte
69da7836f9 tests: Get rid of GtkEventBox 2017-08-02 00:15:10 +01:00
Daniel Boles
2b7db2376c bindings: Avoid iterating array if it is never set
If query.return_type is not one we want, binding_compose_params() is
not called, and so params remains a NULL pointer. However, the code was
then unconditionally iterating it regardless. Don't if it is still NULL.

CID 1452218 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
15. var_deref_op: Dereferencing null pointer params.
2017-08-01 20:45:07 +01:00
Daniel Boles
79bbd4aca5 cssselector: Ensure we do not index out of bounds
This would only happen if the last element was deprecated, but it should
be avoided anyway.

CID 1388852 (#1 of 1): Out-of-bounds read (OVERRUN)
12. overrun-local: Overrunning array pseudo_classes of 16 32-byte
elements at element index 16 (byte offset 512) using index i + 1U (which
evaluates to 16).
2017-08-01 20:17:02 +01:00
Daniel Boles
fc619706b7 Notebook: Remove null check after dereference
This function clearly assumes the parameter children cannot be NULL, and
the call sites seem to perform enough checks to confirm this.

CID 1388869 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking children suggests that it may be null,
but it has already been dereferenced on all paths leading to the check.
2017-08-01 20:15:14 +01:00
Daniel Boles
881d7c6442 Calendar: Add default case to appease Coverity
CID 1432024 (#1 of 1): Uninitialized scalar variable (UNINIT)
2. uninit_use_in_call: Using uninitialized value rect.x when calling
calendar_arrow_rectangle.

Add a default case to the switch which will bail out with
g_assert_not_reached(), which should reassure Coverity that the method
is always called with a valid value that is handled in the switch.
2017-08-01 20:15:14 +01:00
Daniel Boles
eddbfc65a9 cssbordervalue: Fix possible use of uninitialised
If value->values[i] is NULL, then values[i] was left uninitialised.
The code then reads each element of values[].

CID 1432029 (#1 of 1): Uninitialized pointer read (UNINIT)
11. uninit_use: Using uninitialized value values[i].
2017-08-01 20:14:50 +01:00
Daniel Boles
37b23927c4 Stack: Fix copy-paste error
This fixes Coverity CID 1452217.
2017-08-01 19:18:39 +01:00
Daniel Boles
44c4faeed0 Entry: Fix unset icon tooltip hiding Entry tooltip
Our ::query-tooltip handler first checks whether the pointer is over any
of the icons, returning their tooltip if so, and if not chains up to
Widget::query-tooltip in order to show the text for the widget overall.

But ensure_has_tooltip(), which exists to update :has-tooltip based on
whether ::query-tooltip is needed, only set :has-tooltip to TRUE if any
icon had a tooltip, without caring whether the widget as a whole does.

That is asymmetrical and meant that if the Entry had a tooltip, but
subsequently all icons had their tooltips unset, :has-tooltip would be
set to FALSE, and hence the tooltip for the widget would become lost.

The fix is to set :has-tooltip to TRUE if the widget has a tooltip of
its own, and we only need to check the icons if that is not the case.

https://bugzilla.gnome.org/show_bug.cgi?id=785672
2017-08-01 18:13:11 +01:00
Daniel Boles
b3a6067541 Entry: Warn about corner case hiding icon tooltips
https://bugzilla.gnome.org/show_bug.cgi?id=785672#c4
2017-08-01 18:13:11 +01:00
Timm Bäder
f7bb6a7aa8 widget: Unset PRELIGHT and ACTIVE state in _set_sensitive
They both depend on input, which an insensitive widget does not receive.
2017-08-01 18:43:42 +02:00
Timm Bäder
36c4582086 button: Stop fiddling with PRELIGHT state
This is done automatically now and it's wrong here since it gets
executed after gesture release.
2017-08-01 18:16:40 +02:00
Timm Bäder
30d6b08271 scale: Allocate the value next to the slider
... when vertical. Also fixes usage of the uninitialized value_alloc.y.
2017-08-01 11:36:03 +02:00
Chun-wei Fan
ffc15bf922 Visual Studio builds: Adapt to new glib-mkenums
glib-mkenums is now done in Python, but since the Visual Studio build
environment (cmd.exe) does not support shebang lines, we need to call
the interpretor explicitly to run the script.

This means that we need to update on how we generate
gsk/gskenumtypes.[c|h] in our projects, as at this point GTK+-3.91.x
does not require a GLib installation that ships with the Python-fied
glib-mkenums.  As a result, we adapt to this by first using Python
to call glib-mkenums.  If this fails (where the output file becomes 0
in size), then we use PERL to call the glib-mkenums script.  Note that
during the build this will cause a warning message to be displayed,
stating that '&' cannot be found, but due to the way Windows .bat script
are done, we need to live with that until a solution can be found on
this.

This is likely a problem that does not exist in the Meson builds, as
Meson will take care of calling the interpretor for us by looking at
the shebang lines for our case.

Also, clean up the .batin Windows batch script that is used to call
glib-mkenums by using a for loop in there.
2017-08-01 16:26:43 +08:00