[rhythmbox] audiocd: don't require gtk 2.17.6 for metadata, just for the info bar
- From: Jonathan Matthew <jmatthew src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rhythmbox] audiocd: don't require gtk 2.17.6 for metadata, just for the info bar
- Date: Sat, 8 Aug 2009 13:30:53 +0000 (UTC)
commit 109284875f2ae5b9200daffd6c781aa53b821ea7
Author: Jonathan Matthew <jonathan d14n org>
Date: Sat Aug 8 23:29:31 2009 +1000
audiocd: don't require gtk 2.17.6 for metadata, just for the info bar
configure.ac | 4 ++--
plugins/audiocd/rb-audiocd-source.c | 10 ++++++----
2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1644096..153d344 100644
--- a/configure.ac
+++ b/configure.ac
@@ -353,8 +353,8 @@ have_sj_metadata_getter=no
AC_ARG_ENABLE(musicbrainz, AC_HELP_STRING([--disable-musicbrainz],
[don't build with MusicBrainz support]))
if test x"$enable_musicbrainz" != "xno"; then
- PKG_CHECK_MODULES(MUSICBRAINZ3, libmusicbrainz3 >= $MUSICBRAINZ3_REQS gtk+-2.0 >= 2.17.6, [have_musicbrainz3=yes], [have_musicbrainz3=no])
- PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= $MUSICBRAINZ_REQS gtk+-2.0 >= 2.17.6, [have_musicbrainz=yes], [have_musicbrainz=no])
+ PKG_CHECK_MODULES(MUSICBRAINZ3, libmusicbrainz3 >= $MUSICBRAINZ3_REQS, [have_musicbrainz3=yes], [have_musicbrainz3=no])
+ PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= $MUSICBRAINZ_REQS, [have_musicbrainz=yes], [have_musicbrainz=no])
AC_SUBST(MUSICBRAINZ3_CFLAGS)
AC_SUBST(MUSICBRAINZ3_LIBS)
diff --git a/plugins/audiocd/rb-audiocd-source.c b/plugins/audiocd/rb-audiocd-source.c
index c502ac2..f1efacc 100644
--- a/plugins/audiocd/rb-audiocd-source.c
+++ b/plugins/audiocd/rb-audiocd-source.c
@@ -93,7 +93,7 @@ static gboolean update_album_cb (GtkWidget *widget, GdkEventFocus *event, RBAudi
static gboolean update_genre_cb (GtkWidget *widget, GdkEventFocus *event, RBAudioCdSource *source);
static gboolean update_year_cb (GtkWidget *widget, GdkEventFocus *event, RBAudioCdSource *source);
static gboolean update_disc_number_cb (GtkWidget *widget, GdkEventFocus *event, RBAudioCdSource *source);
-#ifdef HAVE_SJ_METADATA_GETTER
+#if defined(HAVE_SJ_METADATA_GETTER) && GTK_CHECK_VERSION(2,17,6)
static void info_bar_response_cb (GtkInfoBar *info_bar, gint response_id, RBAudioCdSource *source);
#endif
@@ -289,7 +289,7 @@ rb_audiocd_source_constructor (GType type,
RBAudioCdSourcePrivate *priv;
GtkWidget *table;
GtkBuilder *builder;
-#ifdef HAVE_SJ_METADATA_GETTER
+#if defined(HAVE_SJ_METADATA_GETTER) && GTK_CHECK_VERSION(2,17,6)
GtkWidget *box;
char *message;
#endif
@@ -302,7 +302,7 @@ rb_audiocd_source_constructor (GType type,
table = GTK_WIDGET (gtk_builder_get_object (builder, "album_info"));
g_assert (table != NULL);
-#ifdef HAVE_SJ_METADATA_GETTER
+#if defined(HAVE_SJ_METADATA_GETTER) && GTK_CHECK_VERSION(2,17,6)
/* Info bar for non-Musicbrainz data */
priv->info_bar = gtk_info_bar_new_with_buttons (_("S_ubmit Album"), GTK_RESPONSE_OK,
_("Hide"), GTK_RESPONSE_CANCEL,
@@ -753,11 +753,13 @@ metadata_cb (SjMetadataGetter *metadata,
} else
album = (AlbumDetails *)albums->data;
+#if GTK_CHECK_VERSION(2,17,6)
if (album->metadata_source != SOURCE_MUSICBRAINZ) {
priv->submit_url = sj_metadata_getter_get_submit_url (metadata);
if (priv->submit_url != NULL)
gtk_widget_show (priv->info_bar);
}
+#endif
if (album->metadata_source == SOURCE_FALLBACK) {
rb_debug ("ignoring CD metadata from fallback source");
@@ -1220,7 +1222,7 @@ update_disc_number_cb (GtkWidget *widget, GdkEventFocus *event, RBAudioCdSource
return FALSE;
}
-#ifdef HAVE_SJ_METADATA_GETTER
+#if defined(HAVE_SJ_METADATA_GETTER) && GTK_CHECK_VERSION(2,17,6)
static void
info_bar_response_cb (GtkInfoBar *info_bar, gint response_id, RBAudioCdSource *source)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]