[sugar] spawning popup windows in sugar?

Owen Williams ywwg
Sun Oct 1 15:42:18 EDT 2006


On Sun, 2006-10-01 at 18:51 +0200, Marco Pesenti Gritti wrote:
> Owen Williams wrote:
> > I'm trying to spawn simple popup windows in sugar for error messages and
> > a preference window, but they don't appear.  In a previous build of
> > sugar they did, but now nothing happens.  What's the proper way to
> > launch a popup window in Sugar?
> >   
> You need to use dialogs rather than popup windows in general. Can you 
> show the code that it's failing?
> 
> Marco
> 

This doesn't show anything:

dialog = gtk.Dialog(title=_("No Unviewed Media"), 
		      parent=None, 
                    flags=gtk.DIALOG_MODAL, 
                    buttons=(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
label = gtk.Label(_("There is no unviewed media to download."))
dialog.vbox.pack_start(label, True, True, 0)
label.show()
response = dialog.run()
dialog.hide()
del dialog

But I also have a GtkWindow that I load with glade that doesn't get
shown.  It has a type hint of Dialog and a type of Top Level.

owen




More information about the Sugar-devel mailing list