[pygtk] ANNOUNCE: PyGTK 2.2.0

2004-03-11 Thread Johan Dahlin
I am pleased to announce version 2.2.0 of the Python bindings for GTK.  
The new release is available from ftp.gtk.org or ftp.gnome.org and its 
mirrors:
http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.2/pygtk-2.2.0.tar.gz

GTK is a toolkit for developing graphical applications that run on POSIX 
systems such as Linux, Windows and MacOS X (provided that the X server 
for MacOS X has been installed).  It provides a comprehensive set of GUI 
widgets, can display Unicode bidi text.  It links into the Gnome 
Accessibility Framework through the ATK library.

PyGTK provides a convenient wrapper for the GTK library for use in 
Python programs, and takes care of many of the boring details such as 
managing memory and type casting.  When combined with PyORBit and 
gnome-python, it can be used to write full featured Gnome applications.

Like the GTK library itself PyGTK 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 features applications.

PyGTK now requires GTK = 2.2 and Python = 2.2 to build.

It includes a number of changes since the last pygtk
release; Lorenzo has provided a short summary of changes included, which
I've included below. We'd really appreciate testing and bug reports on
this release; please take the time out to download and test it to ensure
it works for your application[s]. Bug reports, as always, should go to
Bugzilla; check out http://pygtk.org/developer.html and
http://pygtk.org/feedback.html for links to posting and querying bug
reports for PyGTK.

Help in fixing or advising on the blockers is also much appreciated.

Lorenzo's summarized change list follows:

- Better support for gtk.gdk.Pixbuf integration with Numerical
  arrays (Tim Evans)
- Added gtk.gdk.Eventkey.hardware_code (Johan)
- Added gtk.binding_entry_remove and gtk.accel_group_connect (Gustavo)
- Don't allow reading non readable properties (James)
- Better support for Pygtk generation tools (codegen, m4 macros,
  h2def, Makefile.am ...) (James, Jon Willeke, Xavier, Johan)
- Allow None return values in gtk.GenericCellRenderer.start_editing (Johan)
- Better and more flexible support for TreeModel and TreeView API:
  - Implemented gtk.TreeSelection.get_selected_rows
  - Allow None iter for gtk.GenericTreeModel.iter_n_children
(Don Allingham)
  - Allow None parent for gtk.TreeMode.iter_children (Benjamin Cama)
  - Allow None iterator values in gtk.TreeModel (John Ehresman)
  - Implemented the gtk.ListStore.reorder method (Johan)
  - Swap parent and child argument for gtk.TreeModel.get_parent (Johan)

- Allow None arguments for gtk.Widget.modify_* (jkluebs at luebsphoto.com)
- Added support for some GTK+ 2.2 APIs (James):
  - Better support for gtk.Clipboard: set_with_data
  - Better support for gtk.gdk.Window: set_geometry_hints,
peek_children, set_icon_list, for gtk.gdk.Screen:
get_setting; and for gtk.Display: get_window_at_pointer
  - gdk.Pixbuf.get_formats() returns a list of dictionaries
  - More functions wrapped for GdkDisplay and GdkScreen
  - Removed gtkgl bindings

- And lots of bug fixes: gdk.event_get_axis (Seth), distutils (Alif
  Wahid), mem leaks, gtk.Menu.popup (Gustavo)

A Bonsai link to view the actual checkins follows:


http://cvs.gnome.org/bonsai/cvsquery.cgi?treeid=defaultbranch=HEADbranchtype=matchdir=gnome-python%2Fpygtkfile=filetype=matchwho=whotype=matchsortby=Datehours=2date=explicitmindate=2003-09-02maxdate=2004-04-01cvsroot=%2Fcvs%2Fgnome


-- 
Johan Dahlin
[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] ANNOUNCE: PyGTK 2.2.0

2004-03-11 Thread Ionutz Borcoman
Johan Dahlin wrote:
 I am pleased to announce version 2.2.0 of the Python bindings for GTK.
 The new release is available from ftp.gtk.org or ftp.gnome.org and its
 mirrors:
 http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.2/pygtk-2.2.0.tar.gz
Hi,

Any idea on when can we expect the windows port to be available ?

