[pygtk] pygtk2 TextView cursor with black background

2002-10-30 Thread Brad Tonkes
This is probably more of a GTK2 question rather than being pygtk-specific, 
but I wonder if anyone here has come across it.  I have a TextView whose 
background is set to black via a gtkrc file:

style foo
{
text[NORMAL] = {1.0, 1.0, 1.0}
base[NORMAL] = {0.0, 0.0, 0.0}
}
widget_class *GtkTextView style foo

which works fine.  However, the TextView cursor is drawn in black and can't
be seen against the black background.  Note that the cursor is set to be
visible with set_cursor_visible(gtk.TRUE), and it is visible if the style
isn't applied.  Is there any way to make the cursor visible against a black
background?  I tried (hoped) that adding a fg[NORMAL] = {1.0, 1.0, 1.0} would
work, but it doesn't seem to.

thanks,
brad


___
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] updating with combo-entry

2002-10-30 Thread mekkaoui omar
Hi,

I use glade to develop my application.

I would like to update information on a window after 
selecting an entry in the combo.  But, I don't know which 
signal I will use to associate it to an updating function.
Omar Mekkaoui
THEMA - université de Cergy-Pontoise
Economie des Transports
___
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] updating with combo-entry

2002-10-30 Thread Christian Reis
On Wed, Oct 30, 2002 at 11:11:45AM +0100, mekkaoui omar wrote:
 I would like to update information on a window after 
 selecting an entry in the combo.  But, I don't know which 
 signal I will use to associate it to an updating function.

Heh. You're starting to discover things that nobody is supposed to know.
There is no direct signal for Combo changed, but you can catch the
Combo's entry's insert_text/delete_text or changed and it will work,
though it will call your callback many times. The Combo is a container,
wrapping a button and an entry, and only the entry actually holds the
state the Combo is in. So:

combo.entry.connect(changed, my_callback)

And be glad you're not using an OptionMeny, because there *is no such
thing* for gtk1.2's OM.

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/



Re: [pygtk] Wrapping gtksourceview

2002-10-30 Thread Johan Dahlin
Em Qua, 2002-10-30 às 03:14, Ahmad Baitalmal escreveu:
 Ok,
 So it compiled just fine with no errors. 
 I installed it using make install in the gnome-python dir.
 It tells me that it's installed and I do see the library files in the
 site-packages.
 
 Here is where I'm stuck
 I import gtk, works fine,
 I import gtkhtml2, works fine,
 I import gtksourceview, kablam, here is what I get
 
  /usr/lib/python2.2/site-packages/gtksourceviewmodule.so: undefined
 symbol: gtk_source_buffer_get_tag_end
 
 The library is linking at compile time correctly (-lgtksourceview), and
 I checked gtksourceview.c and confirmed a wrapper for that function are
 there. 
