Re: [pygtk] GenericTreeModel problems

2002-12-28 Thread David M. Cook
I've uploaded a tarball, mytreemodel.tgz, of a pygtk program and a README
describes some of the problems I'm seeing to

  http://davidcook.org/pygtk
  
Dave
___
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] Python does not find PyGtk

2002-12-28 Thread Tom Cato Amundsen
On Sat, Dec 28, 2002 at 10:50:32PM +0100, Martijn Brouwer wrote:
> I have two versions of python installed (2.1 and 2.2) on a linux system running 
>debian testing. For 2.1 I have PyGtk installed using the packages from the 
>distribution, which works fine. Now I want to write a program myself using PyGtk and 
>Gnome-Python version 1.99.13. Both are now installed in 
>/home/martijn/sys/lib/python2.2/sitepackages. The listing of this directory looks 
>like everything is OK.
> drwxr-xr-x5 martijn  users4096 Dec 27 16:08 gtk-2.0
> -rw-r--r--1 martijn  users   8 Dec 26 23:12 pygtk.pth
> -rw-r--r--1 martijn  users2092 Dec 26 23:12 pygtk.py
> -rw-r--r--1 martijn  users1841 Dec 26 23:12 pygtk.pyc
> -rw-r--r--1 martijn  users1504 Dec 26 23:12 pygtk.pyo
> 
> Yet, when I export PYTHONPATH=/home/martijn/sys/lib/python2.2/sitepackages and start 
>the python interpreter (2.2) I cannot import gtk: 
   
You mean
site-packages,
   right?

> ImportError: No module named gtk
> 
> What is missing? sys.path is

I guess you forgot to

import pygtk
pygtk.require("2.0")

before "import gtk"



-- 
Tom Cato Amundsen <[EMAIL PROTECTED]>
GNU Solfege - free eartraining, http://www.gnu.org/software/solfege/
___
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] Python does not find PyGtk

2002-12-28 Thread Martijn Brouwer
I have two versions of python installed (2.1 and 2.2) on a linux system running debian 
testing. For 2.1 I have PyGtk installed using the packages from the distribution, 
which works fine. Now I want to write a program myself using PyGtk and Gnome-Python 
version 1.99.13. Both are now installed in 
/home/martijn/sys/lib/python2.2/sitepackages. The listing of this directory looks like 
everything is OK.
drwxr-xr-x5 martijn  users4096 Dec 27 16:08 gtk-2.0
-rw-r--r--1 martijn  users   8 Dec 26 23:12 pygtk.pth
-rw-r--r--1 martijn  users2092 Dec 26 23:12 pygtk.py
-rw-r--r--1 martijn  users1841 Dec 26 23:12 pygtk.pyc
-rw-r--r--1 martijn  users1504 Dec 26 23:12 pygtk.pyo

Yet, when I export PYTHONPATH=/home/martijn/sys/lib/python2.2/sitepackages and start 
the python interpreter (2.2) I cannot import gtk: 
ImportError: No module named gtk

What is missing? sys.path is
['', '/home/martijn/sys/lib/python2.2/site-packages', '/usr/lib/python2.2', 
'/usr/lib/python2.2/plat-linux2', '/usr/lib/python2.2/lib-tk', 
'/usr/lib/python2.2/lib-dynload', '/usr/local/lib/python2.2/site-packages', 
'/usr/lib/python2.2/site-packages', '/usr/lib/python2.2/site-packages/Numeric', 
'/usr/lib/site-python']

What is missing. I would really like to run the helloworld program from the tutorial 
;-)

Thanks for helping

Martijn

___
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] GenericTreeModel problems

2002-12-28 Thread David M. Cook
I've been banging my head against some real weirdness with implementing my
own TreeModel with editable cells, particularly with editableCells showing
up where they shouldn't, even overlapping, and also problems with
selections.  I made a bug report on one of the minor problems I've been
having (EditableCells offset to the left):

http://bugzilla.gnome.org/show_bug.cgi?id=101748

I did a google search and found this old message 

http://www.daa.com.au/pipermail/pygtk/2001-December/002227.html

which seems to indicate that there are fundamental problems with the
GenericTreeModel (but that was a year ago).  Should I keep trying to get it
to work?  However, I definitely can't say that my code isn't at fault as I
don't understand the API completely, particulary exactly when some signals
need to be emitted (row_changed, row_has_child_toggled, row_inserted).
  
