[totem] grilo: Port to grilo 0.2
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] grilo: Port to grilo 0.2
- Date: Fri, 13 Apr 2012 15:03:47 +0000 (UTC)
commit 4a54e4bace4a980b6b495f23904026cad61119fd
Author: Bastien Nocera <hadess hadess net>
Date: Sat Apr 7 14:45:37 2012 +0100
grilo: Port to grilo 0.2
https://bugzilla.gnome.org/show_bug.cgi?id=673592
configure.in | 2 +-
src/plugins/grilo/totem-grilo.c | 28 ++++++++++++++++++++++------
2 files changed, 23 insertions(+), 7 deletions(-)
---
diff --git a/configure.in b/configure.in
index 6bf8ca8..e251739 100644
--- a/configure.in
+++ b/configure.in
@@ -505,7 +505,7 @@ for plugin in ${used_plugins}; do
fi
;;
grilo)
- PKG_CHECK_MODULES(LIBGRILO, grilo-0.1 >= 0.1.16,
+ PKG_CHECK_MODULES(LIBGRILO, grilo-0.2 >= 0.2.0,
[HAVE_LIBGRILO=yes], [HAVE_LIBGRILO=no])
if test "${HAVE_LIBGRILO}" != "yes" ; then
plugin_error_or_ignore "you need libgrilo >= 0.1.16 installed for the Grilo plugin"
diff --git a/src/plugins/grilo/totem-grilo.c b/src/plugins/grilo/totem-grilo.c
index 7d64398..57bf4a0 100644
--- a/src/plugins/grilo/totem-grilo.c
+++ b/src/plugins/grilo/totem-grilo.c
@@ -513,16 +513,25 @@ browse (TotemGriloPlugin *self,
gint page)
{
if (source != NULL) {
- BrowseUserData *bud = g_slice_new (BrowseUserData);
+ BrowseUserData *bud;
+ GrlOperationOptions *default_options;
+
+ default_options = grl_operation_options_new (NULL);
+ grl_operation_options_set_flags (default_options, BROWSE_FLAGS);
+ grl_operation_options_set_skip (default_options, (page - 1) * PAGE_SIZE);
+ grl_operation_options_set_count (default_options, PAGE_SIZE);
+
+ bud = g_slice_new (BrowseUserData);
bud->totem_grilo = g_object_ref (self);
bud->ref_parent = gtk_tree_row_reference_new (self->priv->browser_model, path);
grl_media_source_browse (source,
container,
browse_keys (),
- (page - 1) * PAGE_SIZE, PAGE_SIZE,
- BROWSE_FLAGS,
+ default_options,
browse_cb,
bud);
+
+ g_object_unref (default_options);
} else {
show_sources (self);
}
@@ -635,17 +644,24 @@ search_cb (GrlMediaSource *source,
static void
search_more (TotemGriloPlugin *self)
{
+ GrlOperationOptions *default_options;
+
+ default_options = grl_operation_options_new (NULL);
+ grl_operation_options_set_flags (default_options, BROWSE_FLAGS);
+ grl_operation_options_set_skip (default_options, (self->priv->search_page - 1) * PAGE_SIZE);
+ grl_operation_options_set_count (default_options, PAGE_SIZE);
+
gtk_widget_set_sensitive (self->priv->search_entry, FALSE);
self->priv->search_page++;
self->priv->search_remaining = PAGE_SIZE;
self->priv->search_id = grl_media_source_search (self->priv->search_source,
self->priv->search_text,
search_keys (),
- (self->priv->search_page - 1) * PAGE_SIZE,
- PAGE_SIZE,
- BROWSE_FLAGS,
+ default_options,
search_cb,
self);
+ g_object_unref (default_options);
+
if (self->priv->search_id == 0) {
search_cb (self->priv->search_source, 0, NULL, 0, self, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]