[gtk+/refactor: 135/137] demos/gtk-demo/colorsel.c: Use accessor functions to access GtkWidget
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/refactor: 135/137] demos/gtk-demo/colorsel.c: Use accessor functions to access GtkWidget
- Date: Mon, 16 Aug 2010 04:19:48 +0000 (UTC)
commit 72edc17d07c55474de226b14f1208d9e0865bb66
Author: Javier Jardón <jjardon gnome org>
Date: Mon Aug 16 00:37:58 2010 +0200
demos/gtk-demo/colorsel.c: Use accessor functions to access GtkWidget
demos/gtk-demo/colorsel.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/demos/gtk-demo/colorsel.c b/demos/gtk-demo/colorsel.c
index bb7c978..61bdbbf 100644
--- a/demos/gtk-demo/colorsel.c
+++ b/demos/gtk-demo/colorsel.c
@@ -19,14 +19,17 @@ expose_event_callback (GtkWidget *widget,
GdkEventExpose *event,
gpointer data)
{
- if (widget->window)
+ GdkWindow *window;
+
+ window = gtk_widget_get_window (widget);
+ if (window)
{
GtkStyle *style;
cairo_t *cr;
style = gtk_widget_get_style (widget);
- cr = gdk_cairo_create (widget->window);
+ cr = gdk_cairo_create (window);
gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
gdk_cairo_rectangle (cr, &event->area);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]