Hi, is there any example for GtkLockButton (and/or GPermission)? I'm trying to use it, but all I get are segfaults (in Python):
1. Adding a GtkLockButton and clicking on it segfaults: $ python >>> from gi.repository import Gtk >>> w = Gtk.Window() >>> b = Gtk.LockButton() >>> w.add(b) >>> w.show_all() >>> Gtk.main() (click) Segmentation fault 2. Trying to use GSimplePermission segfaults: $ python >>> from gi.repository import Gio >>> p = Gio.SimplePermission.new(True) >>> p.acquire(None) Segmentation fault 3. Using a GPermission-subclass works, but using it with the GtkLockButton segfaults again: $ python >>> from gi.repository import Gio, Gtk >>> >>> class dummy_permission(Gio.Permission): >>> def __init__(self): >>> Gio.Permission.__init__(self) >>> self.impl_update(False, True, True) >>> def acquire(self, cancellable=None): >>> self.impl_update(True, True, True) >>> def release(self, cancellable=None): >>> self.impl_update(False, True, True) >>> >>> p = dummy_permission() >>> p.get_allowed() False >>> p.acquire() >>> p.get_allowed() True >>> p.release() >>> p.get_allowed() False >>> w = Gtk.Window() >>> b = Gtk.LockButton() >>> b.set_permission(p) >>> w.add(b) >>> w.show_all() >>> Gtk.main() (click) Segmentation fault Any ideas? Roland _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list