Verify with ld, so it's actually linked against libgtksourceview.o and
verify so the symbol, gtk_source_buffer_get_tag_end exists in the
library by using nm.

 
 What am I missing ?
 
 Thx
 Ahmad
 
 On Tue, 2002-10-29 at 13:09, Ahmad Baitalmal wrote:
 On Tue, 2002-10-29 at 06:34, Johan Dahlin wrote:
 Nice, i hope this can enter gnome-python in cvs soon.
 
 I'm close, or so it seems.
 
 I got how the type thing works, I'm not sure how to deal with this too
 few arguments deal.
 I thought it might be like the two overridden _wrap_..._stream functions
 in gtkhtml2's wrapping (am I way off here?). Is that why those two
 functions were overridden in gtkhtml2.override?
 
 Thx,
 Compile errors:
 
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.2
 -I/usr/include/pygtk-2.0 -I/usr/local/include/gtksourceview
 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
 -I/usr/include/pango-1.0 -I/usr/include/Xft2 -I/usr/include/freetype2
 -I/usr/X11R6/include -I/usr/include/atk-1.0 -g -O2 -Wall -std=c9x -c
 gtksourceview.c -MT gtksourceviewmodule_la-gtksourceview.lo -MD -MP -MF
 .deps/gtksourceviewmodule_la-gtksourceview.TPlo  -fPIC -DPIC -o
 gtksourceviewmodule_la-gtksourceview.lo
 gtksourceview.c: In function `_wrap_gtk_source_buffer_load':
 gtksourceview.c:415: too few arguments to function
 `gtk_source_buffer_load'
 gtksourceview.c: In function `_wrap_gtk_source_buffer_save':
 gtksourceview.c:428: too few arguments to function
 `gtk_source_buffer_save'
 gtksourceview.c: In function
 `_wrap_gtk_source_buffer_load_with_character_encoding':
 gtksourceview.c:441: too few arguments to function
 `gtk_source_buffer_load_with_character_encoding'
 gtksourceview.c: At top level:
 gtksourceview.c:840: redefinition of
 `_wrap_gtk_source_buffer_iter_has_syntax_tag'
 gtksourceview.c:819: `_wrap_gtk_source_buffer_iter_has_syntax_tag'
 previously defined here
 gtksourceview.c:819: warning:
 `_wrap_gtk_source_buffer_iter_has_syntax_tag' defined but not used
 make[2]: *** [gtksourceviewmodule_la-gtksourceview.lo] Error 1
 make[2]: Leaving directory
 `/home/ahmad/Projects/gnome-python/gnome-python/gtksourceview'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory
 `/home/ahmad/Projects/gnome-python/gnome-python'
 make: *** [all] Error 2
 
 
 
 -- 
 
 -  - --   - --- -- -   -
 Ahmad Baitalmal
 BitBuilder
 web: http://www.bitbuilder.com
 -  - --  
 -- --- -- - 
 -
 ___
 pygtk mailing list   [EMAIL PROTECTED]
 http://www.daa.com.au/mailman/listinfo/pygtk
 Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
 -- 
 
 -  - --   - --- -- -   -
 Ahmad Baitalmal
 BitBuilder
 web: http://www.bitbuilder.com
 -  - --  
 -- --- -- - 
 -
 ___
 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] libglade, python and gnome widgets: segmentation fault

2002-10-30 Thread Padraig Brady
Juri wrote:
 Hi,

 I was going to ask about how to get Gnome widgets to work with
 libglade and python but apparently I solved the problem. I've seen
 other people complaining about the problem but no solution, so I
 decided to post this anyway; consider it a bug report. I was getting
 this error when I tried running a project file containing Gnome stuff
 using glade.py (which is included at least in the Debian python-glade
 package):

 GnomeUI-CRITICAL **: file gnome-app.c: line 208 (gnome_app_new): assertion 
`appname != NULL' failed.

 Gtk-WARNING **: invalid cast from (NULL) pointer to `GnomeApp'
 zsh: segmentation fault

 The problem is avoided if I import gnome.ui. No need to call any
 functions or instantiate any classes, it just has to be imported. This
 seems massively unintuitive to a person with relatively little
 Gnome/Gtk programming experience and absolutely no experience with
 Glade; it would be nice if this was clearly documented (or fixed)
 somewhere.

OK I would like to release a python app using libglade that
just has a dependency on gtk and not gnome. The above is still
happening on my RH7.3 system so is there a work around or
is it possible at all to not import gnome.ui ?

thanks,
Pádraig.

___
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: gtk radio button

2002-10-30 Thread Skip Montanaro

balu I am new to py-gtk. How do I get which one of the radio buttons
balu are selected in a particular group?

Off the top of my head, I'm not sure.  I haven't actually used PyGtk in over
a year.  You'll be better off asking on the pygtk mailing list, to which
I've cc'd this note.

-- 
Skip Montanaro - [EMAIL PROTECTED]
http://www.mojam.com/
http://www.musi-cal.com/
___
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] updating with combo-entry

2002-10-30 Thread mekkaoui omar
Hi,

I use glade to develop my application.

I would like to update information on a window after 
selecting an entry in the combo.  But, I don't know which 
signal I will use to associate it to an updating function.

Thanks in advance. 
Omar Mekkaoui
THEMA - université de Cergy-Pontoise
Economie des Transports
Tel : (33) 1 34 25 63 16
___
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] Wrapping gtksourceview

2002-10-30 Thread Ahmad Baitalmal




Forgive me,

The problem below is caused by the call to the original functions from the _wrap* funcitons.

The original functions have a third argument or type GError** (in/out).

Is there an example of a correct way to handle this?



Thx

On Tue, 2002-10-29 at 13:09, Ahmad Baitalmal wrote:

On Tue, 2002-10-29 at 06:34, Johan Dahlin wrote:
Nice, i hope this can enter gnome-python in cvs soon.

I'm close, or so it seems.

I got how the type thing works, I'm not sure how to deal with this too
few arguments deal.
I thought it might be like the two overridden _wrap_..._stream functions
in gtkhtml2's wrapping (am I way off here?). Is that why those two
functions were overridden in gtkhtml2.override?

Thx,
Compile errors:

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.2
-I/usr/include/pygtk-2.0 -I/usr/local/include/gtksourceview
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/pango-1.0 -I/usr/include/Xft2 -I/usr/include/freetype2
-I/usr/X11R6/include -I/usr/include/atk-1.0 -g -O2 -Wall -std=c9x -c
gtksourceview.c -MT gtksourceviewmodule_la-gtksourceview.lo -MD -MP -MF
.deps/gtksourceviewmodule_la-gtksourceview.TPlo  -fPIC -DPIC -o
gtksourceviewmodule_la-gtksourceview.lo
gtksourceview.c: In function `_wrap_gtk_source_buffer_load':
gtksourceview.c:415: too few arguments to function
`gtk_source_buffer_load'
gtksourceview.c: In function `_wrap_gtk_source_buffer_save':
gtksourceview.c:428: too few arguments to function
`gtk_source_buffer_save'
gtksourceview.c: In function
`_wrap_gtk_source_buffer_load_with_character_encoding':
gtksourceview.c:441: too few arguments to function
`gtk_source_buffer_load_with_character_encoding'
gtksourceview.c: At top level:
gtksourceview.c:840: redefinition of
`_wrap_gtk_source_buffer_iter_has_syntax_tag'
gtksourceview.c:819: `_wrap_gtk_source_buffer_iter_has_syntax_tag'
previously defined here
gtksourceview.c:819: warning:
`_wrap_gtk_source_buffer_iter_has_syntax_tag' defined but not used
make[2]: *** [gtksourceviewmodule_la-gtksourceview.lo] Error 1
make[2]: Leaving directory
`/home/ahmad/Projects/gnome-python/gnome-python/gtksourceview'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/ahmad/Projects/gnome-python/gnome-python'
make: *** [all] Error 2



-- 

-  - --   - --- -- -   -
Ahmad Baitalmal
BitBuilder
web: http://www.bitbuilder.com
-  - --  
-- --- -- - 
-
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/




- - --  - --- -- - -

Ahmad Baitalmal IT Dude

Etelos Systems, Inc.



phone: 425.765.4274 

email: [EMAIL PROTECTED]

web: http://www.etelos.com

- - --  -- --- -- - -








Re: [pygtk] Re: gtk radio button

2002-10-30 Thread Christian Reis
On Mon, Oct 28, 2002 at 10:26:17AM -0600, Skip Montanaro wrote:
 
 balu I am new to py-gtk. How do I get which one of the radio buttons
 balu are selected in a particular group?
 
 Off the top of my head, I'm not sure.  I haven't actually used PyGtk in over
 a year.  You'll be better off asking on the pygtk mailing list, to which
 I've cc'd this note.

balu, I coded a patch to wrap group() to pygtk, but it hasn't been
reviewed or checked in yet. I added it against pygtk-0.6, just so you
know. It's attached to http://bugzilla.gnome.org/show_bug.cgi?id=93772

James?

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/



Re: [pygtk] libglade, python and gnome widgets: segmentation fault

2002-10-30 Thread Christian Reis
On Wed, Oct 23, 2002 at 01:33:25PM +0100, Padraig Brady wrote:
  
   GnomeUI-CRITICAL **: file gnome-app.c: line 208 (gnome_app_new): assertion 
 `appname != NULL' failed.
  
   Gtk-WARNING **: invalid cast from (NULL) pointer to `GnomeApp'
   zsh: segmentation fault
  
 
 OK I would like to release a python app using libglade that
 just has a dependency on gtk and not gnome. The above is still
 happening on my RH7.3 system so is there a work around or
 is it possible at all to not import gnome.ui ?

You don't have to import gnome.ui. Your glade file appears to define a
GnomeApp in it, however, which mandates it. Change the glade file to use
only GTK+ widgets and you should be fine.

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/



Re: [pygtk] libglade, python and gnome widgets: segmentation fault

2002-10-30 Thread Christian Reis
On Wed, Oct 30, 2002 at 03:14:38PM +, Padraig Brady wrote:
 Thanks for the info,
 I've noticed that (with pygtk-0.6.8-3) if you use any gnome stuff
 (even non obvious stuff like stock icons for buttons), then
 it will crash unless you import gnome.ui

Can you test with 0.6.11 and, if the problem persists, send in a stack
trace? I'd like to fix that permanently.

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/



Re: [pygtk] libglade, python and gnome widgets: segmentation fault

2002-10-30 Thread Christian Reis
On Wed, Oct 30, 2002 at 05:18:51PM +, Padraig Brady wrote:
 Where can I get a pygnome corresponding to gtk-0.6.11 ?

http://ftp.gnome.org/pub/GNOME/sources/gnome-python/1.4/gnome-python-1.4.4.tar.gz

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] line attributes

2002-10-30 Thread John Hunter

Does someone have some example code to show me how to use draw_line or draw_lines
with line attributes, eg, GDK_LINE_DOUBLE_DASH, etc...

Thanks,
John
___
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] GtkHTML PyGTK

2002-10-30 Thread Rajarshi Guha
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,
  is it possible to use the GtkHTML widget with PyGTK? I'm using PyGTK 0.6.9 
and I have the gtkhtml-1.0.1 package (a RedHat 7.2 system) - I cant seem to 
find any GtkHTML class in the python sources.

I'd appreciate it if anybody could post some pointers to Python code that uses 
the  GtkHTML widget

thanks,

- -- 
- ---
Rajarshi Guha  [EMAIL PROTECTED] http://jijo.cjb.net
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04  06F7 1BB9 E634 9B87 56EE
- ---
After an instrument has been assembled, extra components will be found
on the bench.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9wE/uG7nmNJuHVu4RAvBBAKCDcSSDrRvLbGZhYZ8wDTkLGlFZywCgqqUC
VhoJLzFtlsAIDje384HiO+4=
=jj5z
-END PGP SIGNATURE-

___
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] pygtk threading problem

2002-10-30 Thread LDC - Pablo Endres Lozada

Hi, 

I made an interface thats works ok while used stndalone, 
but I'm trying to connect it with the backend an I get 
the following error:

Xlib: unexpected async reply

This is is what I'm doing in both cases:

Case 1:  Only interface

in the __init__ method of the Gui class I create a thread
that un its run method goes over gtk.mainloop().  After that I 
setup my display and then call .show().

I almost forgaot in the _-init__ I'm reading a glade file.

CAse 2: hole app

Instead of only creating a Gui class, I do some other things
then create the Gui class.

Basiclly its the same, any ideas??

-- 
Muchas personas creen que piensan,
cuando en realidad sólo están reordenando sus
prejuicios.
- William James
 
   .-.
  /  .-.   Pablo Endres Lozada.-.  \
 |  /   \   Laboratorio Docente de Computacion  /   \  |
 | |\_.  |USB - Venezuela  |/| |
 |\|  | /| |\  | |/|
 | `---' |   [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] GtkHTML PyGTK