TIA,

Ionutz

___
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 2.2.0

2004-03-11 Thread Cedric Gustin
At 01:09 PM 3/11/2004, Ionutz Borcoman wrote:
Johan Dahlin wrote:
 I am pleased to announce version 2.2.0 of the Python bindings for GTK.
 The new release is available from ftp.gtk.org or ftp.gnome.org and its
 mirrors:
 http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.2/pygtk-2.2.0.tar.gz
Hi,

Any idea on when can we expect the windows port to be available ?
Hopefully, later today.

Cedric 

___
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] newbie question dialog/pop-up

2004-03-11 Thread aviad cohen
hello everyone
i have a question about  dialog/pop-up windows
i'm trying to write a program that would show a menu of items.
when the user opens an item (meanning clicks on the button)
the main window would hide ( self.window.hide() ) and a new window
would open instead .
when the user finished with the child window and press the x button
the window would then be closed and the main (previous) window would be 
shown
again (self.window.show)

some time ago i did this task with action-listener (using java)
or post-messege (using c++ and mfc)
my REAL problem is to understand if this structure would be
dialog based like or open a new window new windows.
i wrote an eample code:
.
file main1.py:
--
import gtk
import another_file_module
class main1(gtk.Window):
 def __init__ ...
 def clicked_on_button
   new_win=another_file_module.main_1()
   new_win.show_all()
   self.window.hide()
file another_file_module.py
--
import gtk
class main_1(gtk.Window):
 def __init__ :
.
.
   gtk.Window.__init__(self)   
   self.connect('destroy') - what should i write here in order to close
   this window and show the main1 
window again
.
.
 

thanks
aviad
___
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] newbie question dialog/pop-up

2004-03-11 Thread Pierre N
Hi,

You should check out this great tutorial first:
http://www.moeraki.com/pygtktutorial/pygtktutorial/index.html

You'll see that the easiest way to achieve this is to create a class
where you initialise all your windows/dialogs (and you hold a reference
to all of them) and another one where you handle all the events. From
the event_handler (on_bla_button_clicked) you can then call methods
which are going to give you references to these windows/dialogs:

win1=main.get_window1()
win2=main.get_window2()
win1.show()
win2.hide()

After you get this running, you can go into more advanced way of
managing this, like you'll find here:
http://www.pygtk.org/articles.html

And this nice FAQ has a few great tricks:
http://www.async.com.br/faq/pygtk/index.py?req=all

I'm finishing the development of such an application using over 35
windows. All running like a stack. It's a great experience and (I
believe) it works great!! I'm using Glade though...

--
Pierre


On Thu, 2004-03-11 at 20:38, aviad cohen wrote:
 hello everyone
 i have a question about  dialog/pop-up windows
 
 i'm trying to write a program that would show a menu of items.
 when the user opens an item (meanning clicks on the button)
 the main window would hide ( self.window.hide() ) and a new window
 would open instead .
 
 when the user finished with the child window and press the x button
 the window would then be closed and the main (previous) window would be 
 shown
 again (self.window.show)
 
 some time ago i did this task with action-listener (using java)
 or post-messege (using c++ and mfc)
 
 my REAL problem is to understand if this structure would be
 dialog based like or open a new window new windows.
 
 i wrote an eample code:
 .
 file main1.py:
 --
 import gtk
 import another_file_module
 
 class main1(gtk.Window):
   def __init__ ...
 
   def clicked_on_button
 new_win=another_file_module.main_1()
 new_win.show_all()
 self.window.hide()
 
 file another_file_module.py
 --
 
 import gtk
 class main_1(gtk.Window):
   def __init__ :
 .
 .
 gtk.Window.__init__(self)   
 self.connect('destroy') - what should i write here in order to close
 this window and show the main1 
 window again
 .
 .
   
 
 thanks
 aviad
 ___
 pygtk mailing list   [EMAIL PROTECTED]
 http://www.daa.com.au/mailman/listinfo/pygtk
 Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


signature.asc
Description: This is a digitally signed message part
___
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 2.2.0

