aboutsummaryrefslogtreecommitdiff
path: root/src/metadata-widget.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-10-26 17:49:39 -0400
committerConor Curran <conor.curran@canonical.com>2010-10-26 17:49:39 -0400
commit2f96a598a036cc5742a44d1a497f02aef78f7acb (patch)
tree8eb9118f38e21b7b31b675aed596166a0121c7c5 /src/metadata-widget.c
parenta33f50636cea5d6c1972d1772a59cbb4a0c951b5 (diff)
downloadayatana-indicator-sound-2f96a598a036cc5742a44d1a497f02aef78f7acb.tar.gz
ayatana-indicator-sound-2f96a598a036cc5742a44d1a497f02aef78f7acb.tar.bz2
ayatana-indicator-sound-2f96a598a036cc5742a44d1a497f02aef78f7acb.zip
metadata now fetched at start up
Diffstat (limited to 'src/metadata-widget.c')
-rw-r--r--src/metadata-widget.c33
1 files changed, 29 insertions, 4 deletions
diff --git a/src/metadata-widget.c b/src/metadata-widget.c
index cbbaeff..0e8aa3b 100644
--- a/src/metadata-widget.c
+++ b/src/metadata-widget.c
@@ -511,10 +511,35 @@ static void
metadata_widget_set_twin_item(MetadataWidget* self,
DbusmenuMenuitem* twin_item)
{
- MetadataWidgetPrivate* priv = METADATA_WIDGET_GET_PRIVATE(self);
- priv->twin_item = twin_item;
- g_signal_connect(G_OBJECT(priv->twin_item), "property-changed",
- G_CALLBACK(metadata_widget_property_update), self);
+ MetadataWidgetPrivate* priv = METADATA_WIDGET_GET_PRIVATE(self);
+ priv->twin_item = twin_item;
+ g_signal_connect( G_OBJECT(priv->twin_item), "property-changed",
+ G_CALLBACK(metadata_widget_property_update), self);
+ gtk_label_set_text( GTK_LABEL(priv->container_label),
+ dbusmenu_menuitem_property_get( priv->twin_item,
+ DBUSMENU_METADATA_MENUITEM_ALBUM));
+ metadata_widget_style_labels( self, GTK_LABEL(priv->container_label));
+
+ gtk_label_set_text( GTK_LABEL(priv->piece_label),
+ dbusmenu_menuitem_property_get( priv->twin_item,
+ DBUSMENU_METADATA_MENUITEM_TITLE));
+ metadata_widget_style_labels( self, GTK_LABEL(priv->piece_label));
+ gtk_label_set_text( GTK_LABEL(priv->artist_label),
+ dbusmenu_menuitem_property_get( priv->twin_item,
+ DBUSMENU_METADATA_MENUITEM_ARTIST));
+ metadata_widget_style_labels( self, GTK_LABEL(priv->artist_label));
+
+ g_string_erase(priv->image_path, 0, -1);
+ g_string_overwrite( priv->image_path,
+ 0,
+ dbusmenu_menuitem_property_get( priv->twin_item,
+ DBUSMENU_METADATA_MENUITEM_ARTURL ));
+
+ // if its a remote image queue a redraw incase the download took too long
+ if (g_str_has_prefix (dbusmenu_menuitem_property_get (priv->twin_item, DBUSMENU_METADATA_MENUITEM_ARTURL ),
+ g_get_user_cache_dir())){
+ gtk_widget_queue_draw(GTK_WIDGET(self));
+ }
}