Commit Graph

55056 Commits

Author SHA1 Message Date
Timm Bäder
0aad5da1b3 widget: Remove controller sequence-state-changed signal connection
We can avoid a signal connection per event controller (and the
EventControllerData struct) since every event controller knows the
widget it's attached to.
2018-05-19 10:18:50 +02:00
Timm Bäder
5c339f2844 Add basic searchbar set_key_capture_widget tests
Make sure we're correctly resetting the internal key capture widget
pointer when the widget goes away.
2018-05-19 10:18:50 +02:00
Timm Bäder
8f289227aa searchbar: Add missing GDK_AVAILABLE_IN_ALL marker 2018-05-19 10:18:50 +02:00
Timm Bäder
662e2b1641 snapshot: Remove superfluous typedef
We're already doing this in gtktypes.h

Fixes #214
2018-05-19 10:18:50 +02:00
Timm Bäder
5ff4ef14e6 widget: Directly notify gestures of grab
Since each widget has a list of event controllers now, we don't need to
connect to ::grab-notify of the widget for every controller.
2018-05-19 10:18:50 +02:00
Timm Bäder
f13cccd042 widget: Fix measure docs
Fix a typo and don't ever pass NULL to a ::measure() implementation.
2018-05-19 10:18:50 +02:00
Timm Bäder
c8aa5b8b4e gl renderer: Add helper for printing a render node tree 2018-05-19 10:18:50 +02:00
Timm Bäder
f71b2ee79f gestures demo: widget property is not writable
Use gtk_widget_add_controller instead.
2018-05-19 10:18:50 +02:00
Timm Bäder
a0d0b52034 scrollbar: Remove get_wheel_delta
Unused and undocumented.
2018-05-19 10:18:50 +02:00
Timm Bäder
caaa3f8200 cssvalue: Remove typechecks
This path is more than hot and those type checks ruin any kind of real
life profiling.
2018-05-19 10:18:50 +02:00
Fabio Tomat
90ac5f3755 Update Friulian translation 2018-05-18 16:19:35 +00:00
Matthias Clasen
84364a7ef4 emoji: Improve section scrolling
Leave some space above the section heading when scrolling.

This is a part of https://gitlab.gnome.org/GNOME/gtk/merge_requests/143
by Julian Sperber.
2018-05-17 16:42:00 +01:00
Matthias Clasen
daca4b9a39 Merge branch 'wip/restart-cursor-animation' into 'master'
wayland: Fix restarting cursor animation

See merge request GNOME/gtk!149
2018-05-17 09:59:45 +00:00
Matthias Clasen
1d368b0cd8 Merge branch 'paste-scrolling' into 'master'
textview: Don't scroll for pastes in another view

See merge request GNOME/gtk!152
2018-05-17 09:48:36 +00:00
Emmanuele Bassi
6656130f9c Merge branch 'pages-docs' into 'master'
Publish master docs with gitlab pages.

See merge request GNOME/gtk!135
2018-05-15 08:51:37 +00:00
Chun-wei Fan
9332237bd4 gtkemojicompletion.c: Don't use g_autoptr()
This code is also built with non-GCC/non-CLang compilers, so don't use a
GCCism here.
2018-05-15 13:49:45 +08:00
Chun-wei Fan
04b4c077f6 gdkcairocontext*.h: Include cairo.h consistently
The other sources include cairo.h by just using #include <cairo.h>, so
do likewise here.
2018-05-15 13:49:45 +08:00
Matthias Clasen
71718b9cd1 textview: Don't scroll for pastes in another view
GtkTextView scrolls to the insertion point when the text
buffer signals a paste is done. This is wrong when there
are multiple views on the same buffer, and the paste
happened in another view.

To fix this, flip the handling of the scroll_after_paste
boolean to only be TRUE if we know that we want to scroll.
2018-05-14 13:03:34 +01:00
Fabio Tomat
d7aa13a8e6 Update Friulian translation 2018-05-14 11:12:37 +00:00
Fabio Tomat
e46d286882 Update Friulian translation 2018-05-14 05:21:23 +00:00
Mohammed Sadiq
9a79b090df appchooserdialog: Fix memory leak 2018-05-13 14:57:04 +05:30
Mohammed Sadiq
b59a8c2911 appchooserdialog: Don't fire notify::heading twice
The gtk_app_chooser_dialog_set_heading() function do emit
notify::heading. Since the setter simply calls the function,
the setter itself shouldn't emit a notify signal by itself.
2018-05-13 14:56:49 +05:30
Mohammed Sadiq
0cd9ef8bcf aboutdialog: Fix memory leak 2018-05-13 14:56:34 +05:30
Mohammed Sadiq
1f82697e99 video: Fix memory leak 2018-05-13 14:56:22 +05:30
Mohammed Sadiq
7ddad8aa62 examples: Remove unused variables 2018-05-12 17:32:16 +05:30
Mohammed Sadiq
14e5218753 snapshot: Fix typo in documentation comment 2018-05-12 09:31:32 +05:30
Mohammed Sadiq
8410d87eb5 label: Rearrange struct members
Rearranging so can save us 8 bytes per GtkLabel
on 32/64 bit aligned memory.
Not a big count, but we get it for free.
2018-05-11 16:10:03 +05:30
Mohammed Sadiq
3c7ea78d68 textview: Always show select-all button in touch popup
"Select all" action is possible regardless of the text selection state
or if the text is editable or not.
2018-05-11 16:09:57 +05:30
Mohammed Sadiq
b73857faa9 textview: Reset bubble source id once run
The bubble_timeout_id was reset only on some special case.
And so warnings were shown when the source is being tried
to be removed with the already removed id.

