[sugar] spawning popup windows in sugar?
Marco Pesenti Gritti
mpg
Mon Oct 2 08:35:19 EDT 2006
Owen Williams wrote:
> 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.
>
I assume you get no traces on the console?
I checked in tests/test-window-manager.py see if that works for you too.
Marco
More information about the Sugar-devel
mailing list