Re: [pygtk] Alt + Arrow behaviour
On Tue, Sep 10, 2002 at 05:39:11PM +0100, Graham Ashton wrote: > I've managed to connect a callback to the key_press_event on my > top-level window, and it works fine. > > The only problem is that every time I press the Alt-arrow combination > the focus moves around between the various widgets in the interface > (i.e. just as it normally does). You'll need to emit_stop_by_name("key_press_event") inside your callback if you don't want any other handlers to run. And maybe return gtk.TRUE, too; these things are a bit confusing to me still. 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] Alt + Arrow behaviour
Hi. I'd like to be able to use Alt+Left-arrow and Alt+Right-arrow in my application (to simulate the forward and back key bindings in your average web browser). I've managed to connect a callback to the key_press_event on my top-level window, and it works fine. The only problem is that every time I press the Alt-arrow combination the focus moves around between the various widgets in the interface (i.e. just as it normally does). How do you disable the focus switching? -- Graham Ashton ___ 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] problem generating diacanvas python wrappers
On Fri, 2002-09-06 at 20:16, Mathew Yeates wrote: > Hi, not sure if this is a pygtk problem or a diacanvas problem (I also > posted > to the diacanvas list). > > I have pygtk 1.99.13 installed and when I try and generate python > wrappers for diacanvas > I get into an infinite loop. > > --- > IOError: [Errno 24] Too many open files: 'diacanvascallbacks.defs' > make: *** [diageometry.c] Error 1 > - > > Does this look like a pygtk error or a diacanvas error?? Actually it's both. I use a BASH specific construction in the script that generates this file. If sh is not a link to bash (which is the case on basically all non-Linux systems), this operation will fail, resulting in an empty diacanvascallbacks.defs. My fault. However, it seems like the pygtk parser can't handle empty files. I don't know if it should be called a bug, since empty .defs files are highly unlikely... Regards, Arjan BTW. I fixed it, and a working version is now in CVS. ___ 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] create private signal for derived from gtk class
Hello! I have tried to create private signal for my class. Now it looks like: -- - - - -- - - - - - - - - - - - - - - - -- import gtk, gobject class A (gtk.Window, gobject.GObject): def __init__ (self): gobject.GObject.__init__ (self) gtk.Window.__init__ (self) gobject.signal_new ("no_undo", A, gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ()) inst = A() print gobject.signal_list_names (inst) print gobject.signal_list_names (gtk.Window) - - - -- - - - - - - - - - - - - - - - - - - - I got this as result: ('no-undo', 'set-focus', 'frame-event', 'activate-focus', 'activate-default', 'move-focus', 'keys-changed') ('no-undo', 'set-focus', 'frame-event', 'activate-focus', 'activate-default', 'move-focus', 'keys-changed') Is there way to create 'no-undo' signal for the A class only (not for Window)? -- ... Evgeny ... [AlsaPlayer: Nothing] ___ 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] bug in 1.99.13 and fix
pygtk-codegen-2.0 will fail on a defs file which includes another empts defs file (this is the case for diacanvas). This is because scmexpr.parse() returns an empty tuple for the empty file and StartParsing in scmexpr.py will see no argument. This causes line 81 in scmexpr.py to be executed and the existing parse tree is fed to handle. This causes an infinite loop. Fix: in scmexpr.py change the beginning lines of StartParsing to if arg == (): tuples=() elif type(arg) == types.StringType: tuples = parse(open(arg)) Mathew -- _ |)` | | | |_ /(]__) /(]___) /(]___) ___(]_) / / ___ 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] problem generating diacanvas python wrappers
Hi, not sure if this is a pygtk problem or a diacanvas problem (I also posted to the diacanvas list). I have pygtk 1.99.13 installed and when I try and generate python wrappers for diacanvas I get into an infinite loop. --- (cd . \ && /hsgi/mathew/root/bin/pygtk-codegen-2.0 \ --register diacanvas.defs \ --override diageometry.override \ --prefix pydiageometry diageometry.defs) > gen-diageometry.c \ && cp gen-diageometry.c diageometry.c \ && rm -f gen-diageometry.c Traceback (most recent call last): File "/hsgi/mathew/root/share/pygtk/2.0/codegen/codegen.py", line 772, in ? File "/hsgi/mathew/root/share/pygtk/2.0/codegen/codegen.py", line 748, in main File "/hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py", line 82, in startParsing File "/hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py", line 86, in handle File "/hsgi/mathew/root/share/pygtk/2.0/codegen/defsparser.py", line 16, in include File "/hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py", line 82, in startParsing File "/hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py", line 86, in handle File "/hsgi/mathew/root/share/pygtk/2.0/codegen/defsparser.py", line 16, in include File "/hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py", line 82, in startParsing File "/hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py", line 86, in handle File "/hsgi/mathew/root/share/pygtk/2.0/codegen/defsparser.py", line 16, in include File "/hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py", line 82, in startParsing File "/hsgi/mathew/root/share/pygtk/2.0/codegen/scmexpr.py", line 86, in handle etc,etc IOError: [Errno 24] Too many open files: 'diacanvascallbacks.defs' make: *** [diageometry.c] Error 1 - Does this look like a pygtk error or a diacanvas error?? Mathew -- _ |)` | | | |_ /(]__) /(]___) /(]___) ___(]_) / / ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/