Re: [pygtk] How to use GnomeDialog from an applet

2001-11-02 Thread Akos Polster

On Wed, 2001-10-31 at 18:19, Colin Walters wrote:
 [EMAIL PROTECTED] (Akos Polster) writes:
 
  My panel applet hangs after I create a GnomeDialog and call its
  run_and_close() method. How to avoid this?
 
 I'm having *exactly* the same problem with the python-gnome in powerpc
 Debian unstable, which happens to be 1.0.53.  Hm, I see this is a
 rather old version...looks like a problem building python-opengl.
 Hm...

I think we can confirm now this is a bug. However it is 
quiet possible that this is a bug with Gnome, not with Pygnome.
I'll try to duplicate the problem it in pure C.

 Anyways,
 
 One thing that I discovered is that the same callback works perfectly
 fine when called from a button's clicked signal, but fails when
 called via an applet's callback method.

Very good news; I guess I can use this workaround in my applet -
thanks!

 - Akos.

-- 
Akos Polster
mailto:[EMAIL PROTECTED]
http://akos.pipacs.com

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] How to use GnomeDialog from an applet

2001-10-25 Thread Akos Polster

On Thu, 2001-10-25 at 06:02, Christian Robottom Reis wrote:
 On 23 Oct 2001, Akos Polster wrote:
 
  This is what happens: I create a GnomeDialog with a Close button,
  then call run_and_close. run_and_close returns when I press Close,
  but the dialog, instead of being destroyed, stays on the screen,
  and becomes unresponsive, together with the rest of the applet.
 
 Do the buttons click, or is the app frozen? Does the app redraw when
 covered with another window or not?

The dialog and the app freeze; they don't redraw

 - Akos.


-- 
Akos Polster
mailto:[EMAIL PROTECTED]
http://akos.pipacs.com

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] How to use GnomeDialog from an applet

2001-10-23 Thread Akos Polster

On Tue, 2001-10-23 at 05:12, James Henstridge wrote:
 Akos Polster wrote:
 
 My panel applet hangs after I create a GnomeDialog and call its
 run_and_close() method. How to avoid this? 
 
 Hangs or becomes unresponsive?  If it has hung, if you move a window 
 over the panel applet, it won't redraw.  If it redraws, it hasn't hung.
 
 gnome_dialog_run runs the dialog as a modal window, so none of the other 
 widgets in your program will take input while the dialog is running.

This is what happens: I create a GnomeDialog with a Close button,
then call run_and_close. run_and_close returns when I press Close,
but the dialog, instead of being destroyed, stays on the screen, 
and becomes unresponsive, together with the rest of the applet.

I appended a a short script to the first mail to illustrate this
strange behavior; here is it again:


import os
import gnome.applet
from gtk import *
from gnome.ui import *

def popup(*args):
dlg = GnomeDialog(Close Me, STOCK_BUTTON_CLOSE)
dlg.run_and_close()
print Dialog closed

app = gnome.applet.AppletWidget(test)
frame = GtkFrame()
frame.set_shadow_type(SHADOW_IN)
label = GtkLabel(Select \popup\ from the menu)
frame.add(label)
label.show()
app.add(frame)
frame.show()
app.register_callback(popup, popup, popup)
app.show()

mainloop()



  -  Akos.

-- 
Akos Polster
mailto:[EMAIL PROTECTED]
http://akos.pipacs.com

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



[pygtk] How to use GnomeDialog from an applet

2001-10-22 Thread Akos Polster

My panel applet hangs after I create a GnomeDialog and call its
run_and_close() method. How to avoid this? 

 - Akos.


P.S. I have pygtk 0.6.8 and pygnome 1.4.1. To duplicate:


import os
import gnome.applet
from gtk import *
from gnome.ui import *

def popup(*args):
dlg = GnomeDialog(Close Me, STOCK_BUTTON_CLOSE)
dlg.run_and_close()
print Closed

app = gnome.applet.AppletWidget(test)
frame = GtkFrame()
frame.set_shadow_type(SHADOW_IN)
label = GtkLabel(Select \popup\ from the menu)
frame.add(label)
label.show()
app.add(frame)
frame.show()
app.register_callback(popup, popup, popup)
app.show()
mainloop()


-- 
Akos Polster
mailto:[EMAIL PROTECTED]
http://akos.pipacs.com

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk