[banshee] [build] Only use ApplicationName w/ recent glib#



commit f997dae333e3d37d59539d06f900b9de9c4604ad
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Tue Dec 15 16:53:17 2009 -0800

    [build] Only use ApplicationName w/ recent glib#
    
    GLib.Global.ApplicationName was only added in glib# 2.12.7.
    Detect if glib# is at least 2.12.7, and act accordingly. Fixes part of
    BGO#602589.
    
    Signed-off-by: Gabriel Burt <gabriel burt gmail com>

 build/m4/banshee/gtk-sharp.m4                      |    6 ++++++
 .../Banshee.Gui/GtkBaseClient.cs                   |    2 ++
 src/Core/Banshee.ThickClient/Makefile.am           |    4 ++++
 3 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/build/m4/banshee/gtk-sharp.m4 b/build/m4/banshee/gtk-sharp.m4
index 4f6fff5..6b2dbe8 100644
--- a/build/m4/banshee/gtk-sharp.m4
+++ b/build/m4/banshee/gtk-sharp.m4
@@ -11,6 +11,12 @@ AC_DEFUN([BANSHEE_CHECK_GTK_SHARP],
 		glib-sharp-2.0 >= $GTKSHARP_REQUIRED)
 	AC_SUBST(GLIBSHARP_LIBS)
 
+	PKG_CHECK_MODULES(GLIBSHARP_2_12_7,
+		glib-sharp-2.0 >= 2.12.7,
+		HAVE_GLIBSHARP_2_12_7=yes,
+		HAVE_GLIBSHARP_2_12_7=no)
+	AM_CONDITIONAL(HAVE_GLIBSHARP_2_12_7, [test "$HAVE_GLIBSHARP_2_12_7" = "yes"])
+
     PKG_CHECK_MODULES(GTKSHARP_A11Y, gtk-sharp-2.0 >= 2.12.10, gtksharp_with_a11y=yes, gtksharp_with_a11y=no)
 	AM_CONDITIONAL(ENABLE_ATK, test "x$gtksharp_with_a11y" = "xyes")
 
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs b/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs
index b4a2a3a..ff88c29 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs
@@ -121,7 +121,9 @@ namespace Banshee.Gui
             ThreadAssist.InitializeMainThread ();
 
             Gdk.Global.ProgramClass = Application.InternalName;
+#if HAVE_GLIBSHARP_2_12_7
             GLib.Global.ApplicationName = "Banshee";
+#endif
 
             if (ApplicationContext.Debugging) {
                 GLib.Log.SetLogHandler ("Gtk", GLib.LogLevelFlags.Critical, GLib.Log.PrintTraceLogFunction);
diff --git a/src/Core/Banshee.ThickClient/Makefile.am b/src/Core/Banshee.ThickClient/Makefile.am
index e9f7d4a..9f476c0 100644
--- a/src/Core/Banshee.ThickClient/Makefile.am
+++ b/src/Core/Banshee.ThickClient/Makefile.am
@@ -3,6 +3,10 @@ TARGET = library
 ASSEMBLY_BUILD_FLAGS = -unsafe
 LINK = $(REF_BANSHEE_THICKCLIENT)
 
+if HAVE_GLIBSHARP_2_12_7
+BUILD_DEFINES = "-define:HAVE_GLIBSHARP_2_12_7"
+endif
+
 SOURCES =  \
 	Banshee.Addins.Gui/AddinDetailsDialog.cs \
 	Banshee.Addins.Gui/AddinTile.cs \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]