Re: [pygtk] Documentation recommendations
On Thu, Aug 11, 2005 at 05:33:06PM -0400, Andrew Conkling wrote: > chintzy. The only other option of which I can think is some HTML > pages, but I don't know how I'd use them in my program (other than > launching a browser). Well, that might not be so bad. Take a look at the webbrowser module in the standard lib. It tries to be somewhat cross-platform, i.e. using KDE or Gnome to launch the browser, or the default the user has set in OS X or windows. Dave Cook ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] UIManager and MenuToolButton
Is there a way to use a MenuToolButton with UIManager? I would like to do something like: Unfortunately, this does not seem to work. Has anyone succeeded in using a MenuToolButton with UIManager? Don -- Don Allingham GRAMPS - Open Source Genealogy http://www.gramps-project.org ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Mouse Coordinates?
On 8/11/05, Michael D'Ambrosio <[EMAIL PROTECTED]> wrote: > I want to get the mouse coordinates whenever I click on a widget (in my > case, it's an embedded mozilla browser). I cannot find the proper class. > Any direction would be greatly appreciated. Thank you. > Do a widget.connect("clicked", callback, callback_data) and define the callback function: def callback(widget, event, callback_data): x, y = event.get_coords() Also refer to: http://www.pygtk.org/pygtk2tutorial/sec-TheoryOfSignalsAndCallbacks.html and http://www.pygtk.org/pygtk2tutorial/sec-Events.html HTH, Vinay ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Mouse Coordinates?
I want to get the mouse coordinates whenever I click on a widget (in my case, it's an embedded mozilla browser). I cannot find the proper class. Any direction would be greatly appreciated. Thank you. Mike ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: Fwd: [pygtk] Re: UIManager toolbar stock image size
Themes are applied globally to GTK by the user. There is a theme selector that comes with gtk (gtkthemeselector) that will let you choose your theme. If you want to mess with the themes programatically I think you need to look at the styles classes. http://pygtk.org/pygtk2reference/class-gtkrcstyle.html http://pygtk.org/pygtk2reference/class-gtkstyle.html -Chris On Thu, Aug 11, 2005 at 05:47:56PM +, Vinay Reddy wrote: > > Its depricated because you are supposed to use themes to set sizes. If you > > override the themes you will not get a consistant look and feel. > > > If I createad my own toolbar, it would be easy to get images of custom > sizes using Image.set_from_stock(, ), but my toolbar is > created using the UIManager class (from a string). > > Related to themes, I could only find IconTheme, which can only be used > for individual icons. How can I set the theme for the whole > application? Google didn't help me much; rather, I couldn't extract > much out of google :-( > > Regards, > Vinay ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Documentation recommendations
2005/8/11, Andrew Conkling <[EMAIL PROTECTED]>: > [snip] >The only other option of which I can think is some HTML > pages, but I don't know how I'd use them in my program (other than > launching a browser). Does anyone have any middle-of-the-road > solution? Did you thought to use gtkhtml to render your help pages? If your app has to run on windows as well unfortunatly this is not a solution, a few days ago we had a similar discussion, try to look in the ML. cheers -- Gian Mario Tagliaretti PyGTK GUI programming http://www.parafernalia.org/pygtk/ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Documentation recommendations
I'm brainstorming on how to provide documentation in my program. I'd rather not make use of Gnome help (i.e. yelp's browser) because I'm trying to avoid the additional dependencies. However, I'm not really sure what else I could do that would be effective. I don't really want to provide just a simple textview with text, because that seems chintzy. The only other option of which I can think is some HTML pages, but I don't know how I'd use them in my program (other than launching a browser). Does anyone have any middle-of-the-road solution? -- http://aconkling.blogspot.com ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] run shell commands from pygtk GUI; threading?
> "Dave" == Dave Aitel <[EMAIL PROTECTED]> writes: Dave> I actually included this exact problem as an example in the Dave> Beginners Python book, which I think Amazon lets you browse Dave> into. The code in the book is under the Python license. No Dave> doubt they have some sort of website with all the code too, Dave> although I haven't seen it yet. :> THanks Dave, I did some searching around in the amazon pages but didn't find the example. Could you post a code snippet here? Thanks, JDH ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] gtk.TreeView
On 8/11/05, Luigi Pantano <[EMAIL PROTECTED]> wrote: > how to remove (or select) a item from a gtk.TreeView? 1) model.remove(iter) to remove a row from a model 2) treeview.get_selection().select_path(path) to select a path in a TreeView Refer to http://www.pygtk.org/pygtk2tutorial/sec-TreeModelInterface.html for more info on TreeModels/Views... HTH, Vinay ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] gtk.TreeView
how to remove (or select) a item from a gtk.TreeView? -- Luigi Pantano --- IPUG - Italian Python User Group www.italianpug.org https://py-tips-tricks.python-hosting.com/ --- ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] pygtk + win32
How to compile the pygtk 2.7.3 on windows? -- Luigi Pantano --- www.italianpug.org https://py-tips-tricks.python-hosting.com/ --- ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: Fwd: [pygtk] Re: UIManager toolbar stock image size
> Its depricated because you are supposed to use themes to set sizes. If you > override the themes you will not get a consistant look and feel. > If I createad my own toolbar, it would be easy to get images of custom sizes using Image.set_from_stock(, ), but my toolbar is created using the UIManager class (from a string). Related to themes, I could only find IconTheme, which can only be used for individual icons. How can I set the theme for the whole application? Google didn't help me much; rather, I couldn't extract much out of google :-( Regards, Vinay ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: Fwd: [pygtk] Re: UIManager toolbar stock image size
Its depricated because you are supposed to use themes to set sizes. If you override the themes you will not get a consistant look and feel. -Chris On Thu, Aug 11, 2005 at 02:34:34PM +, Vinay Reddy wrote: > > the size can be set with: > > http://www.pygtk.org/pygtk2reference/class-gtktoolbar.html#method-gtktoolbar--set-icon-size > > > > but this method is deprecated since 2.4 > It works fine, but why was it deprecated? What's the alternative? > > Regards, > Vinay Reddy > ___ > pygtk mailing list pygtk@daa.com.au > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] run shell commands from pygtk GUI; threading?
I actually included this exact problem as an example in the Beginners Python book, which I think Amazon lets you browse into. The code in the book is under the Python license. No doubt they have some sort of website with all the code too, although I haven't seen it yet. :> -dave John Hunter wrote: matplotlib has a mode to use latex to generate text in the figure using dvipng. When running in a pygtk app, I am getting an IOError on calls like stdin, stdout, stderr = os.popen3(command) err = stderr.read() or stdout.read(). The error I get is: File "/usr/lib/python2.4/site-packages/matplotlib/texmanager.py", line 120, in make_dvi err = stderr.read() IOError: [Errno 4] Interrupted system call Since matplotlib has the ability to run in pure image or GUI mode, I can run the same script w/o pygtk and do not get this problem, but reliably get it when running under pygtk. My best guess is that I am being fouled up by the pygtk threading machinery, but can't be sure. Is there a safe way to make system calls from pygtk? Version and platform info below. Thanks, JDH uname -a Linux peds-pc311 2.6.10-5-386 #1 Fri Jun 24 16:53:01 UTC 2005 i686 GNU/Linux python Python 2.4.1 (#2, Mar 30 2005, 21:51:10) [GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. import gtk gtk.pygtk_version (2, 6, 1) ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Fwd: [pygtk] Re: UIManager toolbar stock image size
> the size can be set with: > http://www.pygtk.org/pygtk2reference/class-gtktoolbar.html#method-gtktoolbar--set-icon-size > > but this method is deprecated since 2.4 It works fine, but why was it deprecated? What's the alternative? Regards, Vinay Reddy ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] interference between gtk.gdk.threads_init() and SIGCHLD handling
On Thu, 2005-08-11 at 15:26 +0100, Gustavo J. A. M. Carneiro wrote: > On Thu, 2005-08-11 at 16:21 +0200, Radek Vykydal wrote: > > Hello, > > > > I wrote a python module which forks and execes a child. > > In the parent I made (with signal.signal()) handler to > > catch SIGCHLD and the parent calls gtk.main() to wait for the > > child's exit(). The SIGCHLD handler calls os.waitpid() > > and gtk.main_quit(). > > > > The module works fine alone, but when I incorporate it > > into application which is calling gtk.gdk.threads_init() before > > running it's mainloop, the > > SIGCHLD handler isn't called (after the the child's exit()). > > > > Could you tell me the reason and, possibly, recommend me > > how I can wait for the child in better way? > > (requires pygtk >= 2.6) > > def child_cb(pid, status): > # do something > > gobject.child_watch_add(pid, child_cb) > unfortunately, I must use pygtk 2.0 ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] interference between gtk.gdk.threads_init() and SIGCHLD handling
On Thu, 2005-08-11 at 16:21 +0200, Radek Vykydal wrote: > Hello, > > I wrote a python module which forks and execes a child. > In the parent I made (with signal.signal()) handler to > catch SIGCHLD and the parent calls gtk.main() to wait for the > child's exit(). The SIGCHLD handler calls os.waitpid() > and gtk.main_quit(). > > The module works fine alone, but when I incorporate it > into application which is calling gtk.gdk.threads_init() before > running it's mainloop, the > SIGCHLD handler isn't called (after the the child's exit()). > > Could you tell me the reason and, possibly, recommend me > how I can wait for the child in better way? (requires pygtk >= 2.6) def child_cb(pid, status): # do something gobject.child_watch_add(pid, child_cb) > > Thanks, > > Radek > > ___ > pygtk mailing list pygtk@daa.com.au > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ -- Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> The universe is always one step beyond logic ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] run shell commands from pygtk GUI; threading?
matplotlib has a mode to use latex to generate text in the figure using dvipng. When running in a pygtk app, I am getting an IOError on calls like stdin, stdout, stderr = os.popen3(command) err = stderr.read() or stdout.read(). The error I get is: File "/usr/lib/python2.4/site-packages/matplotlib/texmanager.py", line 120, in make_dvi err = stderr.read() IOError: [Errno 4] Interrupted system call Since matplotlib has the ability to run in pure image or GUI mode, I can run the same script w/o pygtk and do not get this problem, but reliably get it when running under pygtk. My best guess is that I am being fouled up by the pygtk threading machinery, but can't be sure. Is there a safe way to make system calls from pygtk? Version and platform info below. Thanks, JDH > uname -a Linux peds-pc311 2.6.10-5-386 #1 Fri Jun 24 16:53:01 UTC 2005 i686 GNU/Linux > python Python 2.4.1 (#2, Mar 30 2005, 21:51:10) [GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import gtk >>> gtk.pygtk_version (2, 6, 1) ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] interference between gtk.gdk.threads_init() and SIGCHLD handling
Hello, I wrote a python module which forks and execes a child. In the parent I made (with signal.signal()) handler to catch SIGCHLD and the parent calls gtk.main() to wait for the child's exit(). The SIGCHLD handler calls os.waitpid() and gtk.main_quit(). The module works fine alone, but when I incorporate it into application which is calling gtk.gdk.threads_init() before running it's mainloop, the SIGCHLD handler isn't called (after the the child's exit()). Could you tell me the reason and, possibly, recommend me how I can wait for the child in better way? Thanks, Radek ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Dynamically menus with UIManager
Don Allingham a écrit : I've started using UIManager to handle my toolbar and menubar. The action groups and ui merging have proven to be very powerful. However, there are a few cases where I would like to have dynamic menus attached to the menubar. Examples include a history mechanism and a bookmark list. Any ideas on how I would dynamically add menu items to a menu that is generated by UIManager? Thanks. Don Does anyone know if glade can, or will be able to generate uimanager xml files? Joel Dimbernat ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Re: PyGTK for MacOS X?
is there a PyGTK installer for MacOS X available somewhere? I use darwinports to install gtk (but not pygtk), and then just use the setup script in the pygtk tarball. Thanks. I hope that works "out of the box". Sincerely, Wolfgang Keller ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Using a VBox as an Expander's child
Andrew Conkling a écrit : In my program, I have an expander with two labels in a VBox as its child. See http://pygmy.berlios.de/images/pygmywindow.png as reference. The slight problem is that when using the program, only the middle portion activates the expander. It's like the area that would be occupied if a label were the child. Neither in Glade nor in the PyGTK reference could I find anything about making a larger activating area; is this possible? Thanks, Andrew I think you shoud use only one Label with a pango layout instead of two different labels. That's not really a solution but could help... Joel ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/