[gvfs] afc: Detect iPad and set correct icon name
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] afc: Detect iPad and set correct icon name
- Date: Wed, 7 Apr 2010 09:20:11 +0000 (UTC)
commit 1cb5861795d375719b196ecf93fb0a10397414d3
Author: Martin Szulecki <opensuse sukimashita com>
Date: Wed Apr 7 10:48:29 2010 +0200
afc: Detect iPad and set correct icon name
https://bugzilla.gnome.org/show_bug.cgi?id=615039
daemon/gvfsbackendafc.c | 4 ++++
monitor/afc/afcvolume.c | 7 ++++++-
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c
index 9f396a7..a6c9e14 100644
--- a/daemon/gvfsbackendafc.c
+++ b/daemon/gvfsbackendafc.c
@@ -386,6 +386,10 @@ g_vfs_backend_afc_mount (GVfsBackend *backend,
{
g_vfs_backend_set_icon_name (G_VFS_BACKEND(self), "multimedia-player-apple-ipod-touch");
}
+ else if ((self->model != NULL) && (strstr(self->model, "iPad") != NULL))
+ {
+ g_vfs_backend_set_icon_name (G_VFS_BACKEND(self), "computer-apple-ipad");
+ }
else
{
g_vfs_backend_set_icon_name (G_VFS_BACKEND(self), "phone-apple-iphone");
diff --git a/monitor/afc/afcvolume.c b/monitor/afc/afcvolume.c
index 26da41f..10598cd 100644
--- a/monitor/afc/afcvolume.c
+++ b/monitor/afc/afcvolume.c
@@ -116,11 +116,16 @@ _g_vfs_afc_volume_update_metadata (GVfsAfcVolume *self)
model = NULL;
if (afc_get_device_info_key (afc_cli, "Model", &model) == AFC_E_SUCCESS)
{
- if(g_str_has_prefix(model, "iPod") != FALSE)
+ if (g_str_has_prefix(model, "iPod") != FALSE)
{
g_free (self->icon);
self->icon = g_strdup ("multimedia-player-apple-ipod-touch");
}
+ else if (g_str_has_prefix(model, "iPad") != FALSE)
+ {
+ g_free (self->icon);
+ self->icon = g_strdup ("computer-apple-ipad");
+ }
g_free (model);
}
afc_client_free(afc_cli);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]