I'll try to bang together a simplified python test program for this that
might demonstrate the problems.

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] Re: installed gtk+2.2 and now python bindings can't find gnome widgets

2002-12-28 Thread Christian Reis
On Tue, Dec 24, 2002 at 10:47:47PM +0800, James Henstridge wrote:
> (in that order).  If you want to build from CVS, you might want to look 
> at a build script.  The one I use is jhbuild (also in GNOME CVS).

-> FAQ 1.14

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
___
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] Re: Re: Focus ?

2002-12-28 Thread Christian Reis
On Fri, Dec 27, 2002 at 08:56:14PM +, mc collilieux wrote:
> > Try calling grab_focus() after adding the entry to the parent window 
> > (that is, the entry must be packed inside its parent, and the parent
> > in its parent, all the way up to the toplevel GtkWindow).  The
> > currently focused widget is a property of the toplevel window, rather
> > than the child widgets.
> > 
> > James.
> 
> Now, i understand why my method don't work ! my latest parent widget is
> a vbox, not top level window. I begin with a window for insert menu.
> This menu call a module that i have not be able to "draw" in a child
> window, so this module is only in a principal vbox and there is no link
> between dserie and top level window.

Nevertheless, grab_focus() must be called *after* the widget (or one of
its parent containers) has been added to the toplevel window. To be
displayed, the widget *has* to be added to a toplevel window, so its
done at some point.

> But the help of Ricardo Froehlich "gtk.idle_add(dserie.grab_focus)" work
> fine.

I've added FAQ 5.10 which says at the end of it:

using idle_add() to call grab_focus() is naughty and we know that
python hackers are never naughty

I've also added some improved navigation bars so if anybody was scared
of using the FAQ, you can try once more.

> The other question is why i receive all messages of the list and when i
> want post, i receive this message "Post by non-member to a members-only
> list" ?

Maybe you are posting with another email address or domain?

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
___
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] Re: installed gtk+2.2 and now python bindings can't find gnome widgets

2002-12-28 Thread Christian Reis
On Tue, Dec 24, 2002 at 08:48:22AM -0500, Dave Reed wrote:
> > This looks like an error caused by a bug in libglade-2.0.0 that was 
> > fixed by 2.0.1.  When looking for the gnome support module, it would
> > sometimes fall back to looking in $(libdir) if it couldn't be found,
> > and it would sometimes pick up the gnome 1.x libgnome.so.  You will
> > need to set the LIBGLADE_MODULE_PATH environment variable in order
> > for libglade to find the support modules provided by libgnomeui,
> > libbonoboui, etc (probably /usr/lib/libglade/2.0).
> 
> Thanks - that fixed it. I'm still a little confused as to why the
> files in gnome-python/pygnome did not get compiled. Can someone please
> list the commands for compiling from CVS.

Dave, isn't it a matter of running ./autogen.sh, or is it something else
I haven't grokked from your query?

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
___
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] ANNOUNCE: pygtk-1.99.14, pyorbit-1.99.3,gnome-python-1.99.14

2002-12-28 Thread Johan Dahlin
> Many bug fixes have gone into these releases, so upgrading is 
> recommended.  For full details of the changes, see the respective 
> changelogs.

For everybody that's just waiting for update, here is a more complete
list of what's new.
If you're using GtkTreeView or GtkTextView, i can really recommend an
update:

* update to newer auto-tools (autoconf-2.57, automake-1.7.2,
  libtool-1.4.3).
* many bug fixes and additions of missing APIs.
* fix doc generation scripts to match the new style of gtk-doc
  documentation.
* make code generator return either Py_True or Py_False for
  boolean return functions.  This change is only noticable
  with Python 2.3 alphas.
* removal of wrappers for deprecated functions where the
  deprecated method shadowed the replacement.
* wrappers for idle_add, timeout_add, io_add_watch and
  source_remove to gobject module.  Compatibility names are
  provided in the gtk module.
* Many tree and text view wrapper updates from Johan Dahlin and
  John Finlay.
* leak fixes.
* Updated examples, including demo for editable cells.
* Improved threading support.
* Api additions for GdkEvents, TreeSelection, GtkTooltips,  
  libglade, GtkContainer.

-- 
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/