Commit Graph

358 Commits

Author SHA1 Message Date
Matthias Clasen
9a3b61ec9d Drop GtkPlacesSidebar from public API
This is a bit of filechooser internals that gets shared with
nautilus, which is fine, but it shouldn't be part of our
public API. There are no other users than nautilus.
2018-01-08 14:38:55 -05:00
Matthias Clasen
ab256384b8 testsuite: Drop commented out and useless code
These two uses of ::delete-event were pointless.
2018-01-02 18:14:13 -05:00
Matthias Clasen
90b016ef73 Fix the textbuffer test
The test was assuming that gtk_text_buffer_paste_clipboard is
synchronous, which is no longer the case.
2017-12-26 23:15:30 -05:00
Matthias Clasen
7be6d18f27 Fix objects-finalize test
This test needs similar fixes to the notify test to
pass a display to GDK objects when instantiating them.
2017-12-26 20:11:09 -05:00
Matthias Clasen
1b6750c1f1 Fix notify test
We need to pass a display when creating more GDK objects now.
2017-12-26 20:06:06 -05:00
Matthias Clasen
e92c0e85ec Replace gdk_keymap_get_for_display by gdk_display_get_keymap
Replace all uses of the old function by the new one.
No functional change.
2017-12-15 07:44:58 -05:00
Matthias Clasen
fd85ff0c7a Drop gdk_keymap_get_default()
It is better to use the explicit keymap getter - the
default display may not even use the current gdk backend.
2017-12-14 23:57:54 -05:00
Timm Bäder
484e453780 Fix a few overlooked casts
glib warns about these now.
2017-12-09 13:14:00 +01:00
Benjamin Otte
2d5c82b4ec gtk: Remove GtkClipboard 2017-12-03 05:46:49 +01:00
Benjamin Otte
f53848c360 textview: Redo clipboard handling
Instead of using GtkClipboard and handling everything ourselves, we now
put GtkTextBuffer into the GdkClipboard and register (de)serializers for
text/plain.
2017-12-03 05:46:48 +01:00
Matthias Clasen
0b39631464 textview: Replace pixbufs by textures
This affects a few apis, such as gtk_text_iter_get_pixbuf,
gtk_text_buffer_insert_pixbuf and GtkTextBuffer::insert-pixbuf,
which have all been replaced by texture equivalents.

Update all callers.
2017-11-29 23:22:13 -05:00
Benjamin Otte
9a6ec4e959 contentformats: Rename GtkTargetList
It's now called GdkContentsFormat
2017-11-20 23:12:33 +01:00
Benjamin Otte
c863ac0f90 dnd: Remove GtkTargetEntry and GtkTargetFlags
warning: We don't do any same-app checks anymore so you currently can
copy local data into external apps.

This will be fixed later.
2017-11-20 23:12:33 +01:00
Matthias Clasen
95876cbc9c Remove gdk/gdkx.h
It was just a kludge.
2017-11-16 23:00:01 -05:00
Benjamin Otte
3f5178dc21 selection: Remove the info uint
Instead of allowing people to pass a uint user-data, insist on them
comparing mime types.

The user data was a uint instead of a pointer anyway, so uniqueness
could not be guaranteed and it caused more issues than it was worth.
And that's ignoring the fact that it basically wasn't used.
2017-11-16 22:59:43 +01:00
Benjamin Otte
3da65ff233 scalebutton: Remove icon size 2017-11-15 14:22:16 -05:00
Benjamin Otte
a7754a14b5 toolbar: Remove icon sizes 2017-11-15 14:22:16 -05:00
Benjamin Otte
7efc5a1558 clipboard: Consistently use GtkTargetList
Some code was using GtkTargetList, some used GtkTargetEntry and some
GtkTargetPair.
2017-11-15 19:07:16 +01:00
Benjamin Otte
13ca03efb1 cellrendererpixbuf: Remove stock-detail property
GTK3 didn't use that property already...
2017-11-14 18:37:38 -05:00
Benjamin Otte
ed1b6a9bed gdkwindow: Remove event_mask arguments from constructors 2017-11-13 23:41:38 +01:00
Benjamin Otte
e2996732b9 testsuite: Remove cursor tests
Cursors always exist now, it does not make sense to test that their
creation fails anymore.
2017-11-04 00:07:13 +01:00
Benjamin Otte
e294f71555 x11: Redo cursor handling completely
Instead of creating a GdkX11Cursor, create GdkCursors. Cache the XCursor
in a hash table instead.

Also, make use of the new fallback mechanism for fallback code: Make
sure to provide cursors for the names that are guaranteed to exist, but
do not do bad attempts at displaying texture surfaces.
Black/White/transparent is not a replacement for those.
2017-11-04 00:07:13 +01:00
Benjamin Otte
e60da87a94 testsuite: Update for screen => display property changes 2017-10-31 19:00:56 +01:00
Benjamin Otte
07164e098a window: Turn gtk_window_set_screen() into gtk_window_set_display()
And have a priv->display instead of a priv->screen.

