diff options
author | Harry van Haaren <harryhaaren@gmail.com> | 2011-07-28 12:31:36 +0100 |
---|---|---|
committer | Harry van Haaren <harryhaaren@gmail.com> | 2011-07-28 12:31:36 +0100 |
commit | e5350911b2abaca40482bbacbda92e64f2e6d8bb (patch) | |
tree | 07f16db3298f0b79347a7b1c16afa88d0f4afa14 /src/transport-widget.c | |
parent | 88880cb32a353f84985831596ea80d54bc31d23d (diff) | |
download | ayatana-indicator-sound-e5350911b2abaca40482bbacbda92e64f2e6d8bb.tar.gz ayatana-indicator-sound-e5350911b2abaca40482bbacbda92e64f2e6d8bb.tar.bz2 ayatana-indicator-sound-e5350911b2abaca40482bbacbda92e64f2e6d8bb.zip |
added debug info in draw() of spinner animation
Diffstat (limited to 'src/transport-widget.c')
-rw-r--r-- | src/transport-widget.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/transport-widget.c b/src/transport-widget.c index bace76a..b20966f 100644 --- a/src/transport-widget.c +++ b/src/transport-widget.c @@ -183,7 +183,7 @@ transport_widget_init (TransportWidget *self) gtk_style_context_set_path (spinner_style_context, spinner_widget_path); gtk_style_context_add_class (spinner_style_context, GTK_STYLE_CLASS_SPINNER); - gtk_style_context_set_state (spinner_style_context, GTK_STATE_FLAG_ACTIVE); + gtk_style_context_set_state (spinner_style_context, GTK_STATE_FLAG_NORMAL); priv->current_command = TRANSPORT_ACTION_NO_ACTION; priv->current_state = TRANSPORT_STATE_PAUSED; @@ -267,7 +267,7 @@ transport_widget_expose (GtkWidget *button, GdkEventExpose *event) cairo_t *cr; cr = gdk_cairo_create (gtk_widget_get_window (button)); - //g_debug("In the playbutton's expose method, x = %i, y=%i and width: %i and height: %i'"); + g_debug("In the playbutton's expose method, x = %i, y=%i and width: %i and height: %i'"); cairo_rectangle (cr, event->area.x, event->area.y, event->area.width, event->area.height); @@ -1781,9 +1781,15 @@ draw (GtkWidget* button, cairo_t *cr) } else if(priv->current_state == TRANSPORT_STATE_LAUNCHING) { - g_debug ("launching in draw"); + gdouble progress; + gtk_style_context_state_is_running(spinner_style_context, GTK_STATE_ACTIVE, &progress); + + GtkStateFlags state = gtk_style_context_get_state(spinner_style_context); + // state 0 = NORMAL + // state 1 = ACTIVE + + g_debug ("launching in draw state: %i, %f", state ,progress ); - gtk_style_context_set_state (spinner_style_context, GTK_STATE_FLAG_ACTIVE); gtk_render_activity (spinner_style_context, cr, 106, 6 , 30, 30); // need to redraw the cairo context here, cairo_paint() doesn't seem to do it @@ -1914,6 +1920,7 @@ transport_widget_property_update(DbusmenuMenuitem* item, gchar* property, transport_widget_fade_playbutton, bar); g_debug("TransportWidget::toggle play state : %i", priv->current_state); + gtk_style_context_set_state (spinner_style_context, GTK_STATE_FLAG_ACTIVE); } else{ if (priv->launching_timer != 0){ |