Re: [pygtk] treeview listsource

2003-02-11 Thread Thomas Speck
On Tue, 2003-02-11 at 02:38, Anthony Tekatch wrote:
 How can I get changes to ListStore to show up in the GtkTreeView?
 
 I have used glade-2 to create my window. The following code snippet does
 not update the GtkTreeView that I named cat_clist.
 
 cat_clist  = widgets.get_widget('cat_clist')
 model = gtk.ListStore(gobject.TYPE_STRING)
 cat_clist.set_model(model)
 iter = model.append()
 model.set(iter,0,text)
 
 
 
 Thanks in advance!

You have to append at least one column. Something like this:

renderer = gtk.CellRendererText()
col = gtk.TreeViewColumn( 'Title', renderer )
col.set_property( 'resizable', 1 )
col.add_attribute( renderer, 'text', 0 )
cat_list.append_column( col )


-- 
Thomas Speck [EMAIL PROTECTED]

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



[pygtk] unwanted textview scrolling

2003-02-11 Thread george young
[pygtk-1.99.14, gtk-2.2.0, python-2.3a1, x86 linux]
I have a textview/textbuffer that is exhibiting troublesome scrolling
behavior.  It starts as a single blank line.  I type some characters
and hit return.  The widget now appears to be two lines high - both blank.
An up arrow will scroll me up to see the first line.  *OR* if I type
on the top visible line, when the text extends beyond the length of the
first line, the first line suddenly scrolls into view. 

I just want all lines to always be visible.  The textview is inside a frame
inside a vbox with other children inside an hbox with other widgets 
inside a big scrolled window.

Do I have to connect a callback and force a scroll back on every keystroke?
If so how?

-- George

-- 
 I cannot think why the whole bed of the ocean is
 not one solid mass of oysters, so prolific they seem. Ah,
 I am wandering! Strange how the brain controls the brain!
-- Sherlock Holmes in The Dying Detective
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



[pygtk] Re: unwanted textview scrolling -- resolved by upgrade

2003-02-11 Thread george young
On Tue, 11 Feb 2003 15:13:38 -0500
george young [EMAIL PROTECTED] wrote:

 [pygtk-1.99.14, gtk-2.2.0, python-2.3a1, x86 linux]
 I have a textview/textbuffer that is exhibiting troublesome scrolling
 behavior.  It starts as a single blank line.  I type some characters
 and hit return.  The widget now appears to be two lines high - both blank.
 An up arrow will scroll me up to see the first line.  *OR* if I type
 on the top visible line, when the text extends beyond the length of the
 first line, the first line suddenly scrolls into view. 
 
 I just want all lines to always be visible.  The textview is inside a frame
 inside a vbox with other children inside an hbox with other widgets 
 inside a big scrolled window.
 
 Do I have to connect a callback and force a scroll back on every keystroke?
 If so how?

I just upgraded to pygtk-1.99.15/gtk+-2.2.1 and the problem went away!

-- 
 I cannot think why the whole bed of the ocean is
 not one solid mass of oysters, so prolific they seem. Ah,
 I am wandering! Strange how the brain controls the brain!
-- Sherlock Holmes in The Dying Detective
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



[pygtk] gnomeprint bindings bug

2003-02-11 Thread Johan Dahlin
It recently came to my knowledge that a small, but important bug slipped
into gnome-python 1.99.15.

The gnomeprint.ui module was compiled as gnomeprint.printui by mistake,
and could therefor not be imported.
(This was only affected to autotools, people using distutils are not
affected)

This is fixed in CVS. So if you want to use the print bindings you have
to apply a small patch to gnomeprint/Makefile.am.

I strongly recommended for packagers.

Sorry Gustavo!

-- 
Johan Dahlin [EMAIL PROTECTED]
Async Open Source

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



[pygtk] gnome-python2 docs

2003-02-11 Thread Martin Preishuber
Hi all,

is there any documentation on gnome-python available ? I'm just porting
eroaster to gnome-python2 and I have some problems to get Gnome* widgets
working ... I can't find the UIITEM*, STOCK_MENU* constants,
GnomeQuestionDialog and so on ...

thanks,

Martin

-- 
Martin Preishuber [EMAIL PROTECTED]

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



Re: [pygtk] gnome-python2 docs

2003-02-11 Thread Johan Dahlin
tis 2003-02-11 klockan 19.05 skrev Martin Preishuber:
 Hi all,
 
 is there any documentation on gnome-python available ? I'm just porting
 eroaster to gnome-python2 and I have some problems to get Gnome* widgets
 working ... I can't find the UIITEM*, STOCK_MENU* constants,
 GnomeQuestionDialog and so on ...

Sorry. As far as I know there is no documentation available for
gnome-python.

Even the ones for C is not updated on the developer.gnome.org

But i know that UIITEM and STOCK_MENU is deprecated.

Use BonoboUI instead of UIITEM.
Stock icons has moved to Gtk+ since 2.0

-- 
Johan Dahlin [EMAIL PROTECTED]
Async Open Source

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



Re: [pygtk] gnome-python2 docs

2003-02-11 Thread Martin Preishuber
On Tue, 2003-02-11 at 22:24, Johan Dahlin wrote:
 tis 2003-02-11 klockan 19.05 skrev Martin Preishuber:
  Hi all,
  
  is there any documentation on gnome-python available ? I'm just porting
  eroaster to gnome-python2 and I have some problems to get Gnome* widgets
  working ... I can't find the UIITEM*, STOCK_MENU* constants,
  GnomeQuestionDialog and so on ...
 
 Sorry. As far as I know there is no documentation available for
 gnome-python.
 
 Even the ones for C is not updated on the developer.gnome.org
 
 But i know that UIITEM and STOCK_MENU is deprecated.
 
 Use BonoboUI instead of UIITEM.
 Stock icons has moved to Gtk+ since 2.0

