From 84c9dfc73d852739fa9e7ce9f83f536f146a0e2b Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 10 Oct 2011 20:53:06 +0000 Subject: [PATCH] Fix potential GTK theme engine crash Thanks to MutantTurkey for tracing the problem! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/gtk-qt-engine@1258270 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/qt_theme_draw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qt_theme_draw.c b/src/qt_theme_draw.c index e0e826d..53faf7f 100644 --- a/src/qt_theme_draw.c +++ b/src/qt_theme_draw.c @@ -82,7 +82,7 @@ draw_hline(GtkStyle* style, gint y) { if (gtkQtDebug) - printf("HLINE (%d,%d,%d) Widget: %s Detail: %s\n",x1,y1,y,gtk_widget_get_name(widget),detail); + printf("HLINE (%d,%p,%d) Widget: %s Detail: %s\n",x1,y1,y,gtk_widget_get_name(widget),detail); if (DETAIL("vscale")) return; @@ -483,7 +483,7 @@ draw_arrow(GtkStyle* style, } parent = gtk_widget_get_parent(widget); - drawArrow(window,style, GTK_WIDGET_STATE(parent), arrow_type, x, y, width, height); + drawArrow(window,style, gtk_widget_get_state(parent), arrow_type, x, y, width, height); return; } /* if (DETAIL("menuitem")) @@ -689,7 +689,7 @@ draw_box(GtkStyle * style, memset( val, 0, sizeof(GValue) ); g_value_init( val, G_TYPE_BOOLEAN ); - g_object_get_property(widget, "inverted", val); + g_object_get_property(G_OBJECT(widget), "inverted", val); inverted = g_value_get_boolean(val); g_value_unset(val); g_free(val); @@ -741,7 +741,7 @@ draw_box(GtkStyle * style, on a dropdown entry box -- eg. search/replace in gedit */ /* Draw square buttons only if number of children in the hbox is 2 and * the first child is a entry view (GtkEntry)*/ - int defaultButton = GTK_WIDGET_HAS_FOCUS(widget); + int defaultButton = gtk_widget_has_focus(widget); GtkWindow* toplevel; if (isBaghira && GTK_IS_BOX(parent) && (g_list_length(GTK_BOX(parent)->children) == 2))