Re: [pygtk] MenuBar items

2008-04-25 Thread Gian Mario Tagliaretti
On Fri, Apr 25, 2008 at 12:17 AM, Andrea Caminiti <[EMAIL PROTECTED]> wrote:

Hi Andrea,

>  i'm still doing my program and i would like to have a menu bar as every 
> program has (file, edit, ., help). and a lot of doubts came to my mind. 
> looking at pygtk tuttorials i found so good examples to follow using 
> gtk.Menubar, gtk.Menu, etc... but seem that this methods are not suggested to 
> be used any more. instead the suggestion is to use gtk.UIManager.

That's right, you should use UIManager

>  so my question here is what should i use? should i use the old style menubar 
> or the new one? what are the pros and cons with each one? and if i choose the 
> ui manager, where i can find some help/tutorial/guide/reference to use it?

PyGTK demo has got a good example
http://svn.gnome.org/viewvc/pygtk/trunk/examples/pygtk-demo/demos/ui_manager.py?revision=2435&view=markup

The tutorial:
http://www.pygtk.org/pygtk2tutorial/sec-UIManager.html

The reference manual
http://www.pygtk.org/docs/pygtk/class-gtkuimanager.html

cheers
-- 
Gian Mario Tagliaretti
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] python-gtkhtml2 docs

2008-04-25 Thread Mitko Haralanov
On Thu, 24 Apr 2008 13:09:40 -0700
Mitko Haralanov <[EMAIL PROTECTED]> wrote:

> Hi, does anyone know of any useful documentation, API, turorials,
> examples of python-gtkhtml2.
> 
> I can't seem to find anything useful.

Alright, I've been able to find enough information to get a very simple
usage of the widget.

One thing that still puzzles me is the fact that according to
everything I read GtkHTML2 supports CSS and image loading. This either
doesn't hold true for the Python module or I just can't get it to work.
It seems that the request to load the css is being made and I can see
the data being written to the GtkHTML2 stream handler but nothing is
being done with the data because the stylesheet is not applied.

I would appreciate any help from anyone that has played with GtkHTML
and it's Python bindings.

Thanks

-- 
Mitko Haralanov
==
"No bugs were harmed in the preparation of this patch.  
 It's just me fartarsing around."

- Andrew Morton
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Pygtk does not play nicely with speech-dispatcher

2008-04-25 Thread John Finlay

James Simmons wrote:

Michael,

Thanks for the tip!  It was a big help.  I put gtk.gdk.threads_init()  
in the __init__ method of my program and I did get callbacks.  It 
looks like I didn't get callbacks for every word, but Pygtk seems to 
not be the problem anymore.  Thanks again,
The problem is that gtk and by extension pygtk has an event loop, and 
the python speechd api has implemented its own event loop within a 
thread. The speechd protocol is synchronous and sounds similar to RPCs. 
This event loop conflict was in general a problem with RPC programming 
with GUIs. The best solution is to integrate the two event loops using 
io_add_watch but that would entail throwing away the python speechd api 
and you would not have to use threads. This is the course I would take 
if I was doing your project.


If you want to use the speechd python api you have to make your pygtk 
program threaded and that is more than just calling threads_init. Others 
on this list can point you to a list of best practices for threading in 
pygtk.


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


Re: [pygtk] CellRendererCombo Question

2008-04-25 Thread John Finlay

Andrea Caminiti wrote:

hi john:

is there a way to do that wrapping but for rows in the combobox? becuase i have 
a combobox with 8 elements (image + label) and so the pop down list is very 
large. it would be great to do that.
  
I must have missed a message. Is the problem that you have a combobox 
but the list is too long? Amd each row has 8 cellrenderers in it?


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


Re: [pygtk] CellRendererCombo Question

2008-04-25 Thread Andrea Caminiti
hi john:

is there a way to do that wrapping but for rows in the combobox? becuase i have 
a combobox with 8 elements (image + label) and so the pop down list is very 
large. it would be great to do that.

nrayever



  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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


Re: [pygtk] Pygtk does not play nicely with speech-dispatcher

2008-04-25 Thread James Simmons

Michael,

Thanks for the tip!  It was a big help.  I put gtk.gdk.threads_init()  
in the __init__ method of my program and I did get callbacks.  It looks 
like I didn't get callbacks for every word, but Pygtk seems to not be 
the problem anymore.  Thanks again,


James Simmons


Michael Urman wrote:


On Thu, Apr 24, 2008 at 1:16 PM, James Simmons
<[EMAIL PROTECTED]> wrote:
 


The words are spoken correctly, but the callbacks that *should* be invoked
after each word never happen.
   



I see no sign of a call to gtk.gdk.threads_init() or whatever the
current preferred alternative is. Without a call like that, I believe
all versions of PyGTK don't really allow for threading. They certainly
didn't at the python level last time I tried. Try searching for pygtk
thread faq, or something of the sort, for more on this.

 



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