Add is_supported() to GNativeVolumeMonitorClass so that we can avoid

2007-12-17  Alexander Larsson  <alexl@redhat.com>

        * gnativevolumemonitor.h:
        * gunionvolumemonitor.c:
        * gunixvolumemonitor.c:
	Add is_supported() to GNativeVolumeMonitorClass so
	that we can avoid having to create an object to see
	if the backend is supported at runtime.
	Also add name member and an env var to pick a specific
	volume monitor backend.
	
        * gmountprivate.h:
        * glocalfile.c:
	Add cancellable to _g_mount_get_for_mount_path()
	
        * glocaldirectorymonitor.c:
        * glocalfilemonitor.c:
	Avoid loading and unloading modules while sorting.



svn path=/trunk/; revision=6144
This commit is contained in:
Alexander Larsson
2007-12-17 16:00:33 +00:00
committed by Alexander Larsson
parent feb5258cf9
commit c4e3cfbf40
8 changed files with 118 additions and 63 deletions

View File

@@ -165,6 +165,10 @@ get_default_local_file_monitor (gpointer data)
chosen_type = G_TYPE_INVALID;
/* Ref all classes once so we don't load/unload them a lot */
for (i = 0; i < n_monitor_impls; i++)
g_type_class_ref (monitor_impls[i]);
g_qsort_with_data (monitor_impls,
n_monitor_impls,
sizeof (GType),
@@ -183,6 +187,9 @@ get_default_local_file_monitor (gpointer data)
g_type_class_unref (klass);
}
for (i = 0; i < n_monitor_impls; i++)
g_type_class_unref (g_type_class_peek (monitor_impls[i]));
g_free (monitor_impls);
*ret = chosen_type;