2002-10-30 Thread Steve McClure
On Wed, 2002-10-30 at 16:32, Rajarshi Guha wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hi,
   is it possible to use the GtkHTML widget with PyGTK? I'm using PyGTK 0.6.9 
 and I have the gtkhtml-1.0.1 package (a RedHat 7.2 system) - I cant seem to 
 find any GtkHTML class in the python sources.
 
 I'd appreciate it if anybody could post some pointers to Python code that uses 
 the  GtkHTML widget
 
 thanks,

I played with it some, you have to build gnome-python with support. Try
doing configure --with-gtkhtml and install the gtkhtml and gtkhtml-devel
packages (on RedHat anyway).  There are some apps out there that I found
through a search on the pygtk email list archives and/or google.

 
 - -- 
 - ---
 Rajarshi Guha  [EMAIL PROTECTED] http://jijo.cjb.net
 GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04  06F7 1BB9 E634 9B87 56EE
 - ---
 After an instrument has been assembled, extra components will be found
 on the bench.
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.0.7 (GNU/Linux)
 
 iD8DBQE9wE/uG7nmNJuHVu4RAvBBAKCDcSSDrRvLbGZhYZ8wDTkLGlFZywCgqqUC
 VhoJLzFtlsAIDje384HiO+4=
 =jj5z
 -END PGP SIGNATURE-
 
 ___
 pygtk mailing list   [EMAIL PROTECTED]
 http://www.daa.com.au/mailman/listinfo/pygtk
 Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Steve McClure   430 10th St NW
