Commit Graph

804 Commits

Author SHA1 Message Date
Matthias Clasen
ec255f9bb1 Update all callers 2020-01-11 00:50:22 -05:00
Matthias Clasen
1c03bbeb9c Update all users 2020-01-08 18:48:23 -05:00
Matthias Clasen
5206a92522 Update all callers 2020-01-08 18:48:22 -05:00
Matthias Clasen
5ce7bfbbd8 notebook: Receive tab dnd on the tabs
Don't make the whole notebook a drop target
for tab dnd, but just the tab bar. This will
help with drag highlighting, and it arguably
more correct anyway.
2020-01-08 18:48:22 -05:00
Matthias Clasen
df050c51bb notebook: Stop using gtk_drag_get_source 2020-01-08 18:48:21 -05:00
Matthias Clasen
c1c8abf275 notebook: Stop using gtk_drag_source_get_origin 2020-01-08 18:48:21 -05:00
Matthias Clasen
4630dd8d68 notebook: Use gtk_widget_add_controller for drag source 2020-01-08 18:48:21 -05:00
Matthias Clasen
8c3736709e notebook: Use gdk_drag_begin
Use gdk_drag_begin for one-off drags.
2020-01-08 18:48:21 -05:00
Matthias Clasen
e8b830a3dd dragsource: Reshuffle api a bit
Remove arguments from the constructor.

For actions, we now default to COPY, which is the most common one
that we should enable by default (MOVE requires handling deletion
on the the source side, and ASK only makes sense if we have
multiple actions).

For the content provider, we add a new ::prepare signal where
it should be provided just-in-time.
2020-01-08 18:48:21 -05:00
Matthias Clasen
38974d7d2b dragsource: Tweak api, update all callers
Add GdkDrag back to signals, drop ::drag-data-delete,
and replace it with a boolean in ::drag-end.
2020-01-08 18:48:21 -05:00
Matthias Clasen
508570864d Remove gtk_drop_target_get_target
Now that drop targets are event controllers,
we can just use gtk_event_controller_get_widget.
Update all callers.
2020-01-08 18:48:21 -05:00
Matthias Clasen
e9067ae2db Replace gtk_drop_target_attach/detach
Since drop targets are now just event controller,
gtk_widget_add/remove_controller works just fine
for them.
2020-01-08 18:48:21 -05:00
Matthias Clasen
1262184269 droptarget: Drop the track-motion property
It does not have any effect anymore.

Update all callers
2020-01-08 18:48:20 -05:00
Matthias Clasen
46f42fc53d droptarget: Drop defaults flags
These no longer have any effect.

Update all callers.
2020-01-08 18:48:20 -05:00
Matthias Clasen
1e000c3dac Remove gtkdnd.h 2020-01-08 18:48:20 -05:00
Matthias Clasen
583705b4ae notebook: Convert to GtkDropTarget 2020-01-08 18:48:20 -05:00
Matthias Clasen
78a0913f0f notebook: Port to GtkDragSource 2020-01-08 18:48:19 -05:00
Matthias Clasen
b23fbe1f39 notebook: Remove menu remnants 2019-12-29 17:10:16 -05: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
Matthias Clasen
acb7f437fa notebook: Avoid a crash
This is fallout from turning the menu into
a popover, causing it to be be a child.
2019-10-12 19:00:35 -04:00
Matthias Clasen
1b271f3335 notebook: Use a popover for the tab menu
We are phasing out menus.
2019-09-16 17:30:47 -04:00
Timm Bäder
54ed31ebaf notebook: Use a box layout
And incidentally make the CSS node docs correct again.
2019-09-13 19:21:04 +02:00
Matthias Clasen
8e5985d05e Typo fix 2019-06-09 17:42:10 +00:00
Christian Hergert
828c36636c va_marshaller: add various va_marshallers
We don't need to cover every case with a va_marshaller, but there are a
number of them that are useful because they will often only be connected
to by a single signal handler.

Generally speaking, if I opened into a file to add a va_marshaller, I just
set all of them.
2019-06-06 15:30:42 -07: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
ead96b65fd notebook: Drop position from ::create-window
Global coordinates are going away.
2019-05-28 23:23:06 -04:00
Matthias Clasen
ee29b9ba95 notebook: Make final 2019-05-28 20:01:43 -04: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
948347afa9 Stop using gtk_widget_is_toplevel 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
Benjamin Otte
0791924bf7 Convert fallthrough comments to G_GNUC_FALLTHROUGH
This way it's very obvious that fallthrough is indeed what we want.

Also bump the glib requirement to 2.59 which introduced
G_GNUC_FALLTHROUGH.
2019-04-15 14:40:25 +02:00
Benjamin Otte
c593f86ac6 notebook: Add missing return statement
Previously, the code would just fall thrrough and repeat an operation it
had tried before, but that seems quite unnecessary.
2019-04-15 14:38:23 +02:00
Matthias Clasen
5b78a3048f gizmo: Add a contains_func
Let GtkGizmo override the contains() implementation.
Update all callers to pass NULL for the contains_func.
2019-04-07 15:47:24 +00:00
Matthias Clasen
a97845c380 notebook: Stop using child properties 2019-04-05 12:01:43 +00:00
Matthias Clasen
03eb455c93 Rename gdk_device_get_position_double
We can drop the double suffix now.
2019-03-26 18:12:55 -04:00
Matthias Clasen
7e4707642a gtk: Stop using gdk_device_get_position
We should always use the double variant of this api.
2019-03-26 18:12:55 -04:00
Matthias Clasen
2bf1561b48 Port widgets to the root focus API 2019-03-16 21:24:44 -04:00
Peter Bloomfield
afbfccb89e notebook: Notify the notebook page, not the child
Call g_object_notify() on the GtkNotebookPage, not the child GtkWidget.
Fixes some issues in !594.
2019-03-03 18:21:10 -05:00
Matthias Clasen
3ae31b0e79 notebook: Document new apis
This silences gi build warnings.
2019-02-23 23:26:59 -05:00
Matthias Clasen
0961fe7a55 notebook: Fix up issues with property notification 2019-02-21 00:31:17 -05:00
Matthias Clasen
f64b0a705e Implement position property somewhat 2019-02-21 00:31:17 -05:00
Matthias Clasen
c1ad7217b5 notebook: Fix up ref counting
We need to keep a ref to the page objects.
2019-02-21 00:31:17 -05:00
Matthias Clasen
f11d0118a3 notebook: Add a pages model
Just like GtkStack and GtkAssistant, provide
a list model with the page objects.
2019-02-21 00:31:17 -05:00
Matthias Clasen
7f8ba95db5 Allow builder to add notebook pages 2019-02-21 00:31:17 -05:00
Matthias Clasen
ff4b3f1170 Turn labels into page properties 2019-02-21 00:31:17 -05:00
Matthias Clasen
78c54b27d7 Add GtkNotebookPage properties 2019-02-21 00:31:17 -05:00
Matthias Clasen
85fb368834 Make GtkNotebookPage an object 2019-02-21 00:31:17 -05:00
Matthias Clasen
0e29408215 notebook: Rename an internal macro
Avoid a clash between GObject boilerplate and the
GTK_NOTEBOOK_PAGE() macro, by renaming it.
2019-02-21 00:31:17 -05: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