Re: [pygtk] Gobject properties to PyObject attributes mapping

2003-08-14 Thread Iñaki García Etxebarria
El vie, 08-08-2003 a las 15:07, Gustavo J. A. M. Carneiro escribi: label = gtk.Label() label.label = 'Hello World' # Changes the label in the gui print label.label # prints 'Hello World' Perhaps it is wiser to add a small prefix to the python attribute, to avoid possible conflicts with

Re: [omniORB] Re: [pygtk] Conflicting omniORBpy and PyORBit

2003-08-14 Thread Christian Reis
On Thu, Aug 14, 2003 at 08:57:09AM -0400, Jon Willeke wrote: If you want to keep the convenience of a top-level CORBA module, perhaps you could adapt PyGTK's version selection code: use a .pth file to set the default ORB. A program that knows it needs a specific ORB could still import it

Re: [omniORB] Re: [pygtk] Conflicting omniORBpy and PyORBit

2003-08-14 Thread Christian Reis
On Thu, Aug 14, 2003 at 02:56:27PM +0800, James Henstridge wrote: If importing CORBA isn't always going to work, is it ever a good idea to import the module? If it is never a good idea to import CORBA, then should ORBs ever provide a toplevel module by that name? This definitely sounds

Re: [pygtk] Changing the Stock Buttons

2003-08-14 Thread Jan Weil
The (IMO) proper way to achieve this is to overwrite the original stock item. Use (untested): gtk.stock_add(gtk.STOCK_SAVE_AS, Rename, 0, , ) See http://www.moeraki.com/pygtkreference/pygtk2reference/gtk-functions.html#function-gtk--stock-add Jan I want to use the STOCK_SAVE_AS button, but I

[pygtk] missing range_rect, slider_start, slider_end from GtkRange

