[beast: 2/26] BEAST: use Container.get_item() from bseapi.idl
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 2/26] BEAST: use Container.get_item() from bseapi.idl
- Date: Fri, 14 Oct 2016 15:48:09 +0000 (UTC)
commit f564c264c04cbce062843cdb6662a80eeb847e9e
Author: Tim Janik <timj gnu org>
Date: Fri May 27 10:44:17 2016 +0200
BEAST: use Container.get_item() from bseapi.idl
Signed-off-by: Tim Janik <timj gnu org>
beast-gtk/bsttrackview.cc | 19 ++++++++++---------
beast-gtk/bsttreestores.cc | 4 +++-
2 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/beast-gtk/bsttrackview.cc b/beast-gtk/bsttrackview.cc
index f9c4383..51337bb 100644
--- a/beast-gtk/bsttrackview.cc
+++ b/beast-gtk/bsttrackview.cc
@@ -112,7 +112,8 @@ track_view_fill_value (BstItemView *iview,
{
BstTrackView *self = BST_TRACK_VIEW (iview);
guint seqid = row + 1;
- SfiProxy item = bse_container_get_item (iview->container, BST_ITEM_VIEW_GET_CLASS (self)->item_type,
seqid);
+ Bse::ContainerH container = Bse::ContainerH::down_cast (bse_server.from_proxy (iview->container));
+ Bse::ItemH item = container.get_item (BST_ITEM_VIEW_GET_CLASS (self)->item_type, seqid);
if (!item)
return; // item is probably already destructed
switch (column)
@@ -127,27 +128,27 @@ track_view_fill_value (BstItemView *iview,
sfi_value_take_string (value, g_strdup_format ("%03d", seqid));
break;
case COL_NAME:
- g_value_set_string (value, bse_item_get_name (item));
+ g_value_set_string (value, bse_item_get_name (item.proxy_id()));
break;
case COL_MUTE:
- bse_proxy_get (item, "muted", &vbool, NULL);
+ bse_proxy_get (item.proxy_id(), "muted", &vbool, NULL);
g_value_set_boolean (value, !vbool);
break;
case COL_VOICES:
- bse_proxy_get (item, "n_voices", &vint, NULL);
+ bse_proxy_get (item.proxy_id(), "n_voices", &vint, NULL);
sfi_value_take_string (value, g_strdup_format ("%2d", vint));
break;
case COL_SYNTH:
snet = 0;
- bse_proxy_get (item, "snet", &snet, "wave", &wave, NULL);
+ bse_proxy_get (item.proxy_id(), "snet", &snet, "wave", &wave, NULL);
g_value_set_string (value, snet || wave ? bse_item_get_name (snet ? snet : wave) : "");
break;
case COL_MIDI_CHANNEL:
- bse_proxy_get (item, "midi-channel", &vint, NULL);
+ bse_proxy_get (item.proxy_id(), "midi-channel", &vint, NULL);
sfi_value_take_string (value, g_strdup_format ("%2d", vint));
break;
case COL_OUTPUTS:
- bse_proxy_get (item, "outputs", &seq, NULL);
+ bse_proxy_get (item.proxy_id(), "outputs", &seq, NULL);
iseq = bse_it3m_seq_from_seq (seq);
if (iseq && iseq->n_items == 1)
g_value_take_string (value, g_strdup_format ("%s", bse_item_get_name_or_type (iseq->items[0])));
@@ -159,11 +160,11 @@ track_view_fill_value (BstItemView *iview,
break;
case COL_POST_SYNTH:
snet = 0;
- bse_proxy_get (item, "pnet", &snet, NULL);
+ bse_proxy_get (item.proxy_id(), "pnet", &snet, NULL);
g_value_set_string (value, snet ? bse_item_get_name (snet) : "");
break;
case COL_BLURB:
- bse_proxy_get (item, "blurb", &string, NULL);
+ bse_proxy_get (item.proxy_id(), "blurb", &string, NULL);
g_value_set_string (value, string ? string : "");
break;
}
diff --git a/beast-gtk/bsttreestores.cc b/beast-gtk/bsttreestores.cc
index d77e21e..72fcf2b 100644
--- a/beast-gtk/bsttreestores.cc
+++ b/beast-gtk/bsttreestores.cc
@@ -393,7 +393,9 @@ bst_child_list_wrapper_get_proxy (GxkListWrapper *self,
if (ps && row >= 0)
{
guint seqid = row + 1;
- return bse_container_get_item (ps->u.cl.container, ps->u.cl.child_type, seqid);
+ Bse::ContainerH container = Bse::ContainerH::down_cast (bse_server.from_proxy (ps->u.cl.container));
+ Bse::ItemH item = container.get_item (ps->u.cl.child_type, seqid);
+ return item ? item.proxy_id() : 0;
}
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]