[gjs: 6/7] Gtk: Make gtk_container_child_set_property() override optional



commit e1197561ce97c5b33fea2f898b1bdb8384639b58
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Aug 14 22:06:13 2019 +0000

    Gtk: Make gtk_container_child_set_property() override optional
    
    GTK4 removed child properties, so bad things will happen when trying to
    use the override there. Simply apply the override only if the method
    exists (while removing the check for the underlying GjsPrivate API, as
    it's no longer optional).
    
    [skip cpplint] - it wrongly complains about a C-style cast in a C source
    
    https://gitlab.gnome.org/GNOME/gjs/issues/99

 modules/overrides/Gtk.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/modules/overrides/Gtk.js b/modules/overrides/Gtk.js
index d25fa13a..2a7c860c 100644
--- a/modules/overrides/Gtk.js
+++ b/modules/overrides/Gtk.js
@@ -36,7 +36,7 @@ function _init() {
     let {GtkWidgetClass} = Legacy.defineGtkLegacyObjects(GObject, Gtk);
     Gtk.Widget.prototype.__metaclass__ = GtkWidgetClass;
 
-    if (GjsPrivate.gtk_container_child_set_property) {
+    if (Gtk.Container.prototype.child_set_property) {
         Gtk.Container.prototype.child_set_property = function (child, property, value) {
             GjsPrivate.gtk_container_child_set_property(this, child, property, value);
         };


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]