Re: [pygtk] pygi - gtk drawingarea doesn't work?

2012-07-16 Thread Giuseppe Penone
on a clean lubuntu 1204 installation (either 32 and 64 bit), ensured that
python-gobject and gir1.2-gtk-3.0 are installed, the attached demo doesn't
work.
the event 'draw' is never called.
no any feedback on the terminal.
at my home I have still lubuntu 1204 but also gnome and unity installed and
there it works fine.
can anybody help me to understand what package I'm missing?



On Sat, Jul 14, 2012 at 7:20 PM, Giuseppe Penone  wrote:

> On my home laptop it also works fine (lubuntu 1204 64bit running but also
> gnome-shell installed).
> I did check only for *gir1.2-gtk-3.0* at my work pc (clean lubuntu 1204
> 64 bit), so I have to check for *python-gobject* too, many thanks.
> Strange that the demo didn't give any feedback to the terminal anyway
> about the missing package, just never called the draw event.
> Regards,
> Giuseppe.
>
>
>
> On Sat, Jul 14, 2012 at 12:50 AM, David Ripton  wrote:
>
>> On 07/13/2012 12:16 PM, Giuseppe Penone wrote:
>>
>>> Hi, running the demo
>>> http://git.gnome.org/browse/**pygobject/tree/examples/cairo-**demo.py
>>> about the drawing area produces on my lubuntu 12.04 an empty window.
>>> the 'draw' event is never called, is this a bug?
>>>
>>
>> That demo works fine on my Ubuntu 12.04 box, and my Lubuntu 11.10 box.
>>
>> 'draw' should get called when the window is first exposed, and again any
>> time the window is damaged.
>>
>> You have python-gobject installed, right?
>>
>> --
>> David Riptondrip...@ripton.net
>> __**_
>> pygtk mailing list   pygtk@daa.com.au
>> http://www.daa.com.au/mailman/**listinfo/pygtk
>> Read the PyGTK FAQ: http://faq.pygtk.org/
>>
>
>


drawingarea_test.py
Description: Binary data
___
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] pygi - gtk drawingarea doesn't work?

2012-07-16 Thread John Stowers
Works for me. Ubuntu 12.04

I think your install is broken.

John

On Mon, Jul 16, 2012 at 10:37 AM, Giuseppe Penone  wrote:
> on a clean lubuntu 1204 installation (either 32 and 64 bit), ensured that
> python-gobject and gir1.2-gtk-3.0 are installed, the attached demo doesn't
> work.
> the event 'draw' is never called.
> no any feedback on the terminal.
> at my home I have still lubuntu 1204 but also gnome and unity installed and
> there it works fine.
> can anybody help me to understand what package I'm missing?
>
>
>
>
> On Sat, Jul 14, 2012 at 7:20 PM, Giuseppe Penone  wrote:
>>
>> On my home laptop it also works fine (lubuntu 1204 64bit running but also
>> gnome-shell installed).
>> I did check only for gir1.2-gtk-3.0 at my work pc (clean lubuntu 1204 64
>> bit), so I have to check for python-gobject too, many thanks.
>> Strange that the demo didn't give any feedback to the terminal anyway
>> about the missing package, just never called the draw event.
>> Regards,
>> Giuseppe.
>>
>>
>>
>> On Sat, Jul 14, 2012 at 12:50 AM, David Ripton  wrote:
>>>
>>> On 07/13/2012 12:16 PM, Giuseppe Penone wrote:

 Hi, running the demo
 http://git.gnome.org/browse/pygobject/tree/examples/cairo-demo.py
 about the drawing area produces on my lubuntu 12.04 an empty window.
 the 'draw' event is never called, is this a bug?
>>>
>>>
>>> That demo works fine on my Ubuntu 12.04 box, and my Lubuntu 11.10 box.
>>>
>>> 'draw' should get called when the window is first exposed, and again any
>>> time the window is damaged.
>>>
>>> You have python-gobject installed, right?
>>>
>>> --
>>> David Riptondrip...@ripton.net
>>> ___
>>> 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 mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] pygi - gtk drawingarea doesn't work?

2012-07-16 Thread Giuseppe Penone
I tried on more that one installation, either 32 and 64 bit versions of
Lubuntu 12.04.
with Ubuntu 12.04 it works for me too, also with Lubuntu where I have other
desktops installed (unity, gnome).
I'm trying to understand what are the missing dependencies because I cannot
ask the users to install gnome to have drawingarea work...



On Mon, Jul 16, 2012 at 11:18 AM, John Stowers  wrote:

