diff options
author | Juan A. Suarez Romero <jasuarez@igalia.com> | 2010-03-04 22:17:13 +0100 |
---|---|---|
committer | Juan A. Suarez Romero <jasuarez@igalia.com> | 2010-03-04 23:33:41 +0100 |
commit | 923ad6b0ea117b77cc99344b6e77a982070eac27 (patch) | |
tree | 085939fc7b43c015d8fec16300b9a3e5e7f8af5a | |
parent | 241c49f746f191a602a243778288a6f67e567147 (diff) | |
download | grilo-923ad6b0ea117b77cc99344b6e77a982070eac27.tar.gz |
Rename GrlDataBox to GrlMediaBox
-rw-r--r-- | bindings/vala/grilo-0.1.vapi | 10 | ||||
-rw-r--r-- | bindings/vala/grilo-0.1/grilo-0.1.gi | 18 | ||||
-rw-r--r-- | doc/reference/grilo-docs.sgml | 2 | ||||
-rw-r--r-- | src/data/Makefile.am | 4 | ||||
-rw-r--r-- | src/data/grl-data-box.h | 79 | ||||
-rw-r--r-- | src/data/grl-data.c | 2 | ||||
-rw-r--r-- | src/data/grl-media-box.c (renamed from src/data/grl-data-box.c) | 46 | ||||
-rw-r--r-- | src/data/grl-media-box.h | 79 | ||||
-rw-r--r-- | src/grilo.h | 2 | ||||
-rw-r--r-- | src/grl-media-source.c | 12 | ||||
-rw-r--r-- | src/grl-media-source.h | 8 | ||||
-rw-r--r-- | tools/grilo-test-ui/main.c | 18 |
12 files changed, 140 insertions, 140 deletions
diff --git a/bindings/vala/grilo-0.1.vapi b/bindings/vala/grilo-0.1.vapi index b8c5e35..99f0629 100644 --- a/bindings/vala/grilo-0.1.vapi +++ b/bindings/vala/grilo-0.1.vapi @@ -29,9 +29,9 @@ namespace Grl { public MediaAudio (); } [CCode (cheader_filename = "grilo.h")] - public class DataBox : Grl.Media { + public class MediaBox : Grl.Media { [CCode (type = "GrlMedia*", has_construct_function = false)] - public DataBox (); + public MediaBox (); public int get_childcount (); public void set_childcount (int childcount); } @@ -90,7 +90,7 @@ namespace Grl { public virtual void search (string text, GLib.List keys, uint skip, uint count, Grl.MetadataResolutionFlags flags, Grl.MediaSourceResultCb callback); public void set_auto_split_threshold (uint threshold); public void set_operation_data (uint operation_id, void* data); - public virtual void store (Grl.DataBox parent, Grl.Media media, Grl.MediaSourceStoreCb callback); + public virtual void store (Grl.MediaBox parent, Grl.Media media, Grl.MediaSourceStoreCb callback); public uint auto_split_threshold { get; set; } } [Compact] @@ -156,7 +156,7 @@ namespace Grl { public class MediaSourceStoreSpec { public weak Grl.MediaSourceStoreCb callback; public weak Grl.Media media; - public weak Grl.DataBox parent; + public weak Grl.MediaBox parent; public weak Grl.MediaSource source; public void* user_data; } @@ -268,7 +268,7 @@ namespace Grl { [CCode (cheader_filename = "grilo.h", instance_pos = 4.1)] public delegate void MediaSourceResultCb (Grl.MediaSource source, uint browse_id, Grl.Media? media, uint remaining, GLib.Error error); [CCode (cheader_filename = "grilo.h", instance_pos = 4.1)] - public delegate void MediaSourceStoreCb (Grl.MediaSource source, Grl.DataBox parent, Grl.Media? media, GLib.Error error); + public delegate void MediaSourceStoreCb (Grl.MediaSource source, Grl.MediaBox parent, Grl.Media? media, GLib.Error error); [CCode (cheader_filename = "grilo.h", instance_pos = 2.1)] public delegate void MetadataSourceResolveCb (Grl.MetadataSource source, Grl.Media? media, GLib.Error error); [CCode (cheader_filename = "grilo.h")] diff --git a/bindings/vala/grilo-0.1/grilo-0.1.gi b/bindings/vala/grilo-0.1/grilo-0.1.gi index af44573..caf2955 100644 --- a/bindings/vala/grilo-0.1/grilo-0.1.gi +++ b/bindings/vala/grilo-0.1/grilo-0.1.gi @@ -40,7 +40,7 @@ <return-type type="void"/> <parameters> <parameter name="source" type="GrlMediaSource*"/> - <parameter name="parent" type="GrlDataBox*"/> + <parameter name="parent" type="GrlMediaBox*"/> <parameter name="media" type="GrlMedia*"/> <parameter name="user_data" type="gpointer"/> <parameter name="error" type="GError*"/> @@ -107,7 +107,7 @@ </struct> <struct name="GrlMediaSourceStoreSpec"> <field name="source" type="GrlMediaSource*"/> - <field name="parent" type="GrlDataBox*"/> + <field name="parent" type="GrlMediaBox*"/> <field name="media" type="GrlMedia*"/> <field name="callback" type="GrlMediaSourceStoreCb"/> <field name="user_data" type="gpointer"/> @@ -290,20 +290,20 @@ <return-type type="GrlMedia*"/> </constructor> </object> - <object name="GrlDataBox" parent="GrlMedia" type-name="GrlDataBox" get-type="grl_data_box_get_type"> - <method name="get_childcount" symbol="grl_data_box_get_childcount"> + <object name="GrlMediaBox" parent="GrlMedia" type-name="GrlMediaBox" get-type="grl_media_box_get_type"> + <method name="get_childcount" symbol="grl_media_box_get_childcount"> <return-type type="gint"/> <parameters> - <parameter name="data" type="GrlDataBox*"/> + <parameter name="data" type="GrlMediaBox*"/> </parameters> </method> - <constructor name="new" symbol="grl_data_box_new"> + <constructor name="new" symbol="grl_media_box_new"> <return-type type="GrlMedia*"/> </constructor> - <method name="set_childcount" symbol="grl_data_box_set_childcount"> + <method name="set_childcount" symbol="grl_media_box_set_childcount"> <return-type type="void"/> <parameters> - <parameter name="data" type="GrlDataBox*"/> + <parameter name="data" type="GrlMediaBox*"/> <parameter name="childcount" type="gint"/> </parameters> </method> @@ -490,7 +490,7 @@ <return-type type="void"/> <parameters> <parameter name="source" type="GrlMediaSource*"/> - <parameter name="parent" type="GrlDataBox*"/> + <parameter name="parent" type="GrlMediaBox*"/> <parameter name="media" type="GrlMedia*"/> <parameter name="callback" type="GrlMediaSourceStoreCb"/> <parameter name="user_data" type="gpointer"/> diff --git a/doc/reference/grilo-docs.sgml b/doc/reference/grilo-docs.sgml index 86cf888..3a0e989 100644 --- a/doc/reference/grilo-docs.sgml +++ b/doc/reference/grilo-docs.sgml @@ -45,7 +45,7 @@ <title>Media data</title> <xi:include href="xml/grl-data.xml"/> <xi:include href="xml/grl-media.xml"/> - <xi:include href="xml/grl-data-box.xml"/> + <xi:include href="xml/grl-media-box.xml"/> <xi:include href="xml/grl-data-video.xml"/> <xi:include href="xml/grl-media-audio.xml"/> <xi:include href="xml/grl-data-image.xml"/> diff --git a/src/data/Makefile.am b/src/data/Makefile.am index ab5e979..256be00 100644 --- a/src/data/Makefile.am +++ b/src/data/Makefile.am @@ -20,7 +20,7 @@ libdata_la_SOURCES = \ grl-media-audio.c \ grl-data-video.c \ grl-data-image.c \ - grl-data-box.c \ + grl-media-box.c \ grl-config.c libdataincdir = $(includedir)/@GRL_NAME@ @@ -28,7 +28,7 @@ libdataincdir = $(includedir)/@GRL_NAME@ libdatainc_HEADERS = \ grl-data.h \ grl-media.h \ - grl-data-box.h \ + grl-media-box.h \ grl-media-audio.h \ grl-data-video.h \ grl-data-image.h \ diff --git a/src/data/grl-data-box.h b/src/data/grl-data-box.h deleted file mode 100644 index 60c97c1..0000000 --- a/src/data/grl-data-box.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2010 Igalia S.L. - * - * Contact: Iago Toral Quiroga <itoral@igalia.com> - * - * Authors: Juan A. Suarez Romero <jasuarez@igalia.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; version 2.1 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - * - */ - -#ifndef _GRL_DATA_BOX_H_ -#define _GRL_DATA_BOX_H_ - -#include <grl-media.h> - - -G_BEGIN_DECLS - -#define GRL_TYPE_DATA_BOX \ - (grl_data_box_get_type()) - -#define GRL_DATA_BOX(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ - GRL_TYPE_DATA_BOX, \ - GrlDataBox)) - -#define GRL_DATA_BOX_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), \ - GRL_TYPE_DATA_BOX, \ - GrlDataBoxClass)) - -#define GRL_IS_DATA_BOX(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ - GRL_TYPE_DATA_BOX)) - -#define GRL_IS_DATA_BOX_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), \ - GRL_TYPE_DATA_BOX)) - -#define GRL_DATA_BOX_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), \ - GRL_TYPE_DATA_BOX, \ - GrlDataBoxClass)) - -typedef struct _GrlDataBox GrlDataBox; -typedef struct _GrlDataBoxClass GrlDataBoxClass; - -struct _GrlDataBoxClass -{ - GrlMediaClass parent_class; -}; - -struct _GrlDataBox -{ - GrlMedia parent; -}; - -GType grl_data_box_get_type (void) G_GNUC_CONST; -GrlMedia *grl_data_box_new (void); -void grl_data_box_set_childcount (GrlDataBox *box, gint childcount); -gint grl_data_box_get_childcount (GrlDataBox *box); - -G_END_DECLS - -#endif /* _GRL_DATA_BOX_H_ */ diff --git a/src/data/grl-data.c b/src/data/grl-data.c index 3730bb4..d60fd6f 100644 --- a/src/data/grl-data.c +++ b/src/data/grl-data.c @@ -25,7 +25,7 @@ /** * SECTION:grl-data * @short_description: Low-level class to store data - * @see_also: #GrlMedia, #GrlDataBox, #GrlDataVideo, #GrlMediaAudio, #GrlDataImage + * @see_also: #GrlMedia, #GrlMediaBox, #GrlDataVideo, #GrlMediaAudio, #GrlDataImage * * This class acts as dictionary where keys and their values can be stored. It * is suggested to better high level classes, like #GrlMedia, which diff --git a/src/data/grl-data-box.c b/src/data/grl-media-box.c index 6e708b5..3195ee8 100644 --- a/src/data/grl-data-box.c +++ b/src/data/grl-media-box.c @@ -29,60 +29,60 @@ * */ -#include "grl-data-box.h" +#include "grl-media-box.h" #define MIME_BOX "x-grl/box" -static void grl_data_box_dispose (GObject *object); -static void grl_data_box_finalize (GObject *object); +static void grl_media_box_dispose (GObject *object); +static void grl_media_box_finalize (GObject *object); -G_DEFINE_TYPE (GrlDataBox, grl_data_box, GRL_TYPE_MEDIA); +G_DEFINE_TYPE (GrlMediaBox, grl_media_box, GRL_TYPE_MEDIA); static void -grl_data_box_class_init (GrlDataBoxClass *klass) +grl_media_box_class_init (GrlMediaBoxClass *klass) { GObjectClass *gobject_class = (GObjectClass *)klass; - gobject_class->dispose = grl_data_box_dispose; - gobject_class->finalize = grl_data_box_finalize; + gobject_class->dispose = grl_media_box_dispose; + gobject_class->finalize = grl_media_box_finalize; } static void -grl_data_box_init (GrlDataBox *self) +grl_media_box_init (GrlMediaBox *self) { - grl_data_box_set_childcount (self, GRL_METADATA_KEY_CHILDCOUNT_UNKNOWN); + grl_media_box_set_childcount (self, GRL_METADATA_KEY_CHILDCOUNT_UNKNOWN); grl_media_set_mime (GRL_MEDIA (self), MIME_BOX); } static void -grl_data_box_dispose (GObject *object) +grl_media_box_dispose (GObject *object) { - G_OBJECT_CLASS (grl_data_box_parent_class)->dispose (object); + G_OBJECT_CLASS (grl_media_box_parent_class)->dispose (object); } static void -grl_data_box_finalize (GObject *object) +grl_media_box_finalize (GObject *object) { g_signal_handlers_destroy (object); - G_OBJECT_CLASS (grl_data_box_parent_class)->finalize (object); + G_OBJECT_CLASS (grl_media_box_parent_class)->finalize (object); } /** - * grl_data_box_new: + * grl_media_box_new: * * Creates a new data box object. * * Returns: a newly-allocated data box. **/ GrlMedia * -grl_data_box_new (void) +grl_media_box_new (void) { - return GRL_MEDIA (g_object_new (GRL_TYPE_DATA_BOX, + return GRL_MEDIA (g_object_new (GRL_TYPE_MEDIA_BOX, NULL)); } /** - * grl_data_box_set_childcount: + * grl_media_box_set_childcount: * @data: data to change * @childcount: number of children * @@ -90,10 +90,10 @@ grl_data_box_new (void) * #GRL_METADATA_KEY_CHILDCOUNT_UNKNOWN if it is unknown. **/ void -grl_data_box_set_childcount (GrlDataBox *box, - gint childcount) +grl_media_box_set_childcount (GrlMediaBox *box, + gint childcount) { - g_return_if_fail (GRL_IS_DATA_BOX (box)); + g_return_if_fail (GRL_IS_MEDIA_BOX (box)); if (childcount != GRL_METADATA_KEY_CHILDCOUNT_UNKNOWN) { grl_data_set_int (GRL_DATA (box), @@ -107,7 +107,7 @@ grl_data_box_set_childcount (GrlDataBox *box, } /** - * grl_data_box_get_childcount: + * grl_media_box_get_childcount: * @data: data to inspect * * Number of children of this box. @@ -116,9 +116,9 @@ grl_data_box_set_childcount (GrlDataBox *box, * unknown. **/ gint -grl_data_box_get_childcount (GrlDataBox *box) +grl_media_box_get_childcount (GrlMediaBox *box) { - g_return_val_if_fail (GRL_IS_DATA_BOX (box), + g_return_val_if_fail (GRL_IS_MEDIA_BOX (box), GRL_METADATA_KEY_CHILDCOUNT_UNKNOWN); const GValue *value = grl_data_get (GRL_DATA (box), diff --git a/src/data/grl-media-box.h b/src/data/grl-media-box.h new file mode 100644 index 0000000..8baf8f7 --- /dev/null +++ b/src/data/grl-media-box.h @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2010 Igalia S.L. + * + * Contact: Iago Toral Quiroga <itoral@igalia.com> + * + * Authors: Juan A. Suarez Romero <jasuarez@igalia.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef _GRL_MEDIA_BOX_H_ +#define _GRL_MEDIA_BOX_H_ + +#include <grl-media.h> + + +G_BEGIN_DECLS + +#define GRL_TYPE_MEDIA_BOX \ + (grl_media_box_get_type()) + +#define GRL_MEDIA_BOX(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ + GRL_TYPE_MEDIA_BOX, \ + GrlMediaBox)) + +#define GRL_MEDIA_BOX_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), \ + GRL_TYPE_MEDIA_BOX, \ + GrlMediaBoxClass)) + +#define GRL_IS_MEDIA_BOX(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ + GRL_TYPE_MEDIA_BOX)) + +#define GRL_IS_MEDIA_BOX_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), \ + GRL_TYPE_MEDIA_BOX)) + +#define GRL_MEDIA_BOX_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), \ + GRL_TYPE_MEDIA_BOX, \ + GrlMediaBoxClass)) + +typedef struct _GrlMediaBox GrlMediaBox; +typedef struct _GrlMediaBoxClass GrlMediaBoxClass; + +struct _GrlMediaBoxClass +{ + GrlMediaClass parent_class; +}; + +struct _GrlMediaBox +{ + GrlMedia parent; +}; + +GType grl_media_box_get_type (void) G_GNUC_CONST; +GrlMedia *grl_media_box_new (void); +void grl_media_box_set_childcount (GrlMediaBox *box, gint childcount); +gint grl_media_box_get_childcount (GrlMediaBox *box); + +G_END_DECLS + +#endif /* _GRL_MEDIA_BOX_H_ */ diff --git a/src/grilo.h b/src/grilo.h index 25ce081..d0c0ee3 100644 --- a/src/grilo.h +++ b/src/grilo.h @@ -41,7 +41,7 @@ #include <grl-media-audio.h> #include <grl-data-video.h> #include <grl-data-image.h> -#include <grl-data-box.h> +#include <grl-media-box.h> #include <grl-config.h> #endif /* _GRL_MEDIA_STORE_H_ */ diff --git a/src/grl-media-source.c b/src/grl-media-source.c index 83f80fa..ecbaae3 100644 --- a/src/grl-media-source.c +++ b/src/grl-media-source.c @@ -42,7 +42,7 @@ #include "grl-media-source.h" #include "grl-metadata-source-priv.h" #include "data/grl-media.h" -#include "data/grl-data-box.h" +#include "data/grl-media-box.h" #include "grl-error.h" #include <string.h> @@ -1188,7 +1188,7 @@ grl_media_source_browse (GrlMediaSource *source, bs->user_data = _user_data; if (!container) { /* Special case: NULL container ==> NULL id */ - bs->container = grl_data_box_new (); + bs->container = grl_media_box_new (); grl_media_set_id (bs->container, NULL); } else { bs->container = g_object_ref (container); @@ -1564,7 +1564,7 @@ grl_media_source_metadata (GrlMediaSource *source, ms->user_data = _user_data; if (!media) { /* Special case, NULL media ==> root container */ - ms->media = grl_data_box_new (); + ms->media = grl_media_box_new (); grl_media_set_id (ms->media, NULL); } else { ms->media = g_object_ref (media); @@ -1729,7 +1729,7 @@ grl_media_source_set_auto_split_threshold (GrlMediaSource *source, */ void grl_media_source_store (GrlMediaSource *source, - GrlDataBox *parent, + GrlMediaBox *parent, GrlMedia *media, GrlMediaSourceStoreCb callback, gpointer user_data) @@ -1741,7 +1741,7 @@ grl_media_source_store (GrlMediaSource *source, GError *error = NULL; g_return_if_fail (GRL_IS_MEDIA_SOURCE (source)); - g_return_if_fail (!parent || GRL_IS_DATA_BOX (parent)); + g_return_if_fail (!parent || GRL_IS_MEDIA_BOX (parent)); g_return_if_fail (GRL_IS_MEDIA (media)); g_return_if_fail (callback != NULL); g_return_if_fail ((!parent && @@ -1759,7 +1759,7 @@ grl_media_source_store (GrlMediaSource *source, error = g_error_new (GRL_ERROR, GRL_ERROR_STORE_FAILED, "Media has no title, cannot store"); - } else if (!url && !GRL_IS_DATA_BOX (media)) { + } else if (!url && !GRL_IS_MEDIA_BOX (media)) { error = g_error_new (GRL_ERROR, GRL_ERROR_STORE_FAILED, "Media has no URL, cannot store"); diff --git a/src/grl-media-source.h b/src/grl-media-source.h index 739a26a..a8bf744 100644 --- a/src/grl-media-source.h +++ b/src/grl-media-source.h @@ -26,7 +26,7 @@ #include <grl-media-plugin.h> #include <grl-metadata-source.h> #include <grl-data.h> -#include <grl-data-box.h> +#include <grl-media-box.h> #include <glib.h> #include <glib-object.h> @@ -117,7 +117,7 @@ typedef void (*GrlMediaSourceMetadataCb) (GrlMediaSource *source, * Prototype for the callback passed to grl_media_source_store() */ typedef void (*GrlMediaSourceStoreCb) (GrlMediaSource *source, - GrlDataBox *parent, + GrlMediaBox *parent, GrlMedia *media, gpointer user_data, const GError *error); @@ -253,7 +253,7 @@ typedef struct { */ typedef struct { GrlMediaSource *source; - GrlDataBox *parent; + GrlMediaBox *parent; GrlMedia *media; GrlMediaSourceStoreCb callback; gpointer user_data; @@ -357,7 +357,7 @@ void grl_media_source_metadata (GrlMediaSource *source, gpointer user_data); void grl_media_source_store (GrlMediaSource *source, - GrlDataBox *parent, + GrlMediaBox *parent, GrlMedia *media, GrlMediaSourceStoreCb callback, gpointer user_data); diff --git a/tools/grilo-test-ui/main.c b/tools/grilo-test-ui/main.c index 7fa0bc3..0a098ce 100644 --- a/tools/grilo-test-ui/main.c +++ b/tools/grilo-test-ui/main.c @@ -217,7 +217,7 @@ load_icon (const gchar *icon_name) static GdkPixbuf * get_icon_for_media (GrlMedia *media) { - if (GRL_IS_DATA_BOX (media)) { + if (GRL_IS_MEDIA_BOX (media)) { return load_icon (GTK_STOCK_DIRECTORY); } else if (GRL_IS_DATA_VIDEO (media)) { return load_icon ("gnome-mime-video"); @@ -464,9 +464,9 @@ browse_cb (GrlMediaSource *source, if (media) { icon = get_icon_for_media (media); name = grl_media_get_title (media); - if (GRL_IS_DATA_BOX (media)) { + if (GRL_IS_MEDIA_BOX (media)) { gint childcount = - grl_data_box_get_childcount (GRL_DATA_BOX (media)); + grl_media_box_get_childcount (GRL_MEDIA_BOX (media)); type = OBJECT_TYPE_CONTAINER; if (childcount != GRL_METADATA_KEY_CHILDCOUNT_UNKNOWN) { name = g_strdup_printf ("%s (%d)", name, childcount); @@ -646,7 +646,7 @@ browser_row_selected_cb (GtkTreeView *tree_view, (grl_metadata_source_supported_operations (GRL_METADATA_SOURCE (source)) & GRL_OP_STORE)) { gtk_widget_set_sensitive (view->store_btn, TRUE); - } else if (content && GRL_IS_DATA_BOX (content) && + } else if (content && GRL_IS_MEDIA_BOX (content) && grl_metadata_source_supported_operations (GRL_METADATA_SOURCE (source)) & GRL_OP_STORE_PARENT) { gtk_widget_set_sensitive (view->store_btn, TRUE); @@ -735,7 +735,7 @@ back_btn_clicked_cb (GtkButton *btn, gpointer user_data) static void store_cb (GrlMediaSource *source, - GrlDataBox *box, + GrlMediaBox *box, GrlMedia *media, gpointer user_data, const GError *error) @@ -799,7 +799,7 @@ store_btn_clicked_cb (GtkButton *btn, gpointer user_data) GrlMedia *media; const gchar *url = gtk_entry_get_text (GTK_ENTRY (e2)); if (!url || !url[0]) { - media = grl_data_box_new (); + media = grl_media_box_new (); } else { media = grl_media_new (); grl_media_set_url (media, url); @@ -807,7 +807,7 @@ store_btn_clicked_cb (GtkButton *btn, gpointer user_data) grl_media_set_title (media, gtk_entry_get_text (GTK_ENTRY (e1))); grl_media_set_description (media, gtk_entry_get_text (GTK_ENTRY (e3))); - grl_media_source_store (source, GRL_DATA_BOX (container), + grl_media_source_store (source, GRL_MEDIA_BOX (container), media, store_cb, NULL); } @@ -916,9 +916,9 @@ search_cb (GrlMediaSource *source, if (media) { icon = get_icon_for_media (media); name = grl_media_get_title (media); - if (GRL_IS_DATA_BOX (media)) { + if (GRL_IS_MEDIA_BOX (media)) { gint childcount = - grl_data_box_get_childcount (GRL_DATA_BOX (media)); + grl_media_box_get_childcount (GRL_MEDIA_BOX (media)); type = OBJECT_TYPE_CONTAINER; if (childcount != GRL_METADATA_KEY_CHILDCOUNT_UNKNOWN) { name = g_strdup_printf ("%s (%d)", name, childcount); |