Re: [pygtk] button-press-event in pygtk2
On Wed, Jan 29, 2003 at 10:09:48PM -0600, Robert Lowe wrote: > I'm trying to capture mouse clicks on an empty window using pygtk2. You need to add an event mask: w.add_events(gtk.gdk.BUTTON_PRESS_MASK) See http://www.async.com.br/faq/pygtk/index.py?req=all#3.3 Dave Cook ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] button-press-event in pygtk2
I'm trying to capture mouse clicks on an empty window using pygtk2. Now, the code to do this is straight forward, and indeed, the exact same procedures work in C (as can be evidenced by the fact that rox-tasklist has menus) Here's the code that doesn't work: import pygtk pygtk.require("2.0") import gtk def f(widget, event): print "click" w=gtk.Window() w.set_decorated(0) w.connect("destroy", gtk.mainquit) w.connect("button_press_event", f) w.show_all() gtk.mainloop() Can you not detect mouse clicks in pygtk for some reason? ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] gtk.mainloop()
Hi Pablo, You need to run gtk.threads_init() in the same thread that you run gtk.mainloop(). John Pablo Endres wrote: Ok I've narrowed down what happens just before it freezes Heres whats being done: ## Start a thread to run the gtk.mainloop() self.rm = RunMain() print "Going to start"##test self.rm.start() print "Started " And RunMain is this class: import threading class RunMain(threading.Thread): "Class defined to run the gtk.mainloop without blocking the application" def __init__(self): threading.Thread.__init__(self) def run(self): gtk.mainloop() Is there anything wrong? This code works no problem on with pygtk-0.6.x on linux but I'm trying to make it work on pygtk-1.9x on win2000 ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] gtk.mainloop()
Ok I've narrowed down what happens just before it freezes Heres whats being done: ## Start a thread to run the gtk.mainloop() self.rm = RunMain() print "Going to start"##test self.rm.start() print "Started " And RunMain is this class: import threading class RunMain(threading.Thread): "Class defined to run the gtk.mainloop without blocking the application" def __init__(self): threading.Thread.__init__(self) def run(self): gtk.mainloop() Is there anything wrong? This code works no problem on with pygtk-0.6.x on linux but I'm trying to make it work on pygtk-1.9x on win2000 Muchas personas creen que piensan, cuando en realidad sólo están reordenando sus prejuicios. - William James Pablo Endres Centro de Datos GSM: +584127347610 Off: +584128085690 ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] gtk_widget_destroy
Hi guys, I'm still porting my app from pygtk-0.6.x to pygtk-1.9x. I've translated the .glade files with the script, but now some of my signal handlers don't work. I have a splash screen that has a timeout, wen it dies I useed to capture the gtk_widget_destroy event to launch my app. Now I get the following error: C:\tmp\ssemamonWin32>python splash.py ** (splash.py:584): WARNING **: could not find handler `gtk_widget_destroy' And wen I try to run the app withput the splashscreen I get the window up but it freezes, is there anything else that I have to have in mind? thanks in advance Muchas personas creen que piensan, cuando en realidad sólo están reordenando sus prejuicios. - William James Pablo Endres Centro de Datos GSM: +584127347610 Off: +584128085690 ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] test if window fully visible
Any suggestions on how to test whether a gtk.Window is fully visible, not obscured by other windows and not off the screen? I see that there is a symbol gtk.gdk.VISIBILITY_UNOBSCURED which looks relevant, but I don't know how to use it. I also experimented with self.connect('focus_in_event', self.focus_in_event) self.set_events(gdk.FOCUS_CHANGE_MASK| ... but self.focus_in_event is never called regardless of whether I give the window the focus or not. Thanks, John Hunter pygtk 1.99.14 ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Cannot find get_state() in pygtk2
On Wed, 2003-01-29 at 17:24, Roberto Cavada wrote: > I need to retrieve sensitive state of a widget. > FAQ states I can use the get_state() method, but unfortunately I could > not find any trace about that method, in my pygtk installation. > > >>> import gtk > >>> w = gtk.Window() > >>> w.get_state() > Traceback (most recent call last): >File "", line 1, in ? > AttributeError: 'gtk.Window' object has no attribute 'get_state' > Try simply this: w.state Apparently, there is a set_state() method, but no get_state(), only the 'state' attribute. IMHO, this makes sense, since getting an attribute has no side effects, so it can be a simple field; setting attributes should be done with set_xxx() functions, since there can be side effects. > Probably this is due to my configuration, pygtk is 1.99.14. > > About get_state(), code generator produces only the following warning > during the building phase. This does not seem connected to the > problem, though: > > > Could not write method GdkEvent.get_state: No ArgType for > GdkModifierType* > > Sorry to bother you all with that, but maybe you can figure out what > happens here. > > rob > > ___ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ -- Gustavo João Alves Marques Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Cannot find get_state() in pygtk2
I need to retrieve sensitive state of a widget. FAQ states I can use the get_state() method, but unfortunately I could not find any trace about that method, in my pygtk installation. >>> import gtk >>> w = gtk.Window() >>> w.get_state() Traceback (most recent call last): File "", line 1, in ? AttributeError: 'gtk.Window' object has no attribute 'get_state' Probably this is due to my configuration, pygtk is 1.99.14. About get_state(), code generator produces only the following warning during the building phase. This does not seem connected to the problem, though: > Could not write method GdkEvent.get_state: No ArgType for GdkModifierType* Sorry to bother you all with that, but maybe you can figure out what happens here. rob ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] GladeXML
On Wed, 2003-01-29 at 15:46, Pablo Endres wrote: > What changes do I have to make on a glade file created for pygtk-0.6.x so it >works with > the new interface?? Use the script libglade-convert (installed with libglade, if some (expat?) XML python module is found) to convert old .glade files to the new format. > > thanks in advance > > > > Muchas personas creen que piensan, > cuando en realidad sólo están reordenando sus > prejuicios. > - William James > > Pablo Endres > Centro de Datos > > GSM: +584127347610 > Off: +584128085690 > > ___ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ -- Gustavo João Alves Marques Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] GladeXML
What changes do I have to make on a glade file created for pygtk-0.6.x so it works with the new interface?? thanks in advance Muchas personas creen que piensan, cuando en realidad sólo están reordenando sus prejuicios. - William James Pablo Endres Centro de Datos GSM: +584127347610 Off: +584128085690 ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
RE: [pygtk] GdkEventMask's on pygtk-1.9x
Disregard this post... I've already found the answer -Mensaje original- De: Pablo Endres Enviado el: 29 Enero, 2003 11:18 Para: PyGTK List Asunto: [pygtk] GdkEventMask's on pygtk-1.9x Hi guys, I finally could make gtk work on my windows box (CRIBBSJ you were right there was another dll in winnt/system32). In the process of porting my app to pygtk-1.9x I can't find the GDK package necesary to se the DdkEventMask on my wigets. Does anyone know were they are or an equivalent?? This is the code I'm trying to run: import GDK ... self.globalDA.set_events(GDK.EXPOSURE_MASK | GDK.BUTTON_PRESS_MASK) Thanks in advance Muchas personas creen que piensan, cuando en realidad sólo están reordenando sus prejuicios. - William James Pablo Endres Centro de Datos GSM: +584127347610 Off: +584128085690 ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] GdkEventMask's on pygtk-1.9x
Hi guys, I finally could make gtk work on my windows box (CRIBBSJ you were right there was another dll in winnt/system32). In the process of porting my app to pygtk-1.9x I can't find the GDK package necesary to se the DdkEventMask on my wigets. Does anyone know were they are or an equivalent?? This is the code I'm trying to run: import GDK ... self.globalDA.set_events(GDK.EXPOSURE_MASK | GDK.BUTTON_PRESS_MASK) Thanks in advance Muchas personas creen que piensan, cuando en realidad sólo están reordenando sus prejuicios. - William James Pablo Endres Centro de Datos GSM: +584127347610 Off: +584128085690 ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
RE: [pygtk] win32 pygtk-python
-Mensaje original- De: CRIBBSJ [mailto:[EMAIL PROTECTED]] Enviado el: 28 Enero, 2003 05:19 Para: Pablo Endres; Cedric Gustin CC: PyGTK List Asunto: RE: [pygtk] win32 pygtk-python >I had a similar problem recently. This turned out to be the problem: >I had previously installed an older version of hte Gtk 2.0 runtime files >into my c:\winnt\system32 directory. Then, when I installed the newer Gtk >2.0 files from dropline.net, it installed them in a different location >c:\program files\common files\Gtk\ Well, my path was set up so that any >programs first looked in my \winnt\system32 directory, so, even though I had >installed the latest Gtk files, it was finding the old ones first. After I >figured it out, and finished punching my forehead, I simply deleted the gtk >dll files from \winnt\system32 and the program found the correct ones under >\program files\common files. >So, do you possibly have an earlier version of the gtk 2.0 runtime files in >a different directory? I checked and found some files from gtk-1.2.x and deleted them, but I keep getting the same error. I think it's a problem with the distribution. If you have any other ideas let me know. >Hope this helps! >Jamey. ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Changing expand/shrink at runtime
On Wed, Jan 22, 2003 at 05:36:24PM +0100, Alessandro Pellizzari wrote: > But I created thos widgets with "Y expand" TRUE and now those containers > (now "empty") keep on expanding vertically. > > Is there a way to set "Y expand" to FALSE at runtime (and then back TRUE > when re-show()-n?) I often do that in my app (though I usually do that with label). The only way I have found to make this work is setting a fixed size for the container widget that holds the hiding component. You can do that in Glade by using the third tab (Common), or in pure PyGTK (ooh) by calling GtkWidget.set_usize(width, height) If there's a better solution I'd sure like to hear it. Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] pygnome2 porting guide?
Hi. PyGtk Faq 2.3, "a checklist of changes to migrate an application from PyGTK-0 to PyGTK-2"... is really useful! Can anyone provide something similar for porting to pygnome2? Thanks, Andy. --- Andy W. Schmeder ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Changing expand/shrink at runtime
Hi, I am writing a Python+Gtk2+Glade2 application. I placed a button that, when pressed, hides some widgets. But I created thos widgets with "Y expand" TRUE and now those containers (now "empty") keep on expanding vertically. Is there a way to set "Y expand" to FALSE at runtime (and then back TRUE when re-show()-n?) Thanks. -- Alessandro Pellizzari ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] active row selection in GtkTreeView
Hi all I am hoping that someone will be able to help me out. What I want to do is to create a treeview (a list really) where one of the columns is a toggle button i.e. like in the list_store.py demo. The catch is that I want to be able to toggle the buttons _without_ having the row actually being selected -- I want the current row selection to be preserved (as the Gimp's Layers dialoge when you go to select the active dialog). At the moment I'm not having much luck. I can't even find a callback that lets me know when a row as being activated... Any help/suggestions would be greatly appreciated thanks Richard ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Re: GtkSourceView wrapped
> I finally got around to making this work. At the moment syntax > highlighting does not work for some reason, but I haven't played with it > that much. Line numbering works though. That is excellent news. Is gtksourceview officially a part of GNOME? I see it's in cvs.gnome.org but it doesn't seem to be included in debian unstable for instance: http://packages.debian.org/cgi-bin/search_contents.pl?word=gtksourceview&searchmode=searchfilesanddirs&case=insensitive&version=unstable&arch=i386 I'd love to see this as part of the official gnome-python. Stephen. --- http://meld.sf.net steve9000 users.sf.net ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/