Re: [pygtk] A few pygtk2 questions.

2003-03-10 Thread Bernhard Herzog
"Gustavo J. A. M. " Carneiro <[EMAIL PROTECTED]> writes: > On Dom, 2003-03-09 at 06:51, Jason Monroe Martin wrote: > > My treeviews seem slow even on small tables compared to the clist in > > pygtk6.x. and I get this error from some of the data (WARNING **: > > Invalid UTF8 string passed to pang

Re: [pygtk] Strange change in event behavior in PyGTK2

2003-02-24 Thread Bernhard Herzog
James Henstridge <[EMAIL PROTECTED]> writes: > Christian Reis wrote: > > >Would it be correct, according to Python semantics, to pre-copy of > >the object then? And if so, what are the drawbacks of implementing > >things that way? > > > The drawback is that a number of GTK APIs simply don't work

[pygtk] Strange change in event behavior in PyGTK2

2003-02-22 Thread Bernhard Herzog
While porting Sketch to PyGTK2 I came across a strange change in the behavior of event objects in PyGTK2. The sample program below connects to the button press, motion and release events and stores the event object of the button_press event in an instance variable. In the motion event handler the

Re: [pygtk] Bug in bitmap_create_from_data

2003-01-20 Thread Bernhard Herzog
"Andrew P. Lentvorski, Jr." <[EMAIL PROTECTED]> writes: > The format specifier inside _wrap_gdk_bitmap_create_from_data in gtk/gdk.c > needs to be s# instead of s (bitmap data can contain null characters). > Presumably this bug affects any X_from_data functions. This has been fixed in CV

Re: [pygtk] type of bitmap_create_from_data

2003-01-14 Thread Bernhard Herzog
Eddie Kohler <[EMAIL PROTECTED]> writes: > Right, but the actual data string passed to gtk_bitmap_create_from_data() > is not a C string, but a packed array of bytes. (Bitmap data.) The correct > type for such a string seems to be const-guchar*; if you use const-gchar*, > pygtk barfs when you try

Re: [pygtk] Basic graphics primitives

2002-02-08 Thread Bernhard Herzog
Michael Gilfix <[EMAIL PROTECTED]> writes: > I'd like to build an application that uses pygtk to display > graphs. However, I'm having some problems using xoring to display > lines. It doesn't seem to display anything at all (whereas a regular > gc does). As you can imagine, it's very difficul

Re: [pygtk] Request for Comments: shorter widget class names

2001-09-12 Thread Bernhard Herzog
James Henstridge <[EMAIL PROTECTED]> writes: > The main changes are: > pango.Pango* -> pango.* > gtk.Gtk* -> gtk.* > gtk.Gdk* -> gtk.gdk.* Much better than the current naming scheme! The gtk.gdk.* looks a little strange, but I guess it comes from pygtk being a package. > There is one oth

Re: [pygtk] multiple inheritance not possible with ExtensionClass?

2001-05-03 Thread Bernhard Herzog
<[EMAIL PROTECTED]> writes: > I guess this means multiple inheritance (and thus mixin capability) is not > possible with subclasses of ExtensionClass objects. Am I going to have to > inject mixin methods into GtkObject to make them available? This is exactly the situation I mentioned in

Re: [pygtk] deriving classes from gtk.py

2001-04-22 Thread Bernhard Herzog
James Henstridge <[EMAIL PROTECTED]> writes: > On 11 Apr 2001, Bernhard Herzog wrote: > > However, IIRC, calling a baseclass' method in a method has to be done > > slightly different. E.g. > > > > class MyBox(GtkBaseClass): >

Re: [pygtk] deriving classes from gtk.py

2001-04-17 Thread Bernhard Herzog
Skip Montanaro <[EMAIL PROTECTED]> writes: > Tim> hi, > Tim> i'd like to use pygtk widget classes as base classes to my own, like > > Tim> class myVBox (GtkVBox): > Tim> ... > > Tim> now if i understand correctly, the python wrapping code in gtk.py > Tim> is planned to

Re: [pygtk] help understanding event loop

2000-03-23 Thread Bernhard Herzog
s important to connect to the destroy signal of the dialog so you can set the variable to None. This approach has the advantage that you can bind the same callback to several widgets, e.g. a button and a menu item, at once and the function doesn't even have to know to which widget

[pygtk] GtkCList.get_selectable always returns None

2000-03-14 Thread Bernhard Herzog
.defs Tue Mar 14 21:17:10 2000 @@ -373,7 +373,7 @@ (bool selectable))) (define-func gtk_clist_get_selectable - none + bool ((GtkCList clist) (int row))) -- Bernhard Herzog | Sketch, a drawing program for Unix [EMAIL PROTECTED] | http://sketch.sourceforge.net/ To unsubs

