[pygtk] pygtk for gtk2

2002-03-16 Thread Pier

Hi to all,
I've downloaded rpms for gtk2.0  (stable version) for my RH 7.2 and I've
tried to use pygtk-1.99.7
The compile step goes on but when I start my program I have:

Traceback (most recent call last):
  File ./Gnominide, line 3, in ?
import  os, sys, time, gtk
  File /usr/local/lib/python2.2/site-packages/gtk/__init__.py, line 19, in ?
from _gtk import *
ImportError: /usr/lib/python2.2/site-packages/gtk/_gtkmodule.so: undefined symbol: 
gtk_tree_view_column_cell_draw_focus 
My guess is that I must wait a new release of pygtk that works with the
stable branch, is that right?
James can you arrange a new release? (doesn't matter if is not a stable
release or one of 1.99.x )?
Thank you

Pier


___
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] Announcement: pygtk2 for windows

2002-03-16 Thread Peter Kese


Hi

I have managed to compile pygtk-1.99.7 on windows.
Files can be found at:

http://www-ai.ijs.si/~kese/python/

Warning: Consider this as an alpha release as the
software is not very stable yet.


The archive includes binary pyhton modules as well as
required MSVC makefiles (if you wish to build it
yourself).

The binaries have been built on the current CVS
(March 16, 2002) version of pygtk and the Tor
Lillquist's port of Gtk+-2.0 to windows (see
http://www.gimp.org/~tml/gimp/win32/). There are
no bindings for glade, nor gtkgl.

Sources had to be slightly modified in order to
build on windows. Here is a quick description of
modifications:

- gtk/gtkmodule.c: init_gtk

  A call to gtk_init_check(...) segfaults whenever
  any arguments are passed to gtk. I have replaced
  the call with the following code (so that the
  arguments are being ignored):

#ifdef _WIN32
if (!gtk_init_check(0, NULL)) {
#else
if (!gtk_init_check(argc, argv)) {
#endif
if (argv != NULL) {

- gtk/gtk.defs and gtk/gtk-types.defs

  All references to GtkSocket and GtkPlug have been
  removed because GtkSocket and GtkPlug are only
  available in libgtk-x11 (on X windows).

- gtk/gtk.c: _wrap_gtk_widget__get_allocation(...)

  There was a small bug in CVS version of pygtk that
  should be resolved quickly (probably an autogeneration
  problem). Anyway I have replaced:
return pyg_boxed_new(ret, FALSE, TRUE);
  with:
return pyg_boxed_new(GDK_TYPE_RECTANGLE, ret, FALSE, TRUE);

--

That is about it. You are invited to play with it and
help with debugging.

Best luck,

Peter


P.S. I would appreciate if any of this would be included
into the original pygtk CVS or distribution.
___
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] Announcement: pygtk2 for windows

2002-03-16 Thread Johan Dahlin

lör 2002-03-16 klockan 20.07 skrev Peter Kese:
 
 Hi
 
 I have managed to compile pygtk-1.99.7 on windows.
 Files can be found at:

Great news!

[snip]

 - gtk/gtkmodule.c: init_gtk
 
   A call to gtk_init_check(...) segfaults whenever
   any arguments are passed to gtk. I have replaced
   the call with the following code (so that the
   arguments are being ignored):
 
   #ifdef _WIN32
   if (!gtk_init_check(0, NULL)) {
   #else
   if (!gtk_init_check(argc, argv)) {
   #endif
   if (argv != NULL) {
This feels wrong, why does it segfault in gtk_init_check in win32? 
Can't it be fixed in gtk+ instead of just #ifdeffing it out?

 
 - gtk/gtk.defs and gtk/gtk-types.defs
 
   All references to GtkSocket and GtkPlug have been
   removed because GtkSocket and GtkPlug are only
   available in libgtk-x11 (on X windows).
 
Hmm, i think the .override arguments can be easily extended so if
os.platform is win32, we ignore gtk_plug_* and gtk_socket_*.


 - gtk/gtk.c: _wrap_gtk_widget__get_allocation(...)
 
   There was a small bug in CVS version of pygtk that
   should be resolved quickly (probably an autogeneration
   problem). Anyway I have replaced:
 return pyg_boxed_new(ret, FALSE, TRUE);
   with:
 return pyg_boxed_new(GDK_TYPE_RECTANGLE, ret, FALSE, TRUE);
 
 --
 
 That is about it. You are invited to play with it and
 help with debugging.
 
 Best luck,
 
   Peter
 
 
 P.S. I would appreciate if any of this would be included
 into the original pygtk CVS or distribution.
 ___
 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 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] Questions about scrollbars and trees

2002-03-16 Thread James Henstridge

Jon Nelson wrote:

On Fri, 15 Mar 2002 14:10:44 +0800
James Henstridge [EMAIL PROTECTED] wrote:

Jon Nelson wrote:

I have no choice.  I can't use the GtkCTree in this instance at all,
and I have tied to Python 1.5.2, gtk 1.2.[6,8] and pygtk 0.6.8 (can't run anything
newer because they require either newer version of gtk or python
than I can provide).  The GtkCTree doesn't support arbitrary levels
of nesting.

Really?  I hadn't noticed that limitation.  Other than being limited to 
text and pixmaps in GtkCTree, CTree is almost always the right choice 
for 1.2 apps.  If you want something that looks and acts like the old 
GtkTree widget, I recommend doing the following:

  ctree = gtk.GtkCTree(1, 0)
  ctree.column_titles_hide()
  ctree.set_column_auto_resize(0, gtk.TRUE)

Then add your tree nodes.


What I mean by arbitrary levels of *nesting* is that I don't know
ahead of time how many items and subitems (subtrees) I need to make.
I need items capable of expanding and collapsing. Since GtkCTree can only
handle text and pixmaps, this isn't an option.

Not really sure what you want to do that can't be done with ctree.  For 
instance, I might do:
  node1 = ctree.insert_node(None, None, ['node1'], is_leaf=0)  # insert 
a node at toplevel
  node2 = ctree.insert_node(None, None, ['node2'])  # insert a second 
node at toplevel
  node3 = ctree.insert_node(node1, None, ['node3']) # insert a node as a 
child of node1
  node4 = ctree.insert_node(node1, node3, ['node4'], is_leaf=0) # and 
one under node1, before node3
  node5 = ctree.insert_node(node4, None, ['node5'])

This would produce the following tree:
  +-node1
  |  +-node4
  |  |  +-node5
  |  +-node3
  +-node2

Is this not enough?



Still.  Back to the original issue. Any idea why the scrollbars won't 
recognize that they need to be opened until *after* the second time
it has been populated?

Because GtkTree sucks rocks and is really buggy.  This was addressed in 
a previous message.

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/



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