Hmm well ok then maybe someone can help me with the following code
fragments:

1.) I build menus with

self.filemenu = [ UIINFO_ITEM_STOCK(_('_New Project'), None,
self.ProjectNew, STOCK_MENU_NEW) ]
self.window.create_menus(self.menus)

where self.window has been a GnomeApp. Is that completely gone ?

2.) GnomeApp supported .add_toolbar ... anything similar now ?
3.) I used some GnomeEntry fields ... now the following code crashes:

 import gnome.ui
 entry = gnome.ui.Entry()

(:1554): Gnome-CRITICAL **: file gnome-program.c: line 738
(gnome_program_get_app_id): assertion `program != NULL' failed
Segmentation fault

4.) Is there anything like GnomeErrorDialog, GnomeQuestionDialog in
gnome-python2 ?

thanks a lot ;-)

oh one more thing, what about compatibility between glade and glade2 ?
is it possible to use old glade files with gnome-python2 ?

Martin

-- 
Martin Preishuber [EMAIL PROTECTED]

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



Re: [pygtk] gnome-python2 docs

2003-02-11 Thread Johan Dahlin
 Hmm well ok then maybe someone can help me with the following code
 fragments:
 
 1.) I build menus with
 
 self.filemenu = [ UIINFO_ITEM_STOCK(_('_New Project'), None,
 self.ProjectNew, STOCK_MENU_NEW) ]
 self.window.create_menus(self.menus)

UIINFO and friends is not really useful in gnome 2.
Use gtk.IconFactory or bonobo.ui.Component.


 where self.window has been a GnomeApp. Is that completely gone ?

GnomeApp is still around, gnome.ui.App

 2.) GnomeApp supported .add_toolbar ... anything similar now ?

I don't know. If it was support before it's probably support now too.

 3.) I used some GnomeEntry fields ... now the following code crashes:

Don't use GnomeEntry, use a standard GtkEntry instead

 oh one more thing, what about compatibility between glade and glade2 ?
 is it possible to use old glade files with gnome-python2 ?

There is a libglade-convert script to convert from glade (1) files to
glade2.

-- 
Johan Dahlin [EMAIL PROTECTED]
Async Open Source

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



Re: [pygtk] gnome-python2 docs

2003-02-11 Thread Emmanuele Bassi
* Martin Preishuber [EMAIL PROTECTED]:

 Hmm well ok then maybe someone can help me with the following code
 fragments:

[snip]

You should consider to read carefully the GNOME Porting Guide:

http://developer.gnome.org/dotplan/porting/

In it, you'll find deprecated widgets, tips and more.

Regards,
 Emmanuele.

-- 
Emmanuele Bassi (Zefram)  [ http://digilander.iol.it/ebassi/ ]
GnuPG Key fingerprint = 4DD0 C90D 4070 F071 5738  08BD 8ECC DB8F A432 0FF4
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



[pygtk] multiselect with ListStore and TreeView

2003-02-11 Thread John Hunter

I am reading through the list_store.py demo and trying to adapt it to
my case at hand: I want to present a list of rows and allow the user
to select multiple rows, using the control key to select multiple
items and shift to select all items in a range.

Do I need to capture the CTRL and SHIFT key press events and do all
the work myself, or is there some prefab version of this since it is a
fairly common selection operation?

If someone has some example code, I'd be happy to peruse it.

Also, how do I find out which events a CellRenderer can connect to.
For example, CellRendererToggle can connect to toggled but
CellRendererText cannot.  I looked in the pygtk ref docs, but did not
find a list of allowable signals for these classes.

Thanks for any guidance,
John Hunter

pygtk-1.99.14
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



[pygtk] GtkExtra

2003-02-11 Thread Maarten Mulders
When running an Python-program using pygtk, I get the following error:

import * from GtkExtra
GtkExtra not defined

or something like this.

Who can help me?

Thanks in advance,

Maarten Mulders

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



Re: [pygtk] multiselect with ListStore and TreeView

2003-02-11 Thread David M. Cook
On Tue, Feb 11, 2003 at 08:55:25PM -0600, John Hunter wrote:


 Also, how do I find out which events a CellRenderer can connect to.
 For example, CellRendererToggle can connect to toggled but
 CellRendererText cannot.  I looked in the pygtk ref docs, but did not
 find a list of allowable signals for these classes.

Well for CRToggle you have toggled and for CRText you have edited, and
that's it AFAIK.  See the C API docs for the the signatures of the
callbacks.

Dave Cook

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



Re: [pygtk] GtkExtra

2003-02-11 Thread David M. Cook
On Tue, Feb 11, 2003 at 10:51:14AM +0100, Maarten Mulders wrote:

 When running an Python-program using pygtk, I get the following error:

 import * from GtkExtra

Should be from blah import *, but I assume you just mistyped that.  What
version of pygtk do you have?

python -c 'import gtk; print gtk.pygtk_version'

 GtkExtra not defined

It's not part of pygtk 2.  See the FAQ for porting tips:

http://www.async.com.br/faq/pygtk/index.py?req=all

Dave Cook
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/