aboutsummaryrefslogtreecommitdiff
path: root/src/metadata-widget.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-06-16 18:19:35 +0100
committerConor Curran <conor.curran@canonical.com>2010-06-16 18:19:35 +0100
commit71d315d3abec5b62e43b821232d70262bec92bd1 (patch)
tree955da2d757bf08cd788d67196dae714f103706e1 /src/metadata-widget.c
parent0585eccbaa90e2d4eae447a5a69e1101c528d2c0 (diff)
downloadayatana-indicator-sound-71d315d3abec5b62e43b821232d70262bec92bd1.tar.gz
ayatana-indicator-sound-71d315d3abec5b62e43b821232d70262bec92bd1.tar.bz2
ayatana-indicator-sound-71d315d3abec5b62e43b821232d70262bec92bd1.zip
metadata being updated dynamically
Diffstat (limited to 'src/metadata-widget.c')
-rw-r--r--src/metadata-widget.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/metadata-widget.c b/src/metadata-widget.c
index a451ad7..e69a9dd 100644
--- a/src/metadata-widget.c
+++ b/src/metadata-widget.c
@@ -53,9 +53,9 @@ static gboolean metadata_widget_button_press_event (GtkWidget *menuitem,
static gboolean metadata_widget_button_release_event (GtkWidget *menuitem,
GdkEventButton *event);
// Dbusmenuitem properties update callback
-static void metadata_widget_update_state(gchar * property,
- GValue * value,
- gpointer userdata);
+static void metadata_widget_update_state(DbusmenuMenuitem* item, gchar* property,
+ GValue* value, gpointer userdata);
+
//static void update_content(
@@ -159,9 +159,20 @@ metadata_widget_button_release_event (GtkWidget *menuitem,
return TRUE;
}
-static void metadata_widget_update_state(gchar *property, GValue *value, gpointer userdata)
+static void
+metadata_widget_update_state(DbusmenuMenuitem* item, gchar* property,
+ GValue* value, gpointer userdata)
{
- g_debug("metadata_widget_update_state - with property %s", property);
+ //g_debug("metadata_widget_update_state - with property %s", property);
+ MetadataWidget* mitem = METADATA_WIDGET(userdata);
+ MetadataWidgetPrivate * priv = METADATA_WIDGET_GET_PRIVATE(mitem);
+
+ if(g_ascii_strcasecmp(DBUSMENU_METADATA_MENUITEM_TEXT_ARTIST, property) == 0){
+ gtk_label_set_text(GTK_LABEL(priv->artist_label), g_value_get_string(value));
+ }
+ else if(g_ascii_strcasecmp(DBUSMENU_METADATA_MENUITEM_TEXT_PIECE, property) == 0){
+ gtk_label_set_text(GTK_LABEL(priv->piece_label), g_value_get_string(value));
+ }
}
/**