2004-03-11 Thread Cedric Gustin
At 12:25 PM 3/11/2004, Johan Dahlin wrote:
I am pleased to announce version 2.2.0 of the Python bindings for GTK.
The new release is available from ftp.gtk.org or ftp.gnome.org and its
mirrors:
http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.2/pygtk-2.2.0.tar.gz
The windows port is now available from my site

http://www.pcpm.ucl.ac.be/~gustin/win32_ports/

or directly from

http://www.pcpm.ucl.ac.be/~gustin/win32_ports/binaries/pygtk-2.2.0.win32-py2.3.exe

Please note that it requires the latest GTK+ runtime installer (2.2.4.2) 
from dropline (http://www.dropline.net/gtk/) if you want libglade support 
(the libglade and libxml2 DLLs are now included with the GTK+ runtime). I 
recommend to uninstall any previous version of pygtk.

Threading is enabled (but see the recent thread 
http://www.daa.com.au/pipermail/pygtk/2004-February/006882.html for a 
discussion on threading on win32).

For detailed, step by step installation instructions, see section #21 of 
the pygtk FAQ (http://www.async.com.br/faq/pygtk/index.py?req=index).

I also would like to point out that pygtk-2.2 does not compile out of the 
box on win32. I applied the patches described in bugs #123014 and #136731. 
Hopefully, this will be fixed for pygtk-2.2.1.

Cedric

___
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] ProgressBar on OS X

2004-03-11 Thread Christian Robottom Reis
On Tue, Mar 09, 2004 at 12:02:31PM -0600, John Hunter wrote:
 
 I just installed gtk+-2.2.4 and pygtk-2.0.0 from src on OS X 10.3.
 Most everything works properly, but I find any call to gtk.ProgressBar
 raises
 
  SystemError: NULL result without error in PyObject_Call
 
 Has anyone seen this before or have any ideas for a fix?
 
 import pygtk
 pygtk.require('2.0')
 import gtk
 
 progBar = gtk.ProgressBar()

is it raising the error here, 

 progBar.set_size_request(10, 100)

or here? You said any call, which makes me wonder what specifically.

I trust this runs on other platforms, so let's look this through a bit
more. First, it would be great if we found out *which* method/function
call we're failing; the message is generated inside PyObject_Call (see
Python/Objects/abstract.c) and indicates that we called a function that
returned NULL but didn't set up an exception. There are a number of
other similar errors in other situations archived:


http://www.google.com/search?q=pyobject_call+%22null+result+without+error%22hl=enlr=ie=UTF-8oe=UTF-8safe=offstart=10sa=N

Can you get a stacktrace from where the error is generated? I'd suggest
you file a bug [with stacktrace and testcase attached] to ensure this
isn't forgotten, at any rate.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
___
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] ProgressBar on OS X

2004-03-11 Thread John Hunter
 Christian == Christian Robottom Reis [EMAIL PROTECTED] writes:

 progBar = gtk.ProgressBar()

Christian is it raising the error here,

Sorry, yes, this is where the error occurs.  My Mac install doesn't
have strace.  I'll try and gather some more info and file a bug
report.  Anyone know how to get a stack trace on OS X?

Thanks,
JDH
___
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] ProgressBar on OS X

2004-03-11 Thread Christian Robottom Reis
On Thu, Mar 11, 2004 at 08:30:21AM -0600, John Hunter wrote:
  Christian == Christian Robottom Reis [EMAIL PROTECTED] writes:
 
  progBar = gtk.ProgressBar()
 
 Christian is it raising the error here,
 
 Sorry, yes, this is where the error occurs.  My Mac install doesn't
 have strace.  I'll try and gather some more info and file a bug
 report.  Anyone know how to get a stack trace on OS X?

Note that you get a stack trace through a debugger (such as gdb, which I
believe exists for MacOS X), not through a system call tracer :-)

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
___
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: GNOME platform bindings (was Re: [pygtk] Release Candidate 1: pygtk-2.2.0-RC1.tar.gz)

