Re: [pygtk] Curves, splines and libart
On Ter, 2003-03-04 at 15:16, [EMAIL PROTECTED] wrote: Does anyone know how to draw an spline-curve? Or any other fancy type of curve that the user can drag and tweak? Is using art (libart) an option? libart in python? no, sorry. Maybe you should try gnomeprint. If you want interactivity, you should use gnome.canvas. They are both in the gnome-python package. Cheers... Christian / Cybolic ___ 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/
Re: [pygtk] Question about codegen.py
On Qua, 2003-03-05 at 02:45, Malcolm Tredinnick wrote: What is the purpose of the --register option to codgen/codegen.py? It _appears_ to be passed in all the various types from some the modules (as in the cases of atk and pango), but I cannot work out what it does to my own satisfaction. Can somebody explain it? It instructs the code generator to include an extra .defs file. The .defs file usually contains type definitions only, but no functions or methods. It's just to allow you to use those types in your main .defs file. It's the #include foo.h equivalent of codegen. Malcolm -- 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/
Re: [pygtk] Curves, splines and libart
libart in python? no, sorry. Okay, but does anyone know _how_ one can create a curve? I've though about using four x,y coordinates, start_x, start_y, modify_left_x, modify_left_y, modify_right_x, modify_right_y, and end_x, end_y, and then calculating a straight line from start_x,start_y to end_x,end_y, modifying the line afterwards, but I can't quite get my head wrapped around how. Maybe you should try gnomeprint. If you want interactivity, you should use gnome.canvas. They are both in the gnome-python package. I'll look, but does it handle curves? And also, I'd rather use something in Gtk or program it myself to avoid to many dependencies. Cheers... Cybolic ___ 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] applets libglade
Hi, just 2 short questions related to gnome-python2 (1.99.15) 1.) I try to create a panel applet with myapplet = gnome.applet.Applet() and it just segfaults, is this the correct usage ? 2.) I create some windows with glade (pygtk2 1.99.15), to use it I do something like: xml = gtk.glade.XML(gladefile) this works fine, but it immidiately shows the window ... is there any way to load it invisible and set it to visible manually later ? I need to fill some parts of the window before it is visible. thanks, Martin -- Martin Preishuber [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/
Re: [pygtk] applets libglade
On Wed, 2003-03-05 at 23:29, Johan Dahlin wrote: ons 2003-03-05 klockan 19.24 skrev Martin Preishuber: Hi, just 2 short questions related to gnome-python2 (1.99.15) 1.) I try to create a panel applet with myapplet = gnome.applet.Applet() and it just segfaults, is this the correct usage ? Something like this: def sample_factory(applet, iid): label = gtk.Label(Success!) applet.add(label) applet.show_all() return gtk.TRUE gnome.applet.bonobo_factory(OAFIID:GNOME_PythonAppletSample_Factory, gnome.applet.Applet.__gtype__, hello, 0, sample_factory) thanks :) 2.) I create some windows with glade (pygtk2 1.99.15), to use it I do something like: xml = gtk.glade.XML(gladefile) this works fine, but it immidiately shows the window ... is there any way to load it invisible and set it to visible manually later ? I need to fill some parts of the window before it is visible. Go into glade, mark the window, go the Common tab, uncheck Visible. thanks again ... how comes, that I feel somehow stupid now ? :| Martin -- Martin Preishuber [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/
Re: [pygtk] Curves, splines and libart
On Wed, 5 Mar 2003 [EMAIL PROTECTED] wrote: Okay, but does anyone know _how_ one can create a curve? You need to go get a basic computer graphics textbook. Computer Graphics: Principles and Practice in C (2nd Edition) by Foley, et al. is one of the canonical references. Splines require that you play with the derivatives and match those up as well. Normally, the control points are related to concavity changes on the derivatives. Good luck, -a ___ 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] Setting pushed color for a toggle
I'd like to change the color of a ToggleButton when it is pushed in: preferably the background color, but the text color would work too. I would guess that you can do this by setting the right color for the right state. However, I can't find any documention about what state applies when. This is probably obvious to the experts, but it needs a lot more discussion for a beginner like me. For example, how is active different from selected? What state is a toggle in when it is pressed? Even worse, I don't know when to change with the button itself and when to change the label that displays the text (it's child). I've tried everything that seemed obvious with no success. Desperately seeking documentation. -Dan ___ 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] applets libglade
ons 2003-03-05 klockan 19.24 skrev Martin Preishuber: Hi, just 2 short questions related to gnome-python2 (1.99.15) 1.) I try to create a panel applet with myapplet = gnome.applet.Applet() and it just segfaults, is this the correct usage ? I forgot this in my last mail. This is not the expected behavior and is now fixed in CVS. -- Johan Dahlin [EMAIL PROTECTED] Async Open Source ___ 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] Setting pushed color for a toggle
On Wednesday 05 March 2003 16:31, Johan Dahlin wrote: Use widget.modify_bg(state, color), eg: button.modify_bg(gtk.STATE_ACTIVE, gtk.gdk.color_parse(#00ff00)) Actually, I had tried that, but there is yet another tricky bit. The toggle gets re-drawn with the new color, but then get immediately drawn again in prelight mode. Is there anything that defines the color conventions for the drawing modes? For example, prelight is normally lighter than normal, but how do active and selected relate? -Dan ___ 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] pyorbit-1.99.3/configure
Hi, I had some trouble with the configure script that comes with pyorbit on our Alpha at work. The problem is ./libtool --config reports export_dynamic_flag_spec=. This causes sed to exit with an error in the following line. PYORBIT_LIBS=`echo $PYORBIT_LIBS | sed -e s/$export_dynamic//` So PYORBIT_LIBS ends up being empty, which causes trouble later on. Wrapping an if around the above statement seems to fix the problem. if test x$export_dynamic != x; then PYORBIT_LIBS=`echo $PYORBIT_LIBS | sed -e s/$export_dynamic//` fi PS Thanks for the great python ORBit bindings. Python is an excellent language for experimenting at the client side and pyorbit seems to work quite well. -- Bowie Owens CSIRO Mathematical Information Sciences phone : +61 3 9545 8055 fax: +61 3 9545 8080 mobile : 0425 729 875 email : [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/
Re: [pygtk] pyorbit-1.99.3/configure
Bowie Owens wrote: Hi, I had some trouble with the configure script that comes with pyorbit on our Alpha at work. The problem is ./libtool --config reports export_dynamic_flag_spec=. This causes sed to exit with an error in the following line. PYORBIT_LIBS=`echo $PYORBIT_LIBS | sed -e s/$export_dynamic//` So PYORBIT_LIBS ends up being empty, which causes trouble later on. Wrapping an if around the above statement seems to fix the problem. if test x$export_dynamic != x; then PYORBIT_LIBS=`echo $PYORBIT_LIBS | sed -e s/$export_dynamic//` fi PS Thanks for the great python ORBit bindings. Python is an excellent language for experimenting at the client side and pyorbit seems to work quite well. Thanks for the bug report. That problem has been fixed in CVS, so shouldn't bother you in the next PyORBit release. The other feature people might like in the next PyORBit release is the ability to load up IDL files at runtime (as an alternative to typelibs). James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ ___ 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] GObject reference handling
I have recently been looking into the problem of disapearing member variables on GObject wrappers: http://bugzilla.gnome.org/show_bug.cgi?id=92955 I have a fairly good idea of why this happens: the cycle GC system thinks that the only references held on the wrapper are part of cycles, as it doesn't know about the hack in pygtk to resurrect the wrapper, so asks the instance dictionary to clear itself. I believe the way to solve this problem is to get rid of the hacks in pygtk :) I outline my proposed solution in the comment on the bug dated 2003-03-05 06:16. I also have an initial patch to implement this solution. Unfortunately, things aren't quite working correctly. The garbage collector never seems to call the GObject wrapper's tp_clear() method, so the wrapper (and GObject end up getting leaked). If anyone on the list has experience with the Python cycle GC, I would appreciate it if you could read over my reasoning, and hopefully spot any obvious mistakes. If I can get this working, I would like to apply it for the next pygtk release. Thanks, James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ ___ 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] fatal problem with import gnome.ui
Hello, I recently installed redhat 8 (fresh install - not upgrade) and then installed the gtk and gnome bindings (1.99.15 and pyorbin 1.99.3) Now when I run an app that previously worked with the 7.2 install of rh I get: Fatal Python error: could not import bonobo.ui Aborted so I go interactive: Python 2.2.1 (#1, Aug 30 2002, 12:15:30) [GCC 3.2 20020822 (Red Hat Linux Rawhide 3.2-4)] on linux2 Type help, copyright, credits or license for more information. import bonobo.ui Traceback (most recent call last): File stdin, line 1, in ? File /usr/lib/python2.2/site-packages/gtk-2.0/bonobo/__init__.py, line 7, in ? ORBit.load_typelib('Bonobo') RuntimeError: could not load typelib import bonobo import bonobo.ui Now I don't actually import bonobo or bonobo.ui in my app, so I try this: Python 2.2.1 (#1, Aug 30 2002, 12:15:30) [GCC 3.2 20020822 (Red Hat Linux Rawhide 3.2-4)] on linux2 Type help, copyright, credits or license for more information. import gnome.ui Fatal Python error: could not import bonobo.ui Aborted Any clues? -- * Rob Brown-Bayliss * = * zoism.org ___ 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] fatal problem with import gnome.ui
Rob Brown-Bayliss wrote: Hello, I recently installed redhat 8 (fresh install - not upgrade) and then installed the gtk and gnome bindings (1.99.15 and pyorbin 1.99.3) Now when I run an app that previously worked with the 7.2 install of rh I get: Fatal Python error: could not import bonobo.ui Aborted so I go interactive: Python 2.2.1 (#1, Aug 30 2002, 12:15:30) [GCC 3.2 20020822 (Red Hat Linux Rawhide 3.2-4)] on linux2 Type help, copyright, credits or license for more information. import bonobo.ui Traceback (most recent call last): File stdin, line 1, in ? File /usr/lib/python2.2/site-packages/gtk-2.0/bonobo/__init__.py, line 7, in ? ORBit.load_typelib('Bonobo') RuntimeError: could not load typelib import bonobo import bonobo.ui Now I don't actually import bonobo or bonobo.ui in my app, so I try this: Python 2.2.1 (#1, Aug 30 2002, 12:15:30) [GCC 3.2 20020822 (Red Hat Linux Rawhide 3.2-4)] on linux2 Type help, copyright, credits or license for more information. import gnome.ui Fatal Python error: could not import bonobo.ui Aborted You will need to get an updated version of the libbonobo package. The one that came with RH8 was missing a few files (the Bonobo typelib is the important one here). James. -- Email: [EMAIL PROTECTED] WWW: http://www.daa.com.au/~james/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/