summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-07-11 12:29:30 +0200
committerGravatar Martin Szulecki2010-07-11 12:29:30 +0200
commitc3b363ca32bf3b18a50ec7f529bba72267ac35df (patch)
tree7c41a68e6df81c22f4b4892a5761868e4946c380
parente133e945494ad9073930973f92a640d14d53ae5f (diff)
downloadsbmanager-c3b363ca32bf3b18a50ec7f529bba72267ac35df.tar.gz
sbmanager-c3b363ca32bf3b18a50ec7f529bba72267ac35df.tar.bz2
Compile with stable libimobiledevice release without 1.1.0 API requirement
-rw-r--r--configure.ac10
-rw-r--r--src/device.c2
-rw-r--r--src/gui.c5
3 files changed, 15 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 3bf87ae..0e69f5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,15 @@ AM_PROG_CC_C_O
AC_PROG_LIBTOOL
# Checks for libraries.
-PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0)
+PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0 >= 0.9.7)
+PKG_CHECK_MODULES(libimobiledevice10, libimobiledevice-1.0 >= 1.0.0, libimobiledevice_1_0=yes, libimobiledevice_1_0=no)
+if test x"$libimobiledevice_1_0" = xyes; then
+ AC_DEFINE([HAVE_LIBIMOBILEDEVICE_1_0], 1, [Define if libimobiledevice is using 1.0.0 API])
+fi
+PKG_CHECK_MODULES(libimobiledevice11, libimobiledevice-1.0 >= 1.1.0, libimobiledevice_1_1=yes, libimobiledevice_1_1=no)
+if test x"$libimobiledevice_1_1" = xyes; then
+ AC_DEFINE([HAVE_LIBIMOBILEDEVICE_1_1], 1, [Define if libimobiledevice is using 1.1.0 API])
+fi
PKG_CHECK_MODULES(libglib2, glib-2.0 >= 2.14.1)
PKG_CHECK_MODULES(libgthread2, gthread-2.0 >= 2.14.1)
PKG_CHECK_MODULES(libplist, libplist >= 1.0)
diff --git a/src/device.c b/src/device.c
index 4617118..c36a47b 100644
--- a/src/device.c
+++ b/src/device.c
@@ -186,6 +186,7 @@ gboolean device_sbs_set_iconstate(sbservices_client_t sbc, plist_t iconstate, GE
return result;
}
+#ifdef HAVE_LIBIMOBILEDEVICE_1_1
gboolean device_sbs_save_wallpaper(sbservices_client_t sbc, const char *filename, GError **error)
{
gboolean res = FALSE;
@@ -207,6 +208,7 @@ gboolean device_sbs_save_wallpaper(sbservices_client_t sbc, const char *filename
}
return res;
}
+#endif
device_info_t device_info_new()
{
diff --git a/src/gui.c b/src/gui.c
index 0ab2ac7..1c88591 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -1113,6 +1113,7 @@ static gboolean wait_icon_load_finished(gpointer user_data)
return res;
}
+#ifdef HAVE_LIBIMOBILEDEVICE_1_1
static void gui_set_wallpaper(const char *wp)
{
GError *err = NULL;
@@ -1132,6 +1133,7 @@ static void gui_set_wallpaper(const char *wp)
clutter_actor_lower_bottom(actor);
wallpaper = actor;
}
+#endif
static gboolean gui_pages_init_cb(gpointer user_data)
{
@@ -1157,13 +1159,14 @@ static gboolean gui_pages_init_cb(gpointer user_data)
}
if (sbc) {
+#ifdef HAVE_LIBIMOBILEDEVICE_1_1
if (osversion >= 0x04000000) {
/* Load wallpaper if available */
if (device_sbs_save_wallpaper(sbc, "/tmp/wallpaper.png", &error)) {
gui_set_wallpaper("/tmp/wallpaper.png");
}
}
-
+#endif
/* Load icon data */
if (device_sbs_get_iconstate(sbc, &iconstate, &error)) {
gui_set_iconstate(iconstate);