From a9186ea33c957a90cb4bfea464244602f4637b37 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Tue, 29 Jun 2010 10:16:45 +0100 Subject: more debug --- src/play-button.c | 27 ++++++++++++++++----------- src/transport-widget.c | 10 ++++++++++ 2 files changed, 26 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/play-button.c b/src/play-button.c index 774b1e6..8962377 100644 --- a/src/play-button.c +++ b/src/play-button.c @@ -65,16 +65,6 @@ static void play_button_init (PlayButton *self) { g_debug("PlayButton::play_button_init"); - GtkAllocation alloc; - - alloc.width = 100; - alloc.height = 100; - alloc.x = 0; - alloc.y = 0; - - gtk_widget_set_allocation(GTK_WIDGET(self), - &alloc); - //g_free(alloc); } static void @@ -92,9 +82,24 @@ play_button_finalize (GObject *object) static gboolean play_button_expose (GtkWidget *button, GdkEventExpose *event) { + GtkAllocation alloc; + + alloc.width = 200; + alloc.height = 600; + alloc.x = 100; + alloc.y = 100; + + gtk_widget_set_allocation(GTK_WIDGET(button), + &alloc); + cairo_t *cr; cr = gdk_cairo_create (button->window); - cairo_rectangle (cr, + + g_debug("PlayButton::Draw - width = %i", button->allocation.width); + g_debug("PlayButton::Draw - event->area.width = %i", event->area.width); + g_debug("PlayButton::Draw - event->area.x = %i", event->area.x); + + cairo_rectangle (cr, event->area.x, event->area.y, event->area.width, event->area.height); diff --git a/src/transport-widget.c b/src/transport-widget.c index 07e7402..6ff3c04 100644 --- a/src/transport-widget.c +++ b/src/transport-widget.c @@ -89,6 +89,16 @@ transport_widget_init (TransportWidget *self) priv->play_button = play_button_new(); + GtkAllocation alloc; + + alloc.width = 200; + alloc.height = 600; + alloc.x = 100; + alloc.y = 0; + + gtk_widget_set_allocation(GTK_WIDGET(priv->play_button), + &alloc); + gtk_box_pack_start (GTK_BOX (priv->hbox), priv->play_button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(twin_item), "property-changed", G_CALLBACK(transport_widget_property_update), self); -- cgit v1.2.3