Includes turning gtk_menu_set_screen() into gtk_menu_set_display(),
because that function just forwards to its window.
2017-10-31 08:25:37 +01:00
Benjamin Otte
9151e0b9f5 stylecontext: Port to use display instead of screen 2017-10-31 03:05:54 +01:00
Matthias Clasen
c54294e2e1 Add a forgotten file 2017-10-18 18:52:06 +02:00
Matthias Clasen
2f96592e80 Use the cairo renderer for gtk tests for now
We haven't tracked down yet why the window size tests
fail with Vulkan, so use cairo for now.
2017-10-18 17:30:20 +02:00
Matthias Clasen
4a22704d82 Fix test environments 2017-10-18 17:30:20 +02:00
Matthias Clasen
896316a9d1 Install gtk tests
Some of these currently fail on my system.
2017-10-18 17:30:20 +02:00
Matthias Clasen
abe7d8a846 More testsuite cosmetics
Unify the test naming some more.
2017-10-18 17:30:20 +02:00
Matthias Clasen
2a71a4382a testsuite: Use the cairo renderer for now 2017-10-18 17:30:20 +02:00
Carlos Garnacho
06b21b4bec testsuite: Make all gesture test touches happen in the middle of the window
The event coordinates are (so far) irrelevant to what we are testing here,
just make all events happen in the middle of the window in order to ensure
all widgets receive it. More importantly, avoid using fixed pixel distances,
since we don't get guarantees about window sizes.

Fixes the gestures testsuite on X11.
2017-10-12 18:32:27 +02:00
Carlos Garnacho
40a2b91a6c testsuite: Update gestures test to pointer emulation removal
Now all widgets are mandated to handle the real thing, which means no
pointer events are emulated for the pointer emulating touch. The output
of these tests relied on this fact, so update to the tests handling real
touch events.
2017-10-12 14:47:15 +02:00
Carlos Garnacho
ff31bdd334 testsuite: Fix gesture test inconsistencies due to legacy event handling
Legacy GtkWidget vmethods are now handled on an event controller, which
due to being the very first controller added to every widget, runs in
a different order than the previously hardcoded.

Probably testing legacy events is not really futurible, specially after
we stop installing this legacy controller by default. I'll leave the
choice to remove these specific tests for later though.
2017-10-12 14:47:15 +02:00
Timm Bäder
c8c39af454 testsuite: Add test case for previous commit
This previously led to a loop in the child widgets.
2017-09-29 12:16:06 +02:00
Timm Bäder
18837248a6 build: Add widgetorder unit test to build system 2017-09-29 12:10:42 +02:00
Debarshi Ray
60cee7339f GtkBuilder: Enforce "class" as a mandatory attribute for <object>
https://bugzilla.gnome.org/show_bug.cgi?id=786931
2017-09-25 15:26:34 +02:00
Matthias Clasen
b350db58e0 testsuite: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Chun-wei Fan
60297b9fc7 testsuite: Fix builder test on Windows/MSVC
Visual Studio does not support things like -Wl,export-dynamic, so we
need to export those symbols by using __declspec(dllexport).  So, we
decorate these with macros which we define accordingly for this purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=785210
2017-09-15 21:41:15 +08:00
Debarshi Ray
fd9aec27fc GtkBuilder: Prefer "type-func" over "class" when looking for the GType
https://bugzilla.gnome.org/show_bug.cgi?id=786932
2017-08-29 15:41:01 +02:00
Emmanuele Bassi
391d1a04ec Drop Autotools build
We are officially switching to Meson as the default build system for
GTK+.
2017-08-14 22:23:09 +01:00
Benjamin Otte
77c9ef1b7b testsuite: Don't use GtkEventBox in gestures test 2017-08-02 16:58:17 +01:00
Benjamin Otte
bb238894dc testuite: Remove EventBox from builder test 2017-08-02 11:34:57 +01:00
Timm Bäder
348871d9fc Fix a few testsuite failures
Adjust default property values, skip GtkRange:adjustment.
2017-07-19 21:27:16 -04:00
Timm Bäder
b497b066b0 cssprovider test: Remove style property test case
It's getting harder and harder to find a dummy style property to use
here, so remove the test case since style properties should be going
away soon anyway.
2017-07-19 21:27:14 -04:00
Timm Bäder
ec1984bd93 revealer: Request child size for NONE transition type
Previously, we would request a size of 0×0 when the transition type was
NONE and the child un-revealed, making the revealer in this case a
gtk_widget_set_visible replacement. Instead, to the exact same thing we
do in the CROSSFADE case and request the child size instead. This also
keeps the revealer from under allocating the child when the transition
type is set to NONE.
2017-07-19 21:27:13 -04:00
Carlos Garnacho
b151b1ba9e testsuite: Adjust gestures tests to gtk4 event delivery
Events that get to gtk_main_do_event() have the toplevel GdkWindow
as event->any.window. Also, ensure that coordinates fall within
sensible places of the windows, since those might have shadows,
headerbars and whatnot on wayland.
2017-07-19 21:05:19 +02:00
Daniel Boles
9546673d33 testsuite/scrolledwindow: Try non-overlay/non-auto
It was only testing the default configuration, where overlay scrolling
is on and both scrollbars use POLICY_AUTOMATIC. We should also test the
other 3 configurations that are available by including non-overlay
scrollbars and/or those that use POLICY_ALWAYS.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-05-10 22:29:01 +01:00
Daniel Boles
91f2a310ab testsuite/gtk/scrolledwindow: Fix a copy-paste-o
It measured horizontal size when it needs height, making the test fail.
2017-05-10 19:12:16 +01:00
Timm Bäder
3d21128dbb Remove gtk_widget_get_preferred_*
They are unnecessary now that we have gtk_widget_measure.
2017-05-05 11:18:25 +02:00