2004-03-11 Thread Murray Cumming
On Wed, 2004-03-10 at 07:21, Xavier Ordoquy wrote:
 On Wed, 2004-03-10 at 01:27, Graham Ashton wrote:
  Failing that, if there's enough interest in getting pygtk included in
  the release set, what do people think of the second option?
 
 I see drawbacks (release deadline fixed,

Yes, that's an advantage for many people. Your users want to know that
you will closely track the APIs that you are wrapping, and your
developers need to know when they can help most effectively. And distros
need to know when you will release new stable API so that they can
depend on it in their scheduled releases. A release schedule makes sure
that software gets released. This could clearly help gnome-python.

  API coverage has to match the
 gtk/gnome version

You don't need to wrap 100% of the C API, but you should try.

  with no further API addition) but I'm failing to see
 the advantages.

gnome-python gets released, publicised, distributed, and used.

-- 
Murray Cumming
www.murrayc.com
[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] ANNOUNCE: PyGTK 2.2.0

2004-03-11 Thread Christian Robottom Reis
On Thu, Mar 11, 2004 at 12:25:31PM +0100, Johan Dahlin wrote:
 A Bonsai link to view the actual checkins follows:
 
 
 http://cvs.gnome.org/bonsai/cvsquery.cgi?treeid=defaultbranch=HEADbranchtype=matchdir=gnome-python%2Fpygtkfile=filetype=matchwho=whotype=matchsortby=Datehours=2date=explicitmindate=2003-09-02maxdate=2004-04-01cvsroot=%2Fcvs%2Fgnome

An updated Bonsai link that includes everything in this release:

http://cvs.gnome.org/bonsai/cvsquery.cgi?treeid=defaultbranch=HEADbranchtype=matchdir=gnome-python%2Fpygtkfile=filetype=matchwho=whotype=matchsortby=Datehours=2date=explicitmindate=2003-09-02maxdate=2004-03-05cvsroot=%2Fcvs%2Fgnome

A Bonsai link that shows changes done between RC1 and release:

http://cvs.gnome.org/bonsai/cvsquery.cgi?treeid=defaultbranch=HEADbranchtype=matchdir=gnome-python%2Fpygtkfile=filetype=matchwho=whotype=matchsortby=Datehours=2date=explicitmindate=2004-03-06maxdate=2004-03-11cvsroot=%2Fcvs%2Fgnome

** I'd like to remind people checking in (wink wink) that good checkin
messages are crucial to having good CVS history on the files changed;
please help keep them as complete as you can. **

Thanks for all the hard work, and as I always say, file mo' bugs.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
___
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] Is there a windows binary of pygtk available?

2004-03-11 Thread Rick Muller
Yeah, I'm aware of gtkglext; I'm just trying to get this release out 
the door before making any major code changes, since the code already 
works.

R.

On Wednesday, March 10, 2004, at 10:54  PM, John Hunter wrote:

Rick == Rick Muller [EMAIL PROTECTED] writes:
Rick Thanks very much -- should have looked there first,
Rick obviously. Has anyone gotten gtk.gl working? Are there
Rick simple instructions?
Rick Sorry for all of the dumb questions. I'm nearing a release
Rick date of an open-source molecular graphics program, and I
Rick would like to be able to support Win32 in addition to Unix
Rick and Mac OS X, so I got an old Win2K box and have been trying
Rick to get it running on that platform. I've gotten everything
Rick to work except for gtk.gl, so I'd be grateful for any help
Rick people can offer.
If possible, you should use gtkglext instead.  It runs on
linux/unix/win32 and mac OS X, and superceeds gtk.gl.
If by chance you are using VTK, I have a vtk render window for
pygtkglext, which I also believe is in the VTK CVS.
JDH

Rick Muller
[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] newbie question dialog/pop-up

2004-03-11 Thread aviad cohen
Pierre N wrote:

Hi,

You should check out this great tutorial first:
http://www.moeraki.com/pygtktutorial/pygtktutorial/index.html
You'll see that the easiest way to achieve this is to create a class
where you initialise all your windows/dialogs (and you hold a reference
to all of them) and another one where you handle all the events. From
the event_handler (on_bla_button_clicked) you can then call methods
which are going to give you references to these windows/dialogs:
win1=main.get_window1()
win2=main.get_window2()
win1.show()
win2.hide()
 

