diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-11-03 14:46:36 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-11-03 14:46:36 +0000 |
commit | 7908edebdc349f9a7aa77b736a0208f5afef50b7 (patch) | |
tree | 57c15431726da14393482d7b6fab176a7199a470 /src/metadata-widget.c | |
parent | f1455e94d68d629749f26de0010e1358c40ce72f (diff) | |
parent | 2f96a598a036cc5742a44d1a497f02aef78f7acb (diff) | |
download | ayatana-indicator-sound-7908edebdc349f9a7aa77b736a0208f5afef50b7.tar.gz ayatana-indicator-sound-7908edebdc349f9a7aa77b736a0208f5afef50b7.tar.bz2 ayatana-indicator-sound-7908edebdc349f9a7aa77b736a0208f5afef50b7.zip |
merged startup state issue
Diffstat (limited to 'src/metadata-widget.c')
-rw-r--r-- | src/metadata-widget.c | 33 |
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)); + } } |