Re: [pygtk] Anti-aliasing ?

2000-03-13 Thread Bernhard Herzog
from gnome. FWIW, the development versions of Sketch contain some python-bindings for libart that can render into libart rgb buffers and even into PIL images (including alpha channels, but I haven't really tested that). These bindings are somewhat sketch specific, though, so it might not b

Re: [pygtk] Bug#59713: Strange interaction between gtk and math

2000-03-09 Thread Bernhard Herzog
ly uses libc's strtod to convert strings to numbers, this may be a bug in libc. On my system that's libc-2.1.2. Setting LC_CTYPE to C "solves" it. -- Bernhard Herzog | Sketch, a drawing program for Unix [EMAIL PROTECTED] | http://sketch.sourceforge.net/ To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Re: [pygtk] New signal

1999-10-26 Thread Bernhard Herzog
WroBELL <[EMAIL PROTECTED]> writes: > On Mon, 25 Oct 1999, WroBELL wrote: > > > On Mon, 25 Oct 1999, Bernhard Herzog wrote: > > > > > FWIW, Sketch contains a pretty generic mechanism for this kind of thing. > > > It's pure Python and completely

Re: [pygtk] New signal

1999-10-25 Thread Bernhard Herzog
ressed. IMO, if you already use Python, it makes more sense to implement mechanisms like this in Python than going through GTK. If you already have Sketch, it's in Sketch/Base/connector.py. If there's enough interest, I can make it available separately and write up some documentation. -- B

Re: [pygtk] events_pending() or mainiteration() hang when called

1999-07-07 Thread Bernhard Herzog
_main_run while gtk_main_iteration and gtk_events_pending don't do that for the calls to g_main_iteration and g_main_pending respectively. HTH Bernhard -- Bernhard Herzog | Sketch, a python based drawing program [EMAIL PROTECTED] | http://www.online.de/home/sketch/ To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Re: [pygtk] Problem with gtk.events_pending

1999-07-05 Thread Bernhard Herzog
); } I think it's really a bug in gtk, because gtk_main in gtkmain.c uses the GDK_THREADS_* macros around the call g_main_run while gtk_main_iteration_do and gtk_events_pending don't do that for the calls to g_main_iteration and g_main_pending respectively. Bernhard -- Bernhard

[pygtk] Problem with gtk.events_pending

1999-07-05 Thread Bernhard Herzog
window normally. I tried this with pygtk 0.6.1, Python 1.5.1 and 1.5.2 (both with threading enabled) on Linux. -- Bernhard Herzog | Sketch, a python based drawing program [EMAIL PROTECTED] | http://www.online.de/home/sketch/ To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Re: [pygtk] Modifying a GtkAdjustment

1999-06-07 Thread Bernhard Herzog
tr__; that's why 'print adj.lower' works. Looking at the sources of pygtk, I can't find a way to do this, short of creating a completely new adjustment object. It seems to me, though, that it wouldn't be hard to extend generate.py to also generate functions to modify these attribu

Re: [pygtk] Modifying a GtkAdjustment

1999-06-07 Thread Bernhard Herzog
wrapper around Xlib, are very similar. The rest of the GUI will take a lot more work. Now when I change the zoom factor in Sketch's canvas, I have to either change the adjustment's 'upper' and 'lower' or 'page_size' and the *increments. -- Bernhard Herzog | Sketch, a python based drawing program [EMAIL PROTECTED] | http://www.online.de/home/sketch/ To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

[pygtk] Modifying a GtkAdjustment

1999-06-06 Thread Bernhard Herzog
ange those values in C and call gtk_adjustment_changed afterwards to update e.g. a scrollbar that uses this adjustment. What's the point of having the changed() method, if I can't actually change the adjustment? Thanks in advance -- Bernhard Herzog | Sketch, a python based drawing prog