sorry, but i didn't understands how to call diferent files/classes
it's seems not logical to load all the windows and then to handle them
since, if the user didn't clicked to show a window why should i
load it?
i would be very happy to get some example code that shows how
to use several files and classes
i did looked at the pygtk-demo.py but it was not what i was looking for
thanks again
aviad
___
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 2.2.0

2004-03-11 Thread Christian Robottom Reis

On Thu, Mar 11, 2004 at 02:07:23PM +0100, Cedric Gustin wrote:
 I also would like to point out that pygtk-2.2 does not compile out of the 
 box on win32. I applied the patches described in bugs #123014 and #136731. 
 Hopefully, this will be fixed for pygtk-2.2.1.

We're aware of this, and it should be -- please bother us if it's time
for 2.2.1 and we haven't addressed this yet, Cedric?

BTW, The best entry-point for the win32-threading issues thread is
http://www.daa.com.au/pipermail/pygtk/2004-February/006893.html

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
___
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] Is there a windows binary of pygtk available?

2004-03-11 Thread Christian Robottom Reis
On Wed, Mar 10, 2004 at 11:54:23PM -0600, John Hunter wrote:
  Rick == Rick Muller [EMAIL PROTECTED] writes:
 
 Rick Thanks very much -- should have looked there first,
 Rick obviously. Has anyone gotten gtk.gl working? Are there
 Rick simple instructions?
 
 Rick Sorry for all of the dumb questions. I'm nearing a release
 Rick date of an open-source molecular graphics program, and I
 Rick would like to be able to support Win32 in addition to Unix
 Rick and Mac OS X, so I got an old Win2K box and have been trying
 Rick to get it running on that platform. I've gotten everything
 Rick to work except for gtk.gl, so I'd be grateful for any help
 Rick people can offer.
 
 If possible, you should use gtkglext instead.  It runs on
 linux/unix/win32 and mac OS X, and superceeds gtk.gl.

I think in Rick's case, the best option would be to package gtk.gl
and distribute it separately (or with his application). It's a bit of
work to package, but keeps code compatibility with his current code. I
even proposed so in the relevant bug report!

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
___
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 2.2.0

2004-03-11 Thread Dave Aitel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Christian Robottom Reis wrote:

| On Thu, Mar 11, 2004 at 02:07:23PM +0100, Cedric Gustin wrote:
|
| I also would like to point out that pygtk-2.2 does not compile
| out of the box on win32. I applied the patches described in bugs
| #123014 and #136731. Hopefully, this will be fixed for
| pygtk-2.2.1.
|
|
| We're aware of this, and it should be -- please bother us if it's
| time for 2.2.1 and we haven't addressed this yet, Cedric?
|
| BTW, The best entry-point for the win32-threading issues thread is
| http://www.daa.com.au/pipermail/pygtk/2004-February/006893.html
|
Just as a quick note, now that I've got my Win32 threaded codebase
working stably, I'll find some time and write it up consisely and
throw it in the FAQ. There's no reason to let people think pyGTK is
not the solution for real-world apps on Win32 and Linux both. It works
great!
- -dave



| Take care, -- Christian Robottom Reis | http://async.com.br/~kiko/
| | [+55 16] 261 2331 ___
|  pygtk mailing list   [EMAIL PROTECTED]
| http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ:
| http://www.async.com.br/faq/pygtk/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFAUJh5zOrqAtg8JS8RAk/3AJ9AiL+aZbaM0nJTq+L3CVUqV58CvQCffPbc
1kxud8CB57BxCgladn3tock=
=KYJy
-END PGP SIGNATURE-
___
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] Can priorities be specified for a gtk.input add

2004-03-11 Thread Christian Robottom Reis
On Wed, Mar 10, 2004 at 12:13:35AM -0500, John K Luebs wrote:
  I would like to be a ble to set the input events' priority, as in done 
  in gtkmm through Glib::Source::set_priority().
 
 Currently, GSources are not wrapped by pygtk.
 
 For now, you can try this:
 http://www.luebsphoto.com/gsourcemodule.c
 
 Hopefully, someone will soon get this stuff wrapped in such a way
 that it can be added to pygtk proper.

John, can you open a bug on this and attach your code so we can consider
it for inclusion in pygtk proper?

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
___
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] newbie question dialog/pop-up