2003-08-14 Thread Stephen Kennedy
These members are protected in GtkRange so I assume that is why they are not automatically wrapped. I need to draw a map in the margin beside the scrollbar and account for differently placed/sized scrollbar arrows. (See http://meld.sf.net/screenshots.html for an example) Is it possible to find

[pygtk] threading and TextView

2003-08-14 Thread Felix Breuer
Hello *! I am experimenting with threading and GtkTextView and I have run into troubles. I took Cedric Gustin's example code [1] which works fine and made the thread change a TextView's buffer instead of a Button's label. Whenever the thread is run, however, the program hangs. I am at a loss.

Re: [pygtk] delete selection

2003-08-14 Thread Grzegorz Adam Hankiewicz
On 2003-08-05, Yang Zheng [EMAIL PROTECTED] wrote: Can I not delete iterator like this? Hmmm... can't say what you do wrong, but here's my deletion code, maybe it helps you: selection = self.list_view.get_selection() model, iter, = selection.get_selected() if iter: path =

Re: [pygtk] Gobject properties to PyObject attributes mapping

2003-08-14 Thread Christian Reis
On Sun, Aug 10, 2003 at 11:36:05AM +0200, Jan Weil wrote: Did you try this code? Are you suggesting I don't test my code submissions? :o) No; I don't have PyGTK2 available on my network. The problem is that if you assign to __properties in __init__, __setattr__ is called which calls

Re: [pygtk] Treeview Icons

2003-08-14 Thread James Henstridge
On 11/08/2003 5:04 AM, Colin Fox wrote: On Sun, 2003-08-10 at 11:30, Doug Quale wrote: Here is a simple example using icons in a TreeView. Thanks! That's perfect. Just out of curiosity, how would I show different images for when the item is expanded and collapsed? According to the C

Re: [pygtk] PyGTK+Thread problem (program freezes)

2003-08-14 Thread Christian Reis
On Thu, Aug 07, 2003 at 09:22:45AM -0700, [EMAIL PROTECTED] wrote: We were working with Red Hat 8 and 9. We noticed that PyGTK on Red Hat 8 (pygtk2-1.99.12) has threads turned off. Red Hat 9 does NOT have it turned off. We wondered if this was because it is common knowledge PyGTK threads

Re: [pygtk] Treeview Icons

2003-08-14 Thread Christian Reis
On Mon, Aug 11, 2003 at 10:16:38AM -0500, Doug Quale wrote: James Henstridge [EMAIL PROTECTED] writes: You just associate a model column with the pixbuf_expander_closed and pixbuf_expander_open properties instead of pixbuf. If I make a suggestion and James makes a different suggestion,

Re: [pygtk] Using Accessibility interface from PyORBit?

2003-08-14 Thread James Henstridge
On 13/08/03 04:52, Tessa Lau wrote: Hi all, I'm trying to use PyORBit to duplicate some of the functionality of AT-poke (the GNOME accessibility query tool). I haven't found any documentation on how to use CORBA, much less CORBA with Python. So far I've used orbit-idl-2 to process the

Re: [pygtk] Treeview Icons

2003-08-14 Thread Colin Fox
On Sun, 2003-08-10 at 11:30, Doug Quale wrote: Here is a simple example using icons in a TreeView. Thanks! That's perfect. Just out of curiosity, how would I show different images for when the item is expanded and collapsed? Thanks again! cf -- Colin Fox [EMAIL PROTECTED] CF Consulting Inc.

Re: [pygtk] Problem building PyGtk with new Python-2.3 on Win32.

2003-08-14 Thread Cedric Gustin
On Mon, 2003-08-11 at 15:27, Alif Wahid wrote: Hi folks, I've just been trying to build the latest CVS version of PyGtk on my Windows XP box to run with Python-2.3 and the Mingw32 GCC compiler, but sadly I couldn't do it due to a problem! I can compile all the files properly using the

Re: [pygtk] Win32: Problems with gtk.threads_init()

2003-08-14 Thread Cedric Gustin
On Mon, 2003-08-04 at 18:29, Maik Hertha wrote: I have an application that uses threads. As the call to gtk.threads_init() is wrapped with try: except:, there where no problems. As win32 for py-gtk is build with threadings on by default, the application start seems to hang on

Re: [pygtk] Changing the colour of row selection in gtk.TreeView

2003-08-14 Thread Geoff Bache
On Mon, 28 Jul 2003, Christian Reis wrote: On Mon, Jul 28, 2003 at 06:10:40PM +0200, Geoff Bache wrote: The TreeView has a style, but changing it only seems to affect the arrows at the left of the display. The actual information is in the columns, which are displayed by the CellRenderer.

[pygtk] gtk.DrawingArea xid

2003-08-14 Thread mammique
Hi, i'd like to get the xid of a gdk.DrawingArea object like i do with gdk_x11_drawable_get_xid in C. The only pygtk function i found wich looks like this is gtk.gdk.window_lookup but i don't understand how to use it after many tries. Can anybody help me ? Thanks. -- mammique [EMAIL PROTECTED]

[pygtk] cooperative threads with generators

2003-08-14 Thread Stephen Kennedy
Hi all, I've seen quite a few posts about threading problems in this group and am surprised to see that nobody recommended cooperative threading using generators. See http://www.daa.com.au/pipermail/pygtk/2001-October/002056.html and

Re: [pygtk] multiple windows?

2003-08-14 Thread Christian Reis
On Tue, Aug 05, 2003 at 12:16:22AM -0600, William Hanlon wrote: I would like to know how to have multiple windows running in the same python program. I have been following the drawingarea.py example in Just create a new Window() in a callback and call show() on it. It should `just work'. Take

Re: [pygtk] gnome.ui.Client connect shadows signal_connect

2003-08-14 Thread Stephen Kennedy
self.client = gnome.ui.Client() self.client.connect() # connect to session Note that this call shouldn't work if Client() inherits from GObject. Client does inherit from gtk.Object. Why wouldn't the derived method override and shadow the base class method? Could you please

[pygtk] Using Accessibility interface from PyORBit?

2003-08-14 Thread Tessa Lau
Hi all, I'm trying to use PyORBit to duplicate some of the functionality of AT-poke (the GNOME accessibility query tool). I haven't found any documentation on how to use CORBA, much less CORBA with Python. So far I've used orbit-idl-2 to process the Accessibility.idl file included with AT-SPI,

Re: [pygtk] Gobject properties to PyObject attributes mapping

2003-08-14 Thread Jan Weil
Iaki Garca Etxebarria schrieb: But IMO the main question is whether it is really advantageously to map the properties to attributes. I think so, it produces readable code, and many times is very natural. And, to me at least, the design of the properties api in gobject is thought with this kind of

Re: [pygtk] Gobject properties to PyObject attributes mapping

2003-08-14 Thread Jan Weil
Jan Weil schrieb: I don't like this idea either. Especially because it's quite easy to emulate this behaviour in Python (see example attached). That's obviously not an option if you had to wrap every gtk widget by hand. This one wouldn't let me sleep. But it's really fun (see example attached).

Re: [pygtk] Treeview Icons

2003-08-14 Thread Christian Reis
On Mon, Aug 11, 2003 at 10:16:38AM -0500, Doug Quale wrote: def init_view_columns(self): col = gtk.TreeViewColumn() col.set_title('Silly Example') render_pixbuf = gtk.CellRendererPixbuf() col.pack_start(render_pixbuf, expand=False)

[pygtk] Changing the Stock Buttons

2003-08-14 Thread Shaffer, Chris
Hi... Not really sure if there is an easy way to do this or not. I want to use the STOCK_SAVE_AS button, but I want the text to read 'Rename' instead. Is there an easy way to change that, or am I going to have to create my own button, and pack a box, label, and image into it? Thanks, Chris

Re: [pygtk] Cant load an .glade file.

2003-08-14 Thread Christian Reis
On Thu, Jul 31, 2003 at 08:21:21PM +0200, Kent Nyberg wrote: If i create a Gtk2 project in glade it workes fine, its only gnome projects that will not work. The message i get is: /detect-cd2.py

[pygtk] bugzilla reorganisation

2003-08-14 Thread James Henstridge
I have added pygtk and pyorbit products to bugzilla now, and had the associated bugs moved over (I got Luis to do this, so that it wouldn't send out loads of unwanted bugspam). The main reason for this was to allow better classification of pygtk bugs in the future. Also, a number of people

Re: [omniORB] Re: [pygtk] Conflicting omniORBpy and PyORBit

2003-08-14 Thread James Henstridge
On 3/08/2003 3:18 AM, Duncan Grisby wrote: On Friday 1 August, James Henstridge wrote: The only issue for packagers is how to deal with the top-level CORBA (and PortableServer, etc.) modules. One solution would be to install them only if they are not already there from a different ORB.

Re: [pygtk] Treeview Icons

2003-08-14 Thread Doug Quale
Here is a simple example using icons in a TreeView. Two things of note: There is no gobject.TYPE_ for pixbufs, so the example uses gtk.gdk.Pixbuf as the model column type. This was the only tricky thing to figure out in getting pixbufs in a TreeView. I don't know if gtk.gdk.Pixbuf is the

RE: [pygtk] PyGTK+Thread problem (program freezes)

2003-08-14 Thread Joe Shaw
On Thu, 2003-08-07 at 12:22, [EMAIL PROTECTED] wrote: I verified this by trying to write a PyGTK GUI in Red Hat 8 myself and it would freeze until I removed the GUI stuff. The threading implementation that comes stock with Red Hat 8 has issues, and threaded apps seem to hang pretty regularly

Re: [pygtk] Gobject properties to PyObject attributes mapping

2003-08-14 Thread Jan Weil
Christian Reis kiko at async.com.br wrote: Ah; Note that this is wrong here. You should not return None from getattr, or all lookups on the object for non-existent attributes will return None. This should be: try: return self.__dict__[key] except KeyError: raise

Re: [pygtk] PyGtk Examples

2003-08-14 Thread Malcolm Tredinnick
On Mon, 2003-08-11 at 20:28, Maik Hertha wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello PyGtk-World; I have ported the missing examples from the gtk-demo. To be as close as possible to the gtk-demo, I have changed the calling pygtk-demo.py file. Before finishing all I write

[pygtk] PyGtk Examples

2003-08-14 Thread Maik Hertha
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello PyGtk-World; I have ported the missing examples from the gtk-demo. To be as close as possible to the gtk-demo, I have changed the calling pygtk-demo.py file. Before finishing all I write a simple lexer for the source-code window. Who is the

Re: [pygtk] Gobject properties to PyObject attributes mapping

2003-08-14 Thread Jon Willeke
This may not be a democracy, but I would vote against this change. Merging namespaces like this is asking for trouble. If it is done at all, it should only be at the explicit request of the programmer (e.g., import gtk.__propertyHack__ as gtk). On Fri, 2003-08-08 at 15:20, Iñaki García

Re: [pygtk] Using Accessibility interface from PyORBit?

2003-08-14 Thread Tessa Lau
Aha, I had to do a pygtk.require('2.0') first. OK, so I can call bonobo.activation.query(). What do I call it with? How do I get a repo_ids as you mentioned in your previous mail? Is this stuff documented anywhere, even if from the C side? --Tessa

Re: [pygtk] Loading and reloading

2003-08-14 Thread Michal Chruszcz
Some strange characters appeared on my screen... Probably on Sunday 10 of August 2003 23:24, Christian Reis typed: I'm writing because of two problems. At first, I wanted to make a MessageDialog with a progress bar, while opening a process using popen2. My gtk.main() in this case stops

Re: [pygtk] Access glade's gtk.Tooltips group?

2003-08-14 Thread Christian Reis
On Thu, Jul 31, 2003 at 08:15:29PM +0200, Jan Weil wrote: I'm wondering whether it's possible to access the gtk.Tooltips group used by glade. So that I can add tooltips for widgets which are not part of the glade tree and call tooltips.disable() for this group. Hmmm, so you want to disable

RE: [pygtk] PyGTK+Thread problem (program freezes)

2003-08-14 Thread chris
Christian Thanks for the email. (We have the same 1st name!).. We were working with Red Hat 8 and 9. We noticed that PyGTK on Red Hat 8 (pygtk2-1.99.12) has threads turned off. Red Hat 9 does NOT have it turned off. We wondered if this was because it is common knowledge PyGTK threads

Re: [pygtk] Using Accessibility interface from PyORBit?

2003-08-14 Thread James Henstridge
On 13/08/03 04:52, Tessa Lau wrote: Hi all, I'm trying to use PyORBit to duplicate some of the functionality of AT-poke (the GNOME accessibility query tool). I haven't found any documentation on how to use CORBA, much less CORBA with Python. So far I've used orbit-idl-2 to process the

Re: [pygtk] Using Accessibility interface from PyORBit?

2003-08-14 Thread Tessa Lau
For folks following in my footsteps, I've unearthed a few references that describe how to use Python to talk to the Accessibility interfaces. (But read on for a question on marshalling callbacks.) I'm on travel this week and have had only occasional net access, so I've had to make do with the

Re: [omniORB] Re: [pygtk] Conflicting omniORBpy and PyORBit

2003-08-14 Thread Jon Willeke
I haven't used either ORB, so forgive me if I speak from a position of ignorance. With the introduction of the portable object adapter in CORBA 2.2, a program may need minimal changes to use one ORB or another, but you still need to choose at link time which to use. The last time I looked at

Re: [pygtk] GObject properties

2003-08-14 Thread Jan Weil
Jan Weil schrieb: But could someone please enlighten me, why am I supposed to implement 'do_set_property' and 'do_get_property'? Once again the source was with me. I collected my experiences as a newbie to Glib's type and object system approaching it from the Python site. For me there were some

[pygtk] multiple windows?

2003-08-14 Thread William Hanlon
Hi, I would like to know how to have multiple windows running in the same python program. I have been following the drawingarea.py example in the tutorial (http://www.moeraki.com/pygtktutorial/pygtk2tutorial/sec-DrawingMethods.html) and can't figure out how to extend it so that a second window is

Re: [pygtk] Changing the Stock Buttons

2003-08-14 Thread Tyler Lane
button = gtk.Button( stock=gtk.STOCK_SAVE_AS ) button.get_children()[0].get_children()[0].get_children()[1].set_label( Whatever you want here ) HTH On Wed, 2003-08-13 at 14:37, Shaffer, Chris wrote: Hi... Not really sure if there is an easy way to do this or not. I want to use the

Re: [pygtk] Using Accessibility interface from PyORBit?

2003-08-14 Thread Tessa Lau
James, Thanks for the reply. Do you have sample code that shows how to call these functions? By grepping around in /usr/lib/python2.2/site-packages I found a bonobo package, but I can't figure out how to import it. Ditto for repo_ids --- what's that, and how do I get it? Here's what I tried:

Re: [pygtk] set_style(get_style.copy()) changes behavior?

2003-08-14 Thread Christian Reis
On Tue, Aug 12, 2003 at 02:51:13PM -0400, george young wrote: [pygtk-1.99.16, gtk-2.2.2, python-2.3] In the following code, I had previously been changing some style attribute, then deleted the lines that set attribute, but left in the get_style;set_style, assuming this to be a no-op. Alas,

Re: [pygtk] Treeview Icons

2003-08-14 Thread Colin Fox
On Mon, 2003-08-11 at 08:16, Doug Quale wrote: James Henstridge [EMAIL PROTECTED] writes: You just associate a model column with the pixbuf_expander_closed and pixbuf_expander_open properties instead of pixbuf. If I make a suggestion and James makes a different suggestion, you would be

[pygtk] Loading and reloading

2003-08-14 Thread Michal Chruszcz
Hi, I'm writing because of two problems. At first, I wanted to make a MessageDialog with a progress bar, while opening a process using popen2. My gtk.main() in this case stops executing program, so I can't move further. I think there *must* be something like gtk.main(), but letting go through

Re: [pygtk] Loading and reloading

2003-08-14 Thread Christian Reis
On Mon, Aug 11, 2003 at 12:48:29AM +0200, Olivier Blin wrote: I'm writing because of two problems. At first, I wanted to make a MessageDialog with a progress bar, while opening a process using popen2. My gtk.main() in this case stops executing program, so I can't move further. I think

Re: [pygtk] cooperative threads with generators

2003-08-14 Thread Christian Reis
On Thu, Aug 14, 2003 at 10:40:15AM +0100, Stephen Kennedy wrote: I've seen quite a few posts about threading problems in this group and am surprised to see that nobody recommended cooperative threading using generators. See - FAQ 20.9 Take care, -- Christian Reis, Senior Engineer, Async

Re: [pygtk] Changing the Stock Buttons

2003-08-14 Thread Christian Reis
On Thu, Aug 14, 2003 at 11:06:58AM +0200, Jan Weil wrote: The (IMO) proper way to achieve this is to overwrite the original stock item. Use (untested): gtk.stock_add(gtk.STOCK_SAVE_AS, Rename, 0, , ) It does say that stock_add takes a list of 5-tuples, so it's probably more like:

Re: [pygtk] Loading and reloading

2003-08-14 Thread Jan Weil
Christian Reis schrieb: P.S. Would be that a big problem to create a search engine of list archive? Believe me, find there anything isn't easy... No, but most of the really useful answers are in the FAQ down there ;) Or you can either use google with 'site:www.daa.com.au [pygtk] bla' or even

Re: [pygtk] gnome.ui.Client connect shadows signal_connect

2003-08-14 Thread Christian Reis
On Fri, Aug 08, 2003 at 11:04:01AM +0100, Stephen Kennedy wrote: I couldn't find any examples of python GnomeClient usage and straight away ran into this: self.client = gnome.ui.Client() self.client.connect() # connect to session Note that this call shouldn't work if

Re: [pygtk] delete selection

2003-08-14 Thread Christian Reis
On Tue, Aug 05, 2003 at 09:42:56AM -0700, Yang Zheng wrote: (SimGuiClient.py:20194): Gtk-CRITICAL **: file gtktreeselection.c: line 491 (gtk_tree_selection_selected_foreach): assertion `has_next' failed. There is a disparity between the internal view of the GtkTreeView, and the GtkTreeModel.

Re: [pygtk] libglade and custom widgets

2003-08-14 Thread Christian Reis
On Wed, Jul 30, 2003 at 04:06:53PM +0200, Sebastian Henschel wrote: i could not manage to create custom widgets with python from a glade-file yet. i found the following unreplied question from two years ago in the archives: http://www.daa.com.au/pipermail/pygtk/2001-June/001418.html Did you