Racemi  Suite N-210
http://www.racemi.com   Atlanta, GA 30318
[EMAIL PROTECTED] voice/fax: 404-892-5850



signature.asc
Description: This is a digitally signed message part


Re: [pygtk] Wrapping gtksourceview [WORKS]

2002-10-30 Thread Ahmad Baitalmal
It's Alive!!
The problem was that the header files in gtksourceview
(gtksourcebuffer.h) had function declarations with no implementation.
The compiler didn't complain when compiling gtksrouceview or the wrapper
in gnome-python, but when importing it was looking for those functions.

The missing functions:
gtk_source_buffer_get_tag_start
gtk_source_buffer_get_tag_end
I commented then out in gtksourcebuffer.h since they were not use
anywhere anyway.
gtk_source_view_remove_all_markers
This was mis-named with view instead of buffer. Fixed that.


I didn't do any testing yet, but it works as far as just creating a
SourceView and adding it to a window.

So here are my next questions:
* How/Who do I send the fixes for gtksourceview to?
* How/Who do I send my work to?
* How do I correctly handle GList* functions because I don't
  think they were created by codegen?
* How do I correctly handle GError**?
If there is a paper already out there on my questions please point me to
it, otherwise, I might just write down my own experience as I go and
make it available.


On Wed, 2002-10-30 at 06:12, Johan Dahlin wrote:
Verify with ld, so it's actually linked against libgtksourceview.o and
verify so the symbol, gtk_source_buffer_get_tag_end exists in the
library by using nm.

