]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gtk4: Update workaround for DropTarget.drop() signal conflict
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 26 Nov 2022 06:43:06 +0000 (07:43 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 12 Dec 2022 15:48:22 +0000 (16:48 +0100)
Deprecate DropTarget.on_drop()

Additionally don't skip Notebook.insert_page_menu()

Fixes https://gitlab.gnome.org/GNOME/vala/issues/1312

vapi/gtk4.vapi
vapi/metadata/Gtk-4.0-custom.vala
vapi/metadata/Gtk-4.0.metadata

index 09e01dad9b23876b8e36c130858efeb161ec55c6..2f171bc74705b04f82552ec43a18eed964c81581 100644 (file)
@@ -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 ();
index 6d2070ecdaf72d077e5d9ea35976270eca4832bc..e262c393d3bd44c762916d6a6620ed7515feb794 100644 (file)
@@ -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);
+       }
 }
index cc2cf65f7e4606834860ed08d407369010f04541..0f04be644dcae3e105ad6aeccb38418acf3c2f67 100644 (file)
@@ -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