gnome-applets r10989 - trunk/drivemount



Author: callum
Date: Mon Sep 15 00:34:34 2008
New Revision: 10989
URL: http://svn.gnome.org/viewvc/gnome-applets?rev=10989&view=rev

Log:
Make the Play DVD button appear when a DVD is inserted with the new GIO code.

Modified:
   trunk/drivemount/ChangeLog
   trunk/drivemount/drive-button.c

Modified: trunk/drivemount/drive-button.c
==============================================================================
--- trunk/drivemount/drive-button.c	(original)
+++ trunk/drivemount/drive-button.c	Mon Sep 15 00:34:34 2008
@@ -649,11 +649,18 @@
 	GFile *file;
 	char *udi, *device_path, *mount_path;
 	gboolean result;
+	GMount *mount;
 
 	if (!self->volume)
 		return FALSE;
 
-	file = g_volume_get_activation_root (self->volume);
+	mount = g_volume_get_mount (self->volume);
+	if (!mount)
+	    return FALSE;
+
+	file = g_mount_get_root (mount);
+	g_object_unref (mount);
+	
 	if (!file)
 		return FALSE;
 
@@ -680,11 +687,18 @@
 {
 	GFile *file;
 	char *activation_uri;
+	GMount *mount;
 
 	if (!self->volume)
 		return FALSE;
 
-	file = g_volume_get_activation_root (self->volume);
+	mount = g_volume_get_mount (self->volume);
+	if (!mount)
+	    return FALSE;
+
+	file = g_mount_get_root (mount);
+	g_object_unref (mount);
+
 	if (!file)
 		return FALSE;
 
@@ -692,7 +706,7 @@
 
 	g_object_unref (file);
 
-	// we have an audioCD if the activation URI starts by 'cdda://'
+	/* we have an audioCD if the activation URI starts by 'cdda://' */
 	gboolean result = (strncmp ("cdda://", activation_uri, 7) == 0);
 	g_free (activation_uri);
 	return result;
@@ -703,11 +717,18 @@
 {
 	GFile *file;
 	char *mount_path, *device_path;
+	GMount *mount;
 
 	if (!self->volume)
 		return;
 
-	file = g_volume_get_activation_root (self->volume);
+	mount = g_volume_get_mount (self->volume);
+	if (!mount)
+	    return FALSE;
+
+	file = g_mount_get_root (mount);
+	g_object_unref (mount);
+
 	g_assert (file);
 
 	mount_path = g_file_get_path (file);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]