aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Cimitan <andrea.cimitan@canonical.com>2010-11-17 13:10:31 +0100
committerAndrea Cimitan <andrea.cimitan@canonical.com>2010-11-17 13:10:31 +0100
commita9dea58aef77180c83d8827690f11b9a5acb56fc (patch)
tree3378de6654afd46c5a011dfd4070bbb40b526ca2
parent7889e51f4346844c63aa8c11d127134d4ce292e9 (diff)
downloadayatana-indicator-sound-a9dea58aef77180c83d8827690f11b9a5acb56fc.tar.gz
ayatana-indicator-sound-a9dea58aef77180c83d8827690f11b9a5acb56fc.tar.bz2
ayatana-indicator-sound-a9dea58aef77180c83d8827690f11b9a5acb56fc.zip
commented the prints and try to realize the widget in press event
-rw-r--r--src/transport-widget.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/transport-widget.c b/src/transport-widget.c
index f8aca57..fffbdef 100644
--- a/src/transport-widget.c
+++ b/src/transport-widget.c
@@ -213,7 +213,7 @@ static gboolean
transport_widget_expose (GtkWidget *button, GdkEventExpose *event)
{
cairo_t *cr;
- cr = gdk_cairo_create (button->window);
+ cr = gdk_cairo_create (button);
//g_debug("In the playbutton's expose method, x = %i, y=%i and width: %i and height: %i'");
cairo_rectangle (cr,
@@ -329,7 +329,9 @@ transport_widget_react_to_key_press_event ( TransportWidget* transport,
TransportWidgetPrivate * priv = TRANSPORT_WIDGET_GET_PRIVATE ( transport );
priv->current_command = transport_event;
priv->key_event = transport_event;
- printf("transport_widget_react_to_key_press_event: before drawing\n");
+/* printf("transport_widget_react_to_key_press_event: before drawing\n");*/
+ gtk_widget_realize ( GTK_WIDGET(transport) );
+
cairo_t *cr;
cr = gdk_cairo_create ( GTK_WIDGET(transport)->window );
draw ( GTK_WIDGET(transport), cr );
@@ -352,7 +354,7 @@ transport_widget_react_to_key_release_event ( TransportWidget* transport,
&value,
0 );
}
- printf("transport_widget_react_to_key_release_event: before transport_widget_react_to_key_release_event\n");
+/* printf("transport_widget_react_to_key_release_event: before transport_widget_react_to_key_release_event\n");*/
transport_widget_react_to_button_release ( transport,
transport_event );
}
@@ -397,16 +399,16 @@ transport_widget_react_to_button_release ( TransportWidget* button,
TransportWidgetPrivate* priv = TRANSPORT_WIDGET_GET_PRIVATE(button);
if(priv->current_command == TRANSPORT_NADA){
//g_debug("returning from the playbutton release because my previous command was nada");
- printf("transport_widget_react_to_button_release: inside if(priv->current_command == TRANSPORT_NADA)\n");
+/* printf("transport_widget_react_to_button_release: inside if(priv->current_command == TRANSPORT_NADA)\n");*/
/* Update the drawing in any case, should not hurt :) */
// return;
}
else if(priv->current_command != TRANSPORT_NADA &&
command != TRANSPORT_NADA){
priv->current_command = command;
- printf("transport_widget_react_to_button_release: inside if(priv->current_command != TRANSPORT_NADA && command != TRANSPORT_NADA)\n");
+/* printf("transport_widget_react_to_button_release: inside if(priv->current_command != TRANSPORT_NADA && command != TRANSPORT_NADA)\n");*/
}
- printf("transport_widget_react_to_button_release: before drawing\n");
+/* printf("transport_widget_react_to_button_release: before drawing\n");*/
cairo_t *cr;
cr = gdk_cairo_create ( GTK_WIDGET(button)->window );