Re: [pygtk] dialogs

2005-03-23 Thread Keir Lawson
Im not sure if there is any more relevant code to show, this event is on
a thread.  The crash occurs as soon as i click the close button on the
dialog.

Keir

On Tue, 2005-03-22 at 22:53 +0100, Gian Mario Tagliaretti wrote:
 On Tue, 22 Mar 2005 17:55:23 +, Keir Lawson
 [EMAIL PROTECTED] wrote:
 
  I have set up a MessageDialog to display an error message, and want my
  app to quit when its close button is pressed. i use this code:
  
  resp = self.dialog.run()
  if resp == gtk.RESPONSE_CLOSE:
  gtk.main_quit()
  sys.exit()
  However, my app just crashes, what am i doing wrong?
 
 you don't need to call sys.exit() since gtk.main_quit() is enough.
 to see what is wrong I think is not enough this portion of code.
 
  Keir Lawson
 
 cheers
 gmt
-- 

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


[pygtk] dialogs

2005-03-22 Thread Keir Lawson
I have set up a MessageDialog to display an error message, and want my
app to quit when its close button is pressed. i use this code:

resp = self.dialog.run()
if resp == gtk.RESPONSE_CLOSE:
gtk.main_quit()
sys.exit()
However, my app just crashes, what am i doing wrong?

Keir Lawson

-- 

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


Re: [pygtk] dialogs

2005-03-22 Thread Keir Lawson
OK, sorry about that, the winows freeze and dont redraw, there is no
output in the termianl, no segfault, no traceback, and yes im using
linux ;)

Keir
On Tue, 2005-03-22 at 16:14 -0300, Christian Reis wrote:
 Well, one thing you did wrong was not providing detailed enough
-- 

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


[pygtk] gtkmain running

2005-03-02 Thread Keir Lawson
is there a way to test wehter or not gtkmain is running from within
python? i am in the situation where my program initiates two threads, oe
which starts gtkmain, the other may create a dialogue early on -
possibly before gtkmain is fuly up and running

Keir Lawson
-- 

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


[pygtk] listviews

2004-09-14 Thread Keir Lawson
im trying to use a list view to show a simple two-collumed list, how
ever im finding it extremly difficult to perform this simple task,
throughout the documentation i cannot find a fully worked example of a
listveiw, only a treeview, could someone point me at an example of give
me one please.

Keir Lawson


___
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] auto-scrolling text view

2004-09-05 Thread Keir Lawson
i have been using the code at
http://www.async.com.br/faq/pygtk/index.py?req=all#14.12 to make my
pygtk instant messenger always scroll to the latest message
automatically. however, despite my textveiw having editable set to off,
whenever anyone clicks on it, anywhere other than at the end of the
text, the automatic scrolling stops working, how can i fix this?

completely unrelated and not apropriate for this list but if anyone can
help me with this it would be much apreciated: i have a chat_window
class, and would like to spawn a new instance of it everytime a user
clicks a button, obviously i cant just do:
def on_click(widget):
foobar = chat()
as i will only be able to do this once, how would i resolve this?

Keir Lawson


___
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] confused

2004-07-03 Thread Keir Lawson
i read in the pygtk faq
(http://www.async.com.br/faq/pygtk/index.py?req=all#14.16), that in
oreder to react to a user pressing enter in a text entry, i have to
respond to the activate signal, however, having tried this, it does not
seem to work, pressing enter does not call the functio attatched,
however using the entry's activate() in the program does, have i mis-
interpreted this event?

Keir
-- 

We would rather die on our feet than live on out knees

___
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] gtk mainloop and threads

2004-07-02 Thread Keir Lawson
im new to programming with gtk and was wondering how to work around the
gtk mainloop, which seems to stop all currently running threads, to
allow threads to continue running.  im pretty sure im missing something
glaringly obvious.

thanks in advance

Keir Lawson
-- 

We would rather die on our feet than live on out knees

___
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] documentation?

2004-06-09 Thread Keir Lawson
i was wondering if there was any gnome-python documentation,
specifically for gnome canvas, or indeed any up-to-date documentation on
gnome-canvas in general.  i have had a look at the gnom canvas example
in gnome-python, however i need more that one example to be able to
learn this

Keir Lawson
-- 

We would rather die on our feet than live on out knees

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