MountOperation

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 g_file_mount_enclosing_volume(), g_file_mount_mountable(), g_volume_mount(), g_mount_unmount_with_operation() and others.

When necessary, GtkMountOperation shows dialogs to ask for passwords, questions or show processes blocking unmount.

gtk_show_uri() is a convenient way to launch applications for URIs.

Another object that is worth mentioning in this context is GdkAppLaunchContext, which provides visual feedback when lauching applications.

Constructors

this
this(GtkMountOperation* gtkMountOperation)

Sets our main struct and passes it to the parent class

this
this(Window parent)

Creates a new GtkMountOperation Since 2.14

Members

Functions

getGtkMountOperationStruct
GtkMountOperation* getGtkMountOperationStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getParent
Window getParent()

Gets the transient parent used by the GtkMountOperation Since 2.14

getScreen
Screen getScreen()

Gets the screen on which windows of the GtkMountOperation will be shown. Since 2.14

getStruct
void* getStruct()

the main Gtk struct as a void*

isShowing
int isShowing()

Returns whether the GtkMountOperation is currently displaying a window. Since 2.14

setParent
void setParent(Window parent)

Sets the transient parent for windows shown by the GtkMountOperation. Since 2.14

setScreen
void setScreen(Screen screen)

Sets the screen to show windows of the GtkMountOperation on. Since 2.14

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

showUri
int showUri(Screen screen, string uri, uint timestamp)

This is a convenience function for launching the default application to show the uri. The uri must be of a form understood by GIO (i.e. you need to install gvfs to get support for uri schemes such as http:// or ftp://, as only local files are handled by GIO itself). Typical examples are file:///home/gnome/pict.jpg http://www.gnome.org

mailto:me@gnome.org Ideally the timestamp is taken from the event triggering the gtk_show_uri() call. If timestamp is not known you can take GDK_CURRENT_TIME. This function can be used as a replacement for gnome_vfs_url_show() and gnome_url_show(). Since 2.14

Variables

gtkMountOperation
GtkMountOperation* gtkMountOperation;

the main Gtk struct

Meta