Re: [pygtk] A quick pointer to thred information.
On Mon, 8 May 2000, George Farris wrote: > Can someone point me to a quick tutorial and example programs about > threads and pygtk. Any info would be helpful. > First make sure that python was compiled with thread support, and if you didn't compile pygtk yourself, make sure it was compiled with thread support. Now you can write your program just like any other multithreaded python program, except that you should call threads_enter() and threads_leave() before and after any gtk code outside of the gtk thread. Also note that idle, timeout and input functions are not called with the gtk lock, so remember to call threads_enter/leave if you make gtk calls in one of these callbacks. James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] new development snapshot
On Mon, 8 May 2000, Tom Cato Amundsen wrote: > James Henstridge wrote: > > > > I have put up another tarball of the new extension class based pygtk. It > > is available at: > > ftp://ftp.daa.com.au/pub/james/python/pygtk-0.7.0-unstable-dont-use.tar.gz > It seems like you missed gtk/gdk.defs. Only gtk.defs and > gtk-extrafuncs.defs is > mentioned as EXTRA_DIST in gtk/Makefile.am. Alright. The updated tarball is now on the ftp site. I even ran make distcheck on it, so it should build. As I said in the first message, it is still not finished, so don't be surprised if things don't quite work right (I would like some feedback though). James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] A quick pointer to thred information.
Can someone point me to a quick tutorial and example programs about threads and pygtk. Any info would be helpful. -- George Farris - VE7FRG [EMAIL PROTECTED] - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] new development snapshot
On Mon, 8 May 2000, Tom Cato Amundsen wrote: > James Henstridge wrote: > > > > I have put up another tarball of the new extension class based pygtk. It > > is available at: > > ftp://ftp.daa.com.au/pub/james/python/pygtk-0.7.0-unstable-dont-use.tar.gz > It seems like you missed gtk/gdk.defs. Only gtk.defs and > gtk-extrafuncs.defs is > mentioned as EXTRA_DIST in gtk/Makefile.am. My mistake. I will put up a replacement snapshot soon. Until then, you can grab the files from CVS. > > Tom Cato James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] Re: Your Win32 PyGtk (Where is it?)
At 21:53 06.05.00 -0700, Hamida wrote: >Greetings Hans, > >I found an elogious comment regarding your port of PyGtk to Win32 >(compiled with VC++). I, howver, was unable to use your gtk.pyd There is now such file. The file you probably mean is _gtk.pyd . >(my python is complaining about some .dll ) Are you aware about such a >problem ? > Not really. Which dll is missing? PyGtk is not self contained. It does obviously require the Gtk+ binaries. You may eihter use the dlls from my web site: http://hans.breuer.org/dia/gtk+-bin-2000-03-04.zip or give them provided with gimp a try (I have only tested the previous version). >Could you suggest a turn around (or may be a latest version) > The "official" site is: http://hans.breuer.org/ports/ Latest version: http://hans.breuer.org/ports/pygtk-2000-04-04.zip and there are currently no plans for an immediate update, because the CVS version of Gtk+ (Win32) is slightly broken ... Have Fun, Hans Hans "at" Breuer "dot" Org --- Tell me what you need, and I'll tell you how to get along without it.-- Dilbert - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] new development snapshot
James Henstridge wrote: > > I have put up another tarball of the new extension class based pygtk. It > is available at: > ftp://ftp.daa.com.au/pub/james/python/pygtk-0.7.0-unstable-dont-use.tar.gz It seems like you missed gtk/gdk.defs. Only gtk.defs and gtk-extrafuncs.defs is mentioned as EXTRA_DIST in gtk/Makefile.am. Tom Cato - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] new development snapshot
I have put up another tarball of the new extension class based pygtk. It is available at: ftp://ftp.daa.com.au/pub/james/python/pygtk-0.7.0-unstable-dont-use.tar.gz As before, it is not yet ready to replace the 0.6.x versions of pygtk, but it is getting better. You will probably find that a lot of your programs just work (or almost work) with the new code. If you want to run a program without installing the test release, remember to import the ltihooks module before gtk (this makes sure it finds the extensions correctly). It is still not complete, but it is getting there. James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] add_entries in MenuFactory
Hi, If you're using the gtk item factory, then I think you can just put an _ before the letter you want underscored. E.g., send "_File". I didn't write the code I'm looking at but it looks like we create a GtkItemFactory like this: accel_group = gtk.GtkAccelGroup() self.fItemFactory = gtk.GtkItemFactory(gtk_type, ''%id(self), accel_group) And then create the items like this: if defn.fLabel != None: disp_path = '/' + RemoveSlash(defn.fLabel) item_type = '' else: disp_path = '/sep' item_type = '' item = (disp_path, '', self.__CB_ItemActivate, 0, item_type) self.fItemFactory.create_items([item]) We access the item like this: menu_item = self.fItemFactory.get_widget(RemoveUnderscore(disp_path)) Where RemoveUnderscore are RemoveSlash are this: def RemoveUnderscore(s): """ Remove any underscore chars from given string. """ parts = string.split(s, '_') retval = parts[0] for part in parts[1:]: retval = str(retval) + str(part) return retval def RemoveSlash(s): """ Remove any underscore chars from given string. """ parts = string.split(s, '/') return string.join(parts, '') Hope that helps... - Stephan -- On Mon, 8 May 2000 [EMAIL PROTECTED] wrote: > Greetings, > > Does anybody know how to put underscores under a selected letter > of the items in a menu bar ? (You know the now traditional _File > -underscore under F- means F should pop-down the File menu... > > By the way I do not want to add an explicit accelerator which will yield > to ALT+ Whaterver in the menu > > > Thanks all > > _ > > LaBoufarikoise > > > - > To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED] > - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] add_entries in MenuFactory
On Mon, 8 May 2000 [EMAIL PROTECTED] wrote: > Greetings, > > Does anybody know how to put underscores under a selected letter > of the items in a menu bar ? (You know the now traditional _File > -underscore under F- means F should pop-down the File menu... > > By the way I do not want to add an explicit accelerator which will yield > to ALT+ Whaterver in the menu Use the GtkItemFactory class. It was the successor of the GtkMenuFactory code (which the code in GtkExtra.py is based on). It will handle the underscores and setting up the correct accelerators. > > > Thanks all > > _ > > LaBoufarikoise > James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] add_entries in MenuFactory
Greetings, Does anybody know how to put underscores under a selected letter of the items in a menu bar ? (You know the now traditional _File -underscore under F- means F should pop-down the File menu... By the way I do not want to add an explicit accelerator which will yield to ALT+ Whaterver in the menu Thanks all _ LaBoufarikoise - To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]