diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 0e930e4cff..a99a0791e7 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -1452,14 +1452,23 @@ void wxWindowDC::SetPen( const wxPen &pen ) { for (int i = 0; i < req_nb_dash; i++) real_req_dash[i] = req_dash[i] * width; +#if GTK_CHECK_VERSION(1,2,7) gdk_gc_set_dashes( m_penGC, 0, (gint8*) real_req_dash, req_nb_dash ); +#else + gdk_gc_set_dashes( m_penGC, 0, real_req_dash, + req_nb_dash ); +#endif delete[] real_req_dash; } else { // No Memory. We use non-scaled dash pattern... +#if GTK_CHECK_VERSION(1,2,7) gdk_gc_set_dashes( m_penGC, 0, (gint8*)req_dash, req_nb_dash ); +#else + gdk_gc_set_dashes( m_penGC, 0, (char*)req_dash, req_nb_dash ); +#endif } } #endif diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 0e930e4cff..a99a0791e7 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -1452,14 +1452,23 @@ void wxWindowDC::SetPen( const wxPen &pen ) { for (int i = 0; i < req_nb_dash; i++) real_req_dash[i] = req_dash[i] * width; +#if GTK_CHECK_VERSION(1,2,7) gdk_gc_set_dashes( m_penGC, 0, (gint8*) real_req_dash, req_nb_dash ); +#else + gdk_gc_set_dashes( m_penGC, 0, real_req_dash, + req_nb_dash ); +#endif delete[] real_req_dash; } else { // No Memory. We use non-scaled dash pattern... +#if GTK_CHECK_VERSION(1,2,7) gdk_gc_set_dashes( m_penGC, 0, (gint8*)req_dash, req_nb_dash ); +#else + gdk_gc_set_dashes( m_penGC, 0, (char*)req_dash, req_nb_dash ); +#endif } } #endif