> Works for me. Ubuntu 12.04
>
> I think your install is broken.
>
> John
>
> On Mon, Jul 16, 2012 at 10:37 AM, Giuseppe Penone 
> wrote:
> > on a clean lubuntu 1204 installation (either 32 and 64 bit), ensured that
> > python-gobject and gir1.2-gtk-3.0 are installed, the attached demo
> doesn't
> > work.
> > the event 'draw' is never called.
> > no any feedback on the terminal.
> > at my home I have still lubuntu 1204 but also gnome and unity installed
> and
> > there it works fine.
> > can anybody help me to understand what package I'm missing?
> >
> >
> >
> >
> > On Sat, Jul 14, 2012 at 7:20 PM, Giuseppe Penone 
> wrote:
> >>
> >> On my home laptop it also works fine (lubuntu 1204 64bit running but
> also
> >> gnome-shell installed).
> >> I did check only for gir1.2-gtk-3.0 at my work pc (clean lubuntu 1204 64
> >> bit), so I have to check for python-gobject too, many thanks.
> >> Strange that the demo didn't give any feedback to the terminal anyway
> >> about the missing package, just never called the draw event.
> >> Regards,
> >> Giuseppe.
> >>
> >>
> >>
> >> On Sat, Jul 14, 2012 at 12:50 AM, David Ripton 
> wrote:
> >>>
> >>> On 07/13/2012 12:16 PM, Giuseppe Penone wrote:
> 
>  Hi, running the demo
>  http://git.gnome.org/browse/pygobject/tree/examples/cairo-demo.py
>  about the drawing area produces on my lubuntu 12.04 an empty window.
>  the 'draw' event is never called, is this a bug?
> >>>
> >>>
> >>> That demo works fine on my Ubuntu 12.04 box, and my Lubuntu 11.10 box.
> >>>
> >>> 'draw' should get called when the window is first exposed, and again
> any
> >>> time the window is damaged.
> >>>
> >>> You have python-gobject installed, right?
> >>>
> >>> --
> >>> David Riptondrip...@ripton.net
> >>> ___
> >>> 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 mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] pygi - gtk drawingarea doesn't work?

2012-07-16 Thread Giuseppe Penone
in case it can help, running the py-gi demo
http://git.gnome.org/browse/pygobject/tree/demos/gtk-demo (git clone
http://git.gnome.org/browse/pygobject/)
and double clicking on the Drawing Area element I get:

bazinga@lu1204:~/Templates/git_pygobject/demos/gtk-demo$ ./gtk-demo.py
Traceback (most recent call last):
  File
"/home/bazinga/Templates/git_pygobject/demos/gtk-demo/demos/drawingarea.py",
line 162, in scribble_configure_event
allocation.height)
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
return info.invoke(*args, **kwargs)
TypeError: Couldn't find conversion for foreign struct 'cairo.Surface'



On Mon, Jul 16, 2012 at 11:57 AM, Giuseppe Penone  wrote:

> I tried on more that one installation, either 32 and 64 bit versions of
> Lubuntu 12.04.
> with Ubuntu 12.04 it works for me too, also with Lubuntu where I have
> other desktops installed (unity, gnome).
> I'm trying to understand what are the missing dependencies because I
> cannot ask the users to install gnome to have drawingarea work...
>
>
>
>
> On Mon, Jul 16, 2012 at 11:18 AM, John Stowers <
> john.stowers.li...@gmail.com> wrote:
>
>> Works for me. Ubuntu 12.04
>>
>> I think your install is broken.
>>
>> John
>>
>> On Mon, Jul 16, 2012 at 10:37 AM, Giuseppe Penone 
>> wrote:
>> > on a clean lubuntu 1204 installation (either 32 and 64 bit), ensured
>> that
>> > python-gobject and gir1.2-gtk-3.0 are installed, the attached demo
>> doesn't
>> > work.
>> > the event 'draw' is never called.
>> > no any feedback on the terminal.
>> > at my home I have still lubuntu 1204 but also gnome and unity installed
>> and
>> > there it works fine.
>> > can anybody help me to understand what package I'm missing?
>> >
>> >
>> >
>> >
>> > On Sat, Jul 14, 2012 at 7:20 PM, Giuseppe Penone 
>> wrote:
>> >>
>> >> On my home laptop it also works fine (lubuntu 1204 64bit running but
>> also
>> >> gnome-shell installed).
>> >> I did check only for gir1.2-gtk-3.0 at my work pc (clean lubuntu 1204
>> 64
>> >> bit), so I have to check for python-gobject too, many thanks.
>> >> Strange that the demo didn't give any feedback to the terminal anyway
>> >> about the missing package, just never called the draw event.
>> >> Regards,
>> >> Giuseppe.
>> >>
>> >>
>> >>
>> >> On Sat, Jul 14, 2012 at 12:50 AM, David Ripton 
>> wrote:
>> >>>
>> >>> On 07/13/2012 12:16 PM, Giuseppe Penone wrote:
>> 
>>  Hi, running the demo
>>  http://git.gnome.org/browse/pygobject/tree/examples/cairo-demo.py
>>  about the drawing area produces on my lubuntu 12.04 an empty window.
>>  the 'draw' event is never called, is this a bug?
>> >>>
>> >>>
>> >>> That demo works fine on my Ubuntu 12.04 box, and my Lubuntu 11.10 box.
>> >>>
>> >>> 'draw' should get called when the window is first exposed, and again
>> any
>> >>> time the window is damaged.
>> >>>
>> >>> You have python-gobject installed, right?
>> >>>
>> >>> --
>> >>> David Riptondrip...@ripton.net
>> >>> ___
>> >>> 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 mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] pygi - gtk drawingarea doesn't work?

