Mercurial > dwindows
diff gtk/dw.c @ 407:a8124a9561c7
Fix for dw_window_set_text() on GTK 2.x.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 11 May 2003 06:10:14 +0000 |
parents | 6a3ef130962f |
children | 1d7be77cbfb5 |
line wrap: on
line diff
--- 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)) {