[pygtk] urllib2 use within an idle_add generator

2009-07-21 Thread Jamie Norrish
Within my application, one piece of functionality is to loop over a number of items, fetch a URL resource for each, and update items in a TreeView based on the contents of the returned resource. Since I have something similar, that doesn't involve the URL fetching, I wanted to implement it in the

[pygtk] FileChooserButton - signal when the dialog closes

2007-06-22 Thread Jamie Norrish
Hi there. Back in February Felix Rabe asked about how to know when a FileChooserButton's associated dialog is closed (so that the filename of the selected file can be retrieved from it). As far as I can see, there was no particular response. Having now stumbled upon the same issue, does anyone

Re: [pygtk] FileChooserButton - signal when the dialog closes

2007-06-22 Thread Jamie Norrish
Thanks for the suggestions, Felix and Phillip. However, the idea of having to manually create a FileChooserDialog and associate it with the button seems to defeat half the point of having the button in the first place, which is that it can handle the dialog side of things itself. Surely it is

Re: [pygtk] Alt+Return accelerator

2005-12-30 Thread Jamie Norrish
Nikos Kouremenos writes: eventhough both pygtk ref and I think FAQ has it: I certainly couldn't find this information in the Reference (grepping through it), and while the FAQ has gtk.keysyms.Return in an example piece of code, it wasn't obvious that the question it was answering was my

Re: [pygtk] Alt+Return accelerator

2005-12-30 Thread Jamie Norrish
John Finlay writes: gtk.accelerator_parse('altReturn') will return: (65293, flags GDK_MOD1_MASK of type GdkModifierType) Well, I'm slightly shocked and rather abashed, since this was what I originally tried, along with a number of variations, before posting my original message, and

[pygtk] Alt+Return accelerator

2005-12-28 Thread Jamie Norrish
I wish to specify an accelerator of Alt+Return for a Properties menu item, as per the GNOME HIG, but cannot find how to express the Return part. I have tried various possibilities to no avail, and searching is made difficult by the other uses of the word. What is the correct form, and where is

[pygtk] Setting preview text on FontButton's FontSelectionDialog

2005-10-22 Thread Jamie Norrish
Is there any way to set the preview text for the FontSelectionDialog that is automatically created by a FontButton? I assume not, given that FontButton has a set_title method but not set_preview_text, but I'd like to be wrong - I don't want to forego the benefits of using FontButton. Jamie --

[pygtk] Problem with notebook page switching in Windows thread

2004-11-07 Thread Jamie Norrish
On a Win2K box using the latest PyGTK and gladewin32 GTK+ runtime, I get a complete application freeze when running notebook.set_current_page() inside a thread, if the notebook is not currently on the page that's set in the call. Since I don't have my own Windows box I didn't have the chance to

[pygtk] FontSelection set_font_name() returns false on valid name

2004-10-18 Thread Jamie Norrish
When passing the font name returned by gtk.FontSelection's get_font_name to set_font_name, that method always returns False and the font is not set in the selection. The font name is valid, and the font specified is available on the system (having selected it, it is used in displaying text). This

Re: [pygtk] FontSelection set_font_name() returns false on valid name

2004-10-18 Thread Jamie Norrish
John Finlay writes: It needs to be added to a window before the font lists are populated. Ah, thank you! I had tried calling the method after it had been added to its container (which is not a window), but not after the container had been added to the window. Jamie -- Artefact Publishing: