NativeDialog
Superclasses: Object
Subclasses: FileChooserNative
- Constructors:
NativeDialog(**properties)
Methods
- class NativeDialog
- destroy() None
Destroys a dialog.
When a dialog is destroyed, it will break any references it holds to other objects.
If it is visible it will be hidden and any underlying window system resources will be destroyed.
Note that this does not release any reference to the object (as opposed to destroying a
GtkWindow
) because there is no reference from the windowing system to theGtkNativeDialog
.
- hide() None
Hides the dialog if it is visible, aborting any interaction.
Once this is called the
response
signal will not be emitted until after the next call toshow
.If the dialog is not visible this does nothing.
- set_modal(modal: bool) None
Sets a dialog modal or non-modal.
Modal dialogs prevent interaction with other windows in the same application. To keep modal dialogs on top of main application windows, use
set_transient_for
to make the dialog transient for the parent; most window managers will then disallow lowering the dialog below the parent.- Parameters:
modal – whether the window is modal
- set_title(title: str) None
Sets the title of the
GtkNativeDialog.
- Parameters:
title – title of the dialog
- set_transient_for(parent: Window | None = None) None
Dialog windows should be set transient for the main application window they were spawned from.
This allows window managers to e.g. keep the dialog on top of the main window, or center the dialog over the main window.
Passing
None
forparent
unsets the current transient window.- Parameters:
parent – parent window
Properties
- class NativeDialog
Signals
Virtual Methods
- class NativeDialog
- do_hide() None
Hides the dialog if it is visible, aborting any interaction.
Once this is called the
response
signal will not be emitted until after the next call toshow
.If the dialog is not visible this does nothing.
Fields
- class NativeDialog
- parent_instance