Matthias Clasen
a309e74be7
testtoolbar: Convert to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
ccaf70e1b7
testlist3: Convert to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
2fd9431f23
testdnd: Convert to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
3f33a0ed27
testdnd2: Port to GtkDropTarget
2020-01-08 18:48:20 -05:00
Matthias Clasen
b4c689ecd6
tests: Convert to GtkDragSource
...
Some tests, such as testimage did not have
anything particularly worth keeping, so
were removed instead of fixed.
2020-01-08 18:48:19 -05:00
Matthias Clasen
337057eb35
entry: Port icon dnd to GtkDragSource
...
This requires a small change in the api,
since we need to provide a GdkContentProvider now.
2020-01-08 18:48:19 -05:00
Timm Bäder
1477882b31
testentryicons: Fix a memory leak
2020-01-07 17:27:16 +01:00
Matthias Clasen
96d2bf10b9
Add a text view mark/cursor test
...
This has testcases for some issues around invalidation
of marks.
2020-01-03 11:18:08 -05:00
Matthias Clasen
e56eb7b17b
testtooltips: Test tooltips on popovers
...
They do not currently work right.
2019-12-29 22:09:13 -05:00
Matthias Clasen
5c97f09796
tests: Stop using menus
2019-12-29 20:31:58 -05:00
Matthias Clasen
7078765903
Revert unintended changes
...
I didn't mean to make this a complicated
portal test. Go back to being a simple test.
2019-12-29 13:03:44 -05:00
Matthias Clasen
29e1dac1ff
testfilechooser: Test the choice apis
2019-12-25 09:47:22 -05:00
Christoph Reiter
8f8229dcd2
Fix various new mingw compiler warnings
...
These are the result of us missing CI for some time now and
MSYS2 having a newer GCC now I guess.
2019-12-18 09:25:06 +01:00
Chun-wei Fan
d51e3e835e
tests/: Revert bbb56d8
for non-UNIX
...
The portal bits are only supported on *nix, so use the old code on
non-*nix.
2019-12-17 00:52:25 +08:00
Matthias Clasen
bbb56d8216
Merge branch 'file-transfer' into 'master'
...
clipboard: file transfer portal support
See merge request GNOME/gtk!1244
2019-12-12 19:33:02 +00:00
Matthias Clasen
a20c8af678
clipboard: file transfer portal support
...
Implement file-list <-> application/vnd.flatpak.file-list
serialization by talking to the file transfer portal.
See https://github.com/flatpak/xdg-desktop-portal/pull/222
2019-12-12 14:25:33 -05:00
Benjamin Otte
f6bdfc32d3
tests: Set an existing font in testfontchooser
2019-12-12 19:50:55 +01:00
Matthias Clasen
3ee9b0cf4b
Make a test with a custom display
...
This completely breaks the inspector.
2019-12-07 10:03:42 -05:00
Benjamin Otte
a15fb95c46
gtk-demo: Use normal way to lookup up symbols
...
We're a normal application, so we can use the normal way to hook up code
into builder files, which is using dlsym() for the function pointers.
There's no need to to extra work exporting static symbols.
2019-12-03 18:12:25 +01:00
Timm Bäder
8ca46169b1
gl renderer: Blur shader improvements
...
Use a two-pass blur shader, fix a few other things and unify the
blurring of blur nodes and blurred outset shadow nodes.
Related to #1283
2019-12-03 08:40:34 +01:00
Timm Bäder
642ced0cfc
testblur: Fix default blur radius
...
sync it up with the adjustment value. also just add the destroyed
handler.
2019-12-03 08:40:34 +01:00
Benjamin Otte
b025ee428c
builder: Connect signals automatically
...
gtk_builder_connect_signals() is no longer necessary, because all the
setup that made it necessary to have this extra step is now done
automatically via the closure functions.
2019-11-22 17:42:31 +01:00
Benjamin Otte
27d05102ab
builder: Remove user_data argument from gtk_builder_connect_signals()
...
This is pretty unused and gets in the way of the next steps.
A potential side effect is that for templates the widget was passed as
the user data argument. If that turns out to be important, we have to
special case that situation.
2019-11-22 07:46:18 +01:00
Matthias Clasen
d4180931f8
Merge branch 'seal-popover-menu' into 'master'
...
Privatize popover menu pieces
See merge request GNOME/gtk!925
2019-11-18 01:57:55 +00:00
Emmanuele Bassi
b70e4f6de9
Rename "iconify" to "minimize"
...
The "iconified" state is mostly an X11-ism; every other platform calls
this state "minimized" because it may not involve turning a window into
an icon at all.
2019-11-16 20:07:37 +00:00
Timm Bäder
f8303c7a22
testpopover: Plug two GtkBuilder leaks
2019-11-14 09:15:58 +01:00
Matthias Clasen
bfa0509f08
Privatize popover menu pieces
...
Don't allow manual creation of popover menus
anymore. This lets us also make GtkModelButton
private
2019-11-11 12:42:06 +01:00
Christian Hergert
5e341210a1
texthistory: add GtkTextHistory helper
...
The GtkTextHistory helper provides the fundamental undo/redo stack that
can be integrated with other text widgets. It allows coalescing related
actions to reduce both the number of undo actions to the user as well as
the memory overhead.
A new istring helper is used by GtkTextHistory to allow for "inline
strings" that gracefully grow to using allocations with g_realloc(). This
ensure that most undo operations require no additional allocations other
than the struct for the action itself.
A queue of undoable and redoable actions are maintained and the link for
the queue is embedded in the undo action union. This allows again, for
reducing the number of allocations involved for undo operations.
2019-11-05 09:34:29 -08:00
Matthias Clasen
dbbb7eef15
testicontheme: Remove useless function
...
Contexts in icon themes are not useful for anything,
so drop this function from testicontheme.
2019-10-18 08:53:23 -05:00
Timm Bäder
8928323c6b
popover2.ui: Stop trying to set GtkModelButton:label
...
The property is called "text"
2019-10-09 16:57:22 +02:00
Timm Bäder
c7203550a2
testmodelbutton: Remove toggles for removed properties
2019-10-09 16:57:22 +02:00
Christian Hergert
fea2a82ef6
textview: use GtkTextViewChild for border and overlay children
...
This creates a new GtkTextViewChild that can manage overlay children at
given x,y offsets in buffer coordinates. This simplifies GtkTextView by
extracting this from GtkTextWindow as well as providing a real widget for
the borders.
With this change, we also rename gtk_text_view_add_child_in_window() to
gtk_text_view_add_overlay(). For those that were using
GTK_TEXT_WINDOW_WIDGET, they can use a GtkOverlay. It does not appear
that anyone was using GTK_TEXT_WINDOW_(LEFT|RIGHT|TOP|BOTTOM) for widgets
in this fashion, but that can be done by setting a gutter widget with
gtk_text_view_set_gutter(). We can make GtkTextViewChild public if
necessary to simplify this should it become necessary.
GtkTextViewChild will setup a CSS node of either "text" or "border"
depending on the GtkTextWindowType.
The old GtkTextViewChild has been renamed to AnchoredChild as it is only
used for widgets with anchors in the GtkTextBuffer. This also removes the
use of allocated GSList and instead embeds a GQueue and GList to save a
few extraneous allocations.
2019-10-04 14:45:43 -07:00
Matthias Clasen
9501fc2c14
Merge branch 'nested-popover-menu' into 'master'
...
Nested popover menus
See merge request GNOME/gtk!1076
2019-09-10 01:09:31 +00:00
Timm Bäder
7d93e9963a
testlist2: quit on window close
2019-09-09 17:36:27 +02:00
Timm Bäder
71339225eb
icontheme: Remove gtk_icon_info_load_texture
...
It's the same as load_icon now.
2019-09-09 17:36:26 +02:00
Timm Bäder
590e70d4d1
icontheme: Return a paintable from gtk_icon_info_load_icon
2019-09-09 17:36:26 +02:00
Timm Bäder
fd16ac4d5e
icontheme: Return paintables from more API
2019-09-09 17:36:26 +02:00
Timm Bäder
f3099afcc5
icontheme: Return textures from load_icon{,_for_scale}
2019-09-09 17:36:26 +02:00
Timm Bäder
6821fe0c13
icontheme: Add error argument to _load_texture
...
Loading an icon might fail.
2019-09-09 17:36:26 +02:00
Timm Bäder
4cc4868e93
label: Remove "line" from wrap properties
...
The property names are "wrap" and "wrap-mode", so it doesn't make sense
that the accessors refer to line_wrap and line_wrap_mode.
2019-09-09 17:36:23 +02:00
Matthias Clasen
ea44eade21
Add nesting popover menus
...
Add a variant of popover menus that are nesting
like traditional menus. This is a better fit for
replacing traditional main menus.
2019-09-08 19:02:06 -04:00
Timm Bäder
1c8b746b42
testscale: Properly call gtk_main_quit
2019-08-09 14:30:01 +02:00
Jonas Ådahl
7f6c31c041
tests: Remove obsolete props from popover2.ui
2019-07-24 22:42:37 +02:00
Jonas Ådahl
a2ff6af4b3
tests: Add back testpopupat
...
It's still useful for testing menus. Fixed the .ui file by removing a
property that no longer exists.
This effectively reverts commit
84d2150077
.
2019-07-03 11:42:28 +02:00
Benjamin Otte
d541aed165
testgtk: Remove unused code
...
This code has been doing nothing since 2010 when the optionmenu was
removed in 274395063a
.
2019-06-18 15:53:01 -04:00
Timm Bäder
66b081dc9c
glglyphcache: Use stb_rect_pack for better glyph packing
2019-06-04 22:42:00 +00:00
Matthias Clasen
90f330e27a
Merge branch 'gesture-click' into 'master'
...
Rename GtkGestureMultiPress to GtkGestureClick
See merge request GNOME/gtk!878
2019-05-29 18:39:09 +00:00
Matthias Clasen
d2bc5b490a
tests: Stop using gtk_window_set_position
...
This api is going away.
2019-05-29 18:04:08 +00:00
Matthias Clasen
7f65e5f96b
Rename GtkGestureMultiPress to GtkGestureClick
...
The name just made it hard for people to find the
right gesture to use.
2019-05-29 17:10:46 +00:00
Matthias Clasen
5675d585f4
testgtk: Fix a crash
...
Somebody forgot to update the signal handler
here when changing the size-allocate signal.
2019-05-29 11:07:01 -04:00
Benjamin Otte
a079fd2def
widget: Fix transform refcounting in allocate()
...
Make the transform (transfer full).
1. This makes sure we actually reference the transform. Previously we
did not.
2. Most callers create a new transform to pass to us. Now they don't
have to uref it anymore.
2019-05-29 16:34:56 +02:00
Matthias Clasen
7447abb52b
Stop using gtk_widget_get_toplevel
...
All uses of it can be replaced by gtk_widget_get_root.
2019-05-28 20:25:16 +00:00
Matthias Clasen
302d2a04ae
Stop using gtk_widget_get_surface
...
Replace all uses of gtk_widget_get_surface by
gtk_native_get_surface.
2019-05-28 20:25:16 +00:00
Matthias Clasen
18788c2a86
Remove gtk_widget_get/set_has_surface
...
These serve no purpose anymore - widgets don't
have surfaces, unless they're a GtkNative.
2019-05-28 20:25:15 +00:00
Matthias Clasen
6ab8ab87c8
Reimplement GtkPopover
2019-05-28 20:25:13 +00:00
Daniel Boles
037454d904
testscrolledwindow: GtkMenuButton != GtkContainer
...
It's not anymore, so don't cast it to one... Use the new :label instead.
2019-05-21 21:21:01 +01:00
Benjamin Otte
5273634f47
tests: Use g_free(), not free()
...
Windows doesn't like that.
2019-05-21 07:23:30 +02:00
Benjamin Otte
a1d08b4b52
rendernode: Take a graphene_point_t for the offset
...
... instead of 2 floats.
2019-05-21 06:43:59 +02:00
Matthias Clasen
5368f98dd5
demos: Stop using gtk_button_clicked
2019-05-18 14:33:41 -04:00
Timm Bäder
dde69802cd
Add error func to node deserialization
2019-05-05 07:18:39 +02:00
Matthias Clasen
c9eca55c5e
tests: Stop using gtk_menu_set_display
...
It is not needed here.
2019-05-01 21:54:57 +00:00
Matthias Clasen
92e21c3f1c
Drop the can-default property
...
It was added at a time when default buttons
had a very large external border that would disrupt
aligment. Not a problem nowadays.
2019-04-28 23:28:39 +00:00
Matthias Clasen
89f7b974f2
Stop using gtk_widget_grab_default
...
Replace gtk_widget_grab_default by gtk_window_set_default_widget.
2019-04-28 23:21:51 +00:00
Matthias Clasen
fe3b5ba545
tests: Stop using gtk_widget_get_parent_surface
...
We can just use the surface of the parent.
2019-04-24 20:57:09 -04:00
Benjamin Otte
84d2150077
tests: Remove popupat test
...
The test hasn't worked for a while and nobody cared to fix it.
Neither do I.
2019-04-15 14:38:23 +02:00
Benjamin Otte
117fc68195
tests: Remove testboxcss
...
That test was cool in 2011, but hasn't been updated or used since then
because its features are now part of widget-factory and the inspector.
So let's remove it.
2019-04-12 19:34:29 +02:00
Benjamin Otte
a8f712b09a
cssection: Return locations, not numbers
...
Now that we have GtkCssLocation, actually use it.
2019-04-12 19:34:28 +02:00
Benjamin Otte
a938c14d11
build: Add gtk-css static library
...
This library is meant to be the new CSS library that gets used from GDK,
GSK and GTK for string printing and parsing.
As a first step, move GtkCssProviderError into it.
While doing so, split it into GtkCssParserError (for critical problems)
and GtkCssParserWarning (for non-critical problems).
2019-04-12 19:34:28 +02:00
Matthias Clasen
ef982b7d46
Rename things
...
Rename the can-pick property to can-target,
and redo the pick flags with more descriptive names.
2019-04-08 08:42:25 -04:00
Matthias Clasen
b804235aea
Add a flags argument to gtk_widget_pick
...
This will be used to let the inspector and other users
pick insensitive widgets again. For now, update all
callers to pass no flags, preserving the current
behavior.
2019-04-07 17:19:09 +00:00
Matthias Clasen
0a4a7b310d
testgtk: Stop using child properties
2019-04-05 12:01:43 +00:00
Matthias Clasen
f184393f07
Remove testactionbar
...
This test relies on child properties.
2019-04-05 12:01:43 +00:00
Matthias Clasen
1f37600c4c
Remove testtitlebar
...
This test relies on child properties.
2019-04-05 12:01:43 +00:00
Matthias Clasen
69d4081ff8
Merge branch 'wip/ebassi/grid-layout' into 'master'
...
Implement GtkGridLayout
See merge request GNOME/gtk!714
2019-04-05 02:42:55 +00:00
Emmanuele Bassi
9700543e02
tests: Update GtkGrid definitions in UI files
2019-04-05 00:20:45 +01:00
Matthias Clasen
09cd6e3b5f
Fix teststack
...
This testcase wasn't updated to new GtkStack apis.
2019-04-03 15:10:10 +00:00
Emmanuele Bassi
447dfc029f
Remove GtkLayout
...
The need of a specialised fixed layout container that can be placed into
a GtkScrolledWindow ceased to exist once GtkScrolledWindow gained the
ability to automatically interpose a GtkViewport when adding a child
that does not implement GtkScrollable.
All the other justifications that led to the existence of GtkLayout as a
separate widget from GtkFixed have been largely made irrelevant in the
20 years since its inception.
2019-04-02 15:29:20 +01:00
Matthias Clasen
53a28f7672
testrevealer: Cover the new transitions
...
Add tests for all the swing transitions.
2019-03-29 10:54:45 -04:00
Matthias Clasen
700183e5b6
Convert ui files
...
Run gtk4-builder-tool simplify --3to4 over all ui files.
2019-03-28 16:37:21 -04:00
Matthias Clasen
14ad26a599
Convert ui files
...
Run gtk4-builder-tool simplify --3to4 over all ui files.
2019-03-27 18:40:40 -04:00
Matthias Clasen
7ac250dea7
Convert all ui files
...
Run gtk4-builder-tool simplify --3to4 over all ui files.
2019-03-27 13:36:24 -04:00
Matthias Clasen
de741e57f3
tests: Stop using gtk_window_set_gravity
...
This api is going away.
2019-03-26 17:55:29 -04:00
Matthias Clasen
27c286773c
tests: Stop using gtk_window_move
...
It is going away.
2019-03-26 17:55:29 -04:00
Matthias Clasen
6b6f26ed45
Add a window move/resize test
2019-03-26 15:57:04 -04:00
Matthias Clasen
7ca24f12d7
window: Remove initial-focus builder support
...
With focus-widget now a property, this is no longer needed.
2019-03-16 21:24:45 -04:00
Matthias Clasen
2bf1561b48
Port widgets to the root focus API
2019-03-16 21:24:44 -04:00
Matthias Clasen
a3b73a416e
password entry: Add a way to see the content
...
Add a ::show-peek-icon property and show a clickable
icon when it is set. Clicking it toggles the visibility
of the content. The same functionality is also accessible
via a context menu item.
This is a common feature of password entries.
2019-03-14 20:31:45 -04:00
Benjamin Otte
0e1a50366a
transform: Move to GSK
...
The renaming of the prefix makes this a large patch.
2019-03-04 23:09:02 +01:00
Timm Bäder
f35b8a7541
Fix compile time warnings
2019-03-02 05:28:55 +01:00
Matthias Clasen
9e0c471b03
entry, spin button: Drop redundant API
...
Avoid duplicating GtkEditable APIs. Port existing users.
2019-02-28 16:34:00 -05:00
Matthias Clasen
41c0ac1a68
Merge branch 'overlay-cleanup' into 'master'
...
Overlay cleanup
See merge request GNOME/gtk!600
2019-02-22 03:38:20 +00:00
Matthias Clasen
f8609efa2b
testoverlay: Use gtk_widget_set_can_pick
...
Use gtk_widget_set_can_pick instead of the
overlay-specific api with the same purpose.
2019-02-21 21:55:05 -05:00
Matthias Clasen
3487ebe4fd
remove tests that no longer work
2019-02-21 19:46:38 -05:00
Benjamin Otte
e8b5056940
And another keybinding leftover
2019-02-22 00:07:35 +01:00
Benjamin Otte
c24f32619f
widget: Make gtk_widget_allocate() take a GtkTransform
...
We can reason about GtkTransform way better - and determine its category or
do equality checks.
2019-02-21 19:47:27 +01:00
Benjamin Otte
01f7f255b5
gtk: Check return value of compute_bounds()
...
Half of these calls will completely break if anybody ever uses CSS
transforms with them, but hey...
2019-02-20 05:26:31 +01:00
Timm Bäder
8ce6cf569f
Add test for widget transforms
2019-02-19 19:22:10 +01:00
Matthias Clasen
22ea832eb3
Fix testtreesort warnings
2019-02-19 00:25:59 -05:00
Matthias Clasen
210c5d88a2
Add a test for GtkPassworkEntry
2019-02-19 00:25:59 -05:00
Matthias Clasen
e5e2bd3187
Drop GtkAssistantPage::has-padding
...
This is causing us some internal complications, and
it is very easy to just add padding to the pages
yourself.
2019-02-15 10:23:48 -05:00