Fix this by unconditionally resetting the id on start of the function.
2018-05-11 16:09:50 +05:30
Mohammed Sadiq
8e0cc8169e textview: Simplify creating bubble action buttons
Buttons can be created simply with gtk_button_new_from_icon_name().
2018-05-11 16:09:44 +05:30
Mohammed Sadiq
33bacb4150 widget: Avoid an unnecessary check
The preceding loop terminates when either the widget is NULL,
or if their type matches. There is no reason to check that again
2018-05-11 16:09:38 +05:30
Jonas Ådahl
a5d000cb5c wayland: Fix restarting cursor animation
When an animated cursor was set and the previous cursor animation delay
happened to be the same, we wouldn't restart the animation timeout and
just return G_SOURCE_CONTINUE assuming the timer would continue. This
assumption is however only valid if the function was called from the
timeout, which is not the case.

Instead also arm the timer also if there is no previous timer active.
2018-05-09 22:17:03 +02:00
Olivier Fourdan
d3885e92a7 wayland: check native surface for crossing events
gdk_wayland_*_grab()/ungrab() would emit crossing events which translate
as focus_in/focus_out events for keyboard.

However, the ungrab() functions compare the native toplevel as this is
what gets the Wayland pointer enter/leave events with the grab surface,
so if the grab is issued on a child gdk surface, those won't match and
we would emit more focus_out events than focus_in.

This means that a widget such as spice-gtk which issues a keyboard grab
whenever the pointer enters the surface and releases the grab when it
leaves the surface would get uneven numbers of focus_in/focus_out
events.

Also, gdk_wayland_seat_ungrab() would not emit crossing events for
keyboard devices, whereas gdk_wayland_device_ungrab() does, which adds
even more potential discrepancies between focus_in/focus_out events.

To solve this problem, introduce two new helper functions which check
the relevant native surfaces to emit crossing events when needed that
get called evenly from both gdk_wayland_seat_grab()/ungrab() and gdk
_wayland_device_grab()/ungrab() APIs.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=780422
Closes https://gitlab.gnome.org/GNOME/gtk/issues/792
2018-05-09 17:30:34 +02:00
Mohammed Sadiq
47872e5172 examples: Use icon-name property to set button icons
Gtk4 added an icon-name property for GtkButton.
2018-05-09 15:28:28 +05:30
Mohammed Sadiq
65b423eb05 examples: Simplify counting buffer lines
We do have a gtk_text_buffer_get_line_count() function
to get the line count.
2018-05-09 15:28:15 +05:30
Mohammed Sadiq
88ddda6d60 examples: Remove explicit gtk_widget_show()
In gtk4, widgets are visible by default.
2018-05-09 15:27:55 +05:30
Robert Ancell
e95eeaeef1 Fix comment typo introduced in a32725bc9a 2018-05-09 11:28:53 +12:00
Marek Cernocky
c831a77592 Updated Czech translation 2018-05-08 22:55:59 +02:00
Mohammed Sadiq
8fcc401e05 examples: Take advantage of user_data passed
The last parameter of the signal callback from .ui
is the template's object from which the class is
derived.

And so, we already have access to the window object.
Let's just use it.
2018-05-08 18:55:48 +05:30
Emmanuele Bassi
f07b131362 ci: Disable tests when building Graphene
Our flatpak-builder manifests include building Graphene from Git; since
we're building the GTK demos, it's pointless to build the Graphene tests
as well. Disabling tests and benchmarks avoids pointless installations
inside the Flatpak build repo that will just be removed by the time we
bundle the demo.
2018-05-08 14:20:00 +01:00
Emmanuele Bassi
b702618ed9 docs: List private headers for gtk-doc to ignore
We have a lot of private headers that should not be used by gtk-doc when
scanning for symbols.
2018-05-08 14:20:00 +01:00
Emmanuele Bassi
1262d0c6e5 Avoid absolute paths when building the API reference
We should always use relative paths, or include_directories objects, to
allow using GTK as a subproject.
2018-05-08 14:20:00 +01:00
Daniel Mustieles
547e5bf128 Updated Spanish translation 2018-05-08 15:12:45 +02:00
Daniel Mustieles
ac6d42a119 Updated Spanish translation 2018-05-08 15:06:32 +02:00
Mohammed Sadiq
bf1c344443 examples: Don't use private members for final classes
Only derivable classes are required to have private members
so that derived classes can't override them.
2018-05-08 14:34:43 +05:30
Mohammed Sadiq
555c6d7ac7 reference: Replace reference to gtk3 with gtk4 2018-05-08 06:05:41 +05:30
Mohammed Sadiq
5242073547 reference: Use gtk+-4 for compilation in examples 2018-05-08 06:05:04 +05:30
Mohammed Sadiq
772c994fd0 examples: Simplify .ui files
Run gtk4-builder-tool recursively
2018-05-07 22:30:40 +05:30
Mohammed Sadiq
c5976fed9a examples: Fix Makefiles to use gtk4 for build 2018-05-07 22:29:32 +05:30
Benjamin Otte
34d1ebc562 dnd: Make "formats" a construct-only property
... and hide the member variable inside the DragContextPrivate.
2018-05-07 18:55:09 +02:00