Johan: I think you meant ldd?

-  - --   - --- -- -   -
Ahmad Baitalmal
BitBuilder
web: http://www.bitbuilder.com
-  - --  
-- --- -- - 
-
___
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] Wrapping gtksourceview [WORKS]

2002-10-30 Thread Johan Dahlin
Em Qua, 2002-10-30 às 20:14, Ahmad Baitalmal escreveu:
 It's Alive!!
Congratulations

 The problem was that the header files in gtksourceview
 (gtksourcebuffer.h) had function declarations with no implementation.
 The compiler didn't complain when compiling gtksrouceview or the wrapper
 in gnome-python, but when importing it was looking for those functions.
I've seen the same issure a few times before, i've should have spotted
that before.

 So here are my next questions:
 * How/Who do I send the fixes for gtksourceview to?
Check out the file AUTHOR or MAINTAINER in CVS.
IIRC it's Mikael Hermansson who's responsible.

 * How/Who do I send my work to?
James, again, is there something for gnome-python?
 * How do I correctly handle GList* functions because I don't
   think they were created by codegen?
You can't you have to override them separately, add them to your
.override function and look in [gtk|pango|atk].override for examples how
to handle GLists.

 * How do I correctly handle GError**?
The code generator should handle them correctly automagically.

 If there is a paper already out there on my questions please point me to
 it, otherwise, I might just write down my own experience as I go and
 make it available.

Sorry, i don't think it is. All you have is the source code for pygtk
and gnome-python. There is a lot of information in there, but you have
to dig.

 On Wed, 2002-10-30 at 06:12, Johan Dahlin wrote:
 Verify with ld, so it's actually linked against libgtksourceview.o and
 verify so the symbol, gtk_source_buffer_get_tag_end exists in the
 library by using nm.
 
 Johan: I think you meant ldd?
Indeed :-)

It's nice to see that more modules getting python bindings.
Keep up with the good work!

