Benjamin Otte
ac31979805
widget: Port bindings to use shortcuts
2020-03-18 23:00:49 -04:00
Benjamin Otte
0b4d0f4d31
dialog: Port binding to use shortcuts
2020-03-18 23:00:49 -04:00
Emmanuele Bassi
00bc9e6b85
text: Port to widget shortcuts
2020-03-18 23:00:49 -04:00
Emmanuele Bassi
d75fd59ddf
Allow installing bindings bound to actions
...
This is just convenience code around GtkShortcut, just like bindings for
signal emission and callback invocation.
2020-03-18 23:00:49 -04:00
Emmanuele Bassi
84a52e3bbd
shortcut: Add action activation
2020-03-18 23:00:49 -04:00
Emmanuele Bassi
9687d69b5a
bindings: Export action activation internally
...
We're going to use it, just like we use the signal emission code.
2020-03-18 23:00:49 -04:00
Benjamin Otte
b18f9da807
shortcut: Add gtk_shortcut_set_callback()
...
... and gtk_widget_class_add_binding() to go with it.
This allows shortcuts to invoke manually added callbacks.
2020-03-18 23:00:49 -04:00
Benjamin Otte
6c13bbb441
combobox: Port bindings to use shortcuts
2020-03-18 23:00:49 -04:00
Benjamin Otte
4f128a4a21
assistant: Port bindings to use shortcuts
2020-03-18 23:00:49 -04:00
Benjamin Otte
e62154c91f
trigger: Add an alternative trigger
...
And use it.
I just added it to GtkWidget just to show that I can.
The real reason I want it is for gamepad/joystick triggers
in games, so that it becomes possible to select 2 different
triggers (gamepad and keyboard) for the same shortcut.
2020-03-18 23:00:49 -04:00
Matthias Clasen
78f9940ddc
shortcut: Add GtkShortcutTrigger
...
Triggers are meant to describe how to trigger a shortcut.
So far only a keyval + modifiers trigger exists.
2020-03-18 23:00:49 -04:00
Benjamin Otte
0f6c5da28d
window: Port bindings to use shortcuts
2020-03-18 23:00:49 -04:00
Benjamin Otte
c7f10e570e
bindings: Add more variant types
...
Also marshal types that the code in gtkbindings.c doesn't use. These
will be used by gtk_widget_class_add_binding_signal().
2020-03-18 23:00:49 -04:00
Benjamin Otte
e19b49f5aa
widget: Add gtk_widget_class_add_shortcut()
...
This allows adding shortcuts as a replacement for keybindings.
2020-03-18 23:00:49 -04:00
Benjamin Otte
ff13ee4b66
gtk: Add GtkShortcut
...
This is the base class for what is about to take over all sorts of
keyboard shortcuts. The initial version barely deals with keybindings.
2020-03-18 23:00:49 -04:00
Benjamin Otte
fed7d3833f
bindings: Split out function to invoke an action signal
...
We want to use that in shortcuts later.
2020-03-18 23:00:49 -04:00
Benjamin Otte
5c6be5c0cd
shortcutcontroller: Introduce
...
This is a very barebones controller that currently does nothing but
activate the binding signals. Yay.
And because we have bindings on every widget (Yes, a GtkGrid has a
keybinding - 2 in fact), we need that controller everywhere.
2020-03-18 23:00:49 -04:00
Benjamin Otte
06660874ee
bindings: Make gtk_binding_parse_signal() use GVariantBuilder
...
And because it's the last user of GtkBindingArg and
gtk_binding_entry_add_signall(), also remove those two.
2020-03-18 23:00:49 -04:00
Benjamin Otte
4675d74e42
bindings: Parse into GVariantBuilder directly
...
Avoids the indirection via GtkBindingArg
2020-03-18 23:00:49 -04:00
Benjamin Otte
3b3a5c2d53
bindings: Add gtk_binding_entry_add_signal_variant()
...
This function is the replacement for
gtk_binding_entry_add_signall().
The GVariant will be demarshalled and passed to the action signal upon
binding activation. The same rules apply as used to apply for
GtkBindingArg, in that long, double and string args are now replaced by
"x", "d" and "s" variant types.
2020-03-18 23:00:49 -04:00
Benjamin Otte
385c5e0569
bindings: Replace GtkBindingArg arguments with GVariant
...
This only replaces invocation, not yet parsing.
2020-03-18 23:00:49 -04:00
Christian Hergert
6c8d47f585
textbtree: short-circuit visibility check when possible
...
If we have never seen a GtkTextTag in the GtkTextTagTable with the
invisible bit set, then we do not need to go through the process of
checking the accumulated tags.
Not using invisible tags is overwhelmingly the common case.
2020-03-18 11:32:46 -07:00
Matthias Clasen
1bc1b82256
Merge branch 'wip/jimmac/adwaitadark-lighten-switches' into 'master'
...
Adwaita: dark switches/check/radios
Closes #2461
See merge request GNOME/gtk!1532
2020-03-18 12:28:15 +00:00
Matthias Clasen
89c0df6cb7
Merge branch 'wip/chergert/textview-fix-gdk_event_unref' into 'master'
...
textview: use gdk_event_unref()
Closes #2520
See merge request GNOME/gtk!1531
2020-03-18 12:27:08 +00:00
Jakub Steiner
c91dd2cb45
Adwaita: dark switches/check/radios
...
- lighten up radios, switches and checkboxes
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2461
2020-03-18 13:01:17 +01:00
Matthias Clasen
3408ff1dd7
emojichooser: Fix keynav
...
Make arrow and tab keys work in the
variations popover again.
2020-03-17 21:49:29 -04:00
Matthias Clasen
7a46157edf
window: Set min size properly
...
When we are mapping the window, we need to compute
a proper min size, otherwise the 1, 1 sticks and
makes all windows shrinkable to nothing.
2020-03-17 20:46:57 -04:00
Matthias Clasen
01568dc915
Revert "Adwaita: dark switches/check/radios"
...
This reverts commit 435992600f
.
This causes warnings from the CSS parser.
2020-03-17 20:32:23 -04:00
Matthias Clasen
6eb848f0e0
popover: Add keynav keybindings
...
The shortcut controllers are limited to same-native,
so we need to duplicate the Tab and arrow key bindings
for focus handling, as well as the Enter bindings for
activation.
2020-03-17 20:15:26 -04:00
Christian Hergert
e4578b15c3
textview: use gdk_event_unref()
...
Fixes #2520
2020-03-17 13:24:03 -07:00
Jakub Steiner
435992600f
Adwaita: dark switches/check/radios
...
- lighten up radios, switches and checkboxes
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2461
2020-03-17 11:03:28 +01:00
Matthias Clasen
5d4b46b2d8
Merge branch 'emoji-chooser-fixes' into 'master'
...
Emoji chooser fixes
See merge request GNOME/gtk!1530
2020-03-17 05:12:12 +00:00
Matthias Clasen
292cea7310
Adwaita: Fix focus in emoji chooser
2020-03-17 00:28:57 -04:00
Matthias Clasen
4d7f0f330b
emojichooser: Make the variation picker work again
...
We can't attach popovers to unsuspecting widget anymore.
2020-03-17 00:07:37 -04:00
Robert Mader
5343ec3345
imcontextwayland: Honour len argument in gtk_im_context_wayland_set_surrounding
...
Clients may pass not `NULL`-terminated strings as the function takes a
`len` argument. Use that argument.
2020-03-16 16:53:33 +01:00
Matthias Clasen
c9ec1c6af1
Drop focus-related properties
...
We don't use these, and they are only implemented on X11.
2020-03-14 19:28:00 -04:00
Matthias Clasen
6f156dad7f
window: Drop keep above/below
2020-03-14 15:16:56 -04:00
Matthias Clasen
fb7ef8f62c
window: Drop sticky
...
This is an X11-only concept that we don't have
on Wayland.
2020-03-14 14:34:39 -04:00
Matthias Clasen
dfda88038e
window: Drop gtk_window_set_attached_to
...
We are no longer attaching windows to widgets.
2020-03-14 02:00:10 -04:00
Matthias Clasen
66a0a8d53e
Merge branch 'wip/baedert/test-cflags' into 'master'
...
Pass (almost) all our cflags to tests, testsuite, examples, demos, ...
See merge request GNOME/gtk!1516
2020-03-13 18:40:46 +00:00
Matthias Clasen
c5076675aa
a11y: Drop the private from GtkPopoverAccessible
...
It is not used, and empty structs upset msvc.
2020-03-13 09:51:04 -04:00
Matthias Clasen
9d98707f66
Merge branch 'present-toplevel-2' into 'master'
...
surface api splitup
See merge request GNOME/gtk!1511
2020-03-13 13:34:57 +00:00
Bastien Nocera
179b39eb86
Merge branch 'wip/hadess/fix-remote-filechooser-main' into 'master'
...
Fix crasher/warnings when browsing remote filesystems
Closes #2482
See merge request GNOME/gtk!1490
2020-03-13 12:36:10 +00:00
Matthias Clasen
19e2ab76ce
win32: Build fixes
...
These fixes were done blindly, to make the ci pass,
and will need review by somebody with access to an
actual win32 system to make sure the surface subtypes
are implemented properly.
2020-03-13 07:47:48 -04:00
Matthew Leeds
1963ff2951
gtk: Tweak GTK_ALIGN_BASELINE docs
2020-03-12 12:36:09 -07:00
Matthias Clasen
81be6ff46b
Move edge-constraints to GdkToplevel
2020-03-12 15:30:11 -04:00
Matthias Clasen
412a593618
widget: Stop using gdk_surface_set_opacity
2020-03-12 14:56:21 -04:00
Matthias Clasen
ceefe34027
gtkdragicon: Use drag surface api
2020-03-12 14:56:21 -04:00
Matthias Clasen
f90c0ccaf0
a11y: Stop using gdk_surface_get_state
2020-03-12 14:56:20 -04:00
Matthias Clasen
6edff8cd67
gtk: use toplevel state getter
2020-03-12 14:56:20 -04:00
Matthias Clasen
9266881691
window: Use GdkToplevel
2020-03-12 14:56:20 -04:00
Timm Bäder
822d67295a
Replace a few more fallthrough comments
2020-03-12 08:32:03 +01:00
Matthias Clasen
11c91065cf
window: Drop type hints
2020-03-11 19:36:04 -04:00
Matthias Clasen
2ae3b46ee9
Stop setting type hints for dialogs
2020-03-11 19:36:04 -04:00
Matthias Clasen
ef9d7612f6
shortcutswindow: Stop setting type hints
2020-03-11 19:36:04 -04:00
Matthias Clasen
66669e0573
headerbar: Stop looking at type hints
2020-03-11 19:36:04 -04:00
Matthias Clasen
ec0fb44958
a11y: Stop using type hints
2020-03-11 19:35:56 -04:00
Matthias Clasen
b2ae6ce8ff
surface: Rename gdk_surface_input_shape_combine_region
...
There is no shape combining going on anymore, so
call this just gdk_surface_set_input_region, and
remove the offset arguments too. All callers pass
0 anyway.
Update all callers and implementations.
2020-03-11 19:35:56 -04:00
Matthias Clasen
513eb11c7c
inspector: Stop raising and lowering windows
...
We should always be composited, so this should not
matter in practice.
2020-03-11 19:35:56 -04:00
Matthias Clasen
4e8dfdff2e
tooltip: Use GdkPopup
2020-03-11 19:35:55 -04:00
Matthias Clasen
b670bf54f7
popover: Use GdkPopup
2020-03-11 19:35:55 -04:00
Matthias Clasen
78d71eb439
Simplify surface move/drag api
...
Drop the with_device variants, and always pass a device.
2020-03-11 19:35:55 -04:00
Matthias Clasen
6f36d9865e
Drop gtk_window_begin_move/resize_drag
...
These are just simple wrappers around GdkSurface
api, and we don't need them.
2020-03-11 19:35:55 -04:00
Emmanuele Bassi
7de62118a0
Fix message for VFL parser errors
...
The loop is iterating over the wrong variable, and it's reimplementing
g_strfill() in a less efficient way.
2020-03-11 15:14:17 +00:00
Rico Tzschichholz
4232cbe33f
Really fix annotation for GtkDropTarget.get_gtypes()
2020-03-09 17:03:58 +01:00
Timm Bäder
7789d0e23f
builder: Make object names a const array
...
We don't take ownership.
2020-03-07 15:30:38 +01:00
Timm Bäder
049f841900
padcontroller: Copy action entries
...
The label and action_name entries of GtkPadActionEntry are supposed to
be const, so copy them into a private ActionEntryData struct that we
later free.
2020-03-07 14:52:45 +01:00
Matthias Clasen
948ab2767b
Merge branch 'master' into 'master'
...
builder-tool: rename show-close-button to show-title-buttons
See merge request GNOME/gtk!1497
2020-03-06 18:02:06 +00:00
Timm Bäder
d7fb33caf7
filechooserwidget: Avoid criticals when in recent mode
...
Don't try to use the browse_files_model just because we have a location
entry. The model might still be NULL at this point.
2020-03-06 16:29:32 +01:00
Timm Bäder
a1c75795bc
Replace fallthrough comments with G_GNUC_FALLTHROUGH
2020-03-06 10:39:42 +01:00
Benjamin Otte
cda9007f0f
stack: Make static analyzer happy
2020-03-06 05:56:29 +01:00
Benjamin Otte
394955cceb
pathbar: Don't do the same thing twice.
...
Don't do the same thing twice.
2020-03-06 05:53:20 +01:00
Benjamin Otte
a106b54355
treeview: Don't assign value twice.
2020-03-06 05:51:37 +01:00
Benjamin Otte
510e17d123
cellarea: Be very clear
...
The static analyzer needs to know we absolutely DO NOT want to use this
return value.
2020-03-06 05:50:35 +01:00
Benjamin Otte
317dcddddb
builder-tool: Don't allow property to be both resize and shrink
...
Otherwise builder-tool crashes when you do
<property name="shrink" name="resize">1</property>
Thanks to the static analyzer for figuring that one out.
2020-03-06 05:44:11 +01:00
Benjamin Otte
df282a13bb
applicationaccels: Use g_renew()
2020-03-06 05:44:11 +01:00
Benjamin Otte
e37729756d
liststore: Fix gtk_list_store_iter_is_valid()
...
The iter may be invalid, so we may not read from it.
testsuite/gtk/treemodel tests this and valgrind is shouting about it,
but it never crashed until I just ran it...
This bug is from 2004 and the test is from 2007. I guess invalid memory
accesses don't get caught by CI much.
2020-03-06 05:44:11 +01:00
Benjamin Otte
03e7c7fab1
treepath: Use g_renew()
2020-03-06 05:43:56 +01:00
Benjamin Otte
be30f78e62
treeview: Don't initialize variable twice
2020-03-06 05:43:56 +01:00
Benjamin Otte
e356d59a92
build: Add -Wnull-dereference
...
Sprinkle various g_assert() around the code where gcc cannot figure out
on its own that a variable is not NULL and too much refactoring would be
needed to make it do that.
Also fix usage of g_assert_nonnull(x) to use g_assert(x) because the
first is not marked as G_GNUC_NORETURN because of course GTester
supports not aborting on aborts.
2020-03-05 08:14:37 +01:00
Benjamin Otte
4be4799316
icontheme: Remove unused parameter
...
It's only ever set to NULL (and then dereferenced, too)
2020-03-05 07:59:59 +01:00
Benjamin Otte
7dce9e426e
treerbtree: Use for loops
...
Makes the code more readable.
Also does the NULL check for the initial element, which was misisng
before.
2020-03-05 07:59:05 +01:00
Benjamin Otte
4e88d5a7cf
notebook: Don't crash on drags not coming from a notebook
2020-03-05 07:59:05 +01:00
Benjamin Otte
fdd4630952
icontheme: Don't crash on icon lookup failure
2020-03-05 07:59:05 +01:00
Benjamin Otte
dc86c744bf
rbtree: Simplify macros
...
* NODE_FROM_POINTER() can not be NULL
* shuffle NODE_TO_POINTER() code for readability so that the NULL check
is on the outside and not the cast
2020-03-05 07:59:05 +01:00
Benjamin Otte
9fedcec82e
rbtree: Simplify code
...
This makes it easier to understand for gcc (and hopefully humans, too)
that by rotating we essentially just swap `node` and `p`.
2020-03-05 07:59:05 +01:00
Benjamin Otte
38dcc8f63b
mountoperation-x11: Fix copy/paste thinko
2020-03-05 07:05:48 +01:00
Benjamin Otte
8fc360dac5
imcontextwayland: Fix copy/paste error
2020-03-05 04:03:02 +01:00
Benjamin Otte
4313c47113
textview: Fix copy/paste error
2020-03-05 04:03:02 +01:00
Emmanuele Bassi
a3b9dba13c
Fix annotation for GtkDropTarget.get_gtypes()
...
The argument name must match in the documentation, and the `allow-none`
annotation is deprecated, and should be replaced by `optional` in this
case.
2020-03-03 13:17:31 +00:00
Emmanuele Bassi
5e099e2606
Remove incorrect rename-to annotations
...
The `rename-to` annotation is used to "shadow" a symbol with another
one, which means both symbols need to exist. It can't be used to rename
a symbol to something else.
2020-03-03 13:13:26 +00:00
Emmanuele Bassi
041043eec1
Fix introspection warnings for GtkDragIcon
2020-03-03 13:12:52 +00:00
Emmanuele Bassi
ec9038a8f2
Add missing annotation for GtkIconTheme
2020-03-03 13:04:06 +00:00
Georges Basile Stavracas Neto
8e14b21e52
build: Install gtkeventcontrollerfocus.h
...
It's a public class, and is included by gtk.h. Ship it.
2020-03-03 00:38:13 -03:00
Matt Guerrette
46ba019522
builder-tool: rename show-close-button to show-title-buttons
...
For GtkHeaderBar show-close-button has been renamed to
show-title-buttons for GTK4. This commit adds this fixup to the builder
tool
2020-03-02 22:24:46 -05:00
Benjamin Otte
2e55c9cf8c
droptarget: Fast-path local value load
...
This way, we can ensure that for local same-type drops the GValue
is set when ::enter is emitted.
This is the common case for dnd between widgets inside larger
applications, so it's worth it to speed it up.
2020-03-02 21:45:59 +01:00
Benjamin Otte
c0a63e6dd2
dnd: Fix some documentation gotchas
2020-03-02 21:26:08 +01:00
Benjamin Otte
f5fda3ae58
themes: Set proper foreground color for DND icons
2020-03-02 04:43:56 +01:00
Benjamin Otte
f4a00e7909
calendar: Use a drag source
2020-03-02 04:43:56 +01:00
Benjamin Otte
e7db386018
dnd: Don't create custom color drag icons
...
... use the default one. It looks much better.
2020-03-02 04:43:56 +01:00
Benjamin Otte
2a697827e1
dragicon: Add gtk_drag_icon_create_widget_for_value()
...
... and use it to set a drag icon.
2020-03-02 04:43:56 +01:00
Benjamin Otte
03882e1f96
dragicon: Change how to acquire drag icons
...
Before, gtk_drag_icon_new_for_drag() allowed creating new drag icons.
This could cause multiple drag icons to exist for a single drag.
Now, gtk_drag_icon_get_for_drag() makes sure that only one drag icon is
created.
2020-03-02 04:43:56 +01:00
Benjamin Otte
9efc4e6777
dragicon: Add GtkDragIcon::child
2020-03-02 04:43:56 +01:00
Benjamin Otte
7cd728a0ea
gdk: Make gdk_drop_status() take preferred action
...
This allows textview/text dnd to properly display a MOVE icon when in
the widget the drag started from but a COPY icon otherwise.
2020-03-02 04:43:56 +01:00
Benjamin Otte
c3fb6ca747
colorswatch: Switch to dragged color during dnd
...
This is really simple to implement now, so do it.
2020-03-02 03:18:55 +01:00
Benjamin Otte
a411959c91
droptarget: Redo
...
This is a huge reorganization of GtkDropTarget. I did not know how to
split this up, so it's unfortunately all one commit.
Highlights:
- Split GtkDropTarget into GtkDropTarget and GtkDropTargetAsync
GtkDropTarget is the simple one that only works with GTypes and offers
a synchronous interface.
GtkDropTargetAsync retains the full old functionality and allows
handling mime types.
- Drop events are handled differently
Instead of picking a single drop target and sending all DND events to
it, every event is sent to every drop target. The first one to handle
the event gets to call gdk_drop_status(), further handlers do not
interact with the GdkDrop.
Of course, for the ultimate GDK_DROP_STARTING event, only the first
one to accept the drop gets to handle it.
This allows stacking DND event controllers that aren't necessarily
interested in handling the event or that might decide later to drop
it.
- Port all widgets to either of those
Both have a somewhat changed API due to the new event handling.
For the ones who should use the sync version, lots of cleanup was
involved to operate on a sync API.
2020-03-02 03:18:55 +01:00
Benjamin Otte
f4ac74795c
placessidebar: Don't use the GdkDrag
...
First, it should have been a GdkDrop, but even then, proper DND code
should not rely on internals.
It's only been used in an unused signal emission anyway.
2020-03-02 03:18:55 +01:00
Benjamin Otte
b64a0273c5
notebook: Make dnd page switching a drop controller
...
This untangles tab dnd from page switching.
2020-03-02 03:18:55 +01:00
Benjamin Otte
b799bc5ce1
textview: Move drop scrolling to drop motion controller
...
Don't confuse the drop target with it.
2020-03-02 03:18:55 +01:00
Benjamin Otte
fdb39b095b
treeview, iconview: Don't return the drop target
...
Not a good idea to hand internal event controllers out to public API.
2020-03-02 03:18:55 +01:00
Piotr Drąg
810d567cc9
placessidebar: Fix a couple of typos and thinkos in menu labels
2020-03-01 15:05:28 +01:00
Matthias Clasen
3d11973df8
Drop gtk_grab_add/remove from public api
...
The only form in which we still allow grabs to take place
is with modal toplevels.
2020-02-28 16:36:17 -05:00
Matthias Clasen
57c8a643ff
Drop gtk_grab_get_current
...
Another grab-related api that we are not using.
2020-02-28 16:29:56 -05:00
Matthias Clasen
0ffb35c9e7
Drop device grabs
...
We were not using this api at all, so lets drop it.
2020-02-28 16:27:42 -05:00
Matthias Clasen
8f87555176
inspector: Fix the "Software GL" switch
...
This was crashing.
2020-02-28 14:42:19 -05:00
Bastien Nocera
8cb45cdeae
filechooser: Fallback if content-type unavailable
...
Fallback to fast-content-type if the content-type attribute isn't
available, as is the case for most remote filesystems.
Closes : #2482
2020-02-28 17:33:08 +01:00
Bastien Nocera
823714cf66
filechooser: Fix crash when file has no content-type
...
This might happen for slow filesystems where a fast-content-type might
be provided instead. Don't try to manipulate that content_type if it's
NULL, otherwise we'll either throw warnings (at best) or crash (at
worse).
Conflicts:
gtk/gtkfilechooserwidget.c
2020-02-28 17:32:48 +01:00
Matthias Clasen
cf873f3426
Remove a stray g_object_unref
...
Events are no longer objects, so this does not do
any good. Use gdk_event_unref instead.
2020-02-27 14:31:19 -05:00
Matthias Clasen
527a8048b6
Avoid a crash in css font features values
2020-02-27 14:30:58 -05:00
Krzesimir Nowak
8df045537e
Fix a typo in gtkplacessidebar.c
...
Some mistyped vim command got into the code in commit 60d2813247
.
2020-02-27 10:02:56 +00:00
Matthias Clasen
90376d6d6e
Fix a leftover occurrence of ::expand
2020-02-26 19:31:25 -05:00
Matthias Clasen
dcbecdac31
gesture: Actually track targets
...
Due to a mismerge, this wasn't actually working,
and was causing criticals from gtk_widget_has_grab
when dragging windows.
2020-02-26 17:06:15 -05:00
Matthias Clasen
fa75d7f480
builder-tool: Fix a thinko
...
We can't rely on the pspec for a removed property.
This code worked until I actually removed the properties.
Update the tests to reflect this.
2020-02-26 10:01:38 -05:00
Matthias Clasen
5430c80361
Merge branch 'expand-margin-cleanup' into 'master'
...
expand and margin cleanup
See merge request GNOME/gtk!1479
2020-02-26 14:27:47 +00:00
Matthias Clasen
37a2cae10e
Small fixups
...
Trying to get the ci style test to pass.
2020-02-26 08:13:45 -05:00
Emmanuele Bassi
815e18e069
Merge branch 'docs-fixes' into 'master'
...
Various documentation fixes
See merge request GNOME/gtk!1481
2020-02-26 11:19:09 +00:00
Emmanuele Bassi
303e20226c
Add missing ownership transfer annotations
2020-02-26 10:29:59 +00:00
Emmanuele Bassi
3c2312a2dd
Fix gtk-doc stanza for private symbol
2020-02-26 10:25:46 +00:00
Emmanuele Bassi
c8f4f903c6
Remove last instances of GtkFileChooser:show-hidden
...
The file chooser widget is still setting the show-hidden property, even
though it was removed.
2020-02-26 10:15:16 +00:00
Matthias Clasen
b5bacb3be6
Drop the margin property
...
Replace it with margin-start, -end, -top, -bottom throughout.
2020-02-25 20:59:04 -05:00
Matthias Clasen
a9c05193a7
Drop the expand property
...
The hexpand and vexpand properties are sufficient.
2020-02-25 18:29:15 -05:00
Matthias Clasen
77ce55b9ac
builder-tool: replace some properties
...
Replace expand by hexpand and vexpand and
margin by margin-left, -right, -top, -bottom.
2020-02-25 17:50:57 -05:00
Timm Bäder
02e295ec5d
statusbar: Remove _get_message_area() from public API
...
The message should be manipulated via push() and pop().
2020-02-25 14:18:24 +01:00
Timm Bäder
6ff057f36a
scrolledwindow: Remove an unnecessary cast
2020-02-25 14:18:24 +01:00
Timm Bäder
54bf739e8f
scrolledwindow: Remove useless local variables
2020-02-25 14:18:24 +01:00
Timm Bäder
d5327a61e6
widget: Remove gtk_widget_input_shape_combine_region()
...
Widget's don't have surfaces anymore these days.
2020-02-25 14:18:24 +01:00
Timm Bäder
0bca4a276a
inspect-button: Use new gtk_window_set_extra_input_region
2020-02-25 14:18:24 +01:00
Timm Bäder
6056ca9265
window: Carry an extra input region
...
This will be used in the inspector to make it possible to click through
the inspector window.
2020-02-25 14:18:24 +01:00
Timm Bäder
73c212d89b
popover: Stop using gtk_widget_input_shape_combine_region()
...
We control the surface anyway, we can as well set the input shape on it
directly.
2020-02-25 14:18:24 +01:00
Timm Bäder
6b970c6813
widget: Remove set_csd_input_shape
...
Replace the only caller (unsurprisingly from gtkwindow.c) with a direct
call to gdk_surface_input_shape_combine_region.
2020-02-25 14:18:24 +01:00
Timm Bäder
e552adf05a
widget: Remove surface member
...
Only GtkNatives are supposed to have a surface, so use the widget's
native.
2020-02-25 14:18:23 +01:00
Timm Bäder
a1fc94f1f7
range: Remove an outdated comment
...
What even is a CList.
2020-02-25 14:18:23 +01:00
Timm Bäder
b81cd8c929
range: Inline function into only caller
2020-02-25 14:18:23 +01:00
Timm Bäder
838fc4fdf4
range: Clean up compute_slider_position()
2020-02-25 14:18:23 +01:00
Timm Bäder
596be280c9
menusectionbox: Avoid a gtk_widget_destroy() call
2020-02-25 11:08:25 +01:00
Timm Bäder
b1d4d24c7b
pathbar: Inherit from GtkWidget
2020-02-25 11:08:25 +01:00
Timm Bäder
1baae1f288
colorchooser: Fix typo in checkerboard color
2020-02-25 11:08:25 +01:00
Timm Bäder
dae06d82ae
inspector: Remove double borders in recorder
2020-02-25 11:08:25 +01:00
Timm Bäder
549a3a81ae
headerbar: Replace gtk_widget_destroy() call
2020-02-25 11:08:25 +01:00
Timm Bäder
ff4a33b69b
headerbar: Remove size request on icon button
...
Doesn't make sense that we force this one button to be this big.
2020-02-25 11:08:25 +01:00
Timm Bäder
68b4c061cf
shortcutlabel: Remove unnecessary includes
2020-02-25 11:08:25 +01:00
Timm Bäder
dbd1180ce4
stackswitcher: Avoid calling gtk_widget_destroy()
2020-02-25 11:08:25 +01:00
Timm Bäder
df3b88483d
modelbutton: Fix wrong function name in doc comment
2020-02-25 11:08:25 +01:00
Timm Bäder
60d2813247
placessidebar: Convert popover menu to proper GtkPopoverMenu
2020-02-25 11:08:23 +01:00
Timm Bäder
995277f57d
placessidebar: Avoid calling gtk_widget_destroy()
2020-02-25 10:43:15 +01:00
Timm Bäder
e1ca83ddbd
pathbar: Avoid calling gtk_widget_destroy()
2020-02-25 10:43:15 +01:00
Timm Bäder
f4202c5075
headerbar: Avoid calling gtk_widget_destroy()
2020-02-25 10:43:15 +01:00
Timm Bäder
103b6a9205
popovermenubar: Avoid calling gtk_widget_destroy()
2020-02-25 10:43:15 +01:00
Timm Bäder
ceabe70a42
emojichooser: Avoid using gtk_widget_destroy()
2020-02-25 10:43:15 +01:00
Timm Bäder
73faa9c84a
popovermenu: Avoid a gtk_widget_destroy() call
2020-02-25 10:43:15 +01:00
Timm Bäder
1b278b0636
colorchooserwidget: Get rid of a gtk_widget_destroy() call
2020-02-25 10:43:15 +01:00
Matthias Clasen
9d80db29de
Merge branch 'spinning-spinner' into 'master'
...
Rename GtkSpinner::active to ::spinning
See merge request GNOME/gtk!1475
2020-02-25 04:04:46 +00:00
Matthias Clasen
e73a40733f
Rename GtkSpinner::active to ::spinning
...
And add a setter and getter. The old name was
confusing with the widget state of the same
name. 'Active' is just too overloaded.
2020-02-24 22:37:02 -05:00
Matthias Clasen
00f6d1c24b
Merge branch 'kill-rtl-media-icons' into 'master'
...
Drop rtl variants of media-playback-start
See merge request GNOME/gtk!1474
2020-02-25 02:09:52 +00:00
Matthias Clasen
8628c573b5
Drop rtl variants of media-playback-start
...
According to #2469 , they are unwanted.
2020-02-24 20:49:10 -05:00
Matthias Clasen
a43d13aa74
popover: Drop ::relative-to
...
It is enough to just set the parent (and make the parent
call gtk_native_check_resize in size_allocate).
This commit removes the relative_to argument to the
constructors of GtkPopover and GtkPopoverMenu, and
updates all callers.
2020-02-24 20:46:41 -05:00
Matthias Clasen
7a39f2d49d
Replace gdk_surface_is_visible by _get_mapped
...
The property is called ::mapped, and we want to get
to standard getter naming.
2020-02-24 19:07:03 -05:00
Matthias Clasen
7f46b25c04
Merge branch 'wip/ebassi/filechooser-new' into 'master'
...
Clean up the GtkFileChooser API
Closes #2455
See merge request GNOME/gtk!1454
2020-02-24 00:32:23 +00:00
Benjamin Otte
6c61c7bf0b
Don't use GdkAtom where const char * is used
...
Those are all forgotten transitions while updating code to new APIs.
2020-02-23 01:59:19 +01:00
Benjamin Otte
a62d78bf70
selection: Remove GtkSelectionData
2020-02-23 01:59:00 +01:00
Benjamin Otte
a4f7e2ca09
droptarget: Remove selectiondata read functions
...
They are unused now.
2020-02-23 01:59:00 +01:00
Benjamin Otte
a19066b17c
filechooserwidget: Stop using selection data
...
Use gdk_drop_read_async()
2020-02-23 01:59:00 +01:00
Benjamin Otte
b0f6996892
gdk: Remove gdk_surface_register_dnd()
...
All surfaces are expected to be DND surfaces from creation.
2020-02-23 01:59:00 +01:00
Matthias Clasen
ddd126740e
Fix a hard-to-spot typo
...
The symptom caused by this was scales in
popovers not reacting to dragging.
2020-02-22 13:49:12 -05:00
Emmanuele Bassi
ff6772fd98
Remove preview widget from GtkFileChooser
...
The preview widget harks from a platform before time, when we didn't
have GIO, or a thumbnail specification.
Very few applications use it correctly, if at all; it has an horrid hack
to deal with the ownership of the widget's instance when accessed
through the getter function; it messes up the layout of the widget and
its label is less than useful when it comes to file names longer than a
dozen characters; it's a poor substitute for a proper thumbnail view.
2020-02-22 16:39:01 +00:00
Emmanuele Bassi
e5ef26efa8
Remove GtkFileChooserEntry:local-only
...
We don't use it any more in GtkFileChooserWidget.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
ebd23737c0
Remove GtkPlacesSidebar:local-only
...
We don't use it any more in GtkFileChooserWidget.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
6e699e3f04
Remove GtkPlacesView:local-only
...
We don't use it any more from the file chooser widget.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
4a3742979d
Remove GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
...
We don't need a whole separate action, now that the file chooser widget
can create folders; we can create use SELECT_FOLDER and create one.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
b09e7df81b
Remove GtkFileChooser:local-only
...
Now that the whole API goes through GFile we don't have the weird split
between local-only and non-local-only modes.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
516eab5c43
Remove GtkFileChooser:show-hidden
...
This is a user setting and a user action, not something that ought to be
programmatically set via the file selection API.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
063ad28b1a
Remove overwrite confirmation machinery from GtkFileChooser
...
Overwrite confirmation should not be optional, and it should not loop
into application code to create their own dialog and user response.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
d505573ee6
Drop GtkFileChooser:extra-widget
...
We have "choices" as a more rational (and portable) API; additionally,
the ownership semantics of the extra widget property getter are a hack.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
5f070ff233
Remove filename/URI API from GtkFileChooser
...
GtkFileChooser's API predates GIO by a few years, so it started off with
filenames and URI as character arrays. After introducing GIO as a
dependency, the API included GFile-based entry points.
It's much more appropriate to use GFile everywhere, as we want to
encourage people to use GIO instead of passing random bytes to low level
POSIX API.
See: #2455
2020-02-22 15:22:06 +00:00
Benjamin Otte
9d915ff431
treeviewcolumn: Inline variable into return_if_fail()
2020-02-22 07:44:52 +01:00
Benjamin Otte
d9e3eaaec8
treeview: Guard code by right compiler macros
2020-02-22 07:33:41 +01:00
Benjamin Otte
0c4c88b449
scrolledwindow: Inline variable into return_if_fail()
2020-02-22 07:33:41 +01:00
Benjamin Otte
2cb0007b89
iconview: Inline variables into return_if_fail()
2020-02-22 07:33:41 +01:00
Benjamin Otte
eb70173646
levelbar: Guard function by right compiler macros
2020-02-22 07:33:41 +01:00
Benjamin Otte
2e941acb29
filesystemmodel: Guard variable with correct compiler flags
2020-02-22 07:33:41 +01:00
Benjamin Otte
42d71f1016
combobox: Inline variables into return_if_fail()
2020-02-22 07:33:41 +01:00
Benjamin Otte
99fc31865a
comboboxtext: Inline functions into return_if_fail()
2020-02-22 07:33:40 +01:00
Benjamin Otte
a12e563cd2
main: Don't synthesize crossing events when nothing changed
...
This was especially bad because it was confusing the event controllers
so much, they'd emit leave + enter events every time the mouse moved.
2020-02-22 07:33:40 +01:00
Benjamin Otte
a5e2275a72
stackswitcher: Use GdkDropControllerMotion
...
... and use one controller per button instead of using it on the
switcher and then going through lots of pain attempting to find the
right button for the location under the mouse.
2020-02-22 07:33:40 +01:00
Benjamin Otte
d680e2e344
Port simple cases to GtkDropControllerMotion
2020-02-22 07:33:40 +01:00
Benjamin Otte
34e5f36fdf
Add GtkDropControllerMotion
2020-02-22 07:33:40 +01:00
Benjamin Otte
9223d1ee04
eventcontrollermotion: Fix docs
2020-02-22 07:33:40 +01:00
Benjamin Otte
fc43ec0bbc
gtk: Bubble drag events like motion events
...
Emit crossing events - with a new GTK_CROSSING_DROP type - like we do
for motion events. There is no more special casing for them.
Note that the gesture has not been updated yet, so some obscure behavior
may occur.
2020-02-22 07:33:40 +01:00
Benjamin Otte
6f73a750a7
widget: Simplify adjust_allocation()
...
And in particular, only do it if the widget doesn't use ALIGN_FILL.
This avoids lots of measuring in the common case and speeds up
size_allocate() by about 25%.
And because size_allocate() is the bottleneck in the fishbowl, this also
gets ~25% more fishies.
2020-02-22 07:33:40 +01:00
Benjamin Otte
4128ee88b0
widget: Pull margin computation out of adjust_allocation
...
It's way cheaper to just do it.
Also simplifies adjust_size_allocation a lot.
2020-02-22 07:33:23 +01:00