Re: [pygtk] Clickable MenuItem with submenu?

2008-10-23 Thread Miguel Ángel García
Here you are: #buind the menu menu = gtk.Menu() #create an item item = gtk.ImageMenuItem(gtk.STOCK_COPY) item.connect ("activate", myfunction, None) #append it menu.append(item) #built the submenu submenu = gtk.Menu() #well... append the same item built before submenu.append(item) #build ano

Re: [pygtk] How to do_size_allocate properly in a gtk.Viewport subclass?

2008-10-23 Thread Greg Ewing
Joel Hedlund wrote: > So don't draw concentric circles on your test widgets, kids! Yeah. And if you've seen some of the wilder optical illusions around, you'll know that if you choose just the wrong pattern it'll twitch all by itself, without you having to write any code at all! -- Greg ___

[pygtk] Problem with shrinking a Table on a ScrolledWindow

2008-10-23 Thread José Luis
Hello people! I'm having a trouble when I shrink a window that contains the following widgets tree: + ScrolledWindow + Viewport + Table + Frame1 + Frame2 . When I expand my main window, the w

Re: [pygtk] How to do_size_allocate properly in a gtk.Viewport subclass?

2008-10-23 Thread Joel Hedlund
Joel Hedlund wrote: > Now, my real gripe is that zooming looks "twitchy" for small widgets > with the widget-in-table-in-viewport solution, and that will be painful > for users to look at. I'm hoping I've done some stupid oversight > somewhere (help?). Maybe that will go away if you glue the wid

Re: [pygtk] Writting a widget with native scrolling support

2008-10-23 Thread Gustavo J. A. M. Carneiro
On Thu, 2008-10-23 at 15:42 +0200, Laszlo Nagy wrote: > Gustavo J. A. M. Carneiro wrote: > > http://www.daa.com.au/pipermail/pygtk/2006-January/011668.html > > > Yes, this was the only related post that I could find on the internet. > But I could not use it for anything because it does not tell

Re: [pygtk] Writting a widget with native scrolling support

2008-10-23 Thread Laszlo Nagy
Gustavo J. A. M. Carneiro wrote: > http://www.daa.com.au/pipermail/pygtk/2006-January/011668.html > Yes, this was the only related post that I could find on the internet. But I could not use it for anything because it does not tell how to do it. It says: "For custom widgets, check the method

Re: [pygtk] gtk.MessageDialog doesn't work on windows

2008-10-23 Thread Frédéric
Le 23/10/2008, "Timo" <[EMAIL PROTECTED]> a écrit: >The getLink() from above does indeed get called from within a thread, >not the main loop. Would this be the problem? Yes, no doubt! >Because, in the same >thread, I'm also moving a progressbar and filling up a treeview, and >they seem to work f

Re: [pygtk] How to do_size_allocate properly in a gtk.Viewport subclass?

2008-10-23 Thread Joel Hedlund
Thanks for your suggestion! It works quite well, however I do have some gripes with this solution, mostly because of stuff I left out of my original mail for the sake of brevity. So here goes: John Finlay wrote: I'm not sure what behavior you are looking for so I'll assume that you have one wi

Re: [pygtk] gtk.MessageDialog doesn't work on windows

2008-10-23 Thread Timo
Frédéric schreef: > Le 23/10/2008, "Timo" <[EMAIL PROTECTED]> a écrit: > > >> def errorDlg(string): >>s = "An error occured during this operation!" >>errordlg = gtk.MessageDialog(type=gtk.MESSAGE_ERROR, >> message_format=s, buttons=gtk.BUTTONS_OK) >>errordlg.format_secondary_text(str

Re: [pygtk] gtk.MessageDialog doesn't work on windows

2008-10-23 Thread Frédéric
Le 23/10/2008, "Timo" <[EMAIL PROTECTED]> a écrit: >def errorDlg(string): >s = "An error occured during this operation!" >errordlg = gtk.MessageDialog(type=gtk.MESSAGE_ERROR, >message_format=s, buttons=gtk.BUTTONS_OK) >errordlg.format_secondary_text(string) >errordlg.run() >er

[pygtk] gtk.MessageDialog doesn't work on windows

2008-10-23 Thread Timo
I have the following piece of code in my program: def errorDlg(string): s = "An error occured during this operation!" errordlg = gtk.MessageDialog(type=gtk.MESSAGE_ERROR, message_format=s, buttons=gtk.BUTTONS_OK) errordlg.format_secondary_text(string) errordlg.run() err

Re: [pygtk] Filechooserbutton callback

2008-10-23 Thread John Finlay
Frédéric wrote: > On jeudi 23 octobre 2008, John Finlay wrote: > > >>> Using the selection-changed signal does not work; it is never emited. >>> >> Works for me on: >> >> Python 2.5.1, PyGTK 2.12.0 (Gtk+ 2.12.5) >> > > Wich plateform? > Fedora 8 and Ubuntu Hardy _