--
Johan Dahlin
[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] Problems wih multiselection and removing from a tree view

2002-10-30 Thread Rob Brown-Bayliss

Hi, This code here:

def remove_from_list(self, obj):
self.current_selection.selected_foreach(self.remove_by_iter,None)
self.current_selection.unselect_all()

def remove_by_iter(self, *data):
self.current_model.remove(data[2])

Produces this error:

(Boomer:14140): Gtk-CRITICAL **: file gtktreeselection.c: line 491
(gtk_tree_selection_selected_foreach): assertion `has_next' failed.
There is a disparity between the internal view of the GtkTreeView,
and the GtkTreeModel.  This generally means that the model has changed
without letting the view know.  Any display from now on is likely to
be incorrect.


When I have slected multiple lines in a treeview and then called the
remove_from_list() function.  data[2] is a treeiter object.

Is this a bug in GTK or my understanding of how it should work?

-- 

*  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] libglade, python and gnome widgets: segmentation fault

2002-10-30 Thread James Henstridge
Padraig Brady wrote:


Juri wrote:
 Hi,

 I was going to ask about how to get Gnome widgets to work with
 libglade and python but apparently I solved the problem. I've seen
 other people complaining about the problem but no solution, so I
 decided to post this anyway; consider it a bug report. I was getting
 this error when I tried running a project file containing Gnome stuff
 using glade.py (which is included at least in the Debian python-glade
 package):

 GnomeUI-CRITICAL **: file gnome-app.c: line 208 (gnome_app_new): 
assertion `appname != NULL' failed.

 Gtk-WARNING **: invalid cast from (NULL) pointer to `GnomeApp'
 zsh: segmentation fault

 The problem is avoided if I import gnome.ui. No need to call any
 functions or instantiate any classes, it just has to be imported. This
 seems massively unintuitive to a person with relatively little
 Gnome/Gtk programming experience and absolutely no experience with
 Glade; it would be nice if this was clearly documented (or fixed)
 somewhere.

OK I would like to release a python app using libglade that
just has a dependency on gtk and not gnome. The above is still
happening on my RH7.3 system so is there a work around or
is it possible at all to not import gnome.ui ?

If you want to use gnome widgets in your libglade generated interface, 
you must initialise libgnomeui (the same as for C programs).  To do 
this, the steps are:
   import gnome.ui
   gnome.init(programname, version)

As you can see, this can't easily be handled by initialise on import, 
as I don't know what your app is called, or what version it is.

James.

--
Email: [EMAIL PROTECTED]  | Linux.conf.au   http://linux.conf.au/
WWW:   http://www.daa.com.au/~james/ | Jan 22-25   Perth, Western Australia. 




___
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] line attributes

2002-10-30 Thread James Henstridge
John Hunter wrote:


Does someone have some example code to show me how to use draw_line or draw_lines
with line attributes, eg, GDK_LINE_DOUBLE_DASH, etc...
 

All drawing operations in X take a GC (which stands for graphics 
context), which holds some settings used for doing the drawing.  If you 
are going to change the settings of a GC, it is probably best to create 
your own (you don't really want to cause all your widgets to draw with 
double dashed lines).  This can be done with the drawable.new_gc() 
method.  You can then use the gc.set_line_attributes() method to set the 
line width, line style, cap style and join style.
   gc.set_line_attributes(3, gtk.gdk.LINE_DOUBLE_DASH, 
gtk.gdk.CAP_BUTT, gtk.gdk.JOIN_MITER)

Now if you draw lines with this GC, they will use these attributes.

James.

--
Email: [EMAIL PROTECTED]  | Linux.conf.au   http://linux.conf.au/
WWW:   http://www.daa.com.au/~james/ | Jan 22-25   Perth, Western Australia. 




___
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] Wrapping gtksourceview [WORKS]

2002-10-30 Thread James Henstridge
Johan Dahlin wrote:


   * How/Who do I send my work to?
   

James, again, is there something for gnome-python?
 

There are two options here.  The first is to add the binding to pygtk or 
gnome-python.  The second is to distribute a stand alone package.

The main benefit of including it in gnome-python is for wider 
distribution of the code.

Benefits of having a separate package is that you can make releases at 
your own pace (rather than waiting for a gnome-python release, for 
instance).  Also, you can cause your package to error out during 
configure if GtkSourceView is not found (if it went into gnome-python, 
the configure script would most likely be set up to simply ignore the 
wrapper if GtkSourceView wasn't found).

It would also be worth looking at what kind of API stability guarantees 
are being given for GtkSourceView at the moment.  If the API changes 
much, building as a separate package is probably the right answer at the 
moment.

James.

--
Email: [EMAIL PROTECTED]  | Linux.conf.au   http://linux.conf.au/
WWW:   http://www.daa.com.au/~james/ | Jan 22-25   Perth, Western Australia. 




___
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] libglade, python and gnome widgets: segmentation fault

2002-10-30 Thread Padraig Brady
Christian Reis wrote:

On Wed, Oct 23, 2002 at 01:33:25PM +0100, Padraig Brady wrote:



 GnomeUI-CRITICAL **: file gnome-app.c: line 208 (gnome_app_new): assertion 
`appname != NULL' failed.

 Gtk-WARNING **: invalid cast from (NULL) pointer to `GnomeApp'
 zsh: segmentation fault


OK I would like to release a python app using libglade that
just has a dependency on gtk and not gnome. The above is still
happening on my RH7.3 system so is there a work around or
is it possible at all to not import gnome.ui ?


You don't have to import gnome.ui. Your glade file appears to define a
GnomeApp in it, however, which mandates it. Change the glade file to use
only GTK+ widgets and you should be fine.

Take care,


Thanks for the info,
I've noticed that (with pygtk-0.6.8-3) if you use any gnome stuff
(even non obvious stuff like stock icons for buttons), then
it will crash unless you import gnome.ui

Keeping it purely gtk makes things OK.

Note I unselected the Enable Gnome support in
the Glade project options but still got gnome stuff.
So I guess Glade has a bug and pygtk has a buglet.

thanks again,
Pádraig.

___
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] libglade, python and gnome widgets: segmentation fault

2002-10-30 Thread Padraig Brady
Christian Reis wrote:

On Wed, Oct 30, 2002 at 03:14:38PM +, Padraig Brady wrote:


Thanks for the info,
I've noticed that (with pygtk-0.6.8-3) if you use any gnome stuff
(even non obvious stuff like stock icons for buttons), then
it will crash unless you import gnome.ui


Can you test with 0.6.11 and, if the problem persists, send in a stack
trace? I'd like to fix that permanently.


Feck:

rpm -ta pygtk-0.6.11.tar.gz

[serious amounts of goodness snipped]

Then badness:

RPM build errors:
File not found by glob: 
/var/tmp/pygtk-root/usr/lib/python?.?/site-packages/gtk-1.2/{gtkgl.py*,_gtkglmodule.so}

Is there some handy --without-gl option I can give to rpm -ta?

(this is a standard RH7.2 install).

thanks,
Pádraig.

___
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] libglade, python and gnome widgets: segmentation fault

2002-10-30 Thread Padraig Brady
Padraig Brady wrote:

Christian Reis wrote:


On Wed, Oct 30, 2002 at 03:14:38PM +, Padraig Brady wrote:


Thanks for the info,
I've noticed that (with pygtk-0.6.8-3) if you use any gnome stuff
(even non obvious stuff like stock icons for buttons), then
it will crash unless you import gnome.ui



Can you test with 0.6.11 and, if the problem persists, send in a stack
trace? I'd like to fix that permanently.


Feck:

rpm -ta pygtk-0.6.11.tar.gz

[serious amounts of goodness snipped]

Then badness:

RPM build errors:
File not found by glob: 
/var/tmp/pygtk-root/usr/lib/python?.?/site-packages/gtk-1.2/{gtkgl.py*,_gtkglmodule.so} 

Him this wasn't easy. I removed glarea from the spec file manually and it built.
But then I couldn't install because pygnome-libglade-1.4.1-3
needs pygnome-1.4.1 needs pygtk-0.6.8

Where can I get a pygnome corresponding to gtk-0.6.11 ?

Anyway I broke by dependencies (--nodeps --force) just for you :-)
And still same error. I created a button with stock OK image,
and got:

IMLIB ERROR: Cannot allocate XImage buffer

Gdk-CRITICAL **: file gdkwindow.c: line 1406 (gdk_window_get_visual): assertion 
`window != NULL' failed.
Segmentation fault