2012-07-16 Thread Giuseppe Penone
ok installing *python-gi-cairo* made it, this is to be added to the
dependencies if drawingarea is used.


On Mon, Jul 16, 2012 at 12:17 PM, Giuseppe Penone  wrote:

> in case it can help, running the py-gi demo
> http://git.gnome.org/browse/pygobject/tree/demos/gtk-demo (git clone
> http://git.gnome.org/browse/pygobject/)
> and double clicking on the Drawing Area element I get:
>
> bazinga@lu1204:~/Templates/git_pygobject/demos/gtk-demo$ ./gtk-demo.py
> Traceback (most recent call last):
>   File
> "/home/bazinga/Templates/git_pygobject/demos/gtk-demo/demos/drawingarea.py",
> line 162, in scribble_configure_event
> allocation.height)
>   File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
> return info.invoke(*args, **kwargs)
> TypeError: Couldn't find conversion for foreign struct 'cairo.Surface'
>
>
>
>
> On Mon, Jul 16, 2012 at 11:57 AM, Giuseppe Penone wrote:
>
>> I tried on more that one installation, either 32 and 64 bit versions of
>> Lubuntu 12.04.
>> with Ubuntu 12.04 it works for me too, also with Lubuntu where I have
>> other desktops installed (unity, gnome).
>> I'm trying to understand what are the missing dependencies because I
>> cannot ask the users to install gnome to have drawingarea work...
>>
>>
>>
>>
>> On Mon, Jul 16, 2012 at 11:18 AM, John Stowers <
>> john.stowers.li...@gmail.com> wrote:
>>
>>> Works for me. Ubuntu 12.04
>>>
>>> I think your install is broken.
>>>
>>> John
>>>
>>> On Mon, Jul 16, 2012 at 10:37 AM, Giuseppe Penone 
>>> wrote:
>>> > on a clean lubuntu 1204 installation (either 32 and 64 bit), ensured
>>> that
>>> > python-gobject and gir1.2-gtk-3.0 are installed, the attached demo
>>> doesn't
>>> > work.
>>> > the event 'draw' is never called.
>>> > no any feedback on the terminal.
>>> > at my home I have still lubuntu 1204 but also gnome and unity
>>> installed and
>>> > there it works fine.
>>> > can anybody help me to understand what package I'm missing?
>>> >
>>> >
>>> >
>>> >
>>> > On Sat, Jul 14, 2012 at 7:20 PM, Giuseppe Penone 
>>> wrote:
>>> >>
>>> >> On my home laptop it also works fine (lubuntu 1204 64bit running but
>>> also
>>> >> gnome-shell installed).
>>> >> I did check only for gir1.2-gtk-3.0 at my work pc (clean lubuntu 1204
>>> 64
>>> >> bit), so I have to check for python-gobject too, many thanks.
>>> >> Strange that the demo didn't give any feedback to the terminal anyway
>>> >> about the missing package, just never called the draw event.
>>> >> Regards,
>>> >> Giuseppe.
>>> >>
>>> >>
>>> >>
>>> >> On Sat, Jul 14, 2012 at 12:50 AM, David Ripton 
>>> wrote:
>>> >>>
>>> >>> On 07/13/2012 12:16 PM, Giuseppe Penone wrote:
>>> 
>>>  Hi, running the demo
>>>  http://git.gnome.org/browse/pygobject/tree/examples/cairo-demo.py
>>>  about the drawing area produces on my lubuntu 12.04 an empty window.
>>>  the 'draw' event is never called, is this a bug?
>>> >>>
>>> >>>
>>> >>> That demo works fine on my Ubuntu 12.04 box, and my Lubuntu 11.10
>>> box.
>>> >>>
>>> >>> 'draw' should get called when the window is first exposed, and again
>>> any
>>> >>> time the window is damaged.
>>> >>>
>>> >>> You have python-gobject installed, right?
>>> >>>
>>> >>> --
>>> >>> David Riptondrip...@ripton.net
>>> >>> ___
>>> >>> 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 mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] Resizable widgets

