Re: [pygtk] newbie help

2002-10-31 Thread Christian Reis
On Thu, Oct 31, 2002 at 10:34:35PM -0400, Diego Anzoátegui wrote:
> Hi, this is my problem: i have a main window, from a menu item i show another 
> child window, when i close this child, and then, show it again, the textview 
> dissapear.In the delete_event i do a child.hide().
> Only appears the window container itself, not the textview which is inside. 

Your delete_event handler should also return gtk.TRUE

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] newbie help

2002-10-31 Thread Diego Anzoátegui
Hi, this is my problem: i have a main window, from a menu item i show another 
child window, when i close this child, and then, show it again, the textview 
dissapear.In the delete_event i do a child.hide().
Only appears the window container itself, not the textview which is inside. 
Thanks..


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

2002-10-31 Thread Rob Brown-Bayliss
On Fri, 2002-11-01 at 01:42, Christian Reis wrote:

> > 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.
> 
> Offtopic x2: why not try out the ZODB instead? :-)

One more dependency for a minor app, I think I will just revert to
pickling to a file if I get problems.

-- 

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

2002-10-31 Thread John Hunter
> "John" == John Hunter <[EMAIL PROTECTED]> writes:

John> What magical import incantation do I need to get a gtk.gdk?
John> You can seek some of my failures below.

OK, just upgraded to 0.6.9.  And found the magic gdk object as gtk.GDK
which defines the line attributes.

Thanks,
John Hunter 
___
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-31 Thread John Hunter
> "James" == James Henstridge <[EMAIL PROTECTED]> writes:
James> method.  You can then use the gc.set_line_attributes()
James> method to set the line width, line style, cap style and
James> join style.  gc.set_line_attributes(3,
James> gtk.gdk.LINE_DOUBLE_DASH, gtk.gdk.CAP_BUTT,
James> gtk.gdk.JOIN_MITER)

Hi James, thanks for the help.

I am having trouble getting my grubby fingers on this
gtk.gdk.LINE_DOUBLE_DASH object, or the gdk object for that matter.

What magical import incantation do I need to get a gtk.gdk?  You can
seek some of my failures below.

Thanks,
John Hunter
pygtk-0.6.8, python2.2


