GtkLockButton / GPermission
- From: Roland Koebler <rk-list simple-is-better org>
- To: gtk-app-devel-list gnome org
- Subject: GtkLockButton / GPermission
- Date: Wed, 2 Apr 2014 15:14:52 +0200
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]