thanks,
Pádraig.

Is there some handy --without-gl option I can give to rpm -ta?

(this is a standard RH7.2 install).

thanks,
Pádraig.




___
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] libglade, python and gnome widgets: segmentation fault

2002-10-30 Thread Padraig Brady
Christian Reis wrote:

On Wed, Oct 30, 2002 at 05:18:51PM +, Padraig Brady wrote:


Where can I get a pygnome corresponding to gtk-0.6.11 ?



It's gnome-python


cheers




Anyway I broke by dependencies (--nodeps --force) just for you :-)
And still same error. I created a button with stock OK image,
and got:

IMLIB ERROR: Cannot allocate XImage buffer

Gdk-CRITICAL **: file gdkwindow.c: line 1406 (gdk_window_get_visual): assertion 
`window != NULL' failed.
Segmentation fault


Great. Can you run python through gdb to get a stack trace? Something
like:

gdb python 
gdb run scriptname.py
[...]
Segmentation fault
gdb where
[where the crash happened]

#0  0x4064aed1 in gnome_stock_paint () from /usr/lib/libgnomeui.so.32
#1  0x4064b64a in gnome_stock_set_icon () from /usr/lib/libgnomeui.so.32
#2  0x4064b6e3 in gnome_stock_new_with_icon () from /usr/lib/libgnomeui.so.32
#3  0x4064c6fd in gnome_stock_pixmap_widget () from /usr/lib/libgnomeui.so.32
#4  0x4064ccc4 in stock_button_from_entry () from /usr/lib/libgnomeui.so.32
#5  0x4064cd4e in gnome_stock_button () from /usr/lib/libgnomeui.so.32
#6  0x405bb6f8 in stock_button_new () from /usr/lib/libglade-gnome.so.0
#7  0x4051630c in glade_xml_build_widget () from /usr/lib/libglade.so.0

So it's calling stock_button_new which has a shit attack since
gnome.ui isn't imported.

Pádraig.

___
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] Limits of GConf

2002-10-30 Thread Rob Brown-Bayliss

Hi, Slightly off topic today (for the pygtk list).

Does any one know the limits of GConf,  I am building an app and have
decided to pickle some data to GConf rather than to a file on disk.

It occured to me (about 2 mins ago) that GConf might have limits to the
size of a string.  I am doing cPickle.dumps(MyList_Of_Objects)

The list will grow quite large over time (perhapse a few hundred k), how
large is rather unpredictable, should I go back to pickling to a file?

To the non python folks thing of it as a large string.

Will GConf handle this or should I go back to a file for the larger
lists? 

-- 

*  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/



[pygtk] PyGNOME2 panel applets

2002-10-30 Thread Brad Tonkes
The topic of panel applets in pygnome2 has been raised before, and 
seemingly, answered succinctly:
http://www.daa.com.au/pipermail/pygtk/2002-September/003393.html
However, I'm still confused.  Using the files attached to the above post,
I put GNOME_HelloApplet.server in /home/btonkes/lib/oaf which is in the oaf
path:
$ oaf-sysconf --display-directories
OAF configuration file contains:
/home/btonkes/lib/oaf
and python-applet in /home/btonkes/src/pyapplet, changing the PATH TO PYTHON
APPLET string in GNOME_HelloApplet.server to
/home/btonkes/src/pyapplet/python-applet.  My question: what next?  Running
python-applet seems to do nothing.  Am I doing something fundamentally wrong?

I'm using Red Hat 8.0 with the supplied gnome-python rpms, i.e.,
gnome-python2-applet-1.99.11-8
gnome-python2-gtkhtml2-1.99.11-8
gnome-python2-canvas-1.99.11-8
gnome-python2-bonobo-1.99.11-8
gnome-python2-1.99.11-8
orbit-python-1.99.0-4

Is this the only way to create panel applets?  I initially thought that
import gnome
import gnome.applet
applet = gnome.applet.Applet()
might work, but this just dumps core.

Any help appreciated,
thanks,
brad

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/