2012-07-16 Thread Adam Tauno Williams
On Mon, 2012-07-16 at 13:35 +0200, Hugo Teso wrote: 
> Thanks for the instructions, It works great ;) Nice job!

Thanks

> Do you plan to add support for "note" resize by dragging the corner?

Yes.  I want a generic container widget [aka CanvasWidget] that can be
placed on the managed layout [aka WidgetCanvas].  I hope to add drag
handles and resize handles;  as well as letting the widget resize due to
content.

Ultimately I also want to add collision detection so widgets at least
know if they are overlapping another widget so WidgetCanvas can
optionally do-push-aside.  What I want is a canvas like the one used in
[the sadly now moribund] KBasket .
Also similar to the behavior of M$-OneNote; so each of my projects can
have a tab in a notebook where I can pin items, drag them around, make
notes, etc...

I'm not sure I'm doing this properly - but I'm getting close to
something that is working.  For example; I'm not sure if WidgetCanvas /
CanvasWidget should descend from gtk.Widget somehow or be gobject
objects or just remain 'wrappers'.   I've not been able to lure any
interest from any gtk-powers-that-be for advice so this is just stitched
together from the documentation and examples.

> To move the widget by dragging it is something I was looking for, but it
> would also be great to be able to resize the widget by dragging the
> corner :)

Agree.  Patches very welcome  - perhaps we can collaborate on this
generic piece.  I'd hope to make it something abstract enough to be of
general use. 

FYI, you might also want to look at the code of etk.docking





signature.asc
Description: This is a digitally signed message part
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

[pygtk] Simplified GObject Properties ???

2012-07-16 Thread Adam Tauno Williams
In trying to figure out why-gobject-my-objects I ran across "Simplified
GObject Properties"


Is this python/gobject cannon?  It seems to work, at least in my trivial
testing.  Is it OK to do gobject this way?  It seem more Python and less
verbose than examples like
?


signature.asc
Description: This is a digitally signed message part
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

[pygtk] PyGObject 3.3.4 released

2012-07-16 Thread Martin Pitt
I am pleased to announce version 3.3.4 of the Python bindings for
GObject. This is the fourth release of the 3.3 series which eventually
result in the stable 3.4 release for GNOME 3.6.

Thanks to all contributors!

Download

The new release is available from ftp.gnome.org:

http://download.gnome.org/sources/pygobject/3.3/pygobject-3.3.4.tar.xz
  sha256sum:
db32d933717c2fceeef50af777425bdb54a9987ea40b44d6ad6f6720455252b7

What’s new since PyGObject 3.3.3.1
==
 - pygi-convert.sh: Drop bogus filter_new() conversion (Martin Pitt)
   (#67)
 - Fix help() for GI modules (Martin Pitt) (#679804)
 - Skip gi.CallbackInfo objects from a module's dir() (Martin Pitt)
   (#679804)
 - Fix __path__ module attribute (Martin Pitt)
 - pygi-convert.sh: Fix some child → getChild() false positives
   (Joe R. Nassimian) (#680004)
 - Fix array handling for interfaces, properties, and signals
   (Mikkel Kamstrup Erlandsen) (#667244)
 - Add conversion of the Gdk.PropMode constants to pygi-convert.sh
   script (Manuel Quiñones) (#679775)
 - Add the same rules for pack_start to convert pack_end (Manuel
   Quiñones) (#679760)
 - Add error-checking for the case where _arg_cache_new() fails
   (Dave Malcolm) (#678914)
 - Add conversion of the Gdk.NotifyType constants to pygi-convert.sh
   script (Manuel Quiñones) (#679754)
 - Fix PyObject_Repr and PyObject_Str reference leaks (Simon Feltman)
   (#675857)
 - [API add] Gtk overrides: Add TreePath.__len__() (Martin Pitt)
   (#679199)
 - GLib.Variant: Fix repr(), add proper str() (Martin Pitt) (#679336)
 - m4/python.m4: Update Python version list (Martin Pitt)
 - Remove "label" property from Gtk.MenuItem if it is not set
   (Micah Carrick) (#670575)


About PyGObject
===
GObject is a object system used by GTK+, GStreamer and other libraries.

PyGObject provides a convenient wrapper for use in Python programs when
accessing GObject libraries.

Like the GObject library itself PyGObject is licensed under the GNU
LGPL, so is suitable for use in both free software and proprietary
applications. It is already in use in many applications ranging from
small single purpose scripts up to large full featured applications.

PyGObject now dynamically accesses any GObject libraries that uses
GObject Introspection. It replaces the need for separate modules such as
PyGTK, GIO and python-gnome to build a full GNOME 3.0 application. Once
new functionality is added to gobject library it is instantly available
as a Python API without the need for intermediate Python glue.

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


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