[maemo-commits] [maemo-commits] r11822 - projects/haf/trunk/hildon-fm/hildon-fm

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu May 24 17:57:55 EEST 2007
Author: marivoll
Date: 2007-05-24 17:57:54 +0300 (Thu, 24 May 2007)
New Revision: 11822

Modified:
   projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-voldev.c
Log:
	* hildon-fm/hildon-file-system-voldev.c
	(hildon_file_system_voldev_get_extra_info): New, return the device
	path.
	(hildon_file_system_voldev_class_init): Install it.


Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-voldev.c
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-voldev.c	2007-05-24 14:52:15 UTC (rev 11821)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-voldev.c	2007-05-24 14:57:54 UTC (rev 11822)
@@ -44,6 +44,10 @@
 hildon_file_system_voldev_volumes_changed (HildonFileSystemSpecialLocation
                                            *location, GtkFileSystem *fs);
 
+static char *
+hildon_file_system_voldev_get_extra_info (HildonFileSystemSpecialLocation
+					  *location);
+
 G_DEFINE_TYPE (HildonFileSystemVoldev,
                hildon_file_system_voldev,
                HILDON_TYPE_FILE_SYSTEM_SPECIAL_LOCATION);
@@ -60,6 +64,7 @@
     location->requires_access = FALSE;
     location->is_visible = hildon_file_system_voldev_is_visible;
     location->volumes_changed = hildon_file_system_voldev_volumes_changed;
+    location->get_extra_info = hildon_file_system_voldev_get_extra_info;
 }
 
 static void
@@ -203,3 +208,18 @@
 
   g_signal_emit_by_name (location, "changed");
 }
+
+static char *
+hildon_file_system_voldev_get_extra_info (HildonFileSystemSpecialLocation
+					  *location)
+{
+  HildonFileSystemVoldev *voldev = HILDON_FILE_SYSTEM_VOLDEV (location);
+
+  if (voldev->volume)
+    return g_strdup (gnome_vfs_volume_get_device_path (voldev->volume));
+  else if (voldev->drive)
+    return g_strdup (gnome_vfs_drive_get_device_path (voldev->drive));
+  else
+    return NULL;
+}
+


More information about the maemo-commits mailing list