2004-03-11 Thread Alexandre Strube
Em Qui, 2004-03-11 às 14:27, Pierre N escreveu:

   You should check out this great tutorial first:
   http://www.moeraki.com/pygtktutorial/pygtktutorial/index.html
  That's a nice tutorial for learning things from scratch, but IMHO it
  looks a little bit raw for a a complete dum^H^H^H newbie, which would
  prefer learning how to program in python with GTK using glade instead of
  managing every widget itself. 
  
  I liked the article found at
  http://www.linuxjournal.com/article.php?sid=6586
  
  Seems quite adequate for someone which just wants to develop
  applications fast.

 Well, I use Glade myself and I almost did advise him to use Glade. But I
 believe it was not answering his question, so I just kept with the 'pure
 Python code'.
 But I totally agree with you.

Do you have any other pygtk + glade tutorial? It doesn't look that easy
to find something...

 --
 Pierre
 PS: Looks like you forgot to include the list in there... Haven't seen
 your message popping up anyway.

Yes, as list was at cc: line, and I don't like to do a reply to all...


-- 
[]s

Alexandre Ganso 
500 FOUR vermelha - Diretor Steel Goose Moto Group

___
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] newbie question dialog/pop-up

2004-03-11 Thread Christian Robottom Reis
On Thu, Mar 11, 2004 at 02:40:53PM -0300, Alexandre Strube wrote:
  Well, I use Glade myself and I almost did advise him to use Glade. But I
  believe it was not answering his question, so I just kept with the 'pure
  Python code'.
  But I totally agree with you.
 
 Do you have any other pygtk + glade tutorial? It doesn't look that easy
 to find something...

/me looks at Xavier

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
___
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] Can priorities be specified for a gtk.input add

2004-03-11 Thread Johan Dahlin
El jue, 11-03-2004 a las 18:01, Christian Robottom Reis escribió:
 On Wed, Mar 10, 2004 at 12:13:35AM -0500, John K Luebs wrote:
   I would like to be a ble to set the input events' priority, as in done 
   in gtkmm through Glib::Source::set_priority().
  
  Currently, GSources are not wrapped by pygtk.
  
  For now, you can try this:
  http://www.luebsphoto.com/gsourcemodule.c

Looks good. 
I'd like to include this ASAP :-)

Perhaps we should add GHashTable and other structures from glib too. Or
the unicode part that has been asked for before.

I'm not sure how we should split them.
GSources should probably not be included in the gobjectmodule.c.
Maybe we should create a glib module?

What ya think?

-- 
Johan Dahlin
[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] Can priorities be specified for a gtk.input add

2004-03-11 Thread Christian Robottom Reis
On Thu, Mar 11, 2004 at 07:41:15PM +0100, Johan Dahlin wrote:
   For now, you can try this:
   http://www.luebsphoto.com/gsourcemodule.c

 I'm not sure how we should split them.
 GSources should probably not be included in the gobjectmodule.c.
 Maybe we should create a glib module?

Yes, maybe glibmodule.c which would contain GSources and other bits of
GLib that might be useful.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
___
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] pipe, input_add and the like... O_o

2004-03-11 Thread Danny Milosavljevic
Hi,

I have a small problem:

I use (dummy, fc, dummy)  = os.popen3(xterm)
[substitute whatever program here]

Then I have a button which has an indicator if xterm is open (started)
or not.

To update this indicator, when doing the popen3, I set it to started.
Then I use input_add to add fc and give a callback.
(gtk.gdk.INPUT_READ | gtk.gdk.INPUT_EXCEPTION)

In the callback I thought I could check against gtk.gdk.INPUT_EXCEPTION
and if it happens reset the indicator.

As usual, program runs gtk.main() loop,
I click on the button, and expect it to enter the callback for the input
fairly soon (since there are loads of messages for almost every program
since I updated to gtk 2.3, ok maybe xterm is an exception ;))

It does not enter the callback until the app exits.
Then it enters with INPUT_READ as condition O_o
erm...

No INPUT_EXCEPTION happens, and no callbacks happen *instantly* (I don't
need instant callbacks in this case but still... weird)

