[pygtk] Is there a gnome keyring api for PyGi?

2011-06-09 Thread Leon Bogaert
Hi all,

Is there a Gnome Keyring api for pygi? I tried something like this:
  >> from gi.repository import GnomeKeyring

But I can't find the module to load. Does someone know if/how I can access the 
Gnome Keyring api with python gobject introspection? Or should I just use the 
static gnomekeyring?

Regards,
Leon
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Is there a gnome keyring api for PyGi?

2011-06-09 Thread John Stowers
On Thu, 2011-06-09 at 18:26 +, Leon Bogaert wrote:
> Hi all,
> 
> Is there a Gnome Keyring api for pygi? I tried something like this:
>   >> from gi.repository import GnomeKeyring
> 
> But I can't find the module to load. Does someone know if/how I can access 
> the Gnome Keyring api with python gobject introspection? 

I dont know sorry. Check the configure.ac in libgnomekeyring to see if
it supports introspection

> Or should I just use the static gnomekeyring?
> 

You cannot mix static and gi bindings (to GObject libraries) in the same
application.

John


> Regards,
> Leon
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] Making a window just big enough to hold a certain image inside

2011-06-09 Thread Gerardo Marset

This is part of my code:

imagesize = (128, 128)
window =gtk.Window()
window.resize(imagesize[0],imagesize[1])

scrolled =gtk.ScrolledWindow()
scrolled.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
scrolled.set_shadow_type(gtk.SHADOW_NONE)

area =gtk.DrawingArea()|
area.set_size_request(imagesize[0],imagesize[1])|

window.add(scrolled)
scrolled.add_with_viewport(area)
area.show()
scrolled.show()|
window.show()

|It creates a Window with a ScrolledWindow inside, with a Viewport 
inside, with a DrawingArea inside. I would expect the resulting window 
to be just big enough to hold a 128x128 image, but it isn't, and it has 
scrollbars.

It works if I write the second line like this:

window.resize(imagesize[0] + 2,image.size[1] + 2)

But it's ugly, and it doesn't always work. On Windows I had to use + 3.

Any help is greatly appreciated.
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/