video:~/tex/grants/NIH2002> python2.2
Python 2.2.2 (#1, Oct 15 2002, 08:14:58) 
[GCC 3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
>>> gtk.gdk
Traceback (most recent call last):
  File "", line 1, in ?
AttributeError: 'module' object has no attribute 'gdk'
>>> from gtk import *
>>> gdk
Traceback (most recent call last):
  File "", line 1, in ?
NameError: name 'gdk' is not defined
>>> LINE_DOUBLE_DASH
Traceback (most recent call last):
  File "", line 1, in ?
NameError: name 'LINE_DOUBLE_DASH' is not defined
>>> import gdk
Traceback (most recent call last):
  File "", line 1, in ?
ImportError: No module named gdk
>>> import gtk.gdk
Traceback (most recent call last):
  File "", line 1, in ?
ImportError: No module named gdk
___
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] error messages

2002-10-31 Thread Jay Graves
Hello
I have created a test app with pygtk and glade.  When I run the app the
window appears however there are many errors written to the terminal.
Can anyone tell me what these mean, and how to get rid of them.
Also, for bonus points, how come the app quits when I do a File | Quit
but not when I close the window?

I have attached the app the glade file and a file with the list of
errors.

Thanks for your help
-- 

Jay Graves 
[EMAIL PROTECTED]
jay.skabber.com

   O__
  _/`.\
  `=( '


(test:1124): GLib-GObject-WARNING **: invalid cast from (NULL) pointer to `GObject'

(test:1124): GLib-GObject-CRITICAL **: file gobject.c: line 972 (g_object_get): 
assertion `G_IS_OBJECT (object)' failed

(test:1124): GLib-GObject-WARNING **: invalid cast from (NULL) pointer to `GObject'

(test:1124): GLib-GObject-CRITICAL **: file gobject.c: line 972 (g_object_get): 
assertion `G_IS_OBJECT (object)' failed

(test:1124): Gnome-CRITICAL **: file gnome-program.c: line 738 
(gnome_program_get_app_id): assertion `program != NULL' failed

(test:1124): GLib-CRITICAL **: file gstring.c: line 472 (g_string_prepend): assertion 
`val != NULL' failed

(test:1124): Gnome-CRITICAL **: file gnome-program.c: line 738 
(gnome_program_get_app_id): assertion `program != NULL' failed

(test:1124): Gnome-CRITICAL **: file gnome-program.c: line 869 
(gnome_program_locate_file): assertion `program != NULL' failed

(test:1124): Gnome-CRITICAL **: file gnome-program.c: line 869 
(gnome_program_locate_file): assertion `program != NULL' failed

(test:1124): Gnome-CRITICAL **: file gnome-program.c: line 738 
(gnome_program_get_app_id): assertion `program != NULL' failed

(test:1124): GLib-CRITICAL **: file gstring.c: line 472 (g_string_prepend): assertion 
`val != NULL' failed

(test:1124): Gtk-CRITICAL **: file gtkaccelmap.c: line 135 (gtk_accel_map_add_entry): 
assertion `_gtk_accel_path_is_valid (accel_path)' failed

(test:1124): Gtk-CRITICAL **: file gtkwidget.c: line 2809 (gtk_widget_set_accel_path): 
assertion `_gtk_accel_path_is_valid (accel_path)' failed

(test:1124): Gnome-CRITICAL **: file gnome-program.c: line 738 
(gnome_program_get_app_id): assertion `program != NULL' failed

(test:1124): GLib-CRITICAL **: file gstring.c: line 472 (g_string_prepend): assertion 
`val != NULL' failed

(test:1124): Gtk-CRITICAL **: file gtkaccelmap.c: line 135 (gtk_accel_map_add_entry): 
assertion `_gtk_accel_path_is_valid (accel_path)' failed

(test:1124): Gtk-CRITICAL **: file gtkwidget.c: line 2809 (gtk_widget_set_accel_path): 
assertion `_gtk_accel_path_is_valid (accel_path)' failed

(test:1124): Gnome-CRITICAL **: file gnome-program.c: line 738 
(gnome_program_get_app_id): assertion `program != NULL' failed

(test:1124): GLib-CRITICAL **: file gstring.c: line 472 (g_string_prepend): assertion 
`val != NULL' failed

(test:1124): Gtk-CRITICAL **: file gtkaccelmap.c: line 135 (gtk_accel_map_add_entry): 
assertion `_gtk_accel_path_is_valid (accel_path)' failed

(test:1124): Gtk-CRITICAL **: file gtkwidget.c: line 2809 (gtk_widget_set_accel_path): 
assertion `_gtk_accel_path_is_valid (accel_path)' failed

(test:1124): Gnome-CRITICAL **: file gnome-program.c: line 738 
(gnome_program_get_app_id): assertion `program != NULL' failed

(test:1124): GLib-CRITICAL **: file gstring.c: line 472 (g_string_prepend): assertion 
`val != NULL' failed

(test:1124): Gtk-CRITICAL **: file gtkaccelmap.c: line 135 (gtk_accel_map_add_entry): 
assertion `_gtk_accel_path_is_valid (accel_path)' failed

(test:1124): Gtk-CRITICAL **: file gtkwidget.c: line 2809 (gtk_widget_set_accel_path): 
assertion `_gtk_accel_path_is_valid (accel_path)' failed

(test:1124): Gnome-CRITICAL **: file gnome-program.c: line 738 
(gnome_program_get_app_id): assertion `program != NULL' failed

(test:1124): GLib-CRITICAL **: file gstring.c: line 472 (g_string_prepend): assertion 
`val != NULL' failed

(test:1124): Gtk-CRITICAL **: file gtkaccelmap.c: line 135 (gtk_accel_map_add_entry): 
assertion `_gtk_accel_path_is_valid (accel_path)' failed

(test:1124): Gtk-CRITICAL **: file gtkwidget.c: line 2809 (gtk_widget_set_accel_path): 
assertion `_gtk_accel_path_is_valid (accel_path)' failed

(test:1124): Gnome-CRITICAL **: file gnome-program.c: line 738 
(gnome_program_get_app_id): assertion `program != NULL' failed

(test:1124): GLib-CRITICAL **: file gstring.c: line 472 (g_string_prepend): assertion 
`val != NULL' failed

(test:1124): Gnome-CRITICAL **: file gnome-program.c: line 738 
(gnome_program_get_app_id): assertion `program != NULL' failed

(test:1124): GLib-CRITICAL **: file gstring.c: line 472 (g_string_prepend): assertion 
`val != NULL' failed

(test:1124): Gtk-CRITICAL **: file gtkaccelmap.c: line 135 (gtk_accel_map_add_entry): 
assertion `_gtk_accel_path_is_valid (accel_path)' failed

(test:1124): Gtk-CRITICAL **: file gtkwidget.c: line 2809 (gtk_widget_set_accel_path): 
assertion `_gtk_accel_path_is_valid (accel_path)' failed

(test:1124): Gnome-CRITICAL **: file gnome-program

[pygtk] Xlib: unexpected async reply (sequence 0x140)??

2002-10-31 Thread LDC - Pablo Endres Lozada

Hi Guys.

I have an Interface in pygtk and am in the process of 
conecting it to the undergoing layer.

the problem comes when I start the Gui from the undergoing layer
I get ht efollowing error: 

Xlib: unexpected async reply (sequence 0x140)

aNy ideas on what could cause that??

In the Gui class I create a threading class to run the 
gtk.mainloop() ?Could that be the cause?

Thanks in advance

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

2002-10-31 Thread Christian Reis
On Wed, Oct 30, 2002 at 04:40:11PM -0800, David M. Cook wrote:
> On Wed, Oct 30, 2002 at 11:45:23AM +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".
> 
> The simplest way is to add a button to do this, of course, but to save mouse
> clicks the following seems to work for me:

What's wrong with

combo.entry.connect("insert_text", my_handler)
combo.entry.connect("delete_text", my_handler)

?

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

2002-10-31 Thread Christian Reis
On Thu, Oct 31, 2002 at 06:22:34PM +1300, Rob Brown-Bayliss wrote:
> 
> 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.

Offtopic x2: why not try out the ZODB instead? :-)

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

2002-10-31 Thread Malcolm Tredinnick
On Thu, Oct 31, 2002 at 09:30:20PM +1300, Rob Brown-Bayliss wrote:
> 
> > completely missing. The point is that there is no guarantee that the
> > user will have a writable gconf repository available. The system might
> > be configured so that users cannot change anything.
> 
> This applies to all Gonme apps useing GCOnf though doesn't it?  Not
> really a biggie because (unless I am soo wrong) thats thjat whole pont
> of gconf.

Yes it does. But that is why gconf should only be used for data that it
would be "nice" to save on a per-user basis, but not a problem if it was
lost or overridden by an administrator setting. I do not know the
context of the data you are trying to save, but if it is data that you
really _have_ to save for the application to be useful, then you should
use another method.

Malcolm

-- 
If at first you don't succeed, destroy all evidence that you tried.
___
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] Re: Limits of GConf

2002-10-31 Thread Rob Brown-Bayliss

> completely missing. The point is that there is no guarantee that the
> user will have a writable gconf repository available. The system might
> be configured so that users cannot change anything.

This applies to all Gonme apps useing GCOnf though doesn't it?  Not
really a biggie because (unless I am soo wrong) thats thjat whole pont
of gconf.

-- 

*  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] Is this another treeview bug?

2002-10-31 Thread Rob Brown-Bayliss

I get this error:

AttributeError: 'gtk.TreeView' object has no attribute
'widget_to_tree_coords'

Yet 'widget_to_tree_coords' is in the docs. 

Is it a bug?

-- 

*  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] Re: Limits of GConf

2002-10-31 Thread Malcolm Tredinnick
On Thu, Oct 31, 2002 at 06:22:34PM +1300, Rob Brown-Bayliss wrote:
> 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.

While not solving your problem, permit me to confuse the situation
futher. If you are going to adopt the above plan, your application will
not be very portable, or else you should not mind if the data goes
completely missing. The point is that there is no guarantee that the
user will have a writable gconf repository available. The system might
be configured so that users cannot change anything.

Cheers,
Malcolm

-- 
I don't have a solution, but I admire your problem.
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/