Also, some (really few) programs make the python script hang when they
are exited again. hmm?!
There are soo many popen variants, no idea if I picked one with weird
semantics on gone pipes.

Of course if anyone has another not-too-hacky idea to keep track of
number of processes launched (and not exited again) by the python
script, I appreciate any pointers  :)

(what I'm creating is a small launch panel btw :))

Thanks ...

cheers,
   Danny

-- 
www.keyserver.net Key ID A334AEA6


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
___
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] Selection issues with TreeModelSort

2004-03-11 Thread Don Allingham
I have created a custom tree model, derived from GenericTreeModel. I use
text strings as iters for the model. This is working well. When I get
the current selection, I get the string that I was using as an iter.

   model = MyModel()
   tree.set_model(model)
   selection = tree.get_selection()

   return_is_string = selection.get_selected()

However, if I use the TreeModelSort to create a sortable model, then
getting the selection returns a GtkTreeIter, instead of the expected
string.

   model = MyModel()
   sort_model = gtk.TreeSortModel(model)
   tree.set_model(sort_model)
   selection = tree.get_selection()

   return_is_iter = selection.get_selected()

I was expecting to get the string I was using as an iter, not a generic
GtkTreeIter.

Is this the expected behavior? If it is, how do I convert the iter to
something that is meaningful? The convert_iter_to_child_iter method only
returns another GtkTreeIter.

Don

-- 
Don Allingham [EMAIL PROTECTED]
GRAMPS - Open Source Genealogy

___
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] Selection issues with TreeModelSort

2004-03-11 Thread David M. Cook
On Thu, Mar 11, 2004 at 04:43:33PM -0700, Don Allingham wrote:

 I have created a custom tree model, derived from GenericTreeModel. I use
 text strings as iters for the model. This is working well. When I get
 the current selection, I get the string that I was using as an iter.
 
model = MyModel()
tree.set_model(model)
selection = tree.get_selection()
 
return_is_string = selection.get_selected()

I don't see how that works, it sounds like a fortuitous bug.  In C, a
TreeIter is an opaque structure.  You should still have to do a get_value to
get an actual usable value.

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] newbie question dialog/pop-up

2004-03-11 Thread Alexandre Strube
Em Qui, 2004-03-11 às 19:49, Pierre N escreveu:

   I advise you to have a look at the one at handheld.org:
   http://handhelds.org/~nelson/pyglade/pyglade-tutorial
   It's really great, and my whole application is based on this. This is
   very elegant. Considering the size of my beast...
  On thing I find VERY confusing in all of this are those modules' names,
  as well as libraries versions.
  For instance:
  that helloworld example from the above page has the following line:
  import gtk, libglade

  Well, ok. I don't have any idea of which library is libglade, my python
  cannot find it. It says ImportError: No module named libglade.
 I didn't even realise this, you are right. Well, just check with your
 python env. which modules you have and which you don't:

I've been reading other tutorials... but you said that you were using
the handhelds' one yourself, so the only thing I tried was run that
helloworld. This made me confused...

  help()
 helpmodules

This is good to know. I was looking for this for quite some time.


 helpgtk.glade
 [... here you go, the whole API just for you ...]

hooho! :-)


  libglade.GladeXML(file)
  gtk.glade.XML(file)

 different native lib. Here you go, you don't care which one you need.

What worries me is that I would have to convert functions from one to
another on every different distro.

  What is the difference? I don't know. What are the versions? I don't
  know. Is one for gtk/glade 1 and other for gtk2/glade2? I don't know.
 I suppose this is the explanation. I'm sure you can google for libglade
 you'll find everything you need to know about libglade. On
 http://www.python.org as well...

Libglade is from the guy who created PyGTK. In fact, it's hosted at the
same place this list is. Ain't this ackward?

 At the same time I think you want to know too much about everything and
 you can't seem to see the end of it. Hard to be motivated... Just try to
 focus on what you have/like to do. Don't try to know stuff you don't
 need. Not yet anyway ;-p

I was just trying to run a hello world ;-)


-- 
[]s

Alexandre Ganso 
500 FOUR vermelha - Diretor Steel Goose Moto Group

___
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] newbie question dialog/pop-up

