Introduce g_volume_monitor_adopt_orphan_mount() function. Also add signals

2007-12-19  David Zeuthen  <davidz@redhat.com>

	Introduce g_volume_monitor_adopt_orphan_mount() function. Also
	add signals 'disconnected' and 'eject-button' on GDrive. Add
	signal 'removed' on GVolume and 'unmounted' on GMount.

	* gdrive.c: (g_drive_base_init):
	* gdrive.h:
	* gfile.c: (g_file_mount_mountable),
	(g_file_mount_enclosing_volume):
	* gio.symbols:
	* gioerror.h:
	* gmount.c: (g_mount_base_init):
	* gmount.h:
	* gunionvolumemonitor.c: (g_volume_monitor_adopt_orphan_mount):
	* gunixvolumemonitor.c: (update_volumes), (update_mounts):
	* gvolume.c: (g_volume_base_init), (g_volume_mount):
	* gvolume.h:
	* gvolumemonitor.h:


svn path=/trunk/; revision=6153
This commit is contained in:
David Zeuthen
2007-12-19 09:39:50 +00:00
committed by Alexander Larsson
parent 3ca41fe109
commit 88679aba98
13 changed files with 195 additions and 18 deletions

View File

@@ -97,10 +97,9 @@ g_drive_base_init (gpointer g_class)
{
/**
* GDrive::changed:
* @volume: a #GVolume.
* @drive: a #GDrive.
*
* Emitted when the drive's state has changed.
*
**/
g_signal_new (I_("changed"),
G_TYPE_DRIVE,
@@ -110,6 +109,38 @@ g_drive_base_init (gpointer g_class)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
/**
* GDrive::disconnected:
* @drive: a #GDrive.
*
* This signal is emitted when the #GDrive have been
* disconnected. If the recipient is holding references to the
* object they should release them so the object can be
* finalized.
**/
g_signal_new (I_("disconnected"),
G_TYPE_DRIVE,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GDriveIface, disconnected),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
/**
* GDrive::eject-button:
* @drive: a #GDrive.
*
* Emitted when the physical eject button (if any) of a drive have been pressed.
*
**/
g_signal_new (I_("eject-button"),
G_TYPE_DRIVE,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GDriveIface, eject_button),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
initialized = TRUE;
}
}