diff --git a/unix/gtkcompat.h b/unix/gtkcompat.h index 6cbdaafc..f2ae11cb 100644 --- a/unix/gtkcompat.h +++ b/unix/gtkcompat.h @@ -40,6 +40,8 @@ #define gtk_widget_set_size_request gtk_widget_set_usize #define gtk_radio_button_get_group gtk_radio_button_group #define gtk_notebook_set_current_page gtk_notebook_set_page +#define gtk_color_selection_set_has_opacity_control \ + gtk_color_selection_set_opacity #define gtk_dialog_get_content_area(dlg) ((dlg)->vbox) #define gtk_dialog_get_action_area(dlg) ((dlg)->action_area) diff --git a/unix/gtkdlg.c b/unix/gtkdlg.c index 59edb468..6e97b448 100644 --- a/unix/gtkdlg.c +++ b/unix/gtkdlg.c @@ -1143,11 +1143,7 @@ void dlg_coloursel_start(union control *ctrl, void *dlg, int r, int g, int b) dp->coloursel_result.ok = FALSE; gtk_window_set_modal(GTK_WINDOW(coloursel), TRUE); -#if GTK_CHECK_VERSION(2,0,0) gtk_color_selection_set_has_opacity_control(cs, FALSE); -#else - gtk_color_selection_set_opacity(cs, FALSE); -#endif #if GTK_CHECK_VERSION(2,0,0) { diff --git a/unix/gtkfont.c b/unix/gtkfont.c index babc4880..4fc19bf8 100644 --- a/unix/gtkfont.c +++ b/unix/gtkfont.c @@ -2562,11 +2562,9 @@ unifontsel *unifontsel_new(const char *wintitle) gtk_label_set_text(GTK_LABEL(label), "48000"); gtk_widget_size_request(label, &req); size_width = req.width; -#if GTK_CHECK_VERSION(2,10,0) - g_object_ref_sink(label); - g_object_unref(label); -#else g_object_ref_sink(G_OBJECT(label)); +#if GTK_CHECK_VERSION(2,10,0) + g_object_unref(label); #endif } diff --git a/unix/gtkwin.c b/unix/gtkwin.c index 8edf2a5e..c3487687 100644 --- a/unix/gtkwin.c +++ b/unix/gtkwin.c @@ -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