[maemo-developers] How to keep window on top? (python)

From: Pierre Amadio pierre.amadio at laposte.net
Date: Mon Aug 13 18:54:57 EEST 2007
Hi there.

On Mon, Aug 13, 2007 at 11:46:38AM -0400, Tony Maro wrote:
> I'm a noob at both Python and GTK so forgive me if this is a silly question.
> 
> I've got a modal window I'm creating, and I've tried doing
> "set_transient_for" but no matter what I've done, it won't stay on top of
> the base application window.  You can easily pick the app window from the
> taskbar and switch to it, even though it can't get input.
> 
> If a user does this by accident, it leaves the impression that the program
> has locked up.
> 
> Can someone point me in the right direction?  Or does busybox not support
> this?

I use something like:

        self.prefWindow=hildon.Window()
        self.prefWindow.set_title("Preferences")
        self.prefWindow.set_modal(True)
        self.prefWindow.set_transient_for(self.mainWindow)
        self.prefWindow.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)

Hopes it helps :)


More information about the maemo-developers mailing list