[banshee/gtk3] build: Use gio-sharp-3.0 from gtk-sharp instead of standalone gio-sharp
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/gtk3] build: Use gio-sharp-3.0 from gtk-sharp instead of standalone gio-sharp
- Date: Mon, 18 Jul 2011 20:15:19 +0000 (UTC)
commit c12f3909b209df8eeaa17c3f7edf33a044ba9f9c
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Mon Jul 18 21:58:41 2011 +0200
build: Use gio-sharp-3.0 from gtk-sharp instead of standalone gio-sharp
Drop dependency on gkeyfile-sharp, gtk-sharp-beans and standalone
gio-sharp. Everything they provided is now in gtk-sharp itself.
Do the small changes in DeviceMediaCapabilities necessary to adapt to
gtk-sharp naming.
As usual, you need the very latest gtk-sharp from git master for that to
work.
build/build.environment.mk | 3 +--
build/m4/banshee/gio.m4 | 17 ++---------------
.../DeviceMediaCapabilities.cs | 13 +++++++------
.../Banshee.Hardware.Gio/LowLevel/Manager.cs | 1 +
4 files changed, 11 insertions(+), 23 deletions(-)
---
diff --git a/build/build.environment.mk b/build/build.environment.mk
index 84c0d86..06c8897 100644
--- a/build/build.environment.mk
+++ b/build/build.environment.mk
@@ -17,7 +17,6 @@ LINK_GLIB = $(GLIBSHARP_LIBS)
LINK_GTK = $(GTKSHARP_LIBS)
LINK_GCONF = $(GCONFSHARP_LIBS)
LINK_GIO = $(GTKSHARP_BEANS_LIBS) $(GIOSHARP_LIBS)
-LINK_GKEYFILE = $(GKEYFILE_SHARP_LIBS)
LINK_GUDEV = $(GUDEV_SHARP_LIBS)
LINK_DBUS = $(DBUS_SHARP_LIBS) $(DBUS_SHARP_GLIB_LIBS)
LINK_DBUS_NO_GLIB = $(DBUS_SHARP_LIBS)
@@ -166,7 +165,7 @@ REF_EXTENSION_UBUNTUONEMUSICSTORE= $(LINK_BANSHEE_THICKCLIENT_DEPS) $(LINK_UBUNT
REF_EXTENSION_WIKIPEDIA= $(LINK_BANSHEE_WEBBROWSER_DEPS)
# Backends
-REF_BACKEND_GIO = $(LINK_BANSHEE_SERVICES_DEPS) $(LINK_GIO) $(LINK_GUDEV) $(LINK_GKEYFILE)
+REF_BACKEND_GIO = $(LINK_BANSHEE_SERVICES_DEPS) $(LINK_GIO) $(LINK_GUDEV)
REF_BACKEND_GNOME = $(LINK_BANSHEE_SERVICES_DEPS) $(LINK_BANSHEE_THICKCLIENT_DEPS) $(LINK_GCONF)
REF_BACKEND_GSTREAMER = $(LINK_BANSHEE_SERVICES_DEPS) $(LINK_GLIB)
REF_BACKEND_UNIX = $(LINK_BANSHEE_CORE_DEPS) $(LINK_MONO_POSIX)
diff --git a/build/m4/banshee/gio.m4 b/build/m4/banshee/gio.m4
index 51ff94b..e3d5102 100644
--- a/build/m4/banshee/gio.m4
+++ b/build/m4/banshee/gio.m4
@@ -6,15 +6,11 @@ AC_DEFUN([BANSHEE_CHECK_GIO_SHARP],
AC_ARG_ENABLE(gio_hardware, AC_HELP_STRING([--disable-gio-hardware], [Disable GIO Hardware backend]), ,enable_gio_hardware="yes")
if test "x$enable_gio" = "xyes"; then
- PKG_CHECK_MODULES(GTKSHARP_BEANS,
- gtk-sharp-beans-2.0 >= $GNOMESHARP_REQUIRED,
- enable_gio=yes, enable_gio=no)
-
PKG_CHECK_MODULES(GIOSHARP,
- gio-sharp-2.0 >= 2.22,
+ gio-sharp-3.0 >= 2.99,
enable_gio="$enable_gio", enable_gio=no)
- asms="`$PKG_CONFIG --variable=Libraries gio-sharp-2.0` `$PKG_CONFIG --variable=Libraries gtk-sharp-beans-2.0`"
+ asms="`$PKG_CONFIG --variable=Libraries gio-sharp-3.0`"
for asm in $asms; do
FILENAME=`basename $asm`
if [[ "`echo $SEENBEFORE | grep $FILENAME`" = "" ]]; then
@@ -26,22 +22,13 @@ AC_DEFUN([BANSHEE_CHECK_GIO_SHARP],
done
AC_SUBST(GIOSHARP_ASSEMBLIES)
- PKG_CHECK_MODULES(GLIB_2_22,
- glib-2.0 >= 2.22,
- enable_gio="$enable_gio", enable_gio=no)
-
if test "x$enable_gio_hardware" = "xyes"; then
PKG_CHECK_MODULES(GUDEV_SHARP,
gudev-sharp-1.0 >= 0.1,
enable_gio_hardware="$enable_gio", enable_gio_hardware=no)
- PKG_CHECK_MODULES(GKEYFILE_SHARP,
- gkeyfile-sharp >= 0.1,
- enable_gio_hardware="$enable_gio_hardware", enable_gio_hardware=no)
-
if test "x$enable_gio_hardware" = "xno"; then
GUDEV_SHARP_LIBS=''
- GKEYFILE_SHARP_LIBS=''
fi
fi
diff --git a/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/DeviceMediaCapabilities.cs b/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/DeviceMediaCapabilities.cs
index e4c1611..45a6c5e 100644
--- a/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/DeviceMediaCapabilities.cs
+++ b/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/DeviceMediaCapabilities.cs
@@ -29,7 +29,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
-using KeyFile;
+using GLib;
using Banshee.Base;
using Banshee.Hardware;
@@ -132,24 +132,25 @@ namespace Banshee.Hardware.Gio
#endregion
private class GMpiFileInfo
{
- private const char Seperator = ';';
+ private const char Separator = ';';
private const string MediaGroup = "Media";
private const string DeviceGroup = "Device";
private const string VendorGroup = "Vendor";
private const string StorageGroup = "storage";
private const string PlaylistGroup = "Playlist";
- private GKeyFile mpi_file;
+ private KeyFile mpi_file;
public GMpiFileInfo (string mediaPlayerId)
{
try {
- mpi_file = new GKeyFile ();
- mpi_file.ListSeparator = Seperator;
+ mpi_file = new KeyFile ();
+ mpi_file.SetListSeparator (Separator);
+ string full_path;
mpi_file.LoadFromDirs (String.Format ("{0}.mpi", mediaPlayerId),
new string [] {"/usr/share/media-player-info",
"/usr/local/share/media-player-info"},
- null, Flags.None);
+ out full_path, KeyFileFlags.None);
} catch (GLib.GException) {
Hyena.Log.WarningFormat ("Failed to load media-player-info file for {0}",
mediaPlayerId);
diff --git a/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/Manager.cs b/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/Manager.cs
index 213e747..bb8d6f7 100644
--- a/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/Manager.cs
+++ b/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/Manager.cs
@@ -72,6 +72,7 @@ namespace Banshee.Hardware.Gio
void HandleMonitorMountAdded (object o, MountAddedArgs args)
{
// Manually get the mount as gio-sharp translates it to the wrong managed object
+ // TODO: check if this workaround is still needed
var mount = GLib.MountAdapter.GetObject ((GLib.Object) args.Args [0]);
if (mount.Volume == null)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]