1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-06 05:52:48 -05:00

Compile fixes for GTK1 after recent work.

The whole of get_label_text_dimensions() should have been outside the
GTK 2 ifdef; I'd left a gtk_label_set_width_chars() unconditional; and
GDK1's gdk_window_set_background() lacks a const in its prototype.
Serves me right for not test-compiling in all three versions!
This commit is contained in:
Simon Tatham
2015-08-25 19:50:23 +01:00
parent 43a18df156
commit 7193e930de
3 changed files with 48 additions and 37 deletions

View File

@ -1869,7 +1869,12 @@ void set_gdk_window_background(GdkWindow *win, const GdkColor *col)
rgba.alpha = 1.0;
gdk_window_set_background_rgba(win, &rgba);
#else
gdk_window_set_background(win, col);
{
/* For GTK1, which doesn't have a 'const' on
* gdk_window_set_background's second parameter type. */
GdkColor col_mutable = *col;
gdk_window_set_background(win, &col_mutable);
}
#endif
}