gnome-panel r10807 - trunk/gnome-panel
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-panel r10807 - trunk/gnome-panel
- Date: Mon, 11 Feb 2008 10:36:10 +0000 (GMT)
Author: vuntz
Date: Mon Feb 11 10:36:10 2008
New Revision: 10807
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=10807&view=rev
Log:
2008-02-11 Vincent Untz <vuntz gnome org>
* panel-menu-items.c: (panel_place_menu_item_append_local_gio),
(panel_place_menu_item_append_remote_gio): use g_file_is_native()
instead of looking at the URI scheme
Modified:
trunk/gnome-panel/ChangeLog
trunk/gnome-panel/panel-menu-items.c
Modified: trunk/gnome-panel/panel-menu-items.c
==============================================================================
--- trunk/gnome-panel/panel-menu-items.c (original)
+++ trunk/gnome-panel/panel-menu-items.c Mon Feb 11 10:36:10 2008
@@ -788,7 +788,6 @@
mounts = g_volume_monitor_get_mounts (place_item->priv->volume_monitor);
for (l = mounts; l != NULL; l = l->next) {
GFile *root;
- char *scheme;
mount = l->data;
@@ -800,15 +799,12 @@
}
root = g_mount_get_root (mount);
- scheme = g_file_get_uri_scheme (root);
- g_object_unref (root);
-
- if (scheme && strcmp (scheme, "file") != 0) {
- g_free (scheme);
+ if (!g_file_is_native (root)) {
+ g_object_unref (root);
g_object_unref (mount);
continue;
}
- g_free (scheme);
+ g_object_unref (root);
panel_menu_item_append_mount (menu, mount);
g_object_unref (mount);
@@ -833,7 +829,6 @@
for (l = mounts; l; l = l->next) {
GVolume *volume;
GFile *root;
- char *scheme;
mount = l->data;
volume = g_mount_get_volume (mount);
@@ -844,15 +839,13 @@
}
root = g_mount_get_root (mount);
- scheme = g_file_get_uri_scheme (root);
- g_object_unref (root);
-
- if (scheme && strcmp (scheme, "file") == 0) {
- g_free (scheme);
+ if (g_file_is_native (root)) {
+ g_object_unref (root);
g_object_unref (mount);
continue;
}
- g_free (scheme);
+ g_object_unref (root);
+
add_mounts = g_slist_prepend (add_mounts, mount);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]