:right-sidebar: True MountOperation =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: MountOperation(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gio.MountOperation`, :class:`~gi.repository.GObject.Object` ``GtkMountOperation`` is an implementation of ``GMountOperation``. The functions and objects described here make working with GTK and GIO more convenient. ``GtkMountOperation`` is needed when mounting volumes: It is an implementation of ``GMountOperation`` that can be used with GIO functions for mounting volumes such as :func:`~gi.repository.Gio.File.mount_enclosing_volume`, :func:`~gi.repository.Gio.File.mount_mountable`, :func:`~gi.repository.Gio.Volume.mount`, :func:`~gi.repository.Gio.Mount.unmount_with_operation` and others. When necessary, ``GtkMountOperation`` shows dialogs to let the user enter passwords, ask questions or show processes blocking unmount. Constructors ------------ .. rst-class:: interim-class .. class:: MountOperation :no-index: .. classmethod:: new(parent: ~gi.repository.Gtk.Window | None = None) -> ~gi.repository.Gio.MountOperation Creates a new ``GtkMountOperation``. :param parent: transient parent of the window Methods ------- .. rst-class:: interim-class .. class:: MountOperation :no-index: .. method:: get_display() -> ~gi.repository.Gdk.Display Gets the display on which windows of the ``GtkMountOperation`` will be shown. .. method:: get_parent() -> ~gi.repository.Gtk.Window | None Gets the transient parent used by the ``GtkMountOperation``. .. method:: is_showing() -> bool Returns whether the ``GtkMountOperation`` is currently displaying a window. .. method:: set_display(display: ~gi.repository.Gdk.Display) -> None Sets the display to show windows of the ``GtkMountOperation`` on. :param display: a ``GdkDisplay`` .. method:: set_parent(parent: ~gi.repository.Gtk.Window | None = None) -> None Sets the transient parent for windows shown by the ``GtkMountOperation``. :param parent: transient parent of the window Properties ---------- .. rst-class:: interim-class .. class:: MountOperation :no-index: .. attribute:: props.display :type: ~gi.repository.Gdk.Display The display where dialogs will be shown. .. attribute:: props.is_showing :type: bool Whether a dialog is currently shown. .. attribute:: props.parent :type: ~gi.repository.Gtk.Window The parent window. Fields ------ .. rst-class:: interim-class .. class:: MountOperation :no-index: .. attribute:: parent_instance .. attribute:: priv