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

Use gtkcompat.h to slim down a few ifdefs.

Now that I've got a general place to centralise handling of at least
the simple differences between GTK 1 and 2, I should use it wherever
possible. So this commit removes just a small number of ifdefs which
are either obsoleted by definitions already in gtkcompat.h (like
set_size_request vs set_usize), or can easily be replaced by adding
another (e.g. gtk_color_selection_set_has_opacity_control).
This commit is contained in:
Simon Tatham
2015-08-09 09:59:25 +01:00
parent 5fa22495c7
commit 78592116a5
4 changed files with 5 additions and 14 deletions

View File

@ -1639,11 +1639,7 @@ void request_resize(void *frontend, int w, int h)
large_x += 32;
large_y += 32;
#if GTK_CHECK_VERSION(2,0,0)
gtk_widget_set_size_request(inst->area, large_x, large_y);
#else
gtk_widget_set_usize(inst->area, large_x, large_y);
#endif
gtk_widget_size_request(inst->area, &inner);
gtk_widget_size_request(inst->window, &outer);
@ -1659,12 +1655,11 @@ void request_resize(void *frontend, int w, int h)
* way to do this, I think, is to set it to what the size is
* really going to end up being.
*/
#if GTK_CHECK_VERSION(2,0,0)
gtk_widget_set_size_request(inst->area, area_x, area_y);
#if GTK_CHECK_VERSION(2,0,0)
gtk_window_resize(GTK_WINDOW(inst->window),
area_x + offset_x, area_y + offset_y);
#else
gtk_widget_set_usize(inst->area, area_x, area_y);
gtk_drawing_area_size(GTK_DRAWING_AREA(inst->area), area_x, area_y);
/*
* I can no longer remember what this call to