diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2022-11-26 07:43:06 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2022-12-12 16:48:22 +0100 |
commit | be9c53b5327817c512184696c333bb6c549c6af7 (patch) | |
tree | d0f7a29058f3748dba9dc57c588b0d26f73d905d | |
parent | e5f4dfe1e75f5ec48bd4bd9de6a1a601044d9c84 (diff) | |
download | vala-be9c53b5327817c512184696c333bb6c549c6af7.tar.gz |
gtk4: Update workaround for DropTarget.drop() signal conflict
Deprecate DropTarget.on_drop()
Additionally don't skip Notebook.insert_page_menu()
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1312
-rw-r--r-- | vapi/gtk4.vapi | 3 | ||||
-rw-r--r-- | vapi/metadata/Gtk-4.0-custom.vala | 6 | ||||
-rw-r--r-- | vapi/metadata/Gtk-4.0.metadata | 4 |
3 files changed, 9 insertions, 4 deletions
diff --git a/vapi/gtk4.vapi b/vapi/gtk4.vapi index 09e01dad9..2f171bc74 100644 --- a/vapi/gtk4.vapi +++ b/vapi/gtk4.vapi @@ -7915,10 +7915,12 @@ namespace Gtk { public bool preload { get; set; } public GLib.Value value { get; } public signal bool accept (Gdk.Drop drop); + public signal bool drop (GLib.Value value, double x, double y); public signal Gdk.DragAction enter (double x, double y); public signal void leave (); public signal Gdk.DragAction motion (double x, double y); [CCode (cname = "drop")] + [Version (deprecated_since = "vala-0.58", replacement = "DropTarget.drop")] public signal bool on_drop (GLib.Value value, double x, double y); } [CCode (cheader_filename = "gtk/gtk.h", type_id = "gtk_drop_target_async_get_type ()")] @@ -9853,6 +9855,7 @@ namespace Gtk { public Gtk.PositionType get_tab_pos (); public bool get_tab_reorderable (Gtk.Widget child); public int insert_page (Gtk.Widget child, Gtk.Widget? tab_label, int position); + public int insert_page_menu (Gtk.Widget child, Gtk.Widget? tab_label, Gtk.Widget? menu_label, int position); public void next_page (); public int page_num (Gtk.Widget child); public void popup_disable (); diff --git a/vapi/metadata/Gtk-4.0-custom.vala b/vapi/metadata/Gtk-4.0-custom.vala index 6d2070ecd..e262c393d 100644 --- a/vapi/metadata/Gtk-4.0-custom.vala +++ b/vapi/metadata/Gtk-4.0-custom.vala @@ -29,4 +29,10 @@ namespace Gtk { [CCode (delegate_target = false)] public unowned Gtk.BuildableParserErrorFunc error; } + + public class DropTarget : Gtk.EventController { + [CCode (cname = "drop")] + [Version (replacement = "DropTarget.drop", deprecated_since = "vala-0.58")] + public signal bool on_drop (GLib.Value value, double x, double y); + } } diff --git a/vapi/metadata/Gtk-4.0.metadata b/vapi/metadata/Gtk-4.0.metadata index cc2cf65f7..0f04be644 100644 --- a/vapi/metadata/Gtk-4.0.metadata +++ b/vapi/metadata/Gtk-4.0.metadata @@ -234,8 +234,6 @@ Constraint .new_constant name="const" DragSource .drag_cancel#method name="cancel" -DropTarget - .drop#signal name="on_drop" EntryCompletion .insert_prefix#method name="request_prefix_insertion" InfoBar @@ -244,8 +242,6 @@ LayoutManager .get_request_mode#method name="get_size_request_mode" MediaStream .play#method name="play_now" -Notebook - .insert_page_menu skip PopoverMenu .add_child new PopoverMenuBar |