# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1052633414 0 # Node ID a8124a9561c726d281d0dc9f30cf202481546a93 # Parent 765ec42ee2e4df050060058581ffdfa15152f860 Fix for dw_window_set_text() on GTK 2.x. diff -r 765ec42ee2e4 -r a8124a9561c7 gtk/dw.c --- a/gtk/dw.c Sun May 11 00:45:09 2003 +0000 +++ b/gtk/dw.c Sun May 11 06:10:14 2003 +0000 @@ -2810,7 +2810,7 @@ * Sets the text used for a given window. * Parameters: * handle: Handle to the window. - * text: The text associsated with a given window. + * text: The text associsated with a given window. f */ void dw_window_set_text(HWND handle, char *text) { @@ -2825,10 +2825,14 @@ gtk_label_set_text(GTK_LABEL(handle), text); else if(GTK_IS_BUTTON(handle)) { +#if GTK_MAJOR_VERSION < 2 GtkWidget *label = GTK_BUTTON(handle)->child; if(GTK_IS_LABEL(label)) gtk_label_set_text(GTK_LABEL(label), text); +#else + gtk_button_set_label(GTK_BUTTON(handle), text); +#endif } else if(GTK_IS_FRAME(handle)) {