[rhythmbox] audiocd: don't show the search bar



commit 3e38e86a7c483d196d2cbe71cbc427a9d63e933b
Author: Jonathan Matthew <jonathan d14n org>
Date:   Fri Jun 19 14:20:19 2009 +1000

    audiocd: don't show the search bar

 plugins/audiocd/rb-audiocd-source.c |   41 +++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/plugins/audiocd/rb-audiocd-source.c b/plugins/audiocd/rb-audiocd-source.c
index ef57800..1d1de18 100644
--- a/plugins/audiocd/rb-audiocd-source.c
+++ b/plugins/audiocd/rb-audiocd-source.c
@@ -56,9 +56,17 @@
 #include "sj-structures.h"
 #endif
 
+enum
+{
+	PROP_0,
+	PROP_SEARCH_TYPE
+};
+
 static void rb_audiocd_source_dispose (GObject *object);
 static GObject *rb_audiocd_source_constructor (GType type, guint n_construct_properties,
 					        GObjectConstructParam *construct_properties);
+static void impl_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
+static void impl_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
 
 static gboolean impl_show_popup (RBSource *source);
 static guint impl_want_uri (RBSource *source, const char *uri);
@@ -99,6 +107,8 @@ rb_audiocd_source_class_init (RBAudioCdSourceClass *klass)
 
 	object_class->constructor = rb_audiocd_source_constructor;
 	object_class->dispose = rb_audiocd_source_dispose;
+	object_class->set_property = impl_set_property;
+	object_class->get_property = impl_get_property;
 
 	/* don't bother showing the browser/search bits */
 	source_class->impl_can_browse = (RBSourceFeatureFunc) rb_false_function;
@@ -113,6 +123,10 @@ rb_audiocd_source_class_init (RBAudioCdSourceClass *klass)
 	source_class->impl_try_playlist = (RBSourceFeatureFunc) rb_true_function;	/* shouldn't need this. */
 	source_class->impl_want_uri = impl_want_uri;
 
+	g_object_class_override_property (object_class,
+					  PROP_SEARCH_TYPE,
+					  "search-type");
+
 	g_type_class_add_private (klass, sizeof (RBAudioCdSourcePrivate));
 }
 
@@ -204,6 +218,33 @@ rb_audiocd_source_new (RBPlugin *plugin,
 }
 
 static void
+impl_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+	switch (prop_id) {
+	case PROP_SEARCH_TYPE:
+		/* ignored */
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
+}
+
+static void
+impl_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+	switch (prop_id) {
+	case PROP_SEARCH_TYPE:
+		g_value_set_enum (value, RB_SOURCE_SEARCH_NONE);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
+}
+
+
+static void
 entry_set_string_prop (RhythmDB *db,
 		       RhythmDBEntry *entry,
 		       gboolean is_inserted,



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