From d5746cb1df8d7b95d9d2b3def1eb0852d4bfc1c3 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Sat, 1 Mar 2008 14:29:23 +0000 Subject: Fix another case where the icon name was wrong for the root folder (Helps: 2008-03-01 Bastien Nocera * daemon/gvfsbackendobexftp.c (_query_file_info_helper): Fix another case where the icon name was wrong for the root folder (Helps: #519369) svn path=/trunk/; revision=1472 --- ChangeLog | 6 ++++++ daemon/gvfsbackendobexftp.c | 12 +++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index a5bf872b..0c64f579 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-01 Bastien Nocera + + * daemon/gvfsbackendobexftp.c (_query_file_info_helper): + Fix another case where the icon name was wrong for the + root folder (Helps: #519369) + 2008-03-01 Benjamin Otte * daemon/Makefile.am: diff --git a/daemon/gvfsbackendobexftp.c b/daemon/gvfsbackendobexftp.c index 43e141db..0e9f5182 100644 --- a/daemon/gvfsbackendobexftp.c +++ b/daemon/gvfsbackendobexftp.c @@ -68,6 +68,7 @@ struct _GVfsBackendObexftp GVfsBackend parent_instance; char *display_name; + guint type; DBusGConnection *connection; DBusGProxy *manager_proxy; @@ -418,7 +419,6 @@ _query_file_info_helper (GVfsBackend *backend, if (strcmp (filename, "/") == 0) { - GIcon *icon; char *display; /* That happens when you want '/' @@ -426,9 +426,8 @@ _query_file_info_helper (GVfsBackend *backend, g_file_info_set_file_type (info, G_FILE_TYPE_DIRECTORY); g_file_info_set_content_type (info, "inode/directory"); g_file_info_set_name (info, "/"); - icon = g_themed_icon_new ("bluetooth"); - g_file_info_set_icon (info, icon); - g_object_unref (icon); + g_vfs_backend_set_icon_name (backend, + _get_icon_from_type (op_backend->type)); display = g_strdup_printf (_("%s on %s"), "/", op_backend->display_name); g_file_info_set_display_name (info, display); g_free (display); @@ -581,7 +580,6 @@ do_mount (GVfsBackend *backend, char *server, *bdaddr; GMountSpec *obexftp_mount_spec; gboolean connected; - guint32 type; g_print ("+ do_mount\n"); @@ -627,14 +625,14 @@ do_mount (GVfsBackend *backend, path, "org.openobex.Session"); - op_backend->display_name = _get_device_properties (bdaddr, &type); + op_backend->display_name = _get_device_properties (bdaddr, &op_backend->type); if (!op_backend->display_name) op_backend->display_name = g_strdup (bdaddr); g_vfs_backend_set_display_name (G_VFS_BACKEND (op_backend), op_backend->display_name); g_vfs_backend_set_icon_name (G_VFS_BACKEND (op_backend), - _get_icon_from_type (type)); + _get_icon_from_type (op_backend->type)); obexftp_mount_spec = g_mount_spec_new ("obex"); server = g_strdup_printf ("[%s]", bdaddr); -- cgit v1.2.1