2004-03-11 Thread Christian Robottom Reis
On Thu, Mar 11, 2004 at 09:52:58PM -0300, Alexandre Strube wrote:
   libglade.GladeXML(file)
   gtk.glade.XML(file)
 
  different native lib. Here you go, you don't care which one you need.
 
 What worries me is that I would have to convert functions from one to
 another on every different distro.

Hmm, what do you mean by convert functions? Different distro?

 Libglade is from the guy who created PyGTK. In fact, it's hosted at the
 same place this list is. Ain't this ackward?

James wrote both; he works at DAA, where the list and [original pygtk]
pages are kindly hosted.  

It's not awkward; it's a statement on how much greatness he has brought
upon the world.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
___
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] newbie question dialog/pop-up

2004-03-11 Thread Christian Robottom Reis
On Thu, Mar 11, 2004 at 11:20:55PM -0300, Alexandre Strube wrote:
 Em Qui, 2004-03-11 às 22:18, Christian Robottom Reis escreveu:
 
 libglade.GladeXML(file)
 gtk.glade.XML(file)
different native lib. Here you go, you don't care which one you need.
   What worries me is that I would have to convert functions from one to
   another on every different distro.
  Hmm, what do you mean by convert functions? Different distro?
 
 Means that if different linux/bsd distros, for instance, use different
 versions (take a look at two different lines of them on top of the mail,
 they do the same in different libraries) of glade library, would us have
 to write code for both?

Oh, sorry; to an extent you are correct. But, being a consequence of
moving from pygtk-0.6 to 2.0, this is only the tip of the iceberg -- FAQ
section 2 outlines other changes that are necessary when moving from one
version to the other.

Most recent distributions have adopted pygtk-2.x; older applications
written for pygtk-0.6.x still need the older version (though both
coexist nicely).

In summary, yes, you'd need to convert functions if you wanted to use
both PyGTK versions, but in practice, pygtk-2.x is what you should be
targetting (IOW, forget the old pygtk-0.6.x API).

   Libglade is from the guy who created PyGTK. In fact, it's hosted at the
   same place this list is. Ain't this ackward?
  It's not awkward; it's a statement on how much greatness he has brought
  upon the world.
 
 Yes, but it looks like the libglade he wrote isn't the same actually
 used by us. At least with gtk2.

As a matter of fact, he wrote both versions. What we use are wrapped
versions of the C libglade libraries; and yes, he wrote the wrappers
too wink.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
___
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] List replies go to OP

2004-03-11 Thread Alexandre Strube
When we reply a message from this list, the default behaviour is to
reply to the author, not back to list. Wouldn't be better to keep
replies to the list? 

For instance, I was talking about libglade and pygtk2-glade with Pierre,
and if I didn't realized that I was replying only for him, I would never
know that 

- libglade is for pygtk0-6 (which seems to be for gtk1)
- pygtk-glade is for pygtk2.x (which is for gtk2+)

Thanks to Kiko. 

This may look obvious once you learn, but it's not written anywhere.

What do you think of changing this default? But as always, I'm probably
wrong :-)

-- 
[]s

Alexandre Ganso 
500 FOUR vermelha - Diretor Steel Goose Moto Group

___
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: pygtk Digest, Vol 13, Issue 18

2004-03-11 Thread Don Allingham
  I have created a custom tree model, derived from GenericTreeModel. I use
  text strings as iters for the model. This is working well. When I get
  the current selection, I get the string that I was using as an iter.
  
 model = MyModel()
 tree.set_model(model)
 selection = tree.get_selection()
  
 return_is_string = selection.get_selected()
 
 I don't see how that works, it sounds like a fortuitous bug.  In C, a
 TreeIter is an opaque structure.  You should still have to do a get_value to
 get an actual usable value.
 
 Dave Cook

Actually, every example shows using python objects, tuples, or strings
as iters. If you look at the treemodel.py demo shipped with pygtk, it
uses tuples as iters.

Pygtk does not allow you to instantiate TreeIters, or derive classes
from a TreeIter. It seems the preferred method is to you python objects.
This seems to work with everything except the TreeSortModel.

Don 


-- 
Don Allingham [EMAIL PROTECTED]
GRAMPS - Open Source Genealogy

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