[pygtk] GtkCList.get_selectable always returns None
The method GtkCList.get_selectable always returns None, regradless of whether the row is selectable or not. This is due to a bug in gtklists.defs. This bug is present in at least gnome-python 1.0.51 and 1.0.52. Here's a patch: --- gtklists.defs.~1~ Sat Jan 22 11:36:17 2000 +++ gtklists.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 unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] Re: pygtk and GTK+ tutorial
Berthold Hoellmann <[EMAIL PROTECTED]> écrit: > I've found the pygtk mailing list later, and am now subscribed to it. Good. We might meet there, once in a while :-). > I also found a question concerning the colorsel example, but could not > find any answers. I hope you found answers in the code I provided in my preceding reply... My only sources of information are the "GTK v1.2 tutorial" for C, the examples installed with the `pygtk' distribution in the SuSE 6.2 Linux CD-ROMs, and all archived messages I could find of the `pygtk' mailing list. I made a Python script to clean out MHonArc generated clutter, so I can use Gnus and RMAIL instead of Netscape to read, shuffle and sort everything :-). I'm sure that a lot of clues slipped between my fingers while handling that big lot of messages, but I also found some answers, sometimes well hidden within the code samples provided for unrelated questions. It helped me. By trying to closely translate all tutorial examples from C to Python, even if I did not reinsert the comments from the tutorial, I have the hope it might be useful to others. It's 2/3 done by now. I would guess many of us did that work already, but I did not stumble on such results yet :-). -- François Pinard http://www.iro.umontreal.ca/~pinard To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] gtkhtml question: undefined reference.....
Ok, I downloaded gtkhtml from cvs (checkout) and compiled it and installed it. So far it's fine. Next I compiled gnome-python with -with-gtkhtml and again it compiles fine. Next I do a from gtkhtml import * and I get an undefined reference. I am not home so I can't remember exactly, but it had to do with gnome-print-new or something. I have all the latest gnome helix packages, that is gnome-print and gnome-print-devel among others are there. I understand this is CVS gtkhtml and it might not work or even compile, so if this is not a trivial bug, can someone point me to the latest stable gtkhtml that worked with gnome-python bindings of this widget? Also, when I build the rpm and add all the gtkhtml files, I get a failed dependency for libgtkhtml.so.0 even though it's there and has ldconfigured. Any ideas? To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] need help with threading...
hi... i got a problem: i want to change a label in a new thread, but it only works, when i use the Thread.join() methode to wait for the end of the thread. (and that's not useful) is there a possibility to do it without a Thread.join()? thanx - sifu from gtk import * from threading import * class Test(Thread): def __init__(self, window, *args): Thread.__init__(self, name="TestThread") self.window=window def run(self): self.window.label.set_text("neuer Text") class Oberf(GtkWindow): def __init__(self): GtkWindow.__init__(self, WINDOW_TOPLEVEL) self.set_title("Muhkuh") self.connect("destroy", mainquit) box=GtkVBox() self.add(box) box.show() self.label=GtkLabel("muh") box.pack_start(self.label) self.label.show() button=GtkButton("thread") button.connect("clicked", self.button_clicked) box.pack_start(button) button.show() self.show() def button_clicked(self, *args): th=Test(self) th.start() # th.join() def mainloop(self): mainloop() oberf=Oberf() oberf.mainloop() To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] Re: pygtk and GTK+ tutorial
[EMAIL PROTECTED] (Berthold Höllmann) writes: > I try to learn about GTK+ programming using python. I read the tutorial > and port the examples to python. But I can't get "colorsel.py" working > properly. The GtkColorSelectionDialog does not set the drawingarea's > color. Any hint, or shall I send my code? This has been discussed recently on the `pygtk' mailing list: you should be there. Here is the way I did it (style may be questionable, I'm still learning :-). Note that in `destroy_window', I used `return TRUE' because the C code did this, but it works more nicely if you write `return FALSE'. I later found in another experiment that the late allocation of `gc' in the callback could have been done sooner, but after having called `window.realize()' within the first few lines of main(). It also seems you have to call `window.show_now()' instead of `window.show()' if you want to draw in the window as part of your initialisation. The documentation on these things is very terse, so far that I could see :-). from gtk import * import GDK colorseldlg = None drawingarea = None gc = None def color_changed_cb(widget, colorsel): window = drawingarea.get_window() global gc if not gc: gc = window.new_gc() red, green, blue = colorsel.get_color() gc.foreground = window.colormap.alloc(65535*red, 65535*green, 65535*blue) # Above could also have been: #text = '#%04x%04x%04x' % (65535*red, 65535*green, 65535*blue) #gc.foreground = window.colormap.alloc(text) draw_rectangle(window, gc, TRUE, 0, 0, window.width, window.height) # The above to get around the fact that `window.clear()' is missing. def area_event(widget, event): if event.type == GDK.BUTTON_PRESS and colorseldlg is None: global colorseldlg colorseldlg = GtkColorSelectionDialog('Select background color') colorsel = colorseldlg.colorsel colorsel.connect('color_changed', color_changed_cb, colorsel) colorseldlg.show() return TRUE return FALSE def destroy_window(widget, event): mainquit() return TRUE def main(): window = GtkWindow() window.set_title('Color selection test') window.set_policy(TRUE, TRUE, TRUE) window.connect('delete_event', destroy_window) global drawingarea drawingarea = GtkDrawingArea() drawingarea.size(200, 200) drawingarea.set_events(GDK.BUTTON_PRESS_MASK) drawingarea.connect('event', area_event) window.add(drawingarea) drawingarea.show() window.show() mainloop() main() -- François Pinard http://www.iro.umontreal.ca/~pinard To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
[pygtk] gnome-python-1.0.52 fixlet
It appears that a conflict between gnome/config.py and _gnomemodule.so persists in this version. config.py _gnomemodule.so private_list_section gnome_config_private_section_contents gnome_private_list_section list_section gnome_config_section_contents gnome_list_section I would like to see this fixed; can I help? Or am I all wet. Randolph To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
Re: [pygtk] Anti-aliasing ?
Torsten Landschoff <[EMAIL PROTECTED]> writes: > On Mon, Mar 13, 2000 at 02:05:39PM +0100, Hrvoje Niksic wrote: > > > > What version of gnome-python do you have installed on your system? > > > > 1.0.50-3 (Debian). > > Hmm, does anybody know if this feature is needed by a lot of > programs? I have no idea what feature is in fact brkoen; I've only tried to run the program, and it doesn't work. > In that case please file an important bug against python-gnome. I am > working on new packages but they will not get into potato unless > they fix a release critical bug. How typical. :-( To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]