[135031] trunk/dports/multimedia

Jeremy Huddleston Sequoia jeremyhu at apple.com
Sat Apr 18 13:13:28 PDT 2015


Please fix this in the next couple days, or I will do what I can to fix these missteps.  This "The system libraries in OS X 10.8 and lower use libstdc++. Thus, libstdc++ is not supported for this port." is incorrect as we discussed on the list last week.  I don't see why this is still in our ports tree given the rather lengthy discussion we just had about why this is wrong.

--Jeremy

> On Apr 13, 2015, at 09:24, ionic at macports.org wrote:
> 
> Revision
> 135031
> Author
> ionic at macports.org
> Date
> 2015-04-13 09:24:21 -0700 (Mon, 13 Apr 2015)
> Log Message
> 
> audacious{,-{core,plugins}}: update to 3.6.1. Also:
> 
>   - Upstream now uses C++11. Insert abomination to make that work on
>     10.6+.
>   - Re-do patches. Replace -std=gnu++11 with -std=c++11 to not pull in
>     libstdc++ unnecessarily.
>   - Require either gtk2 or gtk3, but make gtk2 preferred.
>   - Drop universal variant.
>   - Add optional Qt5 support.
>   - Drop libsdl patch for audacious-plugins. Merged upstream.
>   - Enable cdaudio variant now that libcdio-paranoia is ported.
>   - Enable cdaudio by default.
>   - Use MacPorts-provided libxml2.
>   - Remove deleted configure flags.
>   - Enable coreaudio output plugin by default. May not work on 10.6.
>   - Add mac-media-keys as disabled, as it's currently broken.
> 
> Modified Paths
> 
> 	• trunk/dports/multimedia/audacious/Portfile
> 	• trunk/dports/multimedia/audacious-core/Portfile
> 	• trunk/dports/multimedia/audacious-core/files/patch-buildsys.diff
> 	• trunk/dports/multimedia/audacious-plugins/Portfile
> 	• trunk/dports/multimedia/audacious-plugins/files/patch-buildsys.diff
> Added Paths
> 
> 	• trunk/dports/multimedia/audacious-core/files/patch-acinclude.m4-drop-libc++-switch-from-gnu++11-to-c++11.diff
> 	• trunk/dports/multimedia/audacious-core/files/patch-gtk3.diff
> 	• trunk/dports/multimedia/audacious-plugins/files/patch-acinclude.m4-drop-libc++-switch-from-gnu++11-to-c++11.diff
> 	• trunk/dports/multimedia/audacious-plugins/files/patch-gtk3.diff
> Removed Paths
> 
> 	• trunk/dports/multimedia/audacious-plugins/files/patch-configure.ac-select-libsdl.diff
> Diff
> 
> Modified: trunk/dports/multimedia/audacious/Portfile (135030 => 135031)
> 
> --- trunk/dports/multimedia/audacious/Portfile	2015-04-13 16:07:33 UTC (rev 135030)
> +++ trunk/dports/multimedia/audacious/Portfile	2015-04-13 16:24:21 UTC (rev 135031)
> 
> @@ -6,7 +6,7 @@
> 
>  name                audacious
> 
>  
> 
>  # Please keep audacious, audacious-core and audacious-plugins synchronized.
> 
> -version             3.5.2
> 
> +version             3.6.1
> 
>  revision            0
> 
>  
> 
>  license             BSD GPL-2+
> 
> Modified: trunk/dports/multimedia/audacious-core/Portfile (135030 => 135031)
> 
> --- trunk/dports/multimedia/audacious-core/Portfile	2015-04-13 16:07:33 UTC (rev 135030)
> +++ trunk/dports/multimedia/audacious-core/Portfile	2015-04-13 16:24:21 UTC (rev 135031)
> 
> @@ -3,12 +3,13 @@
> 
>  
> 
>  PortSystem          1.0
> 
>  PortGroup           conflicts_build 1.0
> 
> +PortGroup           compiler_blacklist_versions 1.0
> 
>  
> 
>  name                audacious-core
> 
>  set real_name       audacious
> 
>  
> 
>  # Please keep audacious, audacious-core and audacious-plugins synchronized.
> 
> -version             3.5.2
> 
> +version             3.6.1
> 
>  revision            0
> 
>  
> 
>  license             BSD
> 
> @@ -31,12 +32,15 @@
> 
>  master_sites        http://distfiles.audacious-media-player.org
>  distname            ${real_name}-${version}
> 
>  use_bzip2           yes
> 
> -checksums           rmd160  dd41e56544d9563b47401a670d96a34d7be920b6 \
> -                    sha256  3915b9692ef8acb2588b0e26c2738e59e36766cfe83e7e52c0e601688e6c1956
> 
> +checksums           rmd160  45efb8bd90e0c0529be6c4ce82952f300b422e90 \
> +                    sha256  85d1d5a80240f45c858bb25af6565c13d53e4b92882eb15fb2b18511fabf3de6
> 
>  
> 
> +universal_variant   no
> +
> 
>  conflicts_build     ${name}
> 
>  
> 
> -patchfiles          patch-buildsys.diff
> 
> +patchfiles          patch-buildsys.diff \
> +                    patch-acinclude.m4-drop-libc++-switch-from-gnu++11-to-c++11.diff
> 
>  
> 
>  depends_build       path:bin/pkg-config:pkgconfig \
> 
>                      path:bin/aclocal:automake \
> 
> @@ -45,8 +49,7 @@
> 
>  depends_lib         port:libiconv \
> 
>                      port:gettext \
> 
>                      path:lib/pkgconfig/dbus-1.pc:dbus \
> 
> -                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
> -                    path:lib/pkgconfig/gtk-3.0.pc:gtk3
> 
> +                    path:lib/pkgconfig/glib-2.0.pc:glib2
> 
>  
> 
>  # Note: rpath is required on Mac OS X.
> 
>  configure.args      --enable-nls \
> 
> @@ -59,17 +62,48 @@
> 
>  autoreconf.cmd      ./autogen.sh
> 
>  autoreconf.args
> 
>  
> 
> +# A compiler supporting C++11 is required to build audacious and its plugins.
> +# The newer, the merrier.
> +# Compilers supporting C++11 are GCC >= 4.6 and clang >= 3.3.
> +# We do not know what "cc" is, so blacklist it as well.
> +compiler.blacklist-append   {*gcc-4.[0-5]} {clang < 500} macports-clang-2.* \
> +                            {macports-clang-3.[0-2]} cc
> +
> 
>  platform darwin {
> 
> -    if {${configure.cxx_stdlib} ne {} &&
> -        [string equal ${configure.cxx_stdlib} "libc++"]} {
> -        if {${os.major} > 10} {
> -            configure.ldflags-append  "-mmacosx-version-min=10.7"
> 
> +    if {${os.major} >= 13} {
> +        if {${configure.cxx_stdlib} ne {} &&
> +            [string equal ${configure.cxx_stdlib} "libc++"]} {
> +            # Blacklist all GCC compilers to not accidentally pull in libstdc++.
> +            compiler.blacklist-append {*gcc*}
> +
> +            # Make sure binary runs on 10.9+ only.
> +            configure.ldflags-append  "-mmacosx-version-min=10.9"
> 
>          } else {
> 
> -            ui_error "libc++ is only supported on OS X 10.7 and up for this port."
> -            error "libc++ supported on >= 10.7 only."
> 
> +            ui_error "The system libraries in OS X 10.9 and higher use libc++. Thus, libstdc++ is not supported for this port."
> +            error "libstdc++ supported on <= 10.8 only."
> 
>          }
> 
>      } else {
> 
> -        configure.ldflags-append  "-mmacosx-version-min=10.5"
> 
> +        if {${configure.cxx_stdlib} ne {} &&
> +            [string equal ${configure.cxx_stdlib} "libc++"]} {
> +            ui_error "The system libraries in OS X 10.8 and lower use libstdc++. Thus, libstdc++ is not supported for this port."
> +            error "libc++ supported on >= 10.9 only."
> +        } else {
> +            # Shameless copy from rust.
> +            depends_lib-append          {path:lib/libstdc\\+\\+.6.dylib:libgcc}
> +
> +            # Force GCC 4.9.
> +            compiler.blacklist-append   {*clang*}
> +            compiler.fallback-append    macports-gcc-4.9
> +
> +            # Make sure binary runs on 10.5+ only.
> +            configure.ldflags-append    "-mmacosx-version-min=10.5"
> +
> +            notes-append {
> +                            Upstream for some reason requires libc++.
> +                            Your build will use libstdc++. The maintainer assumes this
> +                            to be OK, but you're on your own if stuff breaks.\
> +            }
> +        }
> 
>      }
> 
>  }
> 
>  
> 
> @@ -86,6 +120,39 @@
> 
>  #                           --enable-chardet
> 
>  #}
> 
>  
> 
> +variant qt5 description {Add Qt5 support} {
> +    PortGroup   qt5 1.0
> +
> +    configure.args-replace  --disable-qt \
> +                            --enable-qt
> +
> +    notes-append {
> +                    Qt5 support is optional and untested.
> +                    If it breaks, you've got to keep the pieces.\
> +    }
> +}
> +
> +variant gtk2 conflicts gtk3 description {Add GTK2 support} {
> +    depends_lib-append      path:lib/pkgconfig/gtk-2.0.pc:gtk2
> +
> +    configure.args-replace  --disable-gtk \
> +                            --enable-gtk
> +}
> +
> +variant gtk3 conflicts gtk2 description {Add GTK3 support} {
> +    depends_lib-append      path:lib/pkgconfig/gtk-3.0.pc:gtk3
> +
> +    patchfiles-append       patch-gtk3.diff
> +
> +    configure.args-replace  --disable-gtk \
> +                            --enable-gtk
> +}
> +
> +# Need either one of gtk2 or gtk3. Default to gtk2, which is preferred by upstream.
> +if {![variant_isset gtk2] && ![variant_isset gtk3]} {
> +    default_variants-append +gtk2
> +}
> +
> 
>  livecheck.type      regex
> 
>  livecheck.url       ${master_sites}
> 
>  livecheck.regex     "${real_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}
> "
> 
> Added: trunk/dports/multimedia/audacious-core/files/patch-acinclude.m4-drop-libc++-switch-from-gnu++11-to-c++11.diff (0 => 135031)
> 
> --- trunk/dports/multimedia/audacious-core/files/patch-acinclude.m4-drop-libc++-switch-from-gnu++11-to-c++11.diff	                        (rev 0)
> +++ trunk/dports/multimedia/audacious-core/files/patch-acinclude.m4-drop-libc++-switch-from-gnu++11-to-c++11.diff	2015-04-13 16:24:21 UTC (rev 135031)
> 
> @@ -0,0 +1,22 @@
> 
> +--- acinclude.m4.orig
> ++++ acinclude.m4
> +@@ -83,8 +83,8 @@ AC_REQUIRE([AC_SYS_LARGEFILE])
> + if test "x$GCC" = "xyes"; then
> +     CFLAGS="$CFLAGS -std=gnu99 -ffast-math -Wall -pipe"
> +     if test "x$HAVE_DARWIN" = "xyes"; then
> +-        CXXFLAGS="$CXXFLAGS -stdlib=libc++ -std=gnu++11 -ffast-math -Wall -pipe"
> +-        LDFLAGS="$LDFLAGS -lc++ -stdlib=libc++"
> ++        CXXFLAGS="$CXXFLAGS -std=c++11 -ffast-math -Wall -pipe"
> ++        LDFLAGS="$LDFLAGS"
> +     else
> +         CXXFLAGS="$CXXFLAGS -std=gnu++11 -ffast-math -Wall -pipe"
> +     fi
> +@@ -101,7 +101,7 @@ if test "x$HAVE_DARWIN" = "xyes"; then
> +     AC_PROG_OBJCXX
> +     AC_PROG_OBJCXXCPP
> + 
> +-    OBJCXXFLAGS="$OBJCXXFLAGS -stdlib=libc++ -std=c++11"
> ++    OBJCXXFLAGS="$OBJCXXFLAGS -std=c++11"
> + fi
> + 
> + dnl Enable "-Wl,-z,defs" only on Linux
> 
> Modified: trunk/dports/multimedia/audacious-core/files/patch-buildsys.diff (135030 => 135031)
> 
> --- trunk/dports/multimedia/audacious-core/files/patch-buildsys.diff	2015-04-13 16:07:33 UTC (rev 135030)
> +++ trunk/dports/multimedia/audacious-core/files/patch-buildsys.diff	2015-04-13 16:24:21 UTC (rev 135031)
> 
> @@ -1,4 +1,4 @@
> 
> ---- buildsys.mk.in.old
> 
> +--- buildsys.mk.in.orig
> 
>  +++ buildsys.mk.in
> 
>  @@ -107,19 +107,24 @@ PLUGIN_OBJS = ${OBJS:.o=.plugin.o}
> 
>   
> 
> @@ -383,22 +383,23 @@
> 
>  +
> 
>  +.CURDIR ?= .
> 
>  +include ${.CURDIR}/.deps
> 
> ---- m4/buildsys.m4.old
> 
> +--- m4/buildsys.m4.orig
> 
>  +++ m4/buildsys.m4
> 
> -@@ -109,14 +109,14 @@ AC_DEFUN([BUILDSYS_SHARED_LIB], [
> 
> +@@ -108,13 +108,13 @@ AC_DEFUN([BUILDSYS_SHARED_LIB], [
> + 	case "$host_os" in
> 
>   		darwin*)
> 
>   			AC_MSG_RESULT(Darwin)
> 
> - 			LIB_CFLAGS='-fPIC -DPIC'
> --			LIB_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}'
> 
> +-			LIB_CFLAGS='-fPIC -DPIC -mmacosx-version-min=10.7'
> +-			LIB_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR} -mmacosx-version-min=10.7 -install_name "${libdir}/$$(i=${SHARED_LIB}; echo $${i%${LIB_SUFFIX}}).${LIB_MAJOR}${LIB_SUFFIX}"'
> ++			LIB_CFLAGS='-fPIC -DPIC'
> 
>  +			LIB_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR} -Wl,-install_name,${libdir}/$${out%.dylib}.${LIB_MAJOR}.dylib'
> 
>   			LIB_PREFIX='lib'
> 
>   			LIB_SUFFIX='.dylib'
> 
>   			LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
> 
> - 			PLUGIN_CFLAGS='-fPIC -DPIC'
> - 			PLUGIN_LDFLAGS='-bundle -undefined dynamic_lookup'
> 
> +-			PLUGIN_CFLAGS='-fPIC -DPIC -mmacosx-version-min=10.7'
> +-			PLUGIN_LDFLAGS='-bundle -undefined dynamic_lookup -mmacosx-version-min=10.7'
> ++			PLUGIN_CFLAGS='-fPIC -DPIC'
> ++			PLUGIN_LDFLAGS='-bundle -undefined dynamic_lookup'
> 
>   			PLUGIN_SUFFIX='.bundle'
> 
> --			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && install_name_tool -id ${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i'
> -+			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i'
> 
> + 			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i'
> 
>   			UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib'
> 
> - 			CLEAN_LIB=''
> - 			;;
> 
> Added: trunk/dports/multimedia/audacious-core/files/patch-gtk3.diff (0 => 135031)
> 
> --- trunk/dports/multimedia/audacious-core/files/patch-gtk3.diff	                        (rev 0)
> +++ trunk/dports/multimedia/audacious-core/files/patch-gtk3.diff	2015-04-13 16:24:21 UTC (rev 135031)
> 
> @@ -0,0 +1,1009 @@
> 
> +--- acinclude.m4.old
> ++++ acinclude.m4
> +@@ -164,7 +164,7 @@ AC_ARG_ENABLE(gtk,
> +  USE_GTK=$enableval, USE_GTK=yes)
> + 
> + if test $USE_GTK = yes ; then
> +-    PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.24)
> ++    PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.4)
> +     AC_DEFINE(USE_GTK, 1, [Define if GTK+ support enabled])
> + fi
> + 
> +--- src/libaudgui/about.cc.old
> ++++ src/libaudgui/
> about.cc
> 
> +@@ -72,7 +72,7 @@ static GtkWidget * create_about_window ()
> + 
> +     audgui_destroy_on_escape (about_window);
> + 
> +-    GtkWidget * vbox = gtk_vbox_new (false, 6);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
> +     gtk_container_add ((GtkContainer *) about_window, vbox);
> + 
> +     StringBuf logo_path = filename_build ({data_dir, "images", "about-logo.png"});
> +@@ -84,11 +84,9 @@ static GtkWidget * create_about_window ()
> +     gtk_label_set_justify ((GtkLabel *) label, GTK_JUSTIFY_CENTER);
> +     gtk_box_pack_start ((GtkBox *) vbox, label, false, false, 0);
> + 
> +-    GtkWidget * align = gtk_alignment_new (0.5, 0.5, 0, 0);
> +-    gtk_box_pack_start ((GtkBox *) vbox, align, false, false, 0);
> +-
> +     GtkWidget * button = gtk_link_button_new (website);
> +-    gtk_container_add ((GtkContainer *) align, button);
> ++    gtk_widget_set_halign (button, GTK_ALIGN_CENTER);
> ++    gtk_box_pack_start ((GtkBox *) vbox, button, false, false, 0);
> + 
> +     char * credits, * license;
> + 
> +--- src/libaudgui/equalizer.cc.old
> ++++ src/libaudgui/
> equalizer.cc
> 
> +@@ -63,13 +63,14 @@ static void slider_moved (GtkRange * slider)
> + 
> + static GtkWidget * create_slider (const char * name, int band, GtkWidget * hbox)
> + {
> +-    GtkWidget * vbox = gtk_vbox_new (false, 6);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
> + 
> +     GtkWidget * label = gtk_label_new (name);
> +     gtk_label_set_angle ((GtkLabel *) label, 90);
> +     gtk_box_pack_start ((GtkBox *) vbox, label, true, false, 0);
> + 
> +-    GtkWidget * slider = gtk_vscale_new_with_range (-AUD_EQ_MAX_GAIN, AUD_EQ_MAX_GAIN, 1);
> ++    GtkWidget * slider = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL,
> ++     -AUD_EQ_MAX_GAIN, AUD_EQ_MAX_GAIN, 1);
> +     gtk_scale_set_draw_value ((GtkScale *) slider, true);
> +     gtk_scale_set_value_pos ((GtkScale *) slider, GTK_POS_BOTTOM);
> +     gtk_range_set_inverted ((GtkRange *) slider, true);
> +@@ -127,18 +128,19 @@ static GtkWidget * create_window ()
> +     gtk_container_set_border_width ((GtkContainer *) window, 6);
> +     audgui_destroy_on_escape (window);
> + 
> +-    GtkWidget * vbox = gtk_vbox_new (false, 6);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
> +     gtk_container_add ((GtkContainer *) window, vbox);
> + 
> +     gtk_box_pack_start ((GtkBox *) vbox, create_on_off (), false, false, 0);
> + 
> +-    GtkWidget * hbox = gtk_hbox_new (false, 6);
> ++    GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL,  6);
> +     gtk_box_pack_start ((GtkBox *) vbox, hbox, false, false, 0);
> + 
> +     GtkWidget * preamp = create_slider (_("Preamp"), -1, hbox);
> +     g_object_set_data ((GObject *) window, "preamp", preamp);
> + 
> +-    gtk_box_pack_start ((GtkBox *) hbox, gtk_vseparator_new (), false, false, 0);
> ++    gtk_box_pack_start ((GtkBox *) hbox,
> ++     gtk_separator_new (GTK_ORIENTATION_VERTICAL), false, false, 0);
> + 
> +     for (int i = 0; i < AUD_EQ_NBANDS; i ++)
> +     {
> +--- src/libaudgui/file-opener.cc.old
> ++++ src/libaudgui/
> file-opener.cc
> 
> +@@ -96,9 +96,8 @@ static GtkWidget * create_filebrowser (gboolean open)
> +     gtk_window_set_type_hint ((GtkWindow *) window, GDK_WINDOW_TYPE_HINT_DIALOG);
> +     gtk_window_set_title ((GtkWindow *) window, window_title);
> +     gtk_window_set_default_size ((GtkWindow *) window, 700, 450);
> +-    gtk_container_set_border_width ((GtkContainer *) window, 10);
> + 
> +-    GtkWidget * vbox = gtk_vbox_new (false, 0);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> +     gtk_container_add ((GtkContainer *) window, vbox);
> + 
> +     GtkWidget * chooser = gtk_file_chooser_widget_new (GTK_FILE_CHOOSER_ACTION_OPEN);
> +@@ -108,17 +107,24 @@ static GtkWidget * create_filebrowser (gboolean open)
> +     if (path[0])
> +         gtk_file_chooser_set_current_folder ((GtkFileChooser *) chooser, path);
> + 
> +-    gtk_box_pack_start ((GtkBox *) vbox, chooser, true, true, 3);
> ++    gtk_box_pack_start ((GtkBox *) vbox, chooser, true, true, 0);
> + 
> +-    GtkWidget * hbox = gtk_hbox_new (false, 0);
> +-    gtk_box_pack_end ((GtkBox *) vbox, hbox, false, false, 3);
> ++    GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
> ++    gtk_box_pack_end ((GtkBox *) vbox, hbox, false, false, 0);
> ++
> ++#if GTK_CHECK_VERSION (3, 14, 0)
> ++    gtk_container_set_border_width ((GtkContainer *) hbox, 6);
> ++#else
> ++    gtk_widget_set_margin_top (hbox, 12);
> ++    gtk_container_set_border_width ((GtkContainer *) window, 12);
> ++#endif
> + 
> +     GtkWidget * toggle = gtk_check_button_new_with_mnemonic (toggle_text);
> +     gtk_toggle_button_set_active ((GtkToggleButton *) toggle, aud_get_bool ("audgui", option));
> +     g_signal_connect (toggle, "toggled", (GCallback) toggled_cb, (void *) option);
> +     gtk_box_pack_start ((GtkBox *) hbox, toggle, true, true, 0);
> + 
> +-    GtkWidget * bbox = gtk_hbutton_box_new ();
> ++    GtkWidget * bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
> +     gtk_button_box_set_layout ((GtkButtonBox *) bbox, GTK_BUTTONBOX_END);
> +     gtk_box_set_spacing ((GtkBox *) bbox, 6);
> +     gtk_box_pack_end ((GtkBox *) hbox, bbox, true, true, 0);
> +--- src/libaudgui/infopopup.cc.old
> ++++ src/libaudgui/
> infopopup.cc
> 
> +@@ -37,9 +37,6 @@
> + 
> + static void infopopup_move_to_mouse (GtkWidget * infopopup);
> + 
> +-static const GdkColor gray = {0, 40960, 40960, 40960};
> +-static const GdkColor white = {0, 65535, 65535, 65535};
> +-
> + static struct {
> +     GtkWidget * title_header, * title_label;
> +     GtkWidget * artist_header, * artist_label;
> +@@ -107,56 +104,21 @@ static gboolean infopopup_progress_cb (void *)
> +     return true;
> + }
> + 
> +-static void infopopup_realized (GtkWidget * widget)
> +-{
> +-    GdkWindow * window = gtk_widget_get_window (widget);
> +-    gdk_window_set_back_pixmap (window, nullptr, false);
> +-    infopopup_move_to_mouse (widget);
> +-}
> +-
> +-/* borrowed from the gtkui infoarea */
> +-static gboolean infopopup_draw_bg (GtkWidget * widget)
> +-{
> +-    GtkAllocation alloc;
> +-    gtk_widget_get_allocation (widget, & alloc);
> +-
> +-    cairo_t * cr = gdk_cairo_create (gtk_widget_get_window (widget));
> +-
> +-    cairo_pattern_t * gradient = cairo_pattern_create_linear (0, 0, 0, alloc.height);
> +-    cairo_pattern_add_color_stop_rgb (gradient, 0, 0.25, 0.25, 0.25);
> +-    cairo_pattern_add_color_stop_rgb (gradient, 0.5, 0.15, 0.15, 0.15);
> +-    cairo_pattern_add_color_stop_rgb (gradient, 0.5, 0.1, 0.1, 0.1);
> +-    cairo_pattern_add_color_stop_rgb (gradient, 1, 0, 0, 0);
> +-
> +-    cairo_set_source (cr, gradient);
> +-    cairo_rectangle (cr, 0, 0, alloc.width, alloc.height);
> +-    cairo_fill (cr);
> +-
> +-    cairo_pattern_destroy (gradient);
> +-    cairo_destroy (cr);
> +-    return false;
> +-}
> +-
> + static void infopopup_add_category (GtkWidget * grid, int position,
> +  const char * text, GtkWidget * * header, GtkWidget * * label)
> + {
> +     * header = gtk_label_new (nullptr);
> +     * label = gtk_label_new (nullptr);
> + 
> +-    gtk_misc_set_alignment ((GtkMisc *) * header, 1, 0.5);
> +-    gtk_misc_set_alignment ((GtkMisc *) * label, 0, 0.5);
> +-
> +-    gtk_widget_modify_fg (* header, GTK_STATE_NORMAL, & gray);
> +-    gtk_widget_modify_fg (* label, GTK_STATE_NORMAL, & white);
> ++    gtk_widget_set_halign (* header, GTK_ALIGN_END);
> ++    gtk_widget_set_halign (* label, GTK_ALIGN_START);
> + 
> +     char * markup = g_markup_printf_escaped ("<span style=\"italic\">%s</span>", text);
> +     gtk_label_set_markup ((GtkLabel *) * header, markup);
> +     g_free (markup);
> + 
> +-    gtk_table_attach ((GtkTable *) grid, * header, 0, 1, position, position + 1,
> +-     GTK_FILL, GTK_FILL, 0, 0);
> +-    gtk_table_attach ((GtkTable *) grid, * label, 1, 2, position, position + 1,
> +-     GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_grid_attach ((GtkGrid *) grid, * header, 0, position, 1, 1);
> ++    gtk_grid_attach ((GtkGrid *) grid, * label, 1, position, 1, 1);
> + 
> +     gtk_widget_set_no_show_all (* header, true);
> +     gtk_widget_set_no_show_all (* label, true);
> +@@ -185,7 +147,7 @@ static GtkWidget * infopopup_create ()
> +     gtk_window_set_decorated ((GtkWindow *) infopopup, false);
> +     gtk_container_set_border_width ((GtkContainer *) infopopup, 4);
> + 
> +-    GtkWidget * hbox = gtk_hbox_new (false, 6);
> ++    GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL,  6);
> +     gtk_container_add ((GtkContainer *) infopopup, hbox);
> + 
> +     widgets.image = gtk_image_new ();
> +@@ -193,8 +155,8 @@ static GtkWidget * infopopup_create ()
> +     gtk_box_pack_start ((GtkBox *) hbox, widgets.image, false, false, 0);
> +     gtk_widget_set_no_show_all (widgets.image, true);
> + 
> +-    GtkWidget * grid = gtk_table_new (0, 0, false);
> +-    gtk_table_set_col_spacings ((GtkTable *) grid, 6);
> ++    GtkWidget * grid = gtk_grid_new ();
> ++    gtk_grid_set_column_spacing ((GtkGrid *) grid, 6);
> +     gtk_box_pack_start ((GtkBox *) hbox, grid, true, true, 0);
> + 
> +     infopopup_add_category (grid, 0, _("Title"), & widgets.title_header, & widgets.title_label);
> +@@ -207,23 +169,15 @@ static GtkWidget * infopopup_create ()
> + 
> +     /* track progress */
> +     widgets.progress = gtk_progress_bar_new ();
> ++    gtk_widget_set_margin_top (widgets.progress, 6);
> ++    gtk_progress_bar_set_show_text ((GtkProgressBar *) widgets.progress, true);
> +     gtk_progress_bar_set_text ((GtkProgressBar *) widgets.progress, "");
> +-    gtk_table_set_row_spacing ((GtkTable *) grid, 6, 4);
> +-    gtk_table_attach ((GtkTable *) grid, widgets.progress, 0, 2, 7, 8,
> +-     GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_grid_attach ((GtkGrid *) grid, widgets.progress, 0, 7, 2, 1);
> + 
> +     /* do not show the track progress */
> +     gtk_widget_set_no_show_all (widgets.progress, true);
> + 
> +-    /* override background drawing */
> +-    gtk_widget_set_app_paintable (infopopup, true);
> +-
> +-    GtkStyle * style = gtk_style_new ();
> +-    gtk_widget_set_style (infopopup, style);
> +-    g_object_unref (style);
> +-
> +-    g_signal_connect (infopopup, "realize", (GCallback) infopopup_realized, nullptr);
> +-    g_signal_connect (infopopup, "expose-event", (GCallback) infopopup_draw_bg, nullptr);
> ++    g_signal_connect (infopopup, "realize", (GCallback) infopopup_move_to_mouse, nullptr);
> + 
> +     return infopopup;
> + }
> +--- src/libaudgui/infowin.cc.old
> ++++ src/libaudgui/
> infowin.cc
> 
> +@@ -132,7 +132,7 @@ static GtkWidget * small_label_new (const char * text)
> + 
> +     GtkWidget * label = gtk_label_new (text);
> +     gtk_label_set_attributes ((GtkLabel *) label, attrs);
> +-    gtk_misc_set_alignment ((GtkMisc *) label, 0, 0.5);
> ++    gtk_widget_set_halign (label, GTK_ALIGN_START);
> + 
> +     return label;
> + }
> +@@ -301,10 +301,11 @@ static void add_entry (GtkWidget * grid, const char * title, GtkWidget * entry,
> + {
> +     GtkWidget * label = small_label_new (title);
> + 
> +-    gtk_table_attach ((GtkTable *) grid, label, x, x + span, y, y + 1,
> +-     GTK_FILL, GTK_FILL, 0, 0);
> +-    gtk_table_attach ((GtkTable *) grid, entry, x, x + span, y + 1, y + 2,
> +-     GTK_FILL, GTK_FILL, 0, 0);
> ++    if (y > 0)
> ++        gtk_widget_set_margin_top (label, 6);
> ++
> ++    gtk_grid_attach ((GtkGrid *) grid, label, x, y, span, 1);
> ++    gtk_grid_attach ((GtkGrid *) grid, entry, x, y + 1, span, 1);
> + 
> +     g_signal_connect (entry, "changed", (GCallback) entry_changed, nullptr);
> + }
> +@@ -317,44 +318,41 @@ static void create_infowin ()
> +     gtk_window_set_type_hint ((GtkWindow *) infowin,
> +      GDK_WINDOW_TYPE_HINT_DIALOG);
> + 
> +-    GtkWidget * main_grid = gtk_table_new (0, 0, false);
> +-    gtk_table_set_col_spacings ((GtkTable *) main_grid, 6);
> +-    gtk_table_set_row_spacings ((GtkTable *) main_grid, 6);
> ++    GtkWidget * main_grid = gtk_grid_new ();
> ++    gtk_grid_set_column_spacing ((GtkGrid *) main_grid, 6);
> ++    gtk_grid_set_row_spacing ((GtkGrid *) main_grid, 6);
> +     gtk_container_add ((GtkContainer *) infowin, main_grid);
> + 
> +     widgets.image = audgui_scaled_image_new (nullptr);
> +-    gtk_table_attach_defaults ((GtkTable *) main_grid, widgets.image, 0, 1, 0, 1);
> ++    gtk_widget_set_hexpand (widgets.image, true);
> ++    gtk_widget_set_vexpand (widgets.image, true);
> ++    gtk_grid_attach ((GtkGrid *) main_grid, widgets.image, 0, 0, 1, 1);
> + 
> +     widgets.location = gtk_label_new ("");
> +-    gtk_widget_set_size_request (widgets.location, 200, -1);
> ++    gtk_label_set_max_width_chars ((GtkLabel *) widgets.location, 40);
> +     gtk_label_set_line_wrap ((GtkLabel *) widgets.location, true);
> +     gtk_label_set_line_wrap_mode ((GtkLabel *) widgets.location, PANGO_WRAP_WORD_CHAR);
> +     gtk_label_set_selectable ((GtkLabel *) widgets.location, true);
> +-    gtk_table_attach ((GtkTable *) main_grid, widgets.location, 0, 1, 1, 2,
> +-     GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_grid_attach ((GtkGrid *) main_grid, widgets.location, 0, 1, 1, 1);
> + 
> +-    GtkWidget * codec_grid = gtk_table_new (0, 0, false);
> +-    gtk_table_set_row_spacings ((GtkTable *) codec_grid, 2);
> +-    gtk_table_set_col_spacings ((GtkTable *) codec_grid, 12);
> +-    gtk_table_attach ((GtkTable *) main_grid, codec_grid, 0, 1, 2, 3,
> +-     GTK_FILL, GTK_FILL, 0, 0);
> ++    GtkWidget * codec_grid = gtk_grid_new ();
> ++    gtk_grid_set_row_spacing ((GtkGrid *) codec_grid, 3);
> ++    gtk_grid_set_column_spacing ((GtkGrid *) codec_grid, 12);
> ++    gtk_grid_attach ((GtkGrid *) main_grid, codec_grid, 0, 2, 1, 1);
> + 
> +     for (int row = 0; row < CODEC_ITEMS; row ++)
> +     {
> +         GtkWidget * label = small_label_new (_(codec_labels[row]));
> +-        gtk_table_attach ((GtkTable *) codec_grid, label, 0, 1, row, row + 1,
> +-         GTK_FILL, GTK_FILL, 0, 0);
> ++        gtk_grid_attach ((GtkGrid *) codec_grid, label, 0, row, 1, 1);
> + 
> +         widgets.codec[row] = small_label_new (nullptr);
> +-        gtk_table_attach ((GtkTable *) codec_grid, widgets.codec[row], 1, 2, row, row + 1,
> +-         GTK_FILL, GTK_FILL, 0, 0);
> ++        gtk_grid_attach ((GtkGrid *) codec_grid, widgets.codec[row], 1, row, 1, 1);
> +     }
> + 
> +-    GtkWidget * grid = gtk_table_new (0, 0, false);
> +-    gtk_table_set_row_spacings ((GtkTable *) grid, 2);
> +-    gtk_table_set_col_spacings ((GtkTable *) grid, 6);
> +-    gtk_table_attach ((GtkTable *) main_grid, grid, 1, 2, 0, 3,
> +-     GTK_FILL, GTK_FILL, 0, 0);
> ++    GtkWidget * grid = gtk_grid_new ();
> ++    gtk_grid_set_column_homogeneous ((GtkGrid *) grid, true);
> ++    gtk_grid_set_column_spacing ((GtkGrid *) grid, 6);
> ++    gtk_grid_attach ((GtkGrid *) main_grid, grid, 1, 0, 1, 3);
> + 
> +     widgets.title = gtk_entry_new ();
> +     add_entry (grid, _("Title"), widgets.title, 0, 0, 2);
> +@@ -381,9 +379,8 @@ static void create_infowin ()
> +     widgets.track = gtk_entry_new ();
> +     add_entry (grid, _("Track Number"), widgets.track, 1, 12, 1);
> + 
> +-    GtkWidget * bottom_hbox = gtk_hbox_new (false, 6);
> +-    gtk_table_attach ((GtkTable *) main_grid, bottom_hbox, 0, 2, 3, 4,
> +-     GTK_FILL, GTK_FILL, 0, 0);
> ++    GtkWidget * bottom_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> ++    gtk_grid_attach ((GtkGrid *) main_grid, bottom_hbox, 0, 3, 2, 1);
> + 
> +     widgets.clear = gtk_check_button_new_with_mnemonic
> +      (_("Clea_r fields when moving to next song"));
> +--- src/libaudgui/jump-to-track.cc.old
> ++++ src/libaudgui/
> jump-to-track.cc
> 
> +@@ -31,6 +31,10 @@
> + #include "list.h"
> + #include "jump-to-track-cache.h"
> + 
> ++#if GTK_CHECK_VERSION (3, 12, 0)
> ++#define gtk_widget_set_margin_left gtk_widget_set_margin_start
> ++#endif
> ++
> + static void update_cb (void * data, void *);
> + static void activate_cb (void * data, void *);
> + 
> +@@ -243,7 +247,7 @@ static GtkWidget * create_window ()
> +     gtk_container_set_border_width ((GtkContainer *) jump_to_track_win, 10);
> +     gtk_window_set_default_size ((GtkWindow *) jump_to_track_win, 600, 500);
> + 
> +-    GtkWidget * vbox = gtk_vbox_new (false, 6);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
> +     gtk_container_add ((GtkContainer *) jump_to_track_win, vbox);
> + 
> +     treeview = audgui_list_new (& callbacks, nullptr, 0);
> +@@ -256,7 +260,7 @@ static GtkWidget * create_window ()
> +      "changed", (GCallback) selection_changed, nullptr);
> +     g_signal_connect (treeview, "row-activated", (GCallback) do_jump, nullptr);
> + 
> +-    GtkWidget * hbox = gtk_hbox_new (false, 6);
> ++    GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> +     gtk_box_pack_start ((GtkBox *) vbox, hbox, false, false, 3);
> + 
> +     /* filter box */
> +@@ -280,17 +284,14 @@ static GtkWidget * create_window ()
> +     gtk_scrolled_window_set_shadow_type ((GtkScrolledWindow *) scrollwin, GTK_SHADOW_IN);
> +     gtk_box_pack_start ((GtkBox *) vbox, scrollwin, true, true, 0);
> + 
> +-    GtkWidget * hbox2 = gtk_hbox_new (false, 0);
> ++    GtkWidget * hbox2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
> +     gtk_box_pack_end ((GtkBox *) vbox, hbox2, false, false, 0);
> + 
> +-    GtkWidget * bbox = gtk_hbutton_box_new ();
> ++    GtkWidget * bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
> +     gtk_button_box_set_layout ((GtkButtonBox *) bbox, GTK_BUTTONBOX_END);
> ++    gtk_widget_set_margin_left (bbox, 6);
> +     gtk_box_set_spacing ((GtkBox *) bbox, 6);
> +-
> +-    GtkWidget * alignment = gtk_alignment_new (0.5, 0.5, 1, 1);
> +-    gtk_alignment_set_padding ((GtkAlignment *) alignment, 0, 0, 6, 0);
> +-    gtk_container_add ((GtkContainer *) alignment, bbox);
> +-    gtk_box_pack_end ((GtkBox *) hbox2, alignment, true, true, 0);
> ++    gtk_box_pack_end ((GtkBox *) hbox2, bbox, true, true, 0);
> + 
> +     /* close dialog toggle */
> +     GtkWidget * toggle = gtk_check_button_new_with_mnemonic (_("C_lose on jump"));
> +--- src/libaudgui/list.cc.old
> ++++ src/libaudgui/
> list.cc
> 
> +@@ -386,7 +386,7 @@ static gboolean autoscroll (GtkWidget * widget)
> +     ListModel * model = (ListModel *) gtk_tree_view_get_model
> +      ((GtkTreeView *) widget);
> + 
> +-    GtkAdjustment * adj = gtk_tree_view_get_vadjustment ((GtkTreeView *) widget);
> ++    GtkAdjustment * adj = gtk_scrollable_get_vadjustment ((GtkScrollable *) widget);
> +     if (! adj)
> +     {
> +         stop_autoscroll (model);
> +@@ -458,7 +458,7 @@ static gboolean drag_motion (GtkWidget * widget, GdkDragContext * context,
> + 
> +     int height;
> +     gdk_window_get_geometry (gtk_tree_view_get_bin_window ((GtkTreeView *)
> +-     widget), nullptr, nullptr, nullptr, & height, nullptr);
> ++     widget), nullptr, nullptr, nullptr, & height);
> +     gtk_tree_view_convert_widget_to_bin_window_coords ((GtkTreeView *) widget,
> +      x, y, & x, & y);
> + 
> +@@ -534,6 +534,10 @@ static void drag_data_received (GtkWidget * widget, GdkDragContext * context, in
> + 
> + static void destroy_cb (GtkWidget * list, ListModel * model)
> + {
> ++    /* workaround for Gnome bug #679291 */
> ++    g_signal_handlers_disconnect_matched (list, G_SIGNAL_MATCH_DATA, 0, 0, NULL,
> ++     NULL, model);
> ++
> +     stop_autoscroll (model);
> +     g_list_free (model->column_types);
> +     g_object_unref (model);
> +--- src/libaudgui/menu.cc.old
> ++++ src/libaudgui/
> menu.cc
> 
> +@@ -23,6 +23,10 @@
> + #include <libaudcore/i18n.h>
> + #include <libaudcore/runtime.h>
> + 
> ++/* we still use GtkImageMenuItem until there is a good alternative */
> ++#pragma GCC diagnostic push
> ++#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
> ++
> + static GtkWidget * image_menu_item_new (const char * text, const char * icon)
> + {
> +     GtkWidget * widget = gtk_image_menu_item_new_with_mnemonic (text);
> +@@ -36,6 +40,8 @@ static GtkWidget * image_menu_item_new (const char * text, const char * icon)
> +     return widget;
> + }
> + 
> ++#pragma GCC diagnostic pop
> ++
> + static void toggled_cb (GtkCheckMenuItem * check, const AudguiMenuItem * item)
> + {
> +     gboolean on = gtk_check_menu_item_get_active (check);
> +--- src/libaudgui/plugin-prefs.cc.old
> ++++ src/libaudgui/
> plugin-prefs.cc
> 
> +@@ -168,7 +168,7 @@ EXPORT void audgui_show_plugin_prefs (PluginHandle * plugin)
> +     }
> + 
> +     GtkWidget * content = gtk_dialog_get_content_area ((GtkDialog *) window);
> +-    GtkWidget * box = gtk_vbox_new (false, 0);
> ++    GtkWidget * box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> +     audgui_create_widgets_with_domain (box, p->widgets, header->info.domain);
> +     gtk_box_pack_start ((GtkBox *) content, box, true, true, 0);
> + 
> +--- src/libaudgui/plugin-view.cc.old
> ++++ src/libaudgui/
> plugin-view.cc
> 
> +@@ -214,7 +214,7 @@ static void button_destroy (GtkWidget * b)
> + 
> + GtkWidget * plugin_view_new (PluginType type)
> + {
> +-    GtkWidget * vbox = gtk_vbox_new (false, 6);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
> +     gtk_container_set_border_width ((GtkContainer *) vbox, 6);
> + 
> +     GtkWidget * scrolled = gtk_scrolled_window_new (nullptr, nullptr);
> +@@ -229,7 +229,7 @@ GtkWidget * plugin_view_new (PluginType type)
> +     g_signal_connect (tree, "realize", (GCallback) list_fill, aud::to_ptr (type));
> +     g_signal_connect (tree, "destroy", (GCallback) list_destroy, nullptr);
> + 
> +-    GtkWidget * hbox = gtk_hbox_new (false, 6);
> ++    GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL,  6);
> +     gtk_box_pack_start ((GtkBox *) vbox, hbox, false, false, 0);
> + 
> +     GtkWidget * config = audgui_button_new (_("_Settings"), "preferences-system", do_config, tree);
> +--- src/libaudgui/prefs-widget.cc.old
> ++++ src/libaudgui/
> prefs-widget.cc
> 
> +@@ -28,6 +28,10 @@
> + 
> + #include "libaudgui-gtk.h"
> + 
> ++#if GTK_CHECK_VERSION (3, 12, 0)
> ++#define gtk_widget_set_margin_left gtk_widget_set_margin_start
> ++#endif
> ++
> + static void widget_changed (GtkWidget * widget, const PreferencesWidget * w)
> + {
> +     switch (w->type)
> +@@ -181,7 +185,7 @@ static void create_label (const PreferencesWidget * widget, GtkWidget * * label,
> +     * label = gtk_label_new_with_mnemonic (dgettext (domain, widget->label));
> +     gtk_label_set_use_markup ((GtkLabel *) * label, true);
> +     gtk_label_set_line_wrap ((GtkLabel *) * label, true);
> +-    gtk_misc_set_alignment ((GtkMisc *) * label, 0, 0.5);
> ++    gtk_widget_set_halign (* label, GTK_ALIGN_START);
> + }
> + 
> + /* WIDGET_SPIN_BTN */
> +@@ -206,13 +210,15 @@ void create_font_btn (const PreferencesWidget * widget, GtkWidget * * label,
> +  GtkWidget * * font_btn, const char * domain)
> + {
> +     * font_btn = gtk_font_button_new ();
> ++    gtk_widget_set_hexpand (* font_btn, true);
> ++
> +     gtk_font_button_set_use_font ((GtkFontButton *) * font_btn, true);
> +     gtk_font_button_set_use_size ((GtkFontButton *) * font_btn, true);
> + 
> +     if (widget->label)
> +     {
> +         * label = gtk_label_new (dgettext (domain, widget->label));
> +-        gtk_misc_set_alignment ((GtkMisc *) * label, 1, 0.5);
> ++        gtk_widget_set_halign (* label, GTK_ALIGN_END);
> +     }
> + 
> +     if (widget->data.font_btn.title)
> +@@ -228,12 +234,13 @@ static void create_entry (const PreferencesWidget * widget, GtkWidget * * label,
> +  GtkWidget * * entry, const char * domain)
> + {
> +     * entry = gtk_entry_new ();
> ++    gtk_widget_set_hexpand (* entry, true);
> +     gtk_entry_set_visibility ((GtkEntry *) * entry, ! widget->data.entry.password);
> + 
> +     if (widget->label)
> +     {
> +         * label = gtk_label_new (dgettext (domain, widget->label));
> +-        gtk_misc_set_alignment ((GtkMisc *) * label, 1, 0.5);
> ++        gtk_widget_set_halign (* label, GTK_ALIGN_END);
> +     }
> + 
> +     widget_init (* entry, widget);
> +@@ -251,8 +258,7 @@ static void combobox_update (GtkWidget * combobox, const PreferencesWidget * wid
> + 
> +     g_object_set_data ((GObject *) combobox, "comboitems", (void *) items.data);
> + 
> +-    /* no gtk_combo_box_text_clear()? */
> +-    gtk_list_store_clear ((GtkListStore *) gtk_combo_box_get_model ((GtkComboBox *) combobox));
> ++    gtk_combo_box_text_remove_all ((GtkComboBoxText *) combobox);
> + 
> +     for (const ComboItem & item : items)
> +         gtk_combo_box_text_append_text ((GtkComboBoxText *) combobox,
> +@@ -306,7 +312,6 @@ static void fill_table (GtkWidget * table,
> +     for (const PreferencesWidget & w : widgets)
> +     {
> +         GtkWidget * widget_left = nullptr, * widget_middle = nullptr, * widget_right = nullptr;
> +-        GtkAttachOptions middle_policy = (GtkAttachOptions) (GTK_FILL);
> + 
> +         switch (w.type)
> +         {
> +@@ -321,17 +326,14 @@ static void fill_table (GtkWidget * table,
> + 
> +             case PreferencesWidget::FontButton:
> +                 create_font_btn (& w, & widget_left, & widget_middle, domain);
> +-                middle_policy = (GtkAttachOptions) (GTK_EXPAND | GTK_FILL);
> +                 break;
> + 
> +             case PreferencesWidget::Entry:
> +                 create_entry (& w, & widget_left, & widget_middle, domain);
> +-                middle_policy = (GtkAttachOptions) (GTK_EXPAND | GTK_FILL);
> +                 break;
> + 
> +             case PreferencesWidget::ComboBox:
> +                 create_cbox (& w, & widget_left, & widget_middle, domain);
> +-                middle_policy = (GtkAttachOptions) (GTK_EXPAND | GTK_FILL);
> +                 break;
> + 
> +             default:
> +@@ -341,16 +343,13 @@ static void fill_table (GtkWidget * table,
> +         int i = & w - widgets.data;
> + 
> +         if (widget_left)
> +-            gtk_table_attach ((GtkTable *) table, widget_left, 0, 1, i, i + 1,
> +-             GTK_FILL, GTK_FILL, 0, 0);
> ++            gtk_grid_attach ((GtkGrid *) table, widget_left, 0, i, 1, 1);
> + 
> +         if (widget_middle)
> +-            gtk_table_attach ((GtkTable *) table, widget_middle, 1, 2, i, i + 1,
> +-             middle_policy, GTK_FILL, 0, 0);
> ++            gtk_grid_attach ((GtkGrid *) table, widget_middle, 1, i, 1, 1);
> + 
> +         if (widget_right)
> +-            gtk_table_attach ((GtkTable *) table, widget_right, 2, 3, i, i + 1,
> +-             GTK_FILL, GTK_FILL, 0, 0);
> ++            gtk_grid_attach ((GtkGrid *) table, widget_right, 2, i, 1, 1);
> +     }
> + }
> + 
> +@@ -371,13 +370,11 @@ void audgui_create_widgets_with_domain (GtkWidget * box,
> +         {
> +             if (! child_box)
> +             {
> +-                child_box = gtk_vbox_new (false, 0);
> ++                child_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> +                 g_object_set_data ((GObject *) widget, "child", child_box);
> + 
> +-                GtkWidget * alignment = gtk_alignment_new (0.5, 0.5, 1, 1);
> +-                gtk_box_pack_start ((GtkBox *) box, alignment, false, false, 0);
> +-                gtk_alignment_set_padding ((GtkAlignment *) alignment, 0, 0, 12, 0);
> +-                gtk_container_add ((GtkContainer *) alignment, child_box);
> ++                gtk_widget_set_margin_left (child_box, 12);
> ++                gtk_box_pack_start ((GtkBox *) box, child_box, false, false, 0);
> + 
> +                 if (GTK_IS_TOGGLE_BUTTON (widget))
> +                     gtk_widget_set_sensitive (child_box,
> +@@ -387,15 +384,13 @@ void audgui_create_widgets_with_domain (GtkWidget * box,
> +         else
> +             child_box = nullptr;
> + 
> +-        GtkWidget * alignment = gtk_alignment_new (0.5, 0.5, 1, 1);
> +-        gtk_alignment_set_padding ((GtkAlignment *) alignment, 6, 0, 12, 0);
> +-        gtk_box_pack_start ((GtkBox *) (child_box ? child_box : box), alignment, false, false, 0);
> +-
> +         widget = nullptr;
> + 
> +         if (radio_btn_group && w.type != PreferencesWidget::RadioButton)
> +             radio_btn_group = nullptr;
> + 
> ++        int pad_left = 12, pad_top = 6;
> ++
> +         switch (w.type)
> +         {
> +             case PreferencesWidget::Button:
> +@@ -410,22 +405,24 @@ void audgui_create_widgets_with_domain (GtkWidget * box,
> + 
> +             case PreferencesWidget::Label:
> +             {
> +-                if (strstr (w.label, "<b>"))
> +-                    gtk_alignment_set_padding ((GtkAlignment *) alignment,
> +-                     (& w == widgets.data) ? 0 : 12, 0, 0, 0);
> +-
> +                 GtkWidget * icon = nullptr;
> +                 create_label (& w, & label, & icon, domain);
> + 
> +                 if (icon)
> +                 {
> +-                    widget = gtk_hbox_new (false, 6);
> ++                    widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> +                     gtk_box_pack_start ((GtkBox *) widget, icon, false, false, 0);
> +                     gtk_box_pack_start ((GtkBox *) widget, label, false, false, 0);
> +                 }
> +                 else
> +                     widget = label;
> + 
> ++                if (strstr (w.label, "<b>"))
> ++                {
> ++                    pad_left = 0;
> ++                    pad_top = (& w == widgets.data) ? 0 : 12;
> ++                }
> ++
> +                 break;
> +             }
> + 
> +@@ -438,7 +435,7 @@ void audgui_create_widgets_with_domain (GtkWidget * box,
> + 
> +             case PreferencesWidget::SpinButton:
> +             {
> +-                widget = gtk_hbox_new (false, 6);
> ++                widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> + 
> +                 GtkWidget * label_pre = nullptr, * spin_btn = nullptr, * label_past = nullptr;
> +                 create_spin_button (& w, & label_pre, & spin_btn, & label_past, domain);
> +@@ -461,7 +458,7 @@ void audgui_create_widgets_with_domain (GtkWidget * box,
> + 
> +             case PreferencesWidget::FontButton:
> +             {
> +-                widget = gtk_hbox_new (false, 6);
> ++                widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> + 
> +                 GtkWidget * font_btn = nullptr;
> +                 create_font_btn (& w, & label, & font_btn, domain);
> +@@ -475,9 +472,9 @@ void audgui_create_widgets_with_domain (GtkWidget * box,
> +             }
> + 
> +             case PreferencesWidget::Table:
> +-                widget = gtk_table_new (0, 0, false);
> +-                gtk_table_set_col_spacings ((GtkTable *) widget, 6);
> +-                gtk_table_set_row_spacings ((GtkTable *) widget, 6);
> ++                widget = gtk_grid_new ();
> ++                gtk_grid_set_column_spacing ((GtkGrid *) widget, 6);
> ++                gtk_grid_set_row_spacing ((GtkGrid *) widget, 6);
> + 
> +                 fill_table (widget, w.data.table.widgets, domain);
> + 
> +@@ -485,7 +482,7 @@ void audgui_create_widgets_with_domain (GtkWidget * box,
> + 
> +             case PreferencesWidget::Entry:
> +             {
> +-                widget = gtk_hbox_new (false, 6);
> ++                widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> + 
> +                 GtkWidget * entry = nullptr;
> +                 create_entry (& w, & label, & entry, domain);
> +@@ -500,7 +497,7 @@ void audgui_create_widgets_with_domain (GtkWidget * box,
> + 
> +             case PreferencesWidget::ComboBox:
> +             {
> +-                widget = gtk_hbox_new (false, 6);
> ++                widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> + 
> +                 GtkWidget * combo = nullptr;
> +                 create_cbox (& w, & label, & combo, domain);
> +@@ -515,9 +512,9 @@ void audgui_create_widgets_with_domain (GtkWidget * box,
> + 
> +             case PreferencesWidget::Box:
> +                 if (w.data.box.horizontal)
> +-                    widget = gtk_hbox_new (false, 6);
> ++                    widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> +                 else
> +-                    widget = gtk_vbox_new (false, 0);
> ++                    widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> + 
> +                 audgui_create_widgets_with_domain (widget, w.data.box.widgets, domain);
> + 
> +@@ -531,13 +528,11 @@ void audgui_create_widgets_with_domain (GtkWidget * box,
> +                 break;
> + 
> +             case PreferencesWidget::Notebook:
> +-                gtk_alignment_set_padding ((GtkAlignment *) alignment, 0, 0, 0, 0);
> +-
> +                 widget = gtk_notebook_new ();
> + 
> +                 for (const NotebookTab & tab : w.data.notebook.tabs)
> +                 {
> +-                    GtkWidget * vbox = gtk_vbox_new (false, 0);
> ++                    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> +                     gtk_container_set_border_width ((GtkContainer *) vbox, 6);
> + 
> +                     audgui_create_widgets_with_domain (vbox, tab.widgets, domain);
> +@@ -546,11 +541,13 @@ void audgui_create_widgets_with_domain (GtkWidget * box,
> +                      gtk_label_new (dgettext (domain, tab.name)));
> +                 }
> + 
> ++                pad_top = 0;
> ++
> +                 break;
> + 
> +             case PreferencesWidget::Separator:
> +-                widget = w.data.separator.horizontal ?
> +-                 gtk_hseparator_new () : gtk_vseparator_new ();
> ++                widget = gtk_separator_new (w.data.separator.horizontal
> ++                 ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL);
> +                 break;
> + 
> +             default:
> +@@ -560,11 +557,14 @@ void audgui_create_widgets_with_domain (GtkWidget * box,
> +         if (widget)
> +         {
> +             /* use uniform spacing for horizontal boxes */
> +-            if (gtk_orientable_get_orientation ((GtkOrientable *) box) ==
> ++            if (gtk_orientable_get_orientation ((GtkOrientable *) box) !=
> +              GTK_ORIENTATION_HORIZONTAL)
> +-                gtk_alignment_set_padding ((GtkAlignment *) alignment, 0, 0, 0, 0);
> ++            {
> ++                gtk_widget_set_margin_left (widget, pad_left);
> ++                gtk_widget_set_margin_top (widget, pad_top);
> ++            }
> + 
> +-            gtk_container_add ((GtkContainer *) alignment, widget);
> ++            gtk_box_pack_start ((GtkBox *) (child_box ? child_box : box), widget, false, false, 0);
> +         }
> +     }
> + }
> +--- src/libaudgui/prefs-window.cc.old
> ++++ src/libaudgui/
> prefs-window.cc
> 
> +@@ -498,29 +498,32 @@ static void create_titlestring_widgets (GtkWidget * * cbox, GtkWidget * * entry)
> + 
> + static void * create_titlestring_table ()
> + {
> +-    GtkWidget * grid = gtk_table_new (0, 0, false);
> +-    gtk_table_set_row_spacings ((GtkTable *) grid, 6);
> +-    gtk_table_set_col_spacings ((GtkTable *) grid, 6);
> ++    GtkWidget * grid = gtk_grid_new ();
> ++    gtk_grid_set_row_spacing ((GtkGrid *) grid, 4);
> ++    gtk_grid_set_column_spacing ((GtkGrid *) grid, 12);
> + 
> +     GtkWidget * label = gtk_label_new (_("Title format:"));
> +-    gtk_misc_set_alignment ((GtkMisc *) label, 1, 0.5);
> +-    gtk_table_attach ((GtkTable *) grid, label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_grid_attach ((GtkGrid *) grid, label, 0, 0, 1, 1);
> ++    gtk_label_set_justify ((GtkLabel *) label, GTK_JUSTIFY_RIGHT);
> ++    gtk_widget_set_halign (label, GTK_ALIGN_END);
> + 
> +     label = gtk_label_new (_("Custom string:"));
> +-    gtk_misc_set_alignment ((GtkMisc *) label, 1, 0.5);
> +-    gtk_table_attach ((GtkTable *) grid, label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_grid_attach ((GtkGrid *) grid, label, 0, 1, 1, 1);
> ++    gtk_label_set_justify ((GtkLabel *) label, GTK_JUSTIFY_RIGHT);
> ++    gtk_widget_set_halign (label, GTK_ALIGN_END);
> + 
> +     GtkWidget * titlestring_cbox;
> +     create_titlestring_widgets (& titlestring_cbox, & titlestring_entry);
> +-    gtk_table_attach_defaults ((GtkTable *) grid, titlestring_cbox, 1, 2, 0, 1);
> +-    gtk_table_attach_defaults ((GtkTable *) grid, titlestring_entry, 1, 2, 1, 2);
> ++    gtk_widget_set_hexpand (titlestring_cbox, true);
> ++    gtk_widget_set_hexpand (titlestring_entry, true);
> ++    gtk_grid_attach ((GtkGrid *) grid, titlestring_cbox, 1, 0, 1, 1);
> ++    gtk_grid_attach ((GtkGrid *) grid, titlestring_entry, 1, 1, 1, 1);
> + 
> +     GtkWidget * titlestring_help_button = gtk_button_new ();
> +     gtk_widget_set_can_focus (titlestring_help_button, false);
> +     gtk_button_set_focus_on_click ((GtkButton *) titlestring_help_button, false);
> +     gtk_button_set_relief ((GtkButton *) titlestring_help_button, GTK_RELIEF_HALF);
> +-    gtk_table_attach ((GtkTable *) grid, titlestring_help_button, 2, 3, 1, 2,
> +-     GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_grid_attach ((GtkGrid *) grid, titlestring_help_button, 2, 1, 1, 1);
> + 
> +     GtkWidget * titlestring_tag_menu = create_titlestring_tag_menu ();
> + 
> +@@ -535,14 +538,14 @@ static void * create_titlestring_table ()
> + 
> + static void create_playlist_category ()
> + {
> +-    GtkWidget * vbox = gtk_vbox_new (false, 0);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> +     gtk_container_add ((GtkContainer *) category_notebook, vbox);
> +     audgui_create_widgets (vbox, playlist_page_widgets);
> + }
> + 
> + static void create_song_info_category ()
> + {
> +-    GtkWidget * vbox = gtk_vbox_new (false, 0);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> +     gtk_container_add ((GtkContainer *) category_notebook, vbox);
> +     audgui_create_widgets (vbox, song_info_page_widgets);
> + }
> +@@ -593,14 +596,14 @@ static ArrayRef<ComboItem> iface_combo_fill ()
> + 
> + static void * iface_create_prefs_box ()
> + {
> +-    iface_prefs_box = gtk_vbox_new (false, 0);
> ++    iface_prefs_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> +     iface_fill_prefs_box ();
> +     return iface_prefs_box;
> + }
> + 
> + static void create_appearance_category ()
> + {
> +-    GtkWidget * vbox = gtk_vbox_new (false, 0);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> +     gtk_container_add ((GtkContainer *) category_notebook, vbox);
> +     audgui_create_widgets (vbox, appearance_page_widgets);
> + }
> +@@ -666,17 +669,17 @@ static void * output_create_about_button ()
> + 
> + static void create_audio_category ()
> + {
> +-    GtkWidget * audio_page_vbox = gtk_vbox_new (false, 0);
> ++    GtkWidget * audio_page_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> +     audgui_create_widgets (audio_page_vbox, audio_page_widgets);
> +     gtk_container_add ((GtkContainer *) category_notebook, audio_page_vbox);
> + }
> + 
> + static void create_connectivity_category ()
> + {
> +-    GtkWidget * connectivity_page_vbox = gtk_vbox_new (false, 0);
> ++    GtkWidget * connectivity_page_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> +     gtk_container_add ((GtkContainer *) category_notebook, connectivity_page_vbox);
> + 
> +-    GtkWidget * vbox = gtk_vbox_new (false, 0);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> +     gtk_box_pack_start ((GtkBox *) connectivity_page_vbox, vbox, true, true, 0);
> + 
> +     audgui_create_widgets (vbox, connectivity_page_widgets);
> +@@ -711,10 +714,10 @@ static void create_prefs_window ()
> +     gtk_window_set_title ((GtkWindow *) prefswin, _("Audacious Settings"));
> +     gtk_window_set_default_size ((GtkWindow *) prefswin, 680, 400);
> + 
> +-    GtkWidget * vbox = gtk_vbox_new (false, 0);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> +     gtk_container_add ((GtkContainer *) prefswin, vbox);
> + 
> +-    GtkWidget * hbox = gtk_hbox_new (false, 6);
> ++    GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL,  8);
> +     gtk_box_pack_start ((GtkBox *) vbox, hbox, true, true, 0);
> + 
> +     GtkWidget * scrolledwindow = gtk_scrolled_window_new (nullptr, nullptr);
> +@@ -744,17 +747,17 @@ static void create_prefs_window ()
> +     create_song_info_category ();
> +     create_plugin_category ();
> + 
> +-    GtkWidget * hseparator = gtk_hseparator_new ();
> ++    GtkWidget * hseparator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
> +     gtk_box_pack_start ((GtkBox *) vbox, hseparator, false, false, 6);
> + 
> +-    hbox = gtk_hbox_new (false, 0);
> ++    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL,  0);
> +     gtk_box_pack_start ((GtkBox *) vbox, hbox, false, false, 0);
> + 
> +     GtkWidget * audversionlabel = gtk_label_new (aud_version_string);
> +     gtk_box_pack_start ((GtkBox *) hbox, audversionlabel, false, false, 0);
> +     gtk_label_set_use_markup ((GtkLabel *) audversionlabel, true);
> + 
> +-    GtkWidget * prefswin_button_box = gtk_hbutton_box_new ();
> ++    GtkWidget * prefswin_button_box = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
> +     gtk_box_pack_start ((GtkBox *) hbox, prefswin_button_box, true, true, 0);
> +     gtk_button_box_set_layout ((GtkButtonBox *) prefswin_button_box, GTK_BUTTONBOX_END);
> +     gtk_box_set_spacing ((GtkBox *) prefswin_button_box, 6);
> +--- src/libaudgui/scaled-image.cc.old
> ++++ src/libaudgui/
> scaled-image.cc
> 
> +@@ -59,7 +59,7 @@ static GdkPixbuf * get_scaled (GtkWidget * widget, int maxwidth, int maxheight)
> +     return scaled;
> + }
> + 
> +-static int expose_cb (GtkWidget * widget, GdkEventExpose * event)
> ++static gboolean draw_cb (GtkWidget * widget, GdkEventExpose * event)
> + {
> +     GdkRectangle rect;
> +     gtk_widget_get_allocation (widget, & rect);
> +@@ -107,7 +107,7 @@ EXPORT GtkWidget * audgui_scaled_image_new (GdkPixbuf * pixbuf)
> + {
> +     GtkWidget * widget = gtk_drawing_area_new ();
> + 
> +-    g_signal_connect (widget, "expose-event", (GCallback) expose_cb, nullptr);
> ++    g_signal_connect (widget, "draw", (GCallback) draw_cb, nullptr);
> +     g_signal_connect (widget, "destroy", (GCallback) destroy_cb, nullptr);
> + 
> +     audgui_scaled_image_set (widget, pixbuf);
> +--- src/libaudgui/status.cc.old
> ++++ src/libaudgui/
> status.cc
> 
> +@@ -37,7 +37,7 @@ static void create_progress_window ()
> +     gtk_window_set_resizable ((GtkWindow *) progress_window, false);
> +     gtk_container_set_border_width ((GtkContainer *) progress_window, 6);
> + 
> +-    GtkWidget * vbox = gtk_vbox_new (false, 6);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
> +     gtk_container_add ((GtkContainer *) progress_window, vbox);
> + 
> +     progress_label = gtk_label_new (nullptr);
> +--- src/libaudgui/util.cc.old
> ++++ src/libaudgui/
> util.cc
> 
> +@@ -46,12 +46,27 @@ EXPORT int audgui_get_digit_width (GtkWidget * widget)
> + 
> + EXPORT void audgui_get_mouse_coords (GtkWidget * widget, int * x, int * y)
> + {
> +-    gtk_widget_get_pointer (widget, x, y);
> ++    int xwin, ywin;
> ++    GdkRectangle alloc;
> ++
> ++    GdkWindow * window = gtk_widget_get_window (widget);
> ++    GdkDisplay * display = gdk_window_get_display (window);
> ++    GdkDeviceManager * manager = gdk_display_get_device_manager (display);
> ++    GdkDevice * device = gdk_device_manager_get_client_pointer (manager);
> ++
> ++    gdk_window_get_device_position (window, device, & xwin, & ywin, nullptr);
> ++    gtk_widget_get_allocation (widget, & alloc);
> ++
> ++    * x = xwin - alloc.x;
> ++    * y = ywin - alloc.y;
> + }
> + 
> + EXPORT void audgui_get_mouse_coords (GdkScreen * screen, int * x, int * y)
> + {
> +-    gdk_display_get_pointer (gdk_screen_get_display (screen), nullptr, x, y, nullptr);
> ++    GdkDisplay * display = gdk_screen_get_display (screen);
> ++    GdkDeviceManager * manager = gdk_display_get_device_manager (display);
> ++    GdkDevice * device = gdk_device_manager_get_client_pointer (manager);
> ++    gdk_device_get_position (device, nullptr, x, y);
> + }
> + 
> + EXPORT void audgui_get_monitor_geometry (GdkScreen * screen, int x, int y, GdkRectangle * geom)
> +@@ -105,6 +120,22 @@ EXPORT GtkWidget * audgui_button_new (const char * text, const char * icon,
> +     return button;
> + }
> + 
> ++static const char * icon_for_message_type (GtkMessageType type)
> ++{
> ++    switch (type)
> ++    {
> ++        case GTK_MESSAGE_INFO: return "dialog-information";
> ++        case GTK_MESSAGE_WARNING: return "dialog-warning";
> ++        case GTK_MESSAGE_QUESTION: return "dialog-question";
> ++        case GTK_MESSAGE_ERROR: return "dialog-error";
> ++        default: return nullptr;
> ++    }
> ++}
> ++
> ++/* style choices should not be enforced by deprecating API functions */
> ++#pragma GCC diagnostic push
> ++#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
> ++
> + EXPORT GtkWidget * audgui_dialog_new (GtkMessageType type, const char * title,
> +  const char * text, GtkWidget * button1, GtkWidget * button2)
> + {
> +@@ -112,6 +143,13 @@ EXPORT GtkWidget * audgui_dialog_new (GtkMessageType type, const char * title,
> +      GTK_BUTTONS_NONE, "%s", text);
> +     gtk_window_set_title ((GtkWindow *) dialog, title);
> + 
> ++    const char * icon = icon_for_message_type (type);
> ++    if (icon)
> ++    {
> ++        GtkWidget * image = gtk_image_new_from_icon_name (icon, GTK_ICON_SIZE_DIALOG);
> ++        gtk_message_dialog_set_image ((GtkMessageDialog *) dialog, image);
> ++    }
> ++
> +     if (button2)
> +     {
> +         gtk_dialog_add_action_widget ((GtkDialog *) dialog, button2, GTK_RESPONSE_NONE);
> +@@ -127,6 +165,8 @@ EXPORT GtkWidget * audgui_dialog_new (GtkMessageType type, const char * title,
> +     return dialog;
> + }
> + 
> ++#pragma GCC diagnostic pop
> ++
> + EXPORT void audgui_dialog_add_widget (GtkWidget * dialog, GtkWidget * widget)
> + {
> +     GtkWidget * box = gtk_message_dialog_get_message_area ((GtkMessageDialog *) dialog);
> 
> Modified: trunk/dports/multimedia/audacious-plugins/Portfile (135030 => 135031)
> 
> --- trunk/dports/multimedia/audacious-plugins/Portfile	2015-04-13 16:07:33 UTC (rev 135030)
> +++ trunk/dports/multimedia/audacious-plugins/Portfile	2015-04-13 16:24:21 UTC (rev 135031)
> 
> @@ -3,12 +3,13 @@
> 
>  
> 
>  PortSystem          1.0
> 
>  PortGroup           conflicts_build 1.0
> 
> +PortGroup           compiler_blacklist_versions 1.0
> 
>  
> 
>  name                audacious-plugins
> 
>  
> 
>  # Please keep audacious, audacious-core and audacious-plugins synchronized.
> 
> -version             3.5.2
> -revision            3
> 
> +version             3.6.1
> +revision            0
> 
>  
> 
>  # FIXME: probably more licenses involved here...
> 
>  license             BSD GPL-2+
> 
> @@ -27,13 +28,15 @@
> 
>  
> 
>  master_sites        http://distfiles.audacious-media-player.org
>  use_bzip2           yes
> 
> -checksums           rmd160  2cf98e4fbf0e778672d509cd486274a8f7e4f10d \
> -                    sha256  179600d7f8ae31a7d9c5785ce6fa7e09184dbd1271e0adb8c57760432c6a4cd9
> 
> +checksums           rmd160  68d302c3cb9d1dce98fa801e6ed220fa48e17e03 \
> +                    sha256  0ae17d573dd094b3124e0bbec0c059c4ca668436830c922eb00f0b7eb9745195
> 
>  
> 
> +universal_variant   no
> +
> 
>  conflicts_build     ${name}
> 
>  
> 
>  patchfiles          patch-buildsys.diff \
> 
> -                    patch-configure.ac-select-libsdl.diff
> 
> +                    patch-acinclude.m4-drop-libc++-switch-from-gnu++11-to-c++11.diff
> 
>  
> 
>  depends_build       path:bin/pkg-config:pkgconfig \
> 
>                      path:bin/aclocal:automake \
> 
> @@ -43,29 +46,33 @@
> 
>                      port:gettext\
> 
>                      port:libxml2 \
> 
>                      path:lib/pkgconfig/glib-2.0.pc:glib2 \
> 
> -                    path:lib/pkgconfig/gtk-3.0.pc:gtk3 \
> -                    path:lib/pkgconfig/gdk-x11-3.0.pc:gtk3 \
> 
>                      port:neon
> 
>  
> 
>  depends_run         port:unzip
> 
>  
> 
>  # Note: rpath is required on Mac OS X.
> 
>  #       sdlout is the only working audio output plugin at the moment on OS X.
> 
> +#       coreaudio is always enabled on OS X.
> 
>  #       Try PulseAudio at your own risk.
> 
> +#       --with-system-libxml2 enables or disables usage of libxml2 in /usr.
> +#       Play it safe and use our libxml2 port.
> +#       mac-media-keys is currently broken.
> 
>  configure.args      --enable-nls \
> 
> +                    --disable-gtk \
> +                    --disable-qt \
> +                    --with-system-libxml2=no \
> 
>                      --enable-xsf \
> 
>                      --enable-psf \
> 
>                      --enable-hotkey \
> 
>                      --enable-songchange \
> 
> -                    --enable-statusicon \
> 
>                      --enable-neon \
> 
>                      --enable-filewriter \
> 
>                      --enable-rpath \
> 
> -                    --enable-gtkui \
> -                    --enable-skins \
> 
>                      --enable-lyricwiki \
> 
>                      --disable-console \
> 
> +                    --disable-qtaudio \
> 
>                      --disable-pulse \
> 
> +                    --enable-coreaudio \
> 
>                      --disable-sdlout \
> 
>                      --disable-mp3 \
> 
>                      --disable-gnomeshortcuts \
> 
> @@ -99,7 +106,13 @@
> 
>                      --disable-resample \
> 
>                      --disable-speedpitch \
> 
>                      --disable-soxr \
> 
> -                    --disable-glspectrum
> 
> +                    --disable-glspectrum \
> +                    --disable-qtglspectrum \
> +                    --enable-vtx \
> +                    --enable-ladspa \
> +                    --enable-blur-scope \
> +                    --enable-cairo-spectrum \
> +                    --disable-mac-media-keys
> 
>  
> 
>  default_variants    +full
> 
>  
> 
> @@ -107,23 +120,53 @@
> 
>  autoreconf.cmd      ./autogen.sh
> 
>  autoreconf.args
> 
>  
> 
> +# A compiler supporting C++11 is required to build audacious and its plugins.
> +# The newer, the merrier.
> +# Compilers supporting C++11 are GCC >= 4.6 and clang >= 3.3.
> +# We do not know what "cc" is, so blacklist it as well.
> +compiler.blacklist-append   {*gcc-4.[0-5]} {clang < 500} macports-clang-2.* \
> +                            {macports-clang-3.[0-2]} cc
> +
> 
>  platform darwin {
> 
> -    if {${configure.cxx_stdlib} ne {} &&
> -        [string equal ${configure.cxx_stdlib} "libc++"]} {
> -        if {${os.major} > 10} {
> -            configure.ldflags-append  "-mmacosx-version-min=10.7"
> 
> +    if {${os.major} >= 13} {
> +        if {${configure.cxx_stdlib} ne {} &&
> +            [string equal ${configure.cxx_stdlib} "libc++"]} {
> +            # Blacklist all GCC compilers to not accidentally pull in libstdc++.
> +            compiler.blacklist-append {*gcc*}
> +
> +            # Make sure binary runs on 10.9+ only.
> +            configure.ldflags-append  "-mmacosx-version-min=10.9"
> 
>          } else {
> 
> -            ui_error "libc++ is only supported on OS X 10.7 and up for this port."
> -            error "libc++ supported on >= 10.7 only."
> 
> +            ui_error "The system libraries in OS X 10.9 and higher use libc++. Thus, libstdc++ is not supported for this port."
> +            error "libstdc++ supported on <= 10.8 only."
> 
>          }
> 
>      } else {
> 
> -        configure.ldflags-append  "-mmacosx-version-min=10.5"
> 
> +        if {${configure.cxx_stdlib} ne {} &&
> +            [string equal ${configure.cxx_stdlib} "libc++"]} {
> +            ui_error "The system libraries in OS X 10.8 and lower use libstdc++. Thus, libstdc++ is not supported for this port."
> +            error "libc++ supported on >= 10.9 only."
> +        } else {
> +            # Shameless copy from rust.
> +            depends_lib-append          {path:lib/libstdc\\+\\+.6.dylib:libgcc}
> +
> +            # Force GCC 4.9.
> +            compiler.blacklist-append   {*clang*}
> +            compiler.fallback-append    macports-gcc-4.9
> +
> +            # Make sure binary runs on 10.5+ only.
> +            configure.ldflags-append    "-mmacosx-version-min=10.5"
> +
> +            notes-append {
> +                            Upstream for some reason requires libc++.
> +                            Your build will use libstdc++. The maintainer assumes this
> +                            to be OK, but you're on your own if stuff breaks.\
> +            }
> +        }
> 
>      }
> 
>  }
> 
>  
> 
>  post-destroot {
> 
>      xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
> 
> -    xinstall -m 0644 ${worksrcpath}/AUTHORS ${destroot}${prefix}/share/doc/${name}
> 
>      xinstall -m 0644 ${worksrcpath}/COPYING ${destroot}${prefix}/share/doc/${name}
> 
>  }
> 
>  
> 
> @@ -251,13 +294,13 @@
> 
>                              --enable-amidiplug
> 
>  }
> 
>  
> 
> -# libcdio-paranoia not ported yet
> -#variant cdaudio description {Add support for CDAudio-NG} {
> -#    depends_lib-append      port:libcdio \
> -#                            port:libcddb
> -#    configure.args-replace  --disable-cdaudio \
> -#                            --enable-cdaudio
> -#}
> 
> +variant cdaudio description {Add support for CDAudio-NG} {
> +    depends_lib-append      port:libcdio \
> +                            port:libcdio-paranoia \
> +                            port:libcddb
> +    configure.args-replace  --disable-cdaudio \
> +                            --enable-cdaudio
> +}
> 
>  
> 
>  variant lastfm description {Add support for last.fm} {
> 
>      depends_lib-append      port:curl
> 
> @@ -318,9 +361,47 @@
> 
>      configure.args-append   --with-libsdl=2
> 
>  }
> 
>  
> 
> +variant qt5 description {Add Qt5 support} {
> +    PortGroup   qt5 1.0
> +
> +    configure.args-replace  --disable-qt \
> +                            --enable-qt
> +
> +    if {[variant_isset opengl]} {
> +        configure.args-replace  --disable-qtglspectrum \
> +                                --enable-qtglspectrum
> +    }
> +
> +    configure.args-replace  --disable-qtaudio \
> +                            --enable-qtaudio
> +
> +    notes-append {
> +                    Qt5 support is optional and untested.
> +                    If it breaks, you've got to keep the pieces.\
> +    }
> +}
> +
> +variant gtk2 conflicts gtk3 description {Add GTK2 support} {
> +    depends_lib-append      path:lib/pkgconfig/gtk-2.0.pc:gtk2 \
> +                            path:lib/pkgconfig/gdk-x11-2.0.pc:gtk2
> +
> +    configure.args-replace  --disable-gtk \
> +                            --enable-gtk
> +}
> +
> +variant gtk3 conflicts gtk2 description {Add GTK3 support} {
> +    depends_lib-append      path:lib/pkgconfig/gtk-3.0.pc:gtk3 \
> +                            path:lib/pkgconfig/gdk-x11-3.0.pc:gtk3
> +
> +    patchfiles-append       patch-gtk3.diff
> +
> +    configure.args-replace  --disable-gtk \
> +                            --enable-gtk
> +}
> +
> 
>  variant full requires console mp3 dbus lirc osd osd_composite notifications \
> 
> -                      vorbis flac wavpack aac sndfile modplug midi lastfm mms \
> -                      cue lame transform opengl \
> 
> +                      vorbis flac wavpack aac sndfile modplug midi cdaudio \
> +                      lastfm mms cue lame transform opengl \
> 
>               description {Build all plugins, except additional sound output plugins and potentially conflicting variants} {}
> 
>  
> 
>  if {[variant_isset jack]} {
> 
> @@ -328,7 +409,7 @@
> 
>                      You have selected the JACK audio output plugin.
> 
>                      To use this plugin, jackd needs to be started manually.
> 
>                      The plugin is known to have issues leading to crackling sound output.
> 
> -                    Please don't report bugs against this plugin.
> 
> +                    Please don't report bugs against this plugin.\
> 
>      }
> 
>  }
> 
>  
> 
> @@ -336,6 +417,11 @@
> 
>      default_variants-append +sdl1 +ffmpeg
> 
>  }
> 
>  
> 
> +# Need either one of gtk2 or gtk3. Default to gtk2, which is preferred by upstream.
> +if {![variant_isset gtk2] && ![variant_isset gtk3]} {
> +    default_variants-append +gtk2
> +}
> +
> 
>  livecheck.type      regex
> 
>  livecheck.url       ${master_sites}
> 
>  livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}
> "
> 
> Added: trunk/dports/multimedia/audacious-plugins/files/patch-acinclude.m4-drop-libc++-switch-from-gnu++11-to-c++11.diff (0 => 135031)
> 
> --- trunk/dports/multimedia/audacious-plugins/files/patch-acinclude.m4-drop-libc++-switch-from-gnu++11-to-c++11.diff	                        (rev 0)
> +++ trunk/dports/multimedia/audacious-plugins/files/patch-acinclude.m4-drop-libc++-switch-from-gnu++11-to-c++11.diff	2015-04-13 16:24:21 UTC (rev 135031)
> 
> @@ -0,0 +1,22 @@
> 
> +--- acinclude.m4.orig
> ++++ acinclude.m4
> +@@ -83,8 +83,8 @@ AC_REQUIRE([AC_SYS_LARGEFILE])
> + if test "x$GCC" = "xyes"; then
> +     CFLAGS="$CFLAGS -std=gnu99 -ffast-math -Wall -pipe"
> +     if test "x$HAVE_DARWIN" = "xyes"; then
> +-        CXXFLAGS="$CXXFLAGS -stdlib=libc++ -std=gnu++11 -ffast-math -Wall -pipe"
> +-        LDFLAGS="$LDFLAGS -lc++ -stdlib=libc++"
> ++        CXXFLAGS="$CXXFLAGS -std=c++11 -ffast-math -Wall -pipe"
> ++        LDFLAGS="$LDFLAGS"
> +     else
> +         CXXFLAGS="$CXXFLAGS -std=gnu++11 -ffast-math -Wall -pipe"
> +     fi
> +@@ -101,7 +101,7 @@ if test "x$HAVE_DARWIN" = "xyes"; then
> +     AC_PROG_OBJCXX
> +     AC_PROG_OBJCXXCPP
> + 
> +-    OBJCXXFLAGS="$OBJCXXFLAGS -stdlib=libc++ -std=c++11"
> ++    OBJCXXFLAGS="$OBJCXXFLAGS -std=c++11"
> + fi
> + 
> + dnl Enable "-Wl,-z,defs" only on Linux
> 
> Modified: trunk/dports/multimedia/audacious-plugins/files/patch-buildsys.diff (135030 => 135031)
> 
> --- trunk/dports/multimedia/audacious-plugins/files/patch-buildsys.diff	2015-04-13 16:07:33 UTC (rev 135030)
> +++ trunk/dports/multimedia/audacious-plugins/files/patch-buildsys.diff	2015-04-13 16:24:21 UTC (rev 135031)
> 
> @@ -1,4 +1,4 @@
> 
> ---- buildsys.mk.in.old
> 
> +--- buildsys.mk.in.orig
> 
>  +++ buildsys.mk.in
> 
>  @@ -107,19 +107,24 @@ PLUGIN_OBJS = ${OBJS:.o=.plugin.o}
> 
>   
> 
> @@ -383,22 +383,23 @@
> 
>  +
> 
>  +.CURDIR ?= .
> 
>  +include ${.CURDIR}/.deps
> 
> ---- m4/buildsys.m4.old
> 
> +--- m4/buildsys.m4.orig
> 
>  +++ m4/buildsys.m4
> 
> -@@ -109,14 +109,14 @@ AC_DEFUN([BUILDSYS_SHARED_LIB], [
> 
> +@@ -108,13 +108,13 @@ AC_DEFUN([BUILDSYS_SHARED_LIB], [
> + 	case "$host_os" in
> 
>   		darwin*)
> 
>   			AC_MSG_RESULT(Darwin)
> 
> - 			LIB_CFLAGS='-fPIC -DPIC'
> --			LIB_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}'
> 
> +-			LIB_CFLAGS='-fPIC -DPIC -mmacosx-version-min=10.7'
> +-			LIB_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR} -mmacosx-version-min=10.7 -install_name "${libdir}/$$(i=${SHARED_LIB}; echo $${i%${LIB_SUFFIX}}).${LIB_MAJOR}${LIB_SUFFIX}"'
> ++			LIB_CFLAGS='-fPIC -DPIC'
> 
>  +			LIB_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR} -Wl,-install_name,${libdir}/$${out%.dylib}.${LIB_MAJOR}.dylib'
> 
>   			LIB_PREFIX='lib'
> 
>   			LIB_SUFFIX='.dylib'
> 
>   			LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
> 
> - 			PLUGIN_CFLAGS='-fPIC -DPIC'
> - 			PLUGIN_LDFLAGS='-bundle -undefined dynamic_lookup'
> 
> +-			PLUGIN_CFLAGS='-fPIC -DPIC -mmacosx-version-min=10.7'
> +-			PLUGIN_LDFLAGS='-bundle -undefined dynamic_lookup -mmacosx-version-min=10.7'
> ++			PLUGIN_CFLAGS='-fPIC -DPIC'
> ++			PLUGIN_LDFLAGS='-bundle -undefined dynamic_lookup'
> 
>   			PLUGIN_SUFFIX='.bundle'
> 
> --			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && install_name_tool -id ${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i'
> -+			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i'
> 
> + 			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i'
> 
>   			UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib'
> 
> - 			CLEAN_LIB=''
> - 			;;
> 
> Deleted: trunk/dports/multimedia/audacious-plugins/files/patch-configure.ac-select-libsdl.diff (135030 => 135031)
> 
> --- trunk/dports/multimedia/audacious-plugins/files/patch-configure.ac-select-libsdl.diff	2015-04-13 16:07:33 UTC (rev 135030)
> +++ trunk/dports/multimedia/audacious-plugins/files/patch-configure.ac-select-libsdl.diff	2015-04-13 16:24:21 UTC (rev 135031)
> 
> @@ -1,57 +0,0 @@
> 
> ---- configure.ac.old
> -+++ configure.ac
> -@@ -578,17 +578,47 @@ AC_ARG_ENABLE(sdlout,
> -  [AS_HELP_STRING([--disable-sdlout], [disable SDL output plugin])],
> -  [enable_sdlout=$enableval], [enable_sdlout=auto])
> - 
> -+if test "x$enable_sdlout" != "xno"; then
> -+    AC_ARG_WITH(libsdl,
> -+                [AS_HELP_STRING([--with-libsdl=VER], [select which SDL version to use. Set VER to 1 for libsdl1, to 2 for libsdl2. @<:@default=check@:>@])],
> -+                [case "x$withval" in
> -+                     x1) ;;
> -+                     x2) ;;
> -+                     x*) withval=check;;
> -+                 esac
> -+                 with_libsdl=$withval], [with_libsdl=check])
> -+fi
> -+
> -+libsdl1_min="1.2.11";
> -+libsdl2_min="2.0";
> -+
> - have_sdlout=no
> - if test "x$enable_sdlout" != "xno"; then
> --    PKG_CHECK_MODULES([SDL], [sdl2 >= 2.0],
> --       [have_sdlout=yes
> --        OUTPUT_PLUGINS="$OUTPUT_PLUGINS sdlout"],
> --       [PKG_CHECK_MODULES([SDL], [sdl >= 1.2.11],
> -+    if test "x$with_libsdl" = "xcheck"; then
> -+        PKG_CHECK_MODULES([SDL], [sdl2 >= $libsdl2_min],
> -            [have_sdlout=yes
> -             OUTPUT_PLUGINS="$OUTPUT_PLUGINS sdlout"],
> --           [if test "x$enable_sdlout" = "xyes"; then
> --               AC_MSG_ERROR([Cannot find SDL development files (ver >= 1.2.11), but compilation of SDL output plugin has been explicitly requested; please install SDL dev files and run configure again])
> --            fi])])
> -+           [PKG_CHECK_MODULES([SDL], [sdl >= $libsdl1_min],
> -+               [have_sdlout=yes
> -+                OUTPUT_PLUGINS="$OUTPUT_PLUGINS sdlout"],
> -+               [if test "x$enable_sdlout" = "xyes"; then
> -+                   AC_MSG_ERROR([Cannot find SDL development files (ver >= $libsdl1_min), but compilation of SDL output plugin has been explicitly requested; please install SDL dev files and run configure again])
> -+                fi])])
> -+    elif test "x$with_libsdl" = "x1"; then
> -+        PKG_CHECK_MODULES([SDL], [sdl >= $libsdl1_min],
> -+            [have_sdlout=yes
> -+             OUTPUT_PLUGINS="$OUTPUT_PLUGINS sdlout"],
> -+            [if test "x$enable_sdlout" = "xyes"; then
> -+                 AC_MSG_ERROR([Cannot find SDL1 development files (ver >= $libsdl1_min), but compilation of SDL output plugin has been explicitly requested; please install SDL1 dev files and run configure again])
> -+             fi])
> -+    elif test "x$with_libsdl" = "x2"; then
> -+        PKG_CHECK_MODULES([SDL], [sdl2 >= $libsdl2_min],
> -+            [have_sdlout=yes
> -+             OUTPUT_PLUGINS="$OUTPUT_PLUGINS sdlout"],
> -+            [if test "x$enable_sdlout" = "xyes"; then
> -+                 AC_MSG_ERROR([Cannot find SDL2 development files (ver >= $libsdl2_min), but compilation of SDL output plugin has been explicitly requested; please install SDL2 dev files and run configure again])
> -+             fi])
> -+    fi
> - fi
> - 
> - dnl *** sndio output
> 
> Added: trunk/dports/multimedia/audacious-plugins/files/patch-gtk3.diff (0 => 135031)
> 
> --- trunk/dports/multimedia/audacious-plugins/files/patch-gtk3.diff	                        (rev 0)
> +++ trunk/dports/multimedia/audacious-plugins/files/patch-gtk3.diff	2015-04-13 16:24:21 UTC (rev 135031)
> 
> @@ -0,0 +1,2362 @@
> 
> +--- acinclude.m4.old
> ++++ acinclude.m4
> +@@ -164,7 +164,7 @@ AC_ARG_ENABLE(gtk,
> +  USE_GTK=$enableval, USE_GTK=yes)
> + 
> + if test $USE_GTK = yes ; then
> +-    PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.24)
> ++    PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.4)
> +     AC_DEFINE(USE_GTK, 1, [Define if GTK+ support enabled])
> + fi
> + 
> +--- configure.ac.old
> ++++ configure.ac
> +@@ -72,7 +72,7 @@ CONTAINER_PLUGINS="asx asx3 audpl m3u pls xspf"
> + TRANSPORT_PLUGINS="gio"
> + 
> + if test "x$USE_GTK" = "xyes" ; then
> +-    GENERAL_PLUGINS="$GENERAL_PLUGINS alarm albumart delete-files playlist-manager search-tool statusicon"
> ++    GENERAL_PLUGINS="$GENERAL_PLUGINS alarm albumart delete-files playlist-manager search-tool"
> +     GENERAL_PLUGINS="$GENERAL_PLUGINS gtkui skins"
> + fi
> + 
> +@@ -204,11 +204,11 @@ AC_ARG_ENABLE(hotkey,
> + 
> + have_hotkey=no
> + if test "x$enable_hotkey" != "xno"; then
> +-    PKG_CHECK_MODULES(GDKX11, [gdk-x11-2.0],
> ++    PKG_CHECK_MODULES(GDKX11, [gdk-x11-3.0],
> +         [have_hotkey="yes"
> +          GENERAL_PLUGINS="$GENERAL_PLUGINS hotkey"],
> +         [if test "x$enable_hotkey" = "xyes"; then
> +-            AC_MSG_ERROR([Cannot find gdk-x11-2.0 development files, but compilation of X11 Global Hotkey plugin has been explicitly requested; please install gdk-x11-2.0 dev files and run configure again])
> ++            AC_MSG_ERROR([Cannot find gdk-x11-3.0 development files, but compilation of X11 Global Hotkey plugin has been explicitly requested; please install gdk-x11-3.0 dev files and run configure again])
> +          fi]
> +     )
> + else
> +@@ -271,6 +271,17 @@ if test "x$enable_songchange" != "xno"; then
> +     )
> + fi
> + 
> ++dnl Status Icon
> ++dnl ===========
> ++
> ++AC_ARG_ENABLE(statusicon,
> ++ [AS_HELP_STRING([--enable-statusicon], [enable X11 Status Icon plugin (default=disabled)])],
> ++ [have_statusicon=$enableval], [have_statusicon="no"])
> ++
> ++if test "x$have_statusicon" != "xno"; then
> ++    GENERAL_PLUGINS="$GENERAL_PLUGINS statusicon"
> ++fi
> ++
> + dnl *** Audacious OSD plugin (pangocairo-based)
> + 
> + AC_ARG_ENABLE(aosd,
> +@@ -1170,7 +1181,7 @@ echo "  MPRIS 2 Server:                         $have_mpris2"
> + echo "  Playlist Manager:                       $USE_GTK"
> + echo "  Search Tool:                            $USE_GTK"
> + echo "  Song Change:                            $have_songchange"
> +-echo "  Status Icon:                            $USE_GTK"
> ++echo "  Status Icon:                            $have_statusicon"
> + echo "  Audacious OSD:                          $have_aosd"
> + echo "    -> X Composite support:               $have_aosd_xcomp"
> + echo "  libnotify OSD:                          $have_notify"
> +--- src/alarm/interface.cc.old
> ++++ src/alarm/
> interface.cc
> 
> +@@ -23,6 +23,10 @@
> + 
> + #include "callbacks.h"
> + 
> ++#if GTK_CHECK_VERSION (3, 12, 0)
> ++    #define gtk_widget_set_margin_right(w, m) gtk_widget_set_margin_end(w, m)
> ++#endif
> ++
> + const char *help[] =
> + {
> +    N_("Time\n"
> +@@ -169,62 +173,67 @@ GtkWidget *create_config_notebook (void)
> + 
> +     /* Page 1 */
> +     frame = gtk_frame_new (_("Time"));
> +-    gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
> +-    grid = gtk_table_new (0, 0, FALSE);
> +-    gtk_table_set_col_spacings (GTK_TABLE (grid), 6);
> +-    gtk_table_set_row_spacings (GTK_TABLE (grid), 6);
> +-    gtk_container_set_border_width (GTK_CONTAINER (grid), 6);
> ++    gtk_container_set_border_width (GTK_CONTAINER (frame), 10);
> ++    grid = gtk_grid_new ();
> ++    gtk_grid_set_column_spacing (GTK_GRID (grid), 3);
> ++    gtk_grid_set_row_homogeneous (GTK_GRID (grid), TRUE);
> ++    gtk_container_set_border_width (GTK_CONTAINER (grid), 5);
> + 
> +     label = gtk_label_new (_("Alarm at (default):"));
> +-    gtk_table_attach (GTK_TABLE (grid), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_widget_set_margin_right (label, 10);
> ++    gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
> + 
> +-    adjustment = (GtkAdjustment *) gtk_adjustment_new (6, 0, 23, 1, 10, 0);
> ++    adjustment = gtk_adjustment_new (6, 0, 23, 1, 10, 0);
> +     alarm_h_spin = gtk_spin_button_new (adjustment, 1, 0);
> +     g_object_set_data (G_OBJECT (notebook), "alarm_h_spin", alarm_h_spin);
> +     gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (alarm_h_spin), GTK_UPDATE_IF_VALID);
> +     gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (alarm_h_spin), TRUE);
> +     gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (alarm_h_spin), TRUE);
> +-    gtk_table_attach (GTK_TABLE (grid), alarm_h_spin, 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_grid_attach (GTK_GRID (grid), alarm_h_spin, 1, 0, 1, 1);
> + 
> +     label = gtk_label_new (":");
> +-    gtk_table_attach (GTK_TABLE (grid), label, 2, 3, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_grid_attach (GTK_GRID (grid), label, 2, 0, 1, 1);
> + 
> +-    adjustment = (GtkAdjustment *) gtk_adjustment_new (30, 0, 59, 1, 10, 0);
> ++    adjustment = gtk_adjustment_new (30, 0, 59, 1, 10, 0);
> +     alarm_m_spin = gtk_spin_button_new (adjustment, 1, 0);
> +     g_object_set_data (G_OBJECT (notebook), "alarm_m_spin", alarm_m_spin);
> +     gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (alarm_m_spin), GTK_UPDATE_IF_VALID);
> +     gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (alarm_m_spin), TRUE);
> +     gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (alarm_m_spin), TRUE);
> +-    gtk_table_attach (GTK_TABLE (grid), alarm_m_spin, 3, 4, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_grid_attach (GTK_GRID (grid), alarm_m_spin, 3, 0, 1, 1);
> + 
> +     label = gtk_label_new (_("h"));
> +-    gtk_table_attach (GTK_TABLE (grid), label, 4, 5, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_widget_set_halign (label, GTK_ALIGN_START);
> ++    gtk_grid_attach (GTK_GRID (grid), label, 4, 0, 1, 1);
> + 
> +     stop_checkb = gtk_check_button_new_with_label (_("Quiet after:"));
> +     g_object_set_data (G_OBJECT (notebook), "stop_checkb", stop_checkb);
> +-    gtk_table_attach (GTK_TABLE (grid), stop_checkb, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_widget_set_margin_right (stop_checkb, 10);
> ++    gtk_widget_set_valign (stop_checkb, GTK_ALIGN_CENTER);
> ++    gtk_grid_attach (GTK_GRID (grid), stop_checkb, 0, 1, 1, 1);
> + 
> +-    adjustment = (GtkAdjustment *) gtk_adjustment_new (0, 0, 100, 1, 10, 0);
> ++    adjustment = gtk_adjustment_new (0, 0, 100, 1, 10, 0);
> +     stop_h_spin = gtk_spin_button_new (adjustment, 1, 0);
> +     g_object_set_data (G_OBJECT (notebook), "stop_h_spin", stop_h_spin);
> +     gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (stop_h_spin), GTK_UPDATE_IF_VALID);
> +     gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (stop_h_spin), TRUE);
> +     gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (stop_h_spin), TRUE);
> +-    gtk_table_attach (GTK_TABLE (grid), stop_h_spin, 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_grid_attach (GTK_GRID (grid), stop_h_spin, 1, 1, 1, 1);
> + 
> +     label = gtk_label_new (_("hours"));
> +-    gtk_table_attach (GTK_TABLE (grid), label, 2, 3, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_widget_set_margin_right (label, 10);
> ++    gtk_grid_attach (GTK_GRID (grid), label, 2, 1, 1, 1);
> + 
> +-    adjustment = (GtkAdjustment *) gtk_adjustment_new (0, 0, 59, 1, 10, 0);
> ++    adjustment = gtk_adjustment_new (0, 0, 59, 1, 10, 0);
> +     stop_m_spin = gtk_spin_button_new (adjustment, 1, 0);
> +     g_object_set_data (G_OBJECT (notebook), "stop_m_spin", stop_m_spin);
> +     gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (stop_m_spin), GTK_UPDATE_IF_VALID);
> +     gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (stop_m_spin), TRUE);
> +     gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (stop_m_spin), TRUE);
> +-    gtk_table_attach (GTK_TABLE (grid), stop_m_spin, 3, 4, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_grid_attach (GTK_GRID (grid), stop_m_spin, 3, 1, 1, 1);
> + 
> +     label = gtk_label_new (_("minutes"));
> +-    gtk_table_attach (GTK_TABLE (grid), label, 4, 5, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_grid_attach (GTK_GRID (grid), label, 4, 1, 1, 1);
> +     gtk_container_add (GTK_CONTAINER (frame), grid);
> + 
> +     label = gtk_label_new (_("Time"));
> +@@ -233,24 +242,25 @@ GtkWidget *create_config_notebook (void)
> + 
> +     /* Page 2 */
> +     frame = gtk_frame_new (_("Choose the days for the alarm to come on"));
> +-    gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
> +-    grid = gtk_table_new (0, 0, FALSE);
> +-    gtk_table_set_col_spacings (GTK_TABLE (grid), 6);
> +-    gtk_table_set_row_spacings (GTK_TABLE (grid), 6);
> +-    gtk_container_set_border_width (GTK_CONTAINER (grid), 6);
> ++    gtk_container_set_border_width (GTK_CONTAINER (frame), 10);
> ++    grid = gtk_grid_new ();
> ++    gtk_grid_set_column_spacing (GTK_GRID (grid), 15);
> ++    gtk_grid_set_row_homogeneous (GTK_GRID (grid), TRUE);
> ++    gtk_container_set_border_width (GTK_CONTAINER (grid), 5);
> + 
> +     label = gtk_label_new (_("Day"));
> +-    gtk_table_attach (GTK_TABLE (grid), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
> + 
> +     label = gtk_label_new (_("Time"));
> +-    gtk_table_attach (GTK_TABLE (grid), label, 2, 5, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_grid_attach (GTK_GRID (grid), label, 2, 0, 3, 1);
> + 
> +     for (i = 0; i < 7; i ++)
> +     {
> +         widget[i] = gtk_check_button_new_with_label (weekdays[i]);
> +         g_object_set_data (G_OBJECT (notebook), day_cb[i], widget[i]);
> +         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget[i]), TRUE);
> +-        gtk_table_attach (GTK_TABLE (grid), widget[i], 0, 1, i + 1, i + 2, GTK_FILL, GTK_FILL, 0, 0);
> ++        gtk_widget_set_valign (widget[i], GTK_ALIGN_CENTER);
> ++        gtk_grid_attach (GTK_GRID (grid), widget[i], 0, i + 1, 1, 1);
> +     }
> +     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget[6]), FALSE);
> + 
> +@@ -259,30 +269,31 @@ GtkWidget *create_config_notebook (void)
> +         checkbutton = gtk_check_button_new_with_label (_("Default"));
> +         g_object_set_data (G_OBJECT (notebook), day_def[i], checkbutton);
> +         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbutton), TRUE);
> ++        gtk_widget_set_valign (checkbutton, GTK_ALIGN_CENTER);
> +         g_signal_connect (checkbutton, "toggled", G_CALLBACK (cb_def[i]), nullptr);
> +-        gtk_table_attach (GTK_TABLE (grid), checkbutton, 1, 2, i + 1, i + 2, GTK_FILL, GTK_FILL, 0, 0);
> ++        gtk_grid_attach (GTK_GRID (grid), checkbutton, 1, i + 1, 1, 1);
> +     }
> + 
> +     for (i = 7, j = 0; i < 14; i ++, j ++)
> +     {
> +-        adjustment = (GtkAdjustment *) gtk_adjustment_new (6, 0, 23, 1, 10, 0);
> ++        adjustment = gtk_adjustment_new (6, 0, 23, 1, 10, 0);
> +         widget[i] = gtk_spin_button_new (adjustment, 1, 0);
> +         g_object_set_data (G_OBJECT (notebook), day_h[j], widget[i]);
> +-        gtk_table_attach (GTK_TABLE (grid), widget[i], 2, 3, j + 1, j + 2, GTK_FILL, GTK_FILL, 0, 0);
> ++        gtk_grid_attach (GTK_GRID (grid), widget[i], 2, j + 1, 1, 1);
> +     }
> + 
> +     for (i = 0; i < 7; i ++)
> +     {
> +         label = gtk_label_new (":");
> +-        gtk_table_attach (GTK_TABLE (grid), label, 3, 4, i + 1, i + 2, GTK_FILL, GTK_FILL, 0, 0);
> ++        gtk_grid_attach (GTK_GRID (grid), label, 3, i + 1, 1, 1);
> +     }
> + 
> +     for (i = 14, j = 0; i < 21; i ++, j ++)
> +     {
> +-        adjustment = (GtkAdjustment *) gtk_adjustment_new (30, 0, 59, 1, 10, 0);
> ++        adjustment = gtk_adjustment_new (30, 0, 59, 1, 10, 0);
> +         widget[i] = gtk_spin_button_new (adjustment, 1, 0);
> +         g_object_set_data (G_OBJECT (notebook), day_m[j], widget[i]);
> +-        gtk_table_attach (GTK_TABLE (grid), widget[i], 4, 5, j + 1, j + 2, GTK_FILL, GTK_FILL, 0, 0);
> ++        gtk_grid_attach (GTK_GRID (grid), widget[i], 4, j + 1, 1, 1);
> +     }
> + 
> +     label = gtk_label_new (_("Days"));
> +@@ -291,110 +302,117 @@ GtkWidget *create_config_notebook (void)
> + 
> + 
> +     /* Page 3 */
> +-    vbox = gtk_vbox_new (FALSE, 6);
> +-    hbox = gtk_hbox_new (FALSE, 6);
> ++    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> ++    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
> + 
> +     frame = gtk_frame_new (_("Fading"));
> +-    gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
> +-    gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
> +-    adjustment = (GtkAdjustment *) gtk_adjustment_new (120, 0, 3600, 1, 10, 0);
> ++    gtk_container_set_border_width (GTK_CONTAINER (frame), 10);
> ++    gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
> ++    adjustment = gtk_adjustment_new (120, 0, 3600, 1, 10, 0);
> +     fading_spin = gtk_spin_button_new (adjustment, 1, 0);
> +     g_object_set_data (G_OBJECT (notebook), "fading_spin", fading_spin);
> +     gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (fading_spin), TRUE);
> +     gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (fading_spin), GTK_UPDATE_IF_VALID);
> +     label = gtk_label_new (_("seconds"));
> + 
> +-    gtk_box_pack_start (GTK_BOX (hbox), fading_spin, TRUE, TRUE, 0);
> +-    gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
> ++    gtk_container_add (GTK_CONTAINER (hbox), fading_spin);
> ++    gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 3);
> +     gtk_container_add (GTK_CONTAINER (frame), hbox);
> +-    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
> ++    gtk_container_add (GTK_CONTAINER (vbox), frame);
> + 
> +     frame = gtk_frame_new (_("Volume"));
> +-    vbox2 = gtk_vbox_new (FALSE, 6);
> +-    gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
> +-    gtk_container_set_border_width (GTK_CONTAINER (vbox2), 6);
> ++    vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> ++    gtk_container_set_border_width (GTK_CONTAINER (frame), 10);
> ++    gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
> + 
> +     label = gtk_label_new (_("Start at"));
> +-    gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
> ++    gtk_widget_set_margin_bottom (label, 2);
> ++    gtk_widget_set_halign (label, GTK_ALIGN_START);
> ++    gtk_container_add (GTK_CONTAINER (vbox2), label);
> + 
> +-    quiet_vol_scale = gtk_hscale_new ((GtkAdjustment *) gtk_adjustment_new (20, 0, 100, 1, 5, 0));
> ++    quiet_vol_scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, gtk_adjustment_new (20, 0, 100, 1, 5, 0));
> +     g_object_set_data (G_OBJECT (notebook), "quiet_vol_scale", quiet_vol_scale);
> +     gtk_scale_set_value_pos (GTK_SCALE (quiet_vol_scale), GTK_POS_RIGHT);
> +     gtk_scale_set_digits (GTK_SCALE (quiet_vol_scale), 0);
> +     label = gtk_label_new ("%");
> +-    hbox2 = gtk_hbox_new (FALSE, 6);
> ++    hbox2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
> +     gtk_box_pack_start (GTK_BOX (hbox2), quiet_vol_scale, TRUE, TRUE, 0);
> +-    gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
> +-    gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, FALSE, 0);
> ++    gtk_container_add (GTK_CONTAINER (hbox2), label);
> ++    gtk_container_add (GTK_CONTAINER (vbox2), hbox2);
> + 
> +-    separator = gtk_hseparator_new ();
> +-    gtk_box_pack_start (GTK_BOX (vbox2), separator, FALSE, FALSE, 0);
> ++    separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
> ++    gtk_box_pack_start (GTK_BOX (vbox2), separator, FALSE, FALSE, 10);
> + 
> +     label = gtk_label_new (_("Final"));
> +-    gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
> ++    gtk_widget_set_margin_bottom (label, 2);
> ++    gtk_widget_set_halign (label, GTK_ALIGN_START);
> ++    gtk_container_add (GTK_CONTAINER (vbox2), label);
> + 
> +-    vol_scale = gtk_hscale_new ((GtkAdjustment *) gtk_adjustment_new (80, 0, 100, 1, 5, 0));
> ++    vol_scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, gtk_adjustment_new (80, 0, 100, 1, 5, 0));
> +     g_object_set_data (G_OBJECT (notebook), "vol_scale", vol_scale);
> +     gtk_scale_set_value_pos (GTK_SCALE (vol_scale), GTK_POS_RIGHT);
> +     gtk_scale_set_digits (GTK_SCALE (vol_scale), 0);
> +     label = gtk_label_new ("%");
> +-    hbox2 = gtk_hbox_new (FALSE, 6);
> ++    hbox2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
> +     gtk_box_pack_start (GTK_BOX (hbox2), vol_scale, TRUE, TRUE, 0);
> +-    gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
> +-    gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, FALSE, 0);
> ++    gtk_container_add (GTK_CONTAINER (hbox2), label);
> ++    gtk_container_add (GTK_CONTAINER (vbox2), hbox2);
> + 
> +     current_button = gtk_button_new_with_label (_("Current"));
> ++    gtk_widget_set_margin_top (current_button, 10);
> ++    gtk_widget_set_halign (current_button, GTK_ALIGN_END);
> +     g_signal_connect (current_button, "clicked", G_CALLBACK (alarm_current_volume), nullptr);
> +-    gtk_box_pack_start (GTK_BOX (vbox2), current_button, FALSE, FALSE, 0);
> ++    gtk_container_add (GTK_CONTAINER (vbox2), current_button);
> + 
> +     gtk_container_add (GTK_CONTAINER (frame), vbox2);
> +-    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
> ++    gtk_container_add (GTK_CONTAINER (vbox), frame);
> + 
> +     label = gtk_label_new (_("Volume"));
> +     gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox, label);
> + 
> + 
> +     /* Page 4 */
> +-    vbox = gtk_vbox_new (FALSE, 6);
> ++    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> +     frame = gtk_frame_new (_("Additional Command"));
> +-    hbox = gtk_hbox_new (FALSE, 6);
> +-    gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
> +-    gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
> ++    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
> ++    gtk_container_set_border_width (GTK_CONTAINER (frame), 10);
> ++    gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
> +     cmd_entry = gtk_entry_new ();
> +     g_object_set_data (G_OBJECT (notebook), "cmd_entry", cmd_entry);
> +     cmd_checkb = gtk_check_button_new_with_label (_("enable"));
> +     g_object_set_data (G_OBJECT (notebook), "cmd_checkb", cmd_checkb);
> +     gtk_box_pack_start (GTK_BOX (hbox), cmd_entry, TRUE, TRUE, 0);
> +-    gtk_box_pack_start (GTK_BOX (hbox), cmd_checkb, FALSE, FALSE, 0);
> ++    gtk_container_add (GTK_CONTAINER (hbox), cmd_checkb);
> +     gtk_container_add (GTK_CONTAINER (frame), hbox);
> +-    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
> ++    gtk_container_add (GTK_CONTAINER (vbox), frame);
> + 
> +     frame = gtk_frame_new (_("Playlist (optional)"));
> +-    hbox = gtk_hbox_new (FALSE, 6);
> +-    gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
> +-    gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
> ++    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
> ++    gtk_container_set_border_width (GTK_CONTAINER (frame), 10);
> ++    gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
> +     playlist_entry = gtk_entry_new ();
> +     g_object_set_data (G_OBJECT (notebook), "playlist", playlist_entry);
> + 
> +     file_chooser_button = gtk_file_chooser_button_new (_("Select a playlist"), GTK_FILE_CHOOSER_ACTION_OPEN);
> ++    gtk_widget_set_valign (file_chooser_button, GTK_ALIGN_CENTER);
> +     g_signal_connect (file_chooser_button, "file-set", G_CALLBACK (file_set_cb), playlist_entry);
> +     gtk_box_pack_start (GTK_BOX (hbox), playlist_entry, TRUE, TRUE, 0);
> +-    gtk_box_pack_start (GTK_BOX (hbox), file_chooser_button, TRUE, TRUE, 0);
> ++    gtk_container_add (GTK_CONTAINER (hbox), file_chooser_button);
> +     gtk_container_add (GTK_CONTAINER (frame), hbox);
> +-    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
> ++    gtk_container_add (GTK_CONTAINER (vbox), frame);
> + 
> +     frame = gtk_frame_new (_("Reminder"));
> +-    hbox = gtk_hbox_new (FALSE, 6);
> +-    gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
> +-    gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
> ++    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
> ++    gtk_container_set_border_width (GTK_CONTAINER (frame), 10);
> ++    gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
> +     reminder_text = gtk_entry_new ();
> +     reminder_checkb = gtk_check_button_new_with_label (_("enable"));
> +     g_object_set_data (G_OBJECT (notebook), "reminder_text", reminder_text);
> +     g_object_set_data (G_OBJECT (notebook), "reminder_cb", reminder_checkb);
> +     gtk_box_pack_start (GTK_BOX (hbox), reminder_text, TRUE, TRUE, 0);
> +-    gtk_box_pack_start (GTK_BOX (hbox), reminder_checkb, FALSE, FALSE, 0);
> ++    gtk_container_add (GTK_CONTAINER (hbox), reminder_checkb);
> +     gtk_container_add (GTK_CONTAINER (frame), hbox);
> +-    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
> ++    gtk_container_add (GTK_CONTAINER (vbox), frame);
> + 
> +     label = gtk_label_new (_("Options"));
> +     gtk_notebook_append_page (GTK_NOTEBOOK (notebook), vbox, label);
> +@@ -402,7 +420,7 @@ GtkWidget *create_config_notebook (void)
> + 
> +     /* Page 5 */
> +     frame = gtk_frame_new (_("What do these options mean?"));
> +-    gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
> ++    gtk_container_set_border_width (GTK_CONTAINER (frame), 10);
> +     view = gtk_text_view_new ();
> +     gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE);
> +     gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (view), FALSE);
> +--- src/amidi-plug/i_configure-fluidsynth.cc.old
> ++++ src/amidi-plug/i_configure-
> fluidsynth.cc
> 
> +@@ -216,9 +216,8 @@ void * create_soundfont_list (void)
> +             g_strfreev (sffiles);
> +         }
> + 
> +-        soundfont_file_hbox = gtk_hbox_new (FALSE, 2);
> ++        soundfont_file_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
> +         soundfont_file_lv = gtk_tree_view_new_with_model (GTK_TREE_MODEL (soundfont_file_store));
> +-        gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (soundfont_file_lv), TRUE);
> +         g_object_unref (soundfont_file_store);
> +         soundfont_file_lv_text_rndr = gtk_cell_renderer_text_new();
> +         soundfont_file_lv_fname_col = gtk_tree_view_column_new_with_attributes (
> +@@ -241,7 +240,7 @@ void * create_soundfont_list (void)
> +         gtk_container_add (GTK_CONTAINER (soundfont_file_lv_sw), soundfont_file_lv);
> + 
> +         /* soundfont settings - soundfont files - buttonbox */
> +-        soundfont_file_bbox_vbox = gtk_vbox_new (FALSE, 0);
> ++        soundfont_file_bbox_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> +         soundfont_file_bbox_addbt = gtk_button_new();
> +         gtk_button_set_image (GTK_BUTTON (soundfont_file_bbox_addbt),
> +                               gtk_image_new_from_icon_name ("list-add", GTK_ICON_SIZE_MENU));
> +--- src/amidi-plug/i_fileinfo.cc.old
> ++++ src/amidi-plug/i_fileinfo.cc
> +@@ -47,11 +47,14 @@ void i_fileinfo_grid_add_entry (char * field_text, char * value_text,
> +     GtkWidget * field, *value;
> +     field = gtk_label_new (field_text);
> +     gtk_label_set_attributes (GTK_LABEL (field), attrlist);
> +-    gtk_misc_set_alignment (GTK_MISC (field), 0, 0);
> +-    gtk_table_attach (GTK_TABLE (grid), field, 0, 1, line, line + 1, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_widget_set_halign (field, GTK_ALIGN_START);
> ++    gtk_label_set_justify (GTK_LABEL (field), GTK_JUSTIFY_LEFT);
> ++    gtk_grid_attach (GTK_GRID (grid), field, 0, line, 1, 1);
> +     value = gtk_label_new (value_text);
> +-    gtk_misc_set_alignment (GTK_MISC (value), 0, 0);
> +-    gtk_table_attach (GTK_TABLE (grid), value, 1, 2, line, line + 1, GTK_FILL, GTK_FILL, 0, 0);
> ++    gtk_widget_set_halign (value, GTK_ALIGN_START);
> ++    gtk_label_set_justify (GTK_LABEL (value), GTK_JUSTIFY_LEFT);
> ++    gtk_grid_attach (GTK_GRID (grid), value, 1, line, 1, 1);
> ++    return;
> + }
> + 
> + 
> +@@ -139,7 +142,7 @@ void i_fileinfo_gui (const char * filename_uri, VFSFile & file)
> +     g_signal_connect (G_OBJECT (fileinfowin), "destroy", G_CALLBACK (gtk_widget_destroyed), &fileinfowin);
> +     gtk_container_set_border_width (GTK_CONTAINER (fileinfowin), 10);
> + 
> +-    fileinfowin_vbox = gtk_vbox_new (FALSE, 10);
> ++    fileinfowin_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
> +     gtk_container_add (GTK_CONTAINER (fileinfowin), fileinfowin_vbox);
> + 
> +     /* pango attributes */
> +@@ -151,13 +154,12 @@ void i_fileinfo_gui (const char * filename_uri, VFSFile & file)
> + 
> +     /******************
> +      *** TITLE LINE ***/
> +-    title_hbox = gtk_hbox_new (FALSE, 5);
> ++    title_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
> +     gtk_box_pack_start (GTK_BOX (fileinfowin_vbox), title_hbox, FALSE, FALSE, 0);
> + 
> +     title_icon_pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) amidiplug_xpm_midiicon);
> +     title_icon_image = gtk_image_new_from_pixbuf (title_icon_pixbuf);
> +     g_object_unref (title_icon_pixbuf);
> +-    gtk_misc_set_alignment (GTK_MISC (title_icon_image), 0, 0);
> +     gtk_box_pack_start (GTK_BOX (title_hbox), title_icon_image, FALSE, FALSE, 0);
> + 
> +     title_name_f_label = gtk_label_new (_("Name:"));
> +@@ -169,12 +171,12 @@ void i_fileinfo_gui (const char * filename_uri, VFSFile & file)
> +     gtk_widget_set_size_request (GTK_WIDGET (title_name_v_entry), 200, -1);
> +     gtk_box_pack_start (GTK_BOX (title_hbox), title_name_v_entry, TRUE, TRUE, 0);
> + 
> +-    fileinfowin_columns_hbox = gtk_hbox_new (FALSE, 2);
> ++    fileinfowin_columns_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
> +     gtk_box_pack_start (GTK_BOX (fileinfowin_vbox), fileinfowin_columns_hbox, TRUE, TRUE, 0);
> + 
> +     /*********************
> +      *** MIDI INFO BOX ***/
> +-    midiinfoboxes_vbox = gtk_vbox_new (FALSE, 2);
> ++    midiinfoboxes_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
> +     gtk_box_pack_start (GTK_BOX (fileinfowin_columns_hbox), midiinfoboxes_vbox, FALSE, FALSE, 0);
> + 
> +     info_frame_tl = gtk_label_new ("");
> +@@ -183,10 +185,10 @@ void i_fileinfo_gui (const char * filename_uri, VFSFile & file)
> + 
> +     info_frame = gtk_frame_new (nullptr);
> +     gtk_box_pack_start (GTK_BOX (midiinfoboxes_vbox), info_frame, TRUE, TRUE, 0);
> +-    info_grid = gtk_table_new (0, 0, FALSE);
> +-    gtk_table_set_row_spacings (GTK_TABLE (info_grid), 2);
> +-    gtk_table_set_col_spacings (GTK_TABLE (info_grid), 6);
> +-    gtk_container_set_border_width (GTK_CONTAINER (info_grid), 6);
> ++    info_grid = gtk_grid_new();
> ++    gtk_grid_set_row_spacing (GTK_GRID (info_grid), 4);
> ++    gtk_grid_set_column_spacing (GTK_GRID (info_grid), 10);
> ++    gtk_container_set_border_width (GTK_CONTAINER (info_grid), 3);
> +     gtk_container_add (GTK_CONTAINER (info_frame), info_grid);
> +     value_gstring = g_string_new ("");
> + 
> +@@ -223,7 +225,7 @@ void i_fileinfo_gui (const char * filename_uri, VFSFile & file)
> + 
> +     /**********************************
> +      *** MIDI COMMENTS/LYRICS BOXES ***/
> +-    miditextboxes_vbox = gtk_vbox_new (FALSE, 2);
> ++    miditextboxes_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
> +     gtk_box_pack_start (GTK_BOX (fileinfowin_columns_hbox), miditextboxes_vbox, TRUE, TRUE, 0);
> + 
> +     text_frame_tl = gtk_label_new ("");
> +@@ -231,7 +233,7 @@ void i_fileinfo_gui (const char * filename_uri, VFSFile & file)
> +                           _("<span size=\"smaller\"> MIDI Comments and Lyrics </span>"));
> +     gtk_box_pack_start (GTK_BOX (miditextboxes_vbox), text_frame_tl, FALSE, FALSE, 0);
> + 
> +-    miditextboxes_paned = gtk_vpaned_new ();
> ++    miditextboxes_paned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
> +     gtk_box_pack_start (GTK_BOX (miditextboxes_vbox), miditextboxes_paned, TRUE, TRUE, 0);
> + 
> +     text_frame = gtk_frame_new (nullptr);
> +@@ -295,7 +297,7 @@ void i_fileinfo_gui (const char * filename_uri, VFSFile & file)
> + 
> +     /**************
> +      *** FOOTER ***/
> +-    footer_hbbox = gtk_hbutton_box_new ();
> ++    footer_hbbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
> +     gtk_button_box_set_layout (GTK_BUTTON_BOX (footer_hbbox), GTK_BUTTONBOX_END);
> +     footer_bclose = gtk_button_new_with_mnemonic (_("_Close"));
> +     g_signal_connect (G_OBJECT (footer_bclose), "clicked", G_CALLBACK (i_fileinfo_ev_close), fileinfowin);
> +--- src/aosd/aosd_ui.cc.old
> ++++ src/aosd/aosd_ui.cc
> +@@ -33,25 +33,29 @@
> + #include "aosd_osd.h"
> + 
> + 
> +-static void chooser_get_aosd_color (GtkColorButton * chooser, aosd_color_t * color)
> ++static void chooser_get_aosd_color (GtkColorChooser * chooser, aosd_color_t * color)
> + {
> +-  GdkColor gdk_color;
> +-  gtk_color_button_get_color (chooser, & gdk_color);
> ++  GdkRGBA rgba;
> ++  gtk_color_chooser_get_rgba (chooser, & rgba);
> + 
> +-  color->red = gdk_color.red;
> +-  color->green = gdk_color.green;
> +-  color->blue = gdk_color.blue;
> +-  color->alpha = gtk_color_button_get_alpha (chooser);
> ++  color->red = rint (rgba.red * 65535.0);
> ++  color->green = rint (rgba.green * 65535.0);
> ++  color->blue = rint (rgba.blue * 65535.0);
> ++  color->alpha = rint (rgba.alpha * 65535.0);
> + }
> + 
> + 
> +-static void chooser_set_aosd_color (GtkColorButton * chooser, const aosd_color_t * color)
> ++static void chooser_set_aosd_color (GtkColorChooser * chooser, const aosd_color_t * color)
> + {
> +-  GdkColor gdk_color = {0, (uint16_t) color->red, (uint16_t) color->green, (uint16_t) color->blue};
> +-
> +-  gtk_color_button_set_color (chooser, & gdk_color);
> +-  gtk_color_button_set_use_alpha (chooser, TRUE);
> +-  gtk_color_button_set_alpha (chooser, color->alpha);
> ++  GdkRGBA rgba = {
> ++      color->red / 65535.0,
> ++      color->green / 65535.0,
> ++      color->blue / 65535.0,
> ++      color->alpha / 65535.0
> ++  };
> ++
> ++  gtk_color_chooser_set_use_alpha (chooser, TRUE);
> ++  gtk_color_chooser_set_rgba (chooser, & rgba);
> + }
> + 
> + 
> +@@ -80,16 +84,14 @@ aosd_callback_list_run ( aosd_cfg_t * cfg )
> + 
> + static gboolean
> + aosd_cb_configure_position_expose ( GtkWidget * darea ,
> +-                                    GdkEventExpose * event ,
> ++                                    cairo_t * cr ,
> +                                     void * coord_gp )
> + {
> +   int coord = GPOINTER_TO_INT(coord_gp);
> + 
> +-  cairo_t * cr = gdk_cairo_create (gtk_widget_get_window (darea));
> +   cairo_set_source_rgb ( cr , 0 , 0 , 0 );
> +   cairo_rectangle ( cr , (coord % 3) * 10 , (coord / 3) * 16 , 20 , 8 );
> +   cairo_fill ( cr );
> +-  cairo_destroy (cr);
> + 
> +   return FALSE;
> + }
> +@@ -157,16 +159,16 @@ aosd_ui_configure_position ( aosd_cfg_t * cfg )
> +   int monitors_num = gdk_screen_get_n_monitors( gdk_screen_get_default() );
> +   int i = 0;
> + 
> +-  pos_vbox = gtk_vbox_new( FALSE , 4 );
> ++  pos_vbox = gtk_box_new( GTK_ORIENTATION_VERTICAL , 4 );
> +   gtk_container_set_border_width( GTK_CONTAINER(pos_vbox) , 6 );
> + 
> +   pos_placement_frame = gtk_frame_new( _("Placement") );
> +-  pos_placement_hbox = gtk_hbox_new( FALSE , 0 );
> ++  pos_placement_hbox = gtk_box_new( GTK_ORIENTATION_HORIZONTAL , 0 );
> +   gtk_container_set_border_width( GTK_CONTAINER(pos_placement_hbox) , 6 );
> +   gtk_container_add( GTK_CONTAINER(pos_placement_frame) , pos_placement_hbox );
> +   gtk_box_pack_start( GTK_BOX(pos_vbox) , pos_placement_frame , FALSE , FALSE , 0 );
> + 
> +-  pos_placement_grid = gtk_table_new (0, 0, FALSE);
> ++  pos_placement_grid = gtk_grid_new();
> +   for ( i = 0 ; i < 9 ; i++ )
> +   {
> +     if ( i == 0 )
> +@@ -177,10 +179,9 @@ aosd_ui_configure_position ( aosd_cfg_t * cfg )
> +     pos_placement_bt_darea[i] = gtk_drawing_area_new();
> +     gtk_widget_set_size_request( pos_placement_bt_darea[i] , 40 , 40 );
> +     gtk_container_add( GTK_CONTAINER(pos_placement_bt[i]) , pos_placement_bt_darea[i] );
> +-    g_signal_connect( G_OBJECT(pos_placement_bt_darea[i]) , "expose-event" ,
> ++    g_signal_connect( G_OBJECT(pos_placement_bt_darea[i]) , "draw" ,
> +                       G_CALLBACK(aosd_cb_configure_position_expose) , GINT_TO_POINTER(i) );
> +-    gtk_table_attach_defaults( GTK_TABLE(pos_placement_grid) , pos_placement_bt[i] ,
> +-                               (i % 3) , (i % 3) + 1 , (i / 3) , (i / 3) + 1 );
> ++    gtk_grid_attach( GTK_GRID(pos_placement_grid) , pos_placement_bt[i] , (i % 3) , (i / 3) , 1 , 1 );
> +     g_object_set_data( G_OBJECT(pos_placement_bt[i]) , "value" , GINT_TO_POINTER(i+1) );
> +     if ( cfg->position.placement == (i+1) )
> +       gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(pos_placement_bt[i]) , TRUE );
> +@@ -188,38 +189,38 @@ aosd_ui_configure_position ( aosd_cfg_t * cfg )
> +   gtk_box_pack_start( GTK_BOX(pos_placement_hbox) , pos_placement_grid , FALSE , FALSE , 0 );
> +   aosd_cb_list.append( pos_placement_grid , aosd_cb_configure_position_placement_commit );
> + 
> +-  gtk_box_pack_start( GTK_BOX(pos_placement_hbox) , gtk_vseparator_new() , FALSE , FALSE , 6 );
> ++  gtk_box_pack_start( GTK_BOX(pos_placement_hbox) , gtk_separator_new(GTK_ORIENTATION_VERTICAL) , FALSE , FALSE , 6 );
> + 
> +-  pos_offset_grid = gtk_table_new (0, 0, FALSE);
> +-  gtk_table_set_row_spacings( GTK_TABLE(pos_offset_grid) , 4 );
> +-  gtk_table_set_col_spacings( GTK_TABLE(pos_offset_grid) , 4 );
> ++  pos_offset_grid = gtk_grid_new();
> ++  gtk_grid_set_row_spacing( GTK_GRID(pos_offset_grid) , 4 );
> ++  gtk_grid_set_column_spacing( GTK_GRID(pos_offset_grid) , 4 );
> +   pos_offset_x_label = gtk_label_new( _( "Relative X offset:" ) );
> +-  gtk_misc_set_alignment( GTK_MISC(pos_offset_x_label) , 0 , 0.5 );
> +-  gtk_table_attach_defaults( GTK_TABLE(pos_offset_grid) , pos_offset_x_label , 0 , 1 , 0 , 1 );
> ++  gtk_widget_set_halign( pos_offset_x_label , GTK_ALIGN_START );
> ++  gtk_grid_attach( GTK_GRID(pos_offset_grid) , pos_offset_x_label , 0 , 0 , 1 , 1 );
> +   pos_offset_x_spinbt = gtk_spin_button_new_with_range( -9999 , 9999 , 1 );
> +   gtk_spin_button_set_value( GTK_SPIN_BUTTON(pos_offset_x_spinbt) , cfg->position.offset_x );
> +-  gtk_table_attach_defaults( GTK_TABLE(pos_offset_grid) , pos_offset_x_spinbt , 1 , 2 , 0 , 1 );
> ++  gtk_grid_attach( GTK_GRID(pos_offset_grid) , pos_offset_x_spinbt , 1 , 0 , 1 , 1 );
> +   g_object_set_data( G_OBJECT(pos_offset_grid) , "offx" , pos_offset_x_spinbt );
> +   pos_offset_y_label = gtk_label_new( _( "Relative Y offset:" ) );
> +-  gtk_misc_set_alignment( GTK_MISC(pos_offset_y_label) , 0 , 0.5 );
> +-  gtk_table_attach_defaults( GTK_TABLE(pos_offset_grid) , pos_offset_y_label , 0 , 1 , 1 , 2 );
> ++  gtk_widget_set_halign( pos_offset_y_label , GTK_ALIGN_START );
> ++  gtk_grid_attach( GTK_GRID(pos_offset_grid) , pos_offset_y_label , 0 , 1 , 1 , 1 );
> +   pos_offset_y_spinbt = gtk_spin_button_new_with_range( -9999 , 9999 , 1 );
> +   gtk_spin_button_set_value( GTK_SPIN_BUTTON(pos_offset_y_spinbt) , cfg->position.offset_y );
> +-  gtk_table_attach_defaults( GTK_TABLE(pos_offset_grid) , pos_offset_y_spinbt , 1 , 2 , 1 , 2 );
> ++  gtk_grid_attach( GTK_GRID(pos_offset_grid) , pos_offset_y_spinbt , 1 , 1 , 1 , 1 );
> +   g_object_set_data( G_OBJECT(pos_offset_grid) , "offy" , pos_offset_y_spinbt );
> +   pos_maxsize_width_label = gtk_label_new( _("Max OSD width:") );
> +-  gtk_misc_set_alignment( GTK_MISC(pos_maxsize_width_label) , 0 , 0.5 );
> +-  gtk_table_attach_defaults( GTK_TABLE(pos_offset_grid) , pos_maxsize_width_label , 0 , 1 , 2 , 3 );
> ++  gtk_widget_set_halign( pos_maxsize_width_label , GTK_ALIGN_START );
> ++  gtk_grid_attach( GTK_GRID(pos_offset_grid) , pos_maxsize_width_label , 0 , 2 , 1 , 1 );
> +   pos_maxsize_width_spinbt = gtk_spin_button_new_with_range( 0 , 99999 , 1 );
> +   g_object_set_data( G_OBJECT(pos_offset_grid) , "maxsize_width" , pos_maxsize_width_spinbt );
> +   gtk_spin_button_set_value( GTK_SPIN_BUTTON(pos_maxsize_width_spinbt) , cfg->position.maxsize_width );
> +-  gtk_table_attach_defaults( GTK_TABLE(pos_offset_grid) , pos_maxsize_width_spinbt , 1 , 2 , 2 , 3 );
> ++  gtk_grid_attach( GTK_GRID(pos_offset_grid) , pos_maxsize_width_spinbt , 1 , 2 , 1 , 1 );
> +   gtk_box_pack_start( GTK_BOX(pos_placement_hbox) , pos_offset_grid , FALSE , FALSE , 0 );
> +   aosd_cb_list.append( pos_offset_grid , aosd_cb_configure_position_offset_commit );
> +   aosd_cb_list.append( pos_offset_grid , aosd_cb_configure_position_maxsize_commit );
> + 
> +   pos_multimon_frame = gtk_frame_new( _("Multi-Monitor options") );
> +-  pos_multimon_hbox = gtk_hbox_new( FALSE , 4 );
> ++  pos_multimon_hbox = gtk_box_new( GTK_ORIENTATION_HORIZONTAL , 4 );
> +   gtk_container_set_border_width( GTK_CONTAINER(pos_multimon_hbox) , 6 );
> +   gtk_container_add( GTK_CONTAINER(pos_multimon_frame), pos_multimon_hbox );
> +   pos_multimon_label = gtk_label_new( _("Display OSD using:") );
> +@@ -245,7 +246,7 @@ static GtkWidget *
> + aosd_ui_configure_animation_timing ( char * label_string )
> + {
> +   GtkWidget *hbox, *desc_label, *spinbt;
> +-  hbox = gtk_hbox_new( FALSE , 4 );
> ++  hbox = gtk_box_new( GTK_ORIENTATION_HORIZONTAL , 4 );
> +   desc_label = gtk_label_new( label_string );
> +   spinbt = gtk_spin_button_new_with_range( 0 , 99999 , 1 );
> +   gtk_box_pack_start( GTK_BOX(hbox) , desc_label , FALSE , FALSE , 0 );
> +@@ -275,10 +276,10 @@ aosd_ui_configure_animation ( aosd_cfg_t * cfg )
> +   GtkWidget *ani_timing_fadein_widget, *ani_timing_fadeout_widget, *ani_timing_stay_widget;
> +   GtkSizeGroup *sizegroup;
> + 
> +-  ani_vbox = gtk_vbox_new( FALSE , 0 );
> ++  ani_vbox = gtk_box_new( GTK_ORIENTATION_VERTICAL , 0 );
> +   gtk_container_set_border_width( GTK_CONTAINER(ani_vbox) , 6 );
> + 
> +-  ani_timing_hbox = gtk_hbox_new( FALSE , 0 );
> ++  ani_timing_hbox = gtk_box_new( GTK_ORIENTATION_HORIZONTAL , 0 );
> +   ani_timing_frame = gtk_frame_new( _("Timing (ms)") );
> +   gtk_container_set_border_width( GTK_CONTAINER(ani_timing_hbox) , 6 );
> +   gtk_container_add( GTK_CONTAINER(ani_timing_frame) , ani_timing_hbox );
> +@@ -288,12 +289,12 @@ aosd_ui_configure_animation ( aosd_cfg_t * cfg )
> +   gtk_spin_button_set_value( GTK_SPIN_BUTTON(g_object_get_data(
> +     G_OBJECT(ani_timing_stay_widget),"spinbt")) , cfg->animation.timing_display );
> +   gtk_box_pack_start( GTK_BOX(ani_timing_hbox) , ani_timing_stay_widget , TRUE , TRUE , 0 );
> +-  gtk_box_pack_start( GTK_BOX(ani_timing_hbox) , gtk_vseparator_new() , FALSE , FALSE , 4 );
> ++  gtk_box_pack_start( GTK_BOX(ani_timing_hbox) , gtk_separator_new(GTK_ORIENTATION_VERTICAL) , FALSE , FALSE , 4 );
> +   ani_timing_fadein_widget = aosd_ui_configure_animation_timing( _("Fade in:") );
> +   gtk_spin_button_set_value( GTK_SPIN_BUTTON(g_object_get_data(
> +     G_OBJECT(ani_timing_fadein_widget),"spinbt")) , cfg->animation.timing_fadein );
> +   gtk_box_pack_start( GTK_BOX(ani_timing_hbox) , ani_timing_fadein_widget , TRUE , TRUE , 0 );
> +-  gtk_box_pack_start( GTK_BOX(ani_timing_hbox) , gtk_vseparator_new() , FALSE , FALSE , 4 );
> ++  gtk_box_pack_start( GTK_BOX(ani_timing_hbox) , gtk_separator_new(GTK_ORIENTATION_VERTICAL) , FALSE , FALSE , 4 );
> +   ani_timing_fadeout_widget = aosd_ui_configure_animation_timing( _("Fade out:") );
> +   gtk_spin_button_set_value( GTK_SPIN_BUTTON(g_object_get_data(
> +     G_OBJECT(ani_timing_fadeout_widget),"spinbt")) , cfg->animation.timing_fadeout );
> +@@ -329,7 +330,7 @@ static void
> + aosd_cb_configure_text_font_commit ( GtkWidget * fontbt , aosd_cfg_t * cfg )
> + {
> +   int fontnum = GPOINTER_TO_INT(g_object_get_data( G_OBJECT(fontbt) , "fontnum" ));
> +-  GtkColorButton * chooser;
> ++  GtkColorChooser * chooser;
> + 
> +   cfg->text.fonts_name[fontnum] =
> +    String (gtk_font_button_get_font_name (GTK_FONT_BUTTON (fontbt)));
> +@@ -337,10 +338,10 @@ aosd_cb_configure_text_font_commit ( GtkWidget * fontbt , aosd_cfg_t * cfg )
> +   cfg->text.fonts_draw_shadow[fontnum] = gtk_toggle_button_get_active(
> +     GTK_TOGGLE_BUTTON(g_object_get_data(G_OBJECT(fontbt),"use_shadow")) );
> + 
> +-  chooser = (GtkColorButton *) g_object_get_data ((GObject *) fontbt, "color");
> ++  chooser = (GtkColorChooser *) g_object_get_data ((GObject *) fontbt, "color");
> +   chooser_get_aosd_color (chooser, & cfg->text.fonts_color[fontnum]);
> + 
> +-  chooser = (GtkColorButton *) g_object_get_data ((GObject *) fontbt, "shadow_color");
> ++  chooser = (GtkColorChooser *) g_object_get_data ((GObject *) fontbt, "shadow_color");
> +   chooser_get_aosd_color (chooser, & cfg->text.fonts_shadow_color[fontnum]);
> + }
> + 
> +@@ -355,14 +356,14 @@ aosd_ui_configure_text ( aosd_cfg_t * cfg )
> +   GtkWidget *tex_font_shadow_colorbt[3];
> +   int i = 0;
> + 
> +-  tex_vbox = gtk_vbox_new( FALSE , 4 );
> ++  tex_vbox = gtk_box_new( GTK_ORIENTATION_VERTICAL , 4 );
> +   gtk_container_set_border_width( GTK_CONTAINER(tex_vbox) , 6 );
> + 
> +   tex_font_frame = gtk_frame_new( _("Fonts") );
> +-  tex_font_grid = gtk_table_new (0, 0, FALSE);
> ++  tex_font_grid = gtk_grid_new();
> +   gtk_container_set_border_width( GTK_CONTAINER(tex_font_grid) , 6 );
> +-  gtk_table_set_row_spacings( GTK_TABLE(tex_font_grid) , 4 );
> +-  gtk_table_set_col_spacings( GTK_TABLE(tex_font_grid) , 4 );
> ++  gtk_grid_set_row_spacing ( GTK_GRID(tex_font_grid) , 4 );
> ++  gtk_grid_set_column_spacing ( GTK_GRID(tex_font_grid) , 4 );
> +   for ( i = 0 ; i < AOSD_TEXT_FONTS_NUM ; i++ )
> +   {
> +     char *label_str = g_strdup_printf( _("Font %i:") , i+1 );
> +@@ -374,16 +375,17 @@ aosd_ui_configure_text ( aosd_cfg_t * cfg )
> +     gtk_font_button_set_use_font( GTK_FONT_BUTTON(tex_font_fontbt[i]) , FALSE );
> +     gtk_font_button_set_use_size( GTK_FONT_BUTTON(tex_font_fontbt[i]) , FALSE );
> +     gtk_font_button_set_font_name( GTK_FONT_BUTTON(tex_font_fontbt[i]) , cfg->text.fonts_name[i] );
> ++    gtk_widget_set_hexpand( tex_font_fontbt[i] , TRUE );
> + 
> +     tex_font_colorbt[i] = gtk_color_button_new ();
> +-    chooser_set_aosd_color ((GtkColorButton *) tex_font_colorbt[i],
> ++    chooser_set_aosd_color ((GtkColorChooser *) tex_font_colorbt[i],
> +      & cfg->text.fonts_color[i]);
> + 
> +     tex_font_shadow_togglebt[i] = gtk_toggle_button_new_with_label( _("Shadow") );
> +     gtk_toggle_button_set_mode( GTK_TOGGLE_BUTTON(tex_font_shadow_togglebt[i]) , FALSE );
> + 
> +     tex_font_shadow_colorbt[i] = gtk_color_button_new ();
> +-    chooser_set_aosd_color ((GtkColorButton *) tex_font_shadow_colorbt[i],
> ++    chooser_set_aosd_color ((GtkColorChooser *) tex_font_shadow_colorbt[i],
> +      & cfg->text.fonts_shadow_color[i]);
> + 
> +     gtk_widget_set_sensitive( tex_font_shadow_colorbt[i] , FALSE );
> +@@ -392,11 +394,11 @@ aosd_ui_configure_text ( aosd_cfg_t * cfg )
> +                       tex_font_shadow_colorbt[i] );
> +     gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(tex_font_shadow_togglebt[i]) ,
> +       cfg->text.fonts_draw_shadow[i] );
> +-    gtk_table_attach_defaults( GTK_TABLE(tex_font_grid) , tex_font_label[i] , 0 , 1 , i , i + 1 );
> +-    gtk_table_attach_defaults( GTK_TABLE(tex_font_grid) , tex_font_fontbt[i] , 1 , 2 , i , i + 1 );
> +-    gtk_table_attach_defaults( GTK_TABLE(tex_font_grid) , tex_font_colorbt[i] , 2 , 3 , i , i + 1 );
> +-    gtk_table_attach_defaults( GTK_TABLE(tex_font_grid) , tex_font_shadow_togglebt[i] , 3 , 4 , i , i + 1 );
> +-    gtk_table_attach_defaults( GTK_TABLE(tex_font_grid) , tex_font_shadow_colorbt[i] , 4 , 5 , i , i + 1 );
> ++    gtk_grid_attach( GTK_GRID(tex_font_grid) , tex_font_label[i] , 0 , 0 , 1 , 1 );
> ++    gtk_grid_attach( GTK_GRID(tex_font_grid) , tex_font_fontbt[i] , 1 , 0 , 1 , 1 );
> ++    gtk_grid_attach( GTK_GRID(tex_font_grid) , tex_font_colorbt[i] , 2 , 0 , 1 , 1 );
> ++    gtk_grid_attach( GTK_GRID(tex_font_grid) , tex_font_shadow_togglebt[i] , 3 , 0 , 1 , 1 );
> ++    gtk_grid_attach( GTK_GRID(tex_font_grid) , tex_font_shadow_colorbt[i] , 4 , 0 , 1 , 1 );
> +     g_object_set_data( G_OBJECT(tex_font_fontbt[i]) , "fontnum" , GINT_TO_POINTER(i) );
> +     g_object_set_data( G_OBJECT(tex_font_fontbt[i]) , "color" , tex_font_colorbt[i] );
> +     g_object_set_data( G_OBJECT(tex_font_fontbt[i]) , "use_shadow" , tex_font_shadow_togglebt[i] );
> +@@ -430,7 +432,7 @@ static void
> + aosd_cb_configure_decoration_color_commit ( GtkWidget * colorbt , aosd_cfg_t * cfg )
> + {
> +   aosd_color_t color;
> +-  chooser_get_aosd_color ((GtkColorButton *) colorbt, & color);
> ++  chooser_get_aosd_color ((GtkColorChooser *) colorbt, & color);
> + 
> +   int colnum = GPOINTER_TO_INT( g_object_get_data( G_OBJECT(colorbt) , "colnum" ) );
> +   cfg->decoration.colors[colnum] = color;
> +@@ -451,7 +453,7 @@ aosd_ui_configure_decoration ( aosd_cfg_t * cfg )
> +   GtkWidget *dec_rstyleopts_frame, *dec_rstyleopts_grid;
> +   int colors_max_num = 0, i = 0;
> + 
> +-  dec_hbox = gtk_hbox_new( FALSE , 4 );
> ++  dec_hbox = gtk_box_new( GTK_ORIENTATION_HORIZONTAL , 4 );
> +   gtk_container_set_border_width( GTK_CONTAINER(dec_hbox) , 6 );
> + 
> +   /* decoration style model
> +@@ -495,31 +497,31 @@ aosd_ui_configure_decoration ( aosd_cfg_t * cfg )
> +   gtk_box_pack_start( GTK_BOX(dec_hbox) , dec_rstyle_lv_frame , FALSE , FALSE , 0 );
> +   aosd_cb_list.append( dec_rstyle_lv , aosd_cb_configure_decoration_style_commit );
> + 
> +-  dec_rstyle_hbox = gtk_vbox_new( FALSE , 4 );
> ++  dec_rstyle_hbox = gtk_box_new( GTK_ORIENTATION_VERTICAL , 4 );
> +   gtk_box_pack_start( GTK_BOX(dec_hbox) , dec_rstyle_hbox , TRUE , TRUE , 0 );
> + 
> +   /* in colors_max_num now there's the maximum number of colors used by decoration styles */
> +   dec_rstyleopts_frame = gtk_frame_new( _("Colors") );
> +-  dec_rstyleopts_grid = gtk_table_new (0, 0, FALSE);
> ++  dec_rstyleopts_grid = gtk_grid_new();
> +   gtk_container_set_border_width( GTK_CONTAINER(dec_rstyleopts_grid) , 6 );
> +-  gtk_table_set_row_spacings( GTK_TABLE(dec_rstyleopts_grid) , 4 );
> +-  gtk_table_set_col_spacings( GTK_TABLE(dec_rstyleopts_grid) , 8 );
> ++  gtk_grid_set_row_spacing( GTK_GRID(dec_rstyleopts_grid) , 4 );
> ++  gtk_grid_set_column_spacing( GTK_GRID(dec_rstyleopts_grid) , 8 );
> +   gtk_container_add( GTK_CONTAINER(dec_rstyleopts_frame) , dec_rstyleopts_grid );
> +   for ( i = 0 ; i < colors_max_num ; i++ )
> +   {
> +     GtkWidget *hbox, *label;
> +     char *label_str = nullptr;
> +-    hbox = gtk_hbox_new( FALSE , 4 );
> ++    hbox = gtk_box_new( GTK_ORIENTATION_HORIZONTAL , 4 );
> +     label_str = g_strdup_printf( _("Color %i:") , i+1 );
> +     label = gtk_label_new( label_str );
> +     g_free( label_str );
> + 
> +     GtkWidget * colorbt = gtk_color_button_new ();
> +-    chooser_set_aosd_color ((GtkColorButton *) colorbt, & cfg->decoration.colors[i]);
> ++    chooser_set_aosd_color ((GtkColorChooser *) colorbt, & cfg->decoration.colors[i]);
> + 
> +     gtk_box_pack_start( GTK_BOX(hbox) , label , FALSE , FALSE , 0 );
> +     gtk_box_pack_start( GTK_BOX(hbox) , colorbt , FALSE , FALSE , 0 );
> +-    gtk_table_attach_defaults( GTK_TABLE(dec_rstyleopts_grid) , hbox , (i % 3) , (i % 3) + 1, (i / 3) , (i / 3) + 1);
> ++    gtk_grid_attach( GTK_GRID(dec_rstyleopts_grid) , hbox , (i % 3) , (i / 3) , 1 , 1 );
> +     g_object_set_data( G_OBJECT(colorbt) , "colnum" , GINT_TO_POINTER(i) );
> +     aosd_cb_list.append( colorbt , aosd_cb_configure_decoration_color_commit );
> +   }
> +@@ -573,7 +575,7 @@ aosd_ui_configure_trigger ( aosd_cfg_t * cfg )
> +   gtk_notebook_set_show_tabs( GTK_NOTEBOOK(tri_event_nb) , FALSE );
> +   gtk_notebook_set_show_border( GTK_NOTEBOOK(tri_event_nb) , FALSE );
> + 
> +-  tri_hbox = gtk_hbox_new( FALSE , 4 );
> ++  tri_hbox = gtk_box_new( GTK_ORIENTATION_HORIZONTAL , 4 );
> +   gtk_container_set_border_width( GTK_CONTAINER(tri_hbox) , 6 );
> + 
> +   /* trigger model
> +@@ -591,19 +593,19 @@ aosd_ui_configure_trigger ( aosd_cfg_t * cfg )
> +     gtk_list_store_set( tri_event_store , &iter ,
> +       0 , _(aosd_trigger_get_name( i )) ,
> +       1 , i , 2 , i , -1 );
> +-    vbox = gtk_vbox_new( FALSE , 0 );
> ++    vbox = gtk_box_new( GTK_ORIENTATION_VERTICAL , 0 );
> +     gtk_container_set_border_width( GTK_CONTAINER(vbox) , 6 );
> +     label = gtk_label_new( _(aosd_trigger_get_desc( i )) );
> +     gtk_label_set_line_wrap( GTK_LABEL(label) , TRUE );
> +     gtk_label_set_max_width_chars( GTK_LABEL(label), 40 );
> +-    gtk_misc_set_alignment( GTK_MISC(label) , 0.0 , 0.0 );
> ++    gtk_widget_set_halign( label , GTK_ALIGN_START );
> +     checkbt = gtk_check_button_new_with_label( _("Enable trigger") );
> +     if ( cfg->trigger.enabled[i] )
> +       gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(checkbt) , TRUE );
> +     else
> +       gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(checkbt) , FALSE );
> +     gtk_box_pack_start( GTK_BOX(vbox) , checkbt , FALSE , FALSE , 0 );
> +-    gtk_box_pack_start( GTK_BOX(vbox) , gtk_hseparator_new() , FALSE , FALSE , 4 );
> ++    gtk_box_pack_start( GTK_BOX(vbox) , gtk_separator_new(GTK_ORIENTATION_HORIZONTAL) , FALSE , FALSE , 4 );
> +     gtk_box_pack_start( GTK_BOX(vbox) , label , FALSE , FALSE , 0 );
> +     frame = gtk_frame_new( nullptr );
> +     gtk_container_add( GTK_CONTAINER(frame) , vbox );
> +@@ -699,10 +701,10 @@ aosd_ui_configure_misc ( aosd_cfg_t * cfg )
> +   GtkWidget *mis_transp_status_frame, *mis_transp_status_hbox;
> +   GtkWidget *mis_transp_status_img, *mis_transp_status_label;
> + 
> +-  mis_vbox = gtk_vbox_new( FALSE , 0 );
> ++  mis_vbox = gtk_box_new( GTK_ORIENTATION_VERTICAL , 0 );
> +   gtk_container_set_border_width( GTK_CONTAINER(mis_vbox) , 6 );
> + 
> +-  mis_transp_vbox = gtk_vbox_new( FALSE , 0 );
> ++  mis_transp_vbox = gtk_box_new( GTK_ORIENTATION_VERTICAL , 0 );
> +   mis_transp_frame = gtk_frame_new( _("Transparency") );
> +   gtk_container_set_border_width( GTK_CONTAINER(mis_transp_vbox) , 6 );
> +   gtk_container_add( GTK_CONTAINER(mis_transp_frame) , mis_transp_vbox );
> +@@ -719,16 +721,15 @@ aosd_ui_configure_misc ( aosd_cfg_t * cfg )
> +   gtk_box_pack_start( GTK_BOX(mis_transp_vbox) , mis_transp_fake_rbt , TRUE , TRUE , 0 );
> +   gtk_box_pack_start( GTK_BOX(mis_transp_vbox) , mis_transp_real_rbt , TRUE , TRUE , 0 );
> + 
> +-  mis_transp_status_hbox = gtk_hbox_new( FALSE , 4 );
> ++  mis_transp_status_hbox = gtk_box_new( GTK_ORIENTATION_HORIZONTAL , 4 );
> +   mis_transp_status_frame = gtk_frame_new( nullptr );
> +   gtk_container_set_border_width( GTK_CONTAINER(mis_transp_status_hbox) , 3 );
> +   gtk_container_add( GTK_CONTAINER(mis_transp_status_frame) , mis_transp_status_hbox );
> +   gtk_box_pack_start( GTK_BOX(mis_transp_vbox) , mis_transp_status_frame , TRUE , TRUE , 0 );
> + 
> +   mis_transp_status_img = gtk_image_new();
> +-  gtk_misc_set_alignment( GTK_MISC(mis_transp_status_img) , 0.5 , 0 );
> +   mis_transp_status_label = gtk_label_new( "" );
> +-  gtk_misc_set_alignment( GTK_MISC(mis_transp_status_label) , 0 , 0.5 );
> ++  gtk_widget_set_halign( mis_transp_status_label , GTK_ALIGN_START );
> +   gtk_label_set_line_wrap( GTK_LABEL(mis_transp_status_label) , TRUE );
> +   gtk_box_pack_start( GTK_BOX(mis_transp_status_hbox) , mis_transp_status_img , FALSE , FALSE , 0 );
> +   gtk_box_pack_start( GTK_BOX(mis_transp_status_hbox) , mis_transp_status_label , TRUE , TRUE , 0 );
> +--- src/blur_scope/blur_scope.cc.old
> ++++ src/blur_scope/blur_scope.cc
> +@@ -73,13 +73,14 @@ public:
> + 
> + private:
> +     void resize (int w, int h);
> ++    void draw_to_cairo (cairo_t * cr);
> +     void draw ();
> + 
> +     void blur ();
> +     void draw_vert_line (int x, int y1, int y2);
> + 
> +     static gboolean configure_event (GtkWidget * widget, GdkEventConfigure * event, void * user);
> +-    static gboolean expose_event (GtkWidget * widget, GdkEventExpose * event, void * user);
> ++    static gboolean draw_cb (GtkWidget * widget, cairo_t * cr, void * user);
> + 
> +     GtkWidget * area = nullptr;
> +     int width = 0, height = 0, stride = 0, image_size = 0;
> +@@ -115,17 +116,22 @@ void BlurScope::resize (int w, int h)
> +     corner = image + stride + 1;
> + }
> + 
> +-void BlurScope::draw ()
> ++void BlurScope::draw_to_cairo (cairo_t * cr)
> + {
> +-    if (! area || ! gtk_widget_get_window (area))
> +-        return;
> +-
> +-    cairo_t * cr = gdk_cairo_create (gtk_widget_get_window (area));
> +     cairo_surface_t * surf = cairo_image_surface_create_for_data
> +      ((unsigned char *) image, CAIRO_FORMAT_RGB24, width, height, stride << 2);
> +     cairo_set_source_surface (cr, surf, 0, 0);
> +     cairo_paint (cr);
> +     cairo_surface_destroy (surf);
> ++}
> ++
> ++void BlurScope::draw ()
> ++{
> ++    if (! area || ! gtk_widget_get_window (area))
> ++        return;
> ++
> ++    cairo_t * cr = gdk_cairo_create (gtk_widget_get_window (area));
> ++    draw_to_cairo (cr);
> +     cairo_destroy (cr);
> + }
> + 
> +@@ -135,9 +141,9 @@ gboolean BlurScope::configure_event (GtkWidget * widget, GdkEventConfigure * eve
> +     return TRUE;
> + }
> + 
> +-gboolean BlurScope::expose_event (GtkWidget * widget, GdkEventExpose * event, void * user)
> ++gboolean BlurScope::draw_cb (GtkWidget * widget, cairo_t * cr, void * user)
> + {
> +-    ((BlurScope *) user)->draw ();
> ++    ((BlurScope *) user)->draw_to_cairo (cr);
> +     return TRUE;
> + }
> + 
> +@@ -147,7 +153,7 @@ void * BlurScope::get_gtk_widget ()
> +     gtk_widget_set_size_request (area, D_WIDTH, D_HEIGHT);
> +     resize (D_WIDTH, D_HEIGHT);
> + 
> +-    g_signal_connect (area, "expose-event", (GCallback) expose_event, this);
> ++    g_signal_connect (area, "draw_cb", (GCallback) draw_cb, this);
> +     g_signal_connect (area, "configure-event", (GCallback) configure_event, this);
> +     g_signal_connect (area, "destroy", (GCallback) gtk_widget_destroyed, & area);
> + 
> +@@ -216,17 +222,25 @@ void BlurScope::render_mono_pcm (const float * pcm)
> + 
> + static void color_set_cb (GtkWidget * chooser)
> + {
> +-    GdkColor gdk_color;
> +-    gtk_color_button_get_color ((GtkColorButton *) chooser, & gdk_color);
> +-    bscope_color = ((gdk_color.red & 0xff00) << 8) | (gdk_color.green & 0xff00) | (gdk_color.blue >> 8);
> ++    GdkRGBA rgba;
> ++    gtk_color_chooser_get_rgba ((GtkColorChooser *) chooser, & rgba);
> ++
> ++    int red = round (rgba.red * 255);
> ++    int green = round (rgba.green * 255);
> ++    int blue = round (rgba.blue * 255);
> ++    bscope_color = (red << 16) | (green << 8) | blue;
> + }
> + 
> + static void /* GtkWidget */ * bscope_get_color_chooser (void)
> + {
> +-    GdkColor gdk_color = {0, (uint16_t) ((bscope_color & 0xff0000) >> 8),
> +-     (uint16_t) (bscope_color & 0xff00), (uint16_t) ((bscope_color & 0xff) << 8)};
> +-    GtkWidget * chooser = gtk_color_button_new_with_color (& gdk_color);
> +-    gtk_color_button_set_use_alpha ((GtkColorButton *) chooser, FALSE);
> ++    GdkRGBA rgba = {
> ++        ((bscope_color & 0xff0000) >> 16) / 255.0,
> ++        ((bscope_color & 0xff00) >> 8) / 255.0,
> ++        (bscope_color & 0xff) / 255.0
> ++    };
> ++
> ++    GtkWidget * chooser = gtk_color_button_new_with_rgba (& rgba);
> ++    gtk_color_chooser_set_use_alpha ((GtkColorChooser *) chooser, false);
> + 
> +     g_signal_connect (chooser, "color-set", (GCallback) color_set_cb, nullptr);
> + 
> +--- src/cairo-spectrum/cairo-spectrum.cc.old
> ++++ src/cairo-spectrum/
> cairo-spectrum.cc
> 
> +@@ -183,12 +183,29 @@ static void hsv_to_rgb (float h, float s, float v, float * r, float * g, float *
> +     * b = v * (1 - s * (1 - * b));
> + }
> + 
> +-static void get_color (GtkWidget * widget, int i, float * r, float * g, float * b)
> ++static void get_color (gint i, gfloat * r, gfloat * g, gfloat * b)
> + {
> +-    GdkColor * c = (gtk_widget_get_style (widget))->base + GTK_STATE_SELECTED;
> +-    float h, s, v;
> ++    static GdkRGBA c;
> ++    static gboolean valid = FALSE;
> ++    gfloat h, s, v, n;
> + 
> +-    rgb_to_hsv (c->red / 65535.0, c->green / 65535.0, c->blue / 65535.0, & h, & s, & v);
> ++    if (! valid)
> ++    {
> ++        /* we want a color that matches the current theme
> ++         * selected color of a GtkEntry should be reasonable */
> ++        GtkStyleContext * style = gtk_style_context_new ();
> ++        GtkWidgetPath * path = gtk_widget_path_new ();
> ++        gtk_widget_path_append_type (path, GTK_TYPE_ENTRY);
> ++        gtk_style_context_set_path (style, path);
> ++        gtk_widget_path_free (path);
> ++        gtk_style_context_add_class (style, "entry");
> ++        gtk_style_context_get_background_color (style,
> ++         (GtkStateFlags) (GTK_STATE_FLAG_FOCUSED | GTK_STATE_FLAG_SELECTED), & c);
> ++        g_object_unref (style);
> ++        valid = TRUE;
> ++    }
> ++
> ++    rgb_to_hsv (c.red, c.green, c.blue, & h, & s, & v);
> + 
> +     if (s < 0.1) /* monochrome theme? use blue instead */
> +     {
> +@@ -196,8 +213,9 @@ static void get_color (GtkWidget * widget, int i, float * r, float * g, float *
> +         s = 0.75;
> +     }
> + 
> +-    s = 1 - 0.9 * i / (bands - 1);
> +-    v = 0.75 + 0.25 * i / (bands - 1);
> ++    n = i / (gfloat) (bands - 1);
> ++    s = 1 - 0.9 * n;
> ++    v = 0.75 + 0.25 * n;
> + 
> +     hsv_to_rgb (h, s, v, r, g, b);
> + }
> +@@ -218,7 +236,7 @@ static void draw_visualizer (GtkWidget *widget, cairo_t *cr)
> +         int x = ((width / bands) * i) + 2;
> +         float r, g, b;
> + 
> +-        get_color (widget, i, & r, & g, & b);
> ++        get_color (i, & r, & g, & b);
> +         cairo_set_source_rgb (cr, r, g, b);
> +         cairo_rectangle (cr, x + 1, height - (bars[i] * height / 40),
> +          (width / bands) - 1, (bars[i] * height / 40));
> +@@ -239,14 +257,11 @@ static gboolean configure_event (GtkWidget * widget, GdkEventConfigure * event)
> +     return TRUE;
> + }
> + 
> +-static gboolean draw_event (GtkWidget * widget)
> ++static gboolean draw_event (GtkWidget * widget, cairo_t * cr, GtkWidget * area)
> + {
> +-    cairo_t * cr = gdk_cairo_create (gtk_widget_get_window (widget));
> +-
> +     draw_background (widget, cr);
> +     draw_visualizer (widget, cr);
> + 
> +-    cairo_destroy (cr);
> +     return TRUE;
> + }
> + 
> +@@ -255,7 +270,7 @@ void * CairoSpectrum::get_gtk_widget ()
> +     GtkWidget *area = gtk_drawing_area_new();
> +     spect_widget = area;
> + 
> +-    g_signal_connect(area, "expose-event", (GCallback) draw_event, nullptr);
> ++    g_signal_connect(area, "draw", (GCallback) draw_event, nullptr);
> +     g_signal_connect(area, "configure-event", (GCallback) configure_event, nullptr);
> +     g_signal_connect(area, "destroy", (GCallback) gtk_widget_destroyed, & spect_widget);
> + 
> +--- src/filewriter/filewriter.cc.old
> ++++ src/filewriter/
> filewriter.cc
> 
> +@@ -378,9 +378,9 @@ static void filenamefromfilename_cb(GtkWidget *button, void * data)
> + 
> + static void * file_configure (void)
> + {
> +-        GtkWidget * configure_vbox = gtk_vbox_new (FALSE, 6);
> ++        GtkWidget * configure_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
> + 
> +-        GtkWidget * fileext_hbox = gtk_hbox_new (FALSE, 5);
> ++        GtkWidget * fileext_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_box_pack_start(GTK_BOX(configure_vbox), fileext_hbox, FALSE, FALSE, 0);
> + 
> +         GtkWidget * fileext_label = gtk_label_new (_("Output file format:"));
> +@@ -404,9 +404,9 @@ static void * file_configure (void)
> +         gtk_widget_set_sensitive(plugin_button, plugin->configure != nullptr);
> +         gtk_box_pack_end(GTK_BOX(fileext_hbox), plugin_button, FALSE, FALSE, 0);
> + 
> +-        gtk_box_pack_start(GTK_BOX(configure_vbox), gtk_hseparator_new(), FALSE, FALSE, 0);
> ++        gtk_box_pack_start(GTK_BOX(configure_vbox), gtk_separator_new(GTK_ORIENTATION_HORIZONTAL), FALSE, FALSE, 0);
> + 
> +-        GtkWidget * saveplace_hbox = gtk_hbox_new (FALSE, 5);
> ++        GtkWidget * saveplace_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_container_add(GTK_CONTAINER(configure_vbox), saveplace_hbox);
> + 
> +         GtkWidget * saveplace1 = gtk_radio_button_new_with_label (nullptr,
> +@@ -421,7 +421,7 @@ static void * file_configure (void)
> + 
> +         gtk_box_pack_start ((GtkBox *) saveplace_hbox, saveplace2, FALSE, FALSE, 0);
> + 
> +-        path_hbox = gtk_hbox_new (FALSE, 5);
> ++        path_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_box_pack_start(GTK_BOX(configure_vbox), path_hbox, FALSE, FALSE, 0);
> + 
> +         GtkWidget * path_label = gtk_label_new (_("Output file folder:"));
> +@@ -436,9 +436,9 @@ static void * file_configure (void)
> +         if (save_original)
> +             gtk_widget_set_sensitive(path_hbox, FALSE);
> + 
> +-        gtk_box_pack_start(GTK_BOX(configure_vbox), gtk_hseparator_new(), FALSE, FALSE, 0);
> ++        gtk_box_pack_start(GTK_BOX(configure_vbox), gtk_separator_new(GTK_ORIENTATION_HORIZONTAL), FALSE, FALSE, 0);
> + 
> +-        filenamefrom_hbox = gtk_hbox_new (FALSE, 5);
> ++        filenamefrom_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_container_add(GTK_CONTAINER(configure_vbox), filenamefrom_hbox);
> + 
> +         filenamefrom_label = gtk_label_new(_("Generate file name from:"));
> +@@ -463,7 +463,7 @@ static void * file_configure (void)
> +         if (filenamefromtags)
> +             gtk_widget_set_sensitive(use_suffix_toggle, FALSE);
> + 
> +-        gtk_box_pack_start(GTK_BOX(configure_vbox), gtk_hseparator_new(), FALSE, FALSE, 0);
> ++        gtk_box_pack_start(GTK_BOX(configure_vbox), gtk_separator_new(GTK_ORIENTATION_HORIZONTAL), FALSE, FALSE, 0);
> + 
> +         prependnumber_toggle = gtk_check_button_new_with_label(_("Prepend track number to file name"));
> +         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(prependnumber_toggle), prependnumber);
> +--- src/filewriter/mp3.cc.old
> ++++ src/filewriter/
> mp3.cc
> 
> +@@ -669,10 +669,10 @@ static void mp3_configure(void)
> + 
> +         /* Quality */
> + 
> +-        quality_vbox = gtk_vbox_new (FALSE, 5);
> ++        quality_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(quality_vbox), 5);
> + 
> +-        quality_hbox1 = gtk_hbox_new (FALSE, 5);
> ++        quality_hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_box_pack_start(GTK_BOX(quality_vbox), quality_hbox1, FALSE,
> +                            FALSE, 0);
> + 
> +@@ -684,7 +684,7 @@ static void mp3_configure(void)
> +         gtk_box_pack_start(GTK_BOX(quality_hbox1), alg_quality_frame,
> +                            FALSE, FALSE, 0);
> + 
> +-        alg_quality_hbox = gtk_hbox_new (FALSE, 5);
> ++        alg_quality_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(alg_quality_hbox),
> +                                        10);
> +         gtk_container_add(GTK_CONTAINER(alg_quality_frame),
> +@@ -708,7 +708,7 @@ static void mp3_configure(void)
> +         gtk_box_pack_start(GTK_BOX(quality_hbox1), samplerate_frame, FALSE,
> +                            FALSE, 0);
> + 
> +-        samplerate_hbox = gtk_hbox_new (FALSE, 5);
> ++        samplerate_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(samplerate_hbox), 10);
> +         gtk_container_add(GTK_CONTAINER(samplerate_frame),
> +                           samplerate_hbox);
> +@@ -731,7 +731,7 @@ static void mp3_configure(void)
> +         g_signal_connect (combo, "changed", (GCallback) samplerate_changed, nullptr);
> + 
> +         samplerate_label = gtk_label_new(_("(Hz)"));
> +-        gtk_misc_set_alignment(GTK_MISC(samplerate_label), 0, 0.5);
> ++        gtk_widget_set_halign(samplerate_label, GTK_ALIGN_START);
> +         gtk_box_pack_start(GTK_BOX(samplerate_hbox), samplerate_label,
> +                            FALSE, FALSE, 0);
> + 
> +@@ -744,14 +744,14 @@ static void mp3_configure(void)
> +                            FALSE, 0);
> + 
> +         // vbox sorrounding hbox1 and hbox2
> +-        enc_quality_vbox = gtk_vbox_new (FALSE, 5);
> ++        enc_quality_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(enc_quality_vbox), 10);
> + 
> +         // pack vbox to frame
> +         gtk_container_add(GTK_CONTAINER(enc_quality_frame), enc_quality_vbox);
> + 
> +         // hbox1 for bitrate
> +-        hbox1 = gtk_hbox_new (FALSE, 5);
> ++        hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_container_add(GTK_CONTAINER(enc_quality_vbox), hbox1);
> + 
> +         // radio 1
> +@@ -781,7 +781,7 @@ static void mp3_configure(void)
> +         g_signal_connect (combo, "changed", (GCallback) bitrate_changed, nullptr);
> + 
> +         // hbox2 for compression ratio
> +-        hbox2 = gtk_hbox_new (FALSE, 5);
> ++        hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_container_add(GTK_CONTAINER(enc_quality_vbox), hbox2);
> + 
> +         // radio 2
> +@@ -822,7 +822,7 @@ static void mp3_configure(void)
> +         gtk_box_pack_start(GTK_BOX(quality_vbox), mode_frame, FALSE, FALSE,
> +                            0);
> + 
> +-        mode_hbox = gtk_hbox_new (FALSE, 10);
> ++        mode_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 10);
> +         gtk_container_set_border_width(GTK_CONTAINER(mode_hbox), 10);
> +         gtk_container_add(GTK_CONTAINER(mode_frame), mode_hbox);
> + 
> +@@ -847,7 +847,7 @@ static void mp3_configure(void)
> +         gtk_box_pack_start(GTK_BOX(quality_vbox), misc_frame, FALSE, FALSE,
> +                            0);
> + 
> +-        misc_vbox = gtk_vbox_new (FALSE, 5);
> ++        misc_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(misc_vbox), 5);
> +         gtk_container_add(GTK_CONTAINER(misc_frame), misc_vbox);
> + 
> +@@ -880,7 +880,7 @@ static void mp3_configure(void)
> + 
> +         /* VBR/ABR */
> + 
> +-        vbr_vbox = gtk_vbox_new (FALSE, 5);
> ++        vbr_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(vbr_vbox), 5);
> + 
> +         /* Toggle VBR */
> +@@ -889,7 +889,7 @@ static void mp3_configure(void)
> +         gtk_box_pack_start(GTK_BOX(vbr_vbox), vbr_toggle, FALSE, FALSE, 2);
> +         g_signal_connect (vbr_toggle, "toggled", (GCallback) toggle_vbr, nullptr);
> + 
> +-        vbr_options_vbox = gtk_vbox_new (FALSE, 0);
> ++        vbr_options_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
> +         gtk_container_add(GTK_CONTAINER(vbr_vbox), vbr_options_vbox);
> +         gtk_widget_set_sensitive(vbr_options_vbox, FALSE);
> + 
> +@@ -900,7 +900,7 @@ static void mp3_configure(void)
> +         gtk_box_pack_start(GTK_BOX(vbr_options_vbox), vbr_type_frame,
> +                            FALSE, FALSE, 2);
> + 
> +-        vbr_type_hbox = gtk_hbox_new (FALSE, 5);
> ++        vbr_type_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(vbr_type_hbox), 5);
> +         gtk_container_add(GTK_CONTAINER(vbr_type_frame), vbr_type_hbox);
> + 
> +@@ -933,19 +933,19 @@ static void mp3_configure(void)
> +         gtk_box_pack_start(GTK_BOX(vbr_options_vbox), vbr_frame, FALSE,
> +                            FALSE, 2);
> + 
> +-        vbr_options_vbox2 = gtk_vbox_new (FALSE, 5);
> ++        vbr_options_vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(vbr_options_vbox2),
> +                                        5);
> +         gtk_container_add(GTK_CONTAINER(vbr_frame), vbr_options_vbox2);
> + 
> +-        vbr_options_hbox1 = gtk_hbox_new (FALSE, 5);
> ++        vbr_options_hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(vbr_options_hbox1),
> +                                        5);
> +         gtk_container_add(GTK_CONTAINER(vbr_options_vbox2),
> +                           vbr_options_hbox1);
> + 
> +         vbr_min_label = gtk_label_new(_("Minimum bitrate (kbps):"));
> +-        gtk_misc_set_alignment(GTK_MISC(vbr_min_label), 0, 0.5);
> ++        gtk_widget_set_halign(vbr_min_label, GTK_ALIGN_START);
> +         gtk_box_pack_start(GTK_BOX(vbr_options_hbox1), vbr_min_label, TRUE,
> +                            TRUE, 0);
> + 
> +@@ -964,14 +964,14 @@ static void mp3_configure(void)
> +          0);
> +         g_signal_connect (combo, "changed", (GCallback) vbr_min_changed, nullptr);
> + 
> +-        vbr_options_hbox2 = gtk_hbox_new (FALSE, 5);
> ++        vbr_options_hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(vbr_options_hbox2),
> +                                        5);
> +         gtk_container_add(GTK_CONTAINER(vbr_options_vbox2),
> +                           vbr_options_hbox2);
> + 
> +         vbr_max_label = gtk_label_new(_("Maximum bitrate (kbps):"));
> +-        gtk_misc_set_alignment(GTK_MISC(vbr_max_label), 0, 0.5);
> ++        gtk_widget_set_halign(vbr_max_label, GTK_ALIGN_START);
> +         gtk_box_pack_start(GTK_BOX(vbr_options_hbox2), vbr_max_label, TRUE,
> +                            TRUE, 0);
> + 
> +@@ -1010,12 +1010,12 @@ static void mp3_configure(void)
> +                            FALSE, 2);
> +         gtk_widget_set_sensitive(abr_frame, FALSE);
> + 
> +-        abr_hbox = gtk_hbox_new (FALSE, 5);
> ++        abr_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(abr_hbox), 5);
> +         gtk_container_add(GTK_CONTAINER(abr_frame), abr_hbox);
> + 
> +         abr_label = gtk_label_new(_("Average bitrate (kbps):"));
> +-        gtk_misc_set_alignment(GTK_MISC(abr_label), 0, 0.5);
> ++        gtk_widget_set_halign(abr_label, GTK_ALIGN_START);
> +         gtk_box_pack_start(GTK_BOX(abr_hbox), abr_label, TRUE, TRUE, 0);
> + 
> +         combo = gtk_combo_box_text_new ();
> +@@ -1035,14 +1035,14 @@ static void mp3_configure(void)
> + 
> +         /* Quality Level */
> + 
> +-        vbr_options_hbox3 = gtk_hbox_new (FALSE, 5);
> ++        vbr_options_hbox3 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(vbr_options_hbox3),
> +                                        5);
> +         gtk_container_add(GTK_CONTAINER(vbr_options_vbox),
> +                           vbr_options_hbox3);
> + 
> +         vbr_quality_label = gtk_label_new(_("VBR quality level:"));
> +-        gtk_misc_set_alignment(GTK_MISC(vbr_quality_label), 0, 0.5);
> ++        gtk_widget_set_halign(vbr_quality_label, GTK_ALIGN_START);
> +         gtk_box_pack_start(GTK_BOX(vbr_options_hbox3), vbr_quality_label,
> +                            TRUE, TRUE, 0);
> + 
> +@@ -1077,7 +1077,7 @@ static void mp3_configure(void)
> + 
> +         /* Tags */
> + 
> +-        tags_vbox = gtk_vbox_new (FALSE, 5);
> ++        tags_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(tags_vbox), 5);
> + 
> +         /* Frame Params */
> +@@ -1088,7 +1088,7 @@ static void mp3_configure(void)
> +         gtk_box_pack_start(GTK_BOX(tags_vbox), tags_frames_frame, FALSE,
> +                            FALSE, 2);
> + 
> +-        tags_frames_hbox = gtk_hbox_new (FALSE, 5);
> ++        tags_frames_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(tags_frames_hbox), 5);
> +         gtk_container_add(GTK_CONTAINER(tags_frames_frame),
> +                           tags_frames_hbox);
> +@@ -1122,7 +1122,7 @@ static void mp3_configure(void)
> +         gtk_box_pack_start(GTK_BOX(tags_vbox), tags_id3_frame, FALSE,
> +                            FALSE, 2);
> + 
> +-        tags_id3_vbox = gtk_vbox_new (FALSE, 5);
> ++        tags_id3_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(tags_id3_vbox), 5);
> +         gtk_container_add(GTK_CONTAINER(tags_id3_frame), tags_id3_vbox);
> + 
> +@@ -1134,7 +1134,7 @@ static void mp3_configure(void)
> +         g_signal_connect (tags_force_id3v2_toggle, "toggled", (GCallback)
> +          force_v2_toggle, nullptr);
> + 
> +-        tags_id3_hbox = gtk_hbox_new (FALSE, 5);
> ++        tags_id3_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_container_add(GTK_CONTAINER(tags_id3_vbox), tags_id3_hbox);
> + 
> +         tags_only_v1_toggle =
> +--- src/filewriter/vorbis.cc.old
> ++++ src/filewriter/
> vorbis.cc
> 
> +@@ -207,17 +207,17 @@ static void vorbis_configure(void)
> +         gtk_container_set_border_width(GTK_CONTAINER(quality_frame), 5);
> +         gtk_box_pack_start(GTK_BOX(vbox), quality_frame, FALSE, FALSE, 2);
> + 
> +-        quality_vbox = gtk_vbox_new (FALSE, 5);
> ++        quality_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(quality_vbox), 10);
> +         gtk_container_add(GTK_CONTAINER(quality_frame), quality_vbox);
> + 
> +         /* quality option: vbr level */
> +-        quality_hbox1 = gtk_hbox_new (FALSE, 5);
> ++        quality_hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
> +         gtk_container_set_border_width(GTK_CONTAINER(quality_hbox1), 10);
> +         gtk_container_add(GTK_CONTAINER(quality_vbox), quality_hbox1);
> + 
> +         quality_label = gtk_label_new(_("Quality level (0 - 10):"));
> +-        gtk_misc_set_alignment(GTK_MISC(quality_label), 0, 0.5);
> ++        gtk_widget_set_halign(quality_label, GTK_ALIGN_START);
> +         gtk_box_pack_start(GTK_BOX(quality_hbox1), quality_label, TRUE, TRUE, 0);
> + 
> +         quality_adj = (GtkAdjustment *) gtk_adjustment_new (5, 0, 10, 0.1, 1, 0);
> +--- src/gl-spectrum/gl-spectrum.cc.old
> ++++ src/gl-spectrum/
> gl-spectrum.cc
> 
> +@@ -246,7 +246,7 @@ static void draw_bars ()
> +     glPopMatrix ();
> + }
> + 
> +-static gboolean draw_cb (GtkWidget * widget)
> ++static gboolean draw_cb (GtkWidget * widget, cairo_t * cr)
> + {
> + #ifdef GDK_WINDOWING_X11
> +     if (! s_context)
> +@@ -415,7 +415,7 @@ void * GLSpectrum::get_gtk_widget ()
> + 
> +     s_widget = gtk_drawing_area_new ();
> + 
> +-    g_signal_connect (s_widget, "expose-event", (GCallback) draw_cb, nullptr);
> ++    g_signal_connect (s_widget, "draw", (GCallback) draw_cb, nullptr);
> +     g_signal_connect (s_widget, "realize", (GCallback) widget_realized, nullptr);
> +     g_signal_connect (s_widget, "destroy", (GCallback) widget_destroyed, nullptr);
> + 
> +--- src/gtkui/columns.cc.old
> ++++ src/gtkui/
> columns.cc
> 
> +@@ -294,7 +294,7 @@ void * pw_col_create_chooser ()
> +             avail.append (i, false);
> +     }
> + 
> +-    GtkWidget * hbox = gtk_hbox_new (false, 6);
> ++    GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> +     gtk_widget_set_size_request (hbox, -1, 160);
> + 
> +     GtkWidget * scroll = gtk_scrolled_window_new (nullptr, nullptr);
> +@@ -308,7 +308,7 @@ void * pw_col_create_chooser ()
> +     audgui_list_add_column (avail_list, _("Available columns"), 0, G_TYPE_STRING, -1);
> +     gtk_container_add ((GtkContainer *) scroll, avail_list);
> + 
> +-    GtkWidget * vbox = gtk_vbox_new (false, 6);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
> +     gtk_box_pack_start ((GtkBox *) hbox, vbox, false, false, 0);
> + 
> +     GtkWidget * button = gtk_button_new ();
> +--- src/gtkui/layout.cc.old
> ++++ src/gtkui/
> layout.cc
> 
> +@@ -97,8 +97,9 @@ static int item_by_name (Item * item, const char * name)
> + GtkWidget * layout_new ()
> + {
> +     g_return_val_if_fail (! layout, nullptr);
> +-    layout = gtk_alignment_new (0, 0, 1, 1);
> +-    gtk_alignment_set_padding ((GtkAlignment *) layout, 3, 3, 3, 3);
> ++    layout = gtk_frame_new (NULL);
> ++    gtk_frame_set_shadow_type ((GtkFrame *) layout, GTK_SHADOW_NONE);
> ++    gtk_container_set_border_width ((GtkContainer *) layout, 3);
> +     NULL_ON_DESTROY (layout);
> +     return layout;
> + }
> +@@ -187,7 +188,7 @@ static GtkWidget * vbox_new (GtkWidget * widget, const char * name)
> + {
> +     g_return_val_if_fail (widget && name, nullptr);
> + 
> +-    GtkWidget * vbox = gtk_vbox_new (false, 2);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
> + 
> +     GtkWidget * ebox = gtk_event_box_new ();
> +     gtk_box_pack_start ((GtkBox *) vbox, ebox, false, false, 0);
> +@@ -198,7 +199,7 @@ static GtkWidget * vbox_new (GtkWidget * widget, const char * name)
> +     char * markup = g_markup_printf_escaped ("<small><b>%s</b></small>", name);
> +     gtk_label_set_markup ((GtkLabel *) label, markup);
> +     g_free (markup);
> +-    gtk_misc_set_alignment ((GtkMisc *) label, 0, 0);
> ++    gtk_widget_set_halign (label, GTK_ALIGN_START);
> +     gtk_container_add ((GtkContainer *) ebox, label);
> + 
> +     gtk_box_pack_start ((GtkBox *) vbox, widget, true, true, 0);
> +@@ -229,10 +230,13 @@ static gboolean restore_size_cb (RestoreSizeData * d)
> + 
> + static GtkWidget * paned_new (bool vertical, bool after, int w, int h)
> + {
> +-    GtkWidget * paned = vertical ? gtk_vpaned_new () : gtk_hpaned_new ();
> ++    GtkWidget * paned = gtk_paned_new (vertical ? GTK_ORIENTATION_VERTICAL :
> ++     GTK_ORIENTATION_HORIZONTAL);
> + 
> +-    GtkWidget * mine = gtk_alignment_new (0, 0, 1, 1);
> +-    GtkWidget * next = gtk_alignment_new (0, 0, 1, 1);
> ++    GtkWidget * mine = gtk_frame_new (nullptr);
> ++    GtkWidget * next = gtk_frame_new (nullptr);
> ++    gtk_frame_set_shadow_type ((GtkFrame *) mine, GTK_SHADOW_NONE);
> ++    gtk_frame_set_shadow_type ((GtkFrame *) next, GTK_SHADOW_NONE);
> +     gtk_paned_pack1 ((GtkPaned *) paned, after ? next : mine, after, false);
> +     gtk_paned_pack2 ((GtkPaned *) paned, after ? mine : next, ! after, false);
> + 
> +--- src/gtkui/ui_gtk.cc.old
> ++++ src/gtkui/ui_gtk.cc
> +@@ -794,14 +794,16 @@ bool GtkUI::init ()
> +     accel = gtk_accel_group_new ();
> +     gtk_window_add_accel_group ((GtkWindow *) window, accel);
> + 
> +-    vbox_outer = gtk_vbox_new (false, 0);
> ++    vbox_outer = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
> +     gtk_container_add ((GtkContainer *) window, vbox_outer);
> + 
> +-    menu_box = gtk_hbox_new (false, 0);
> ++    menu_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
> +     gtk_box_pack_start ((GtkBox *) vbox_outer, menu_box, false, false, 0);
> + 
> +     toolbar = gtk_toolbar_new ();
> +     gtk_toolbar_set_style ((GtkToolbar *) toolbar, GTK_TOOLBAR_ICONS);
> ++    GtkStyleContext * context = gtk_widget_get_style_context (toolbar);
> ++    gtk_style_context_add_class (context, GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
> +     gtk_box_pack_start ((GtkBox *) vbox_outer, toolbar, false, false, 0);
> + 
> +     /* search button */
> +@@ -827,12 +829,13 @@ bool GtkUI::init ()
> +     gtk_tool_item_set_expand (boxitem1, true);
> +     gtk_toolbar_insert ((GtkToolbar *) toolbar, boxitem1, -1);
> + 
> +-    GtkWidget * box1 = gtk_hbox_new (false, 0);
> ++    GtkWidget * box1 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
> +     gtk_container_add ((GtkContainer *) boxitem1, box1);
> + 
> +-    slider = gtk_hscale_new (nullptr);
> ++    slider = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, nullptr);
> +     gtk_scale_set_draw_value ((GtkScale *) slider, false);
> +     gtk_widget_set_size_request (slider, 120, -1);
> ++    gtk_widget_set_valign (slider, GTK_ALIGN_CENTER);
> +     gtk_widget_set_can_focus (slider, false);
> +     gtk_box_pack_start ((GtkBox *) box1, slider, true, true, 6);
> + 
> +@@ -854,7 +857,7 @@ bool GtkUI::init ()
> +     GtkToolItem * boxitem2 = gtk_tool_item_new ();
> +     gtk_toolbar_insert ((GtkToolbar *) toolbar, boxitem2, -1);
> + 
> +-    GtkWidget * box2 = gtk_hbox_new (false, 0);
> ++    GtkWidget * box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
> +     gtk_container_add ((GtkContainer *) boxitem2, box2);
> + 
> +     volume = gtk_volume_button_new ();
> +@@ -874,7 +877,7 @@ bool GtkUI::init ()
> +     GtkWidget * layout = layout_new ();
> +     gtk_box_pack_start ((GtkBox *) vbox_outer, layout, true, true, 0);
> + 
> +-    vbox = gtk_vbox_new (false, 6);
> ++    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
> +     layout_add_center (vbox);
> + 
> +     ui_playlist_notebook_new ();
> +@@ -969,15 +972,13 @@ void GtkUI::cleanup ()
> + 
> + static void menu_position_cb (GtkMenu * menu, int * x, int * y, int * push, void * button)
> + {
> +-    GtkAllocation alloc;
> +     int xorig, yorig, xwin, ywin;
> + 
> +-    gtk_widget_get_allocation ((GtkWidget *) button, & alloc);
> +     gdk_window_get_origin (gtk_widget_get_window (window), & xorig, & yorig);
> +     gtk_widget_translate_coordinates ((GtkWidget *) button, window, 0, 0, & xwin, & ywin);
> + 
> +     * x = xorig + xwin;
> +-    * y = yorig + ywin + alloc.height;
> ++    * y = yorig + ywin + gtk_widget_get_allocated_height ((GtkWidget *) button);
> +     * push = true;
> + }
> + 
> +--- src/gtkui/ui_infoarea.cc.old
> ++++ src/gtkui/ui_infoarea.cc
> +@@ -232,12 +232,29 @@ static void hsv_to_rgb (float h, float s, float v, float * r, float * g,
> +     * b = v * (1 - s * (1 - * b));
> + }
> + 
> +-static void get_color (GtkWidget * widget, int i, float * r, float * g, float * b)
> ++static void get_color (int i, float * r, float * g, float * b)
> + {
> +-    GdkColor * c = (gtk_widget_get_style (widget))->base + GTK_STATE_SELECTED;
> +-    float h, s, v;
> ++    static GdkRGBA c;
> ++    static gboolean valid = FALSE;
> ++
> ++    if (! valid)
> ++    {
> ++        /* we want a color that matches the current theme
> ++         * selected color of a GtkEntry should be reasonable */
> ++        GtkStyleContext * style = gtk_style_context_new ();
> ++        GtkWidgetPath * path = gtk_widget_path_new ();
> ++        gtk_widget_path_append_type (path, GTK_TYPE_ENTRY);
> ++        gtk_style_context_set_path (style, path);
> ++        gtk_widget_path_free (path);
> ++        gtk_style_context_add_class (style, "entry");
> ++        gtk_style_context_get_background_color (style,
> ++         (GtkStateFlags) (GTK_STATE_FLAG_FOCUSED | GTK_STATE_FLAG_SELECTED), & c);
> ++        g_object_unref (style);
> ++        valid = TRUE;
> ++    }
> + 
> +-    rgb_to_hsv (c->red / 65535.0, c->green / 65535.0, c->blue / 65535.0, & h, & s, & v);
> ++    float h, s, v;
> ++    rgb_to_hsv (c.red, c.green, c.blue, & h, & s, & v);
> + 
> +     if (s < 0.1) /* monochrome theme? use blue instead */
> +     {
> +@@ -251,10 +268,8 @@ static void get_color (GtkWidget * widget, int i, float * r, float * g, float *
> +     hsv_to_rgb (h, s, v, r, g, b);
> + }
> + 
> +-static int expose_vis_cb (GtkWidget * widget, GdkEventExpose * event)
> ++static gboolean draw_vis_cb (GtkWidget * widget, cairo_t * cr)
> + {
> +-    cairo_t * cr = gdk_cairo_create (gtk_widget_get_window (widget));
> +-
> +     clear (widget, cr);
> + 
> +     for (int i = 0; i < VIS_BANDS; i++)
> +@@ -264,7 +279,7 @@ static int expose_vis_cb (GtkWidget * widget, GdkEventExpose * event)
> +         int m = aud::min (VIS_CENTER + vis.bars[i], HEIGHT);
> + 
> +         float r, g, b;
> +-        get_color (widget, i, & r, & g, & b);
> ++        get_color (i, & r, & g, & b);
> + 
> +         cairo_set_source_rgb (cr, r, g, b);
> +         cairo_rectangle (cr, x, t, 6, VIS_CENTER - t);
> +@@ -275,7 +290,6 @@ static int expose_vis_cb (GtkWidget * widget, GdkEventExpose * event)
> +         cairo_fill (cr);
> +     }
> + 
> +-    cairo_destroy (cr);
> +     return true;
> + }
> + 
> +@@ -326,16 +340,15 @@ static void draw_title (cairo_t * cr)
> +          0.7, 0.7, area->last_alpha, "9", area->last_album);
> + }
> + 
> +-static int expose_cb (GtkWidget * widget, GdkEventExpose * event)
> ++static gboolean draw_cb (GtkWidget * widget, cairo_t * cr)
> + {
> +-    cairo_t * cr = gdk_cairo_create (gtk_widget_get_window (widget));
> ++    g_return_val_if_fail (area, FALSE);
> + 
> +     clear (widget, cr);
> + 
> +     draw_album_art (cr);
> +     draw_title (cr);
> + 
> +-    cairo_destroy (cr);
> +     return true;
> + }
> + 
> +@@ -480,7 +493,7 @@ void ui_infoarea_show_vis (bool show)
> +         gtk_widget_set_size_request (vis.widget, VIS_WIDTH + 2 * SPACING, HEIGHT);
> +         gtk_box_pack_start ((GtkBox *) area->box, vis.widget, false, false, 0);
> + 
> +-        g_signal_connect (vis.widget, "expose-event", (GCallback) expose_vis_cb, nullptr);
> ++        g_signal_connect (vis.widget, "draw", (GCallback) draw_vis_cb, nullptr);
> +         gtk_widget_show (vis.widget);
> + 
> +         aud_visualizer_add (& vis);
> +@@ -530,13 +543,13 @@ GtkWidget * ui_infoarea_new ()
> +     g_return_val_if_fail (! area, nullptr);
> +     area = new UIInfoArea ();
> + 
> +-    area->box = gtk_hbox_new (false, 0);
> ++    area->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
> + 
> +     area->main = gtk_drawing_area_new ();
> +     gtk_widget_set_size_request (area->main, ICON_SIZE + 2 * SPACING, HEIGHT);
> +     gtk_box_pack_start ((GtkBox *) area->box, area->main, true, true, 0);
> + 
> +-    g_signal_connect (area->main, "expose-event", (GCallback) expose_cb, nullptr);
> ++    g_signal_connect (area->main, "draw", (GCallback) draw_cb, nullptr);
> + 
> +     hook_associate ("tuple change", (HookFunction) ui_infoarea_set_title, nullptr);
> +     hook_associate ("playback ready", (HookFunction) ui_infoarea_playback_start, nullptr);
> +--- src/gtkui/ui_playlist_notebook.cc.old
> ++++ src/gtkui/ui_playlist_notebook.cc
> +@@ -48,6 +48,7 @@ void apply_column_widths (GtkWidget * treeview)
> +     {
> +         GtkTreeViewColumn * col = gtk_tree_view_get_column ((GtkTreeView *) treeview, i);
> +         gtk_tree_view_column_set_fixed_width (col, pw_col_widths[pw_cols[i]]);
> ++        gtk_tree_view_column_set_expand (col, FALSE);
> +     }
> + }
> + 
> +@@ -110,14 +111,6 @@ static void close_button_cb (GtkWidget * button, void * id)
> +     audgui_confirm_playlist_delete (aud_playlist_by_unique_id (GPOINTER_TO_INT (id)));
> + }
> + 
> +-static void close_button_style_set (GtkWidget * button)
> +-{
> +-    int w, h;
> +-    gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (button),
> +-     GTK_ICON_SIZE_MENU, & w, & h);
> +-    gtk_widget_set_size_request (button, w + 2, h + 2);
> +-}
> +-
> + static GtkWidget * make_close_button (GtkWidget * ebox, int list)
> + {
> +     GtkWidget * button = gtk_button_new ();
> +@@ -130,19 +123,22 @@ static GtkWidget * make_close_button (GtkWidget * ebox, int list)
> +     g_signal_connect (button, "clicked", (GCallback) close_button_cb,
> +      GINT_TO_POINTER (aud_playlist_get_unique_id (list)));
> + 
> +-    gtk_rc_parse_string (
> +-     "style \"gtkui-tab-close-button-style\" {"
> +-     " GtkButton::default-border = {0, 0, 0, 0}"
> +-     " GtkButton::default-outside-border = {0, 0, 0, 0}"
> +-     " GtkButton::inner-border = {0, 0, 0, 0}"
> +-     " GtkWidget::focus-padding = 0"
> +-     " GtkWidget::focus-line-width = 0"
> +-     " xthickness = 0"
> +-     " ythickness = 0 }"
> +-     "widget \"*.gtkui-tab-close-button\" style \"gtkui-tab-close-button-style\""
> +-    );
> +-
> +-    g_signal_connect (button, "style-set", (GCallback) close_button_style_set, nullptr);
> ++    GtkCssProvider * provider = gtk_css_provider_new ();
> ++    gtk_css_provider_load_from_data (provider,
> ++     "#gtkui-tab-close-button {"
> ++     " -GtkButton-default-border: 0;"
> ++     " -GtkButton-default-outside-border: 0;"
> ++     " -GtkButton-inner-border: 0;"
> ++     " -GtkWidget-focus-padding: 0;"
> ++     " -GtkWidget-focus-line-width: 0;"
> ++     " margin: 0;"
> ++     " padding: 0; }",
> ++     -1, nullptr);
> ++
> ++    gtk_style_context_add_provider (gtk_widget_get_style_context (button),
> ++     GTK_STYLE_PROVIDER (provider),
> ++     GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
> ++    g_object_unref (provider);
> + 
> +     gtk_widget_show (button);
> + 
> +@@ -304,7 +300,7 @@ void ui_playlist_notebook_create_tab (int playlist)
> +     GtkWidget * ebox = gtk_event_box_new ();
> +     gtk_event_box_set_visible_window ((GtkEventBox *) ebox, false);
> + 
> +-    GtkWidget * hbox = gtk_hbox_new (false, 2);
> ++    GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
> + 
> +     GtkWidget * label = gtk_label_new ("");
> +     set_tab_label (playlist, (GtkLabel *) label);
> +--- src/gtkui/ui_statusbar.cc.old
> ++++ src/gtkui/ui_statusbar.cc
> +@@ -135,7 +135,7 @@ static void ui_statusbar_destroy_cb ()
> + 
> + GtkWidget * ui_statusbar_new ()
> + {
> +-    GtkWidget * hbox = gtk_hbox_new (false, 3);
> ++    GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
> +     GtkWidget * status = gtk_widget_new (GTK_TYPE_LABEL, "xalign", 0.0, nullptr);
> +     GtkWidget * length = gtk_widget_new (GTK_TYPE_LABEL, "xalign", 1.0, nullptr);
> + 
> +--- src/hotkey/gui.cc.old
> ++++ src/hotkey/
> gui.cc
> 
> +@@ -324,16 +324,18 @@ KeyControls* add_event_controls(KeyControls* list,
> +     }
> + 
> +     controls->combobox = gtk_combo_box_text_new();
> ++    gtk_widget_set_hexpand(controls->combobox, TRUE);
> +     for (i=0;i<EVENT_MAX;i++)
> +     {
> +         gtk_combo_box_text_append_text((GtkComboBoxText *) controls->combobox, _(event_desc[i]));
> +     }
> +     gtk_combo_box_set_active(GTK_COMBO_BOX(controls->combobox), controls->hotkey.event);
> +-    gtk_table_attach_defaults (GTK_TABLE (grid), controls->combobox, 0, 1, row, row + 1);
> ++    gtk_grid_attach (GTK_GRID (grid), controls->combobox, 0, row, 1, 1);
> + 
> + 
> +     controls->keytext = gtk_entry_new ();
> +-    gtk_table_attach_defaults (GTK_TABLE (grid), controls->keytext, 1, 2, row, row + 1);
> ++    gtk_widget_set_hexpand (controls->keytext, TRUE);
> ++    gtk_grid_attach (GTK_GRID (grid), controls->keytext, 1, row, 1, 1);
> +     gtk_editable_set_editable(GTK_EDITABLE(controls->keytext), FALSE);
> + 
> + 
> +@@ -351,7 +353,7 @@ KeyControls* add_event_controls(KeyControls* list,
> +     controls->button = gtk_button_new();
> +     gtk_button_set_image (GTK_BUTTON (controls->button),
> +      gtk_image_new_from_icon_name ("edit-delete", GTK_ICON_SIZE_BUTTON));
> +-    gtk_table_attach_defaults (GTK_TABLE (grid), controls->button, 2, 3, row, row + 1);
> ++    gtk_grid_attach (GTK_GRID (grid), controls->button, 2, row, 1, 1);
> +     g_signal_connect (G_OBJECT (controls->button), "clicked",
> +             G_CALLBACK (clear_keyboard), controls);
> + 
> +@@ -363,7 +365,6 @@ void *make_config_widget ()
> + {
> +     KeyControls *current_controls;
> +     GtkWidget *main_vbox, *hbox;
> +-    GtkWidget *alignment;
> +     GtkWidget *frame;
> +     GtkWidget *label;
> +     GtkWidget *image;
> +@@ -379,18 +380,15 @@ void *make_config_widget ()
> + 
> +     ungrab_keys();
> + 
> +-    main_vbox = gtk_vbox_new (FALSE, 4);
> ++    main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
> + 
> +-    alignment = gtk_alignment_new (0.5, 0.5, 1, 1);
> +-    gtk_box_pack_start (GTK_BOX (main_vbox), alignment, FALSE, TRUE, 0);
> +-    gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 4, 0, 0, 0);
> +-    hbox = gtk_hbox_new (FALSE, 2);
> +-    gtk_container_add (GTK_CONTAINER (alignment), hbox);
> ++    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
> ++    gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, TRUE, 0);
> +     image = gtk_image_new_from_icon_name ("dialog-information", GTK_ICON_SIZE_DIALOG);
> +     gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, TRUE, 0);
> +     label = gtk_label_new (_("Press a key combination inside a text field.\nYou can also bind mouse buttons."));
> +     gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
> +-    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
> ++    gtk_widget_set_halign (label, GTK_ALIGN_START);
> + 
> +     label = gtk_label_new (nullptr);
> +     gtk_label_set_markup (GTK_LABEL (label), _("Hotkeys:"));
> +@@ -398,27 +396,23 @@ void *make_config_widget ()
> +     gtk_frame_set_label_widget (GTK_FRAME (frame), label);
> +     gtk_box_pack_start (GTK_BOX (main_vbox), frame, TRUE, TRUE, 0);
> +     gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
> +-    alignment = gtk_alignment_new (0, 0, 1, 0);
> +-    gtk_container_add (GTK_CONTAINER (frame), alignment);
> +-    gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 3, 3, 3, 3);
> + 
> +-    grid = gtk_table_new (0, 0, FALSE);
> +-    gtk_table_set_col_spacings (GTK_TABLE (grid), 2);
> +-    gtk_container_add (GTK_CONTAINER (alignment), grid);
> ++    grid = gtk_grid_new ();
> ++    gtk_container_set_border_width (GTK_CONTAINER (grid), 3);
> ++    gtk_grid_set_column_spacing (GTK_GRID (grid), 2);
> ++    gtk_container_add (GTK_CONTAINER (frame), grid);
> + 
> +     label = gtk_label_new (nullptr);
> +     gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);
> +-    gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
> +     gtk_label_set_markup (GTK_LABEL (label),
> +             _("<b>Action:</b>"));
> +-    gtk_table_attach_defaults (GTK_TABLE (grid), label, 0, 1, 0, 1);
> ++    gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
> + 
> +     label = gtk_label_new (nullptr);
> +     gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);
> +-    gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
> +     gtk_label_set_markup (GTK_LABEL (label),
> +             _("<b>Key Binding:</b>"));
> +-    gtk_table_attach_defaults (GTK_TABLE (grid), label, 1, 2, 0, 1);
> ++    gtk_grid_attach (GTK_GRID (grid), label, 1, 0, 1, 1);
> + 
> + 
> +     hotkey = &(plugin_cfg->first);
> +@@ -457,10 +451,10 @@ void *make_config_widget ()
> +     add_event_controls(current_controls, grid, i, &temphotkey);
> + 
> + 
> +-    hbox = gtk_hbox_new (FALSE, 0);
> ++    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
> +     gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, TRUE, 0);
> + 
> +-    button_box = gtk_hbutton_box_new ();
> ++    button_box = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
> +     gtk_box_pack_start (GTK_BOX (hbox), button_box, FALSE, TRUE, 0);
> +     gtk_button_box_set_layout (GTK_BUTTON_BOX (button_box), GTK_BUTTONBOX_START);
> +     gtk_box_set_spacing (GTK_BOX (button_box), 4);
> +@@ -520,9 +514,9 @@ static void clear_keyboard (GtkWidget *widget, void * data)
> +             gtk_container_remove( GTK_CONTAINER(c->grid) , c->keytext);
> +             gtk_container_remove( GTK_CONTAINER(c->grid) , c->button);
> + 
> +-            gtk_table_attach_defaults (GTK_TABLE (c->grid), c->combobox, 0, 1, row, row + 1);
> +-            gtk_table_attach_defaults (GTK_TABLE (c->grid), c->keytext, 1, 2, row, row + 1);
> +-            gtk_table_attach_defaults (GTK_TABLE (c->grid), c->button, 2, 3, row, row + 1);
> ++            gtk_grid_attach (GTK_GRID (c->grid), c->combobox, 0, row, 1, 1);
> ++            gtk_grid_attach (GTK_GRID (c->grid), c->keytext, 1, row, 1, 1);
> ++            gtk_grid_attach (GTK_GRID (c->grid), c->button, 2, row, 1, 1);
> + 
> +             g_object_unref(c->combobox);
> +             g_object_unref(c->keytext);
> +--- src/ladspa/plugin.cc.old
> ++++ src/ladspa/
> plugin.cc
> 
> +@@ -33,6 +33,10 @@
> + 
> + #include "plugin.h"
> + 
> ++#if GTK_CHECK_VERSION (3, 12, 0)
> ++#define gtk_widget_set_margin_left gtk_widget_set_margin_start
> ++#endif
> ++
> + const char * const LADSPAHost::defaults[] = {
> +  "plugin_count", "0",
> +  nullptr};
> +@@ -423,7 +427,7 @@ static void configure_plugin (LoadedPlugin & loaded)
> +     {
> +         ControlData & control = plugin.controls[i];
> + 
> +-        GtkWidget * hbox = gtk_hbox_new (FALSE, 6);
> ++        GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> +         gtk_box_pack_start ((GtkBox *) vbox, hbox, 0, 0, 0);
> + 
> +         if (
> control.is
> _toggle)
> +@@ -469,10 +473,10 @@ static void configure_selected ()
> + 
> + static void * make_config_widget ()
> + {
> +-    GtkWidget * vbox = gtk_vbox_new (FALSE, 6);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
> +     gtk_widget_set_size_request (vbox, 480, 360);
> + 
> +-    GtkWidget * hbox = gtk_hbox_new (FALSE, 6);
> ++    GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> +     gtk_box_pack_start ((GtkBox *) vbox, hbox, 0, 0, 0);
> + 
> +     GtkWidget * label = gtk_label_new (_("Module paths:"));
> +@@ -483,17 +487,17 @@ static void * make_config_widget ()
> +      _("<small>Separate multiple paths with a colon.\n"
> +      "These paths are searched in addition to LADSPA_PATH.\n"
> +      "After adding new paths, press Enter to scan for new plugins.</small>"));
> +-    gtk_misc_set_padding ((GtkMisc *) label, 12, 6);
> +-    gtk_misc_set_alignment ((GtkMisc *) label, 0, 0);
> ++    gtk_widget_set_margin_left (label, 12);
> ++    gtk_widget_set_halign (label, GTK_ALIGN_START);
> +     gtk_box_pack_start ((GtkBox *) vbox, label, 0, 0, 0);
> + 
> +     GtkWidget * entry = gtk_entry_new ();
> +     gtk_box_pack_start ((GtkBox *) hbox, entry, 1, 1, 0);
> + 
> +-    hbox = gtk_hbox_new (FALSE, 6);
> ++    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> +     gtk_box_pack_start ((GtkBox *) vbox, hbox, 1, 1, 0);
> + 
> +-    GtkWidget * vbox2 = gtk_vbox_new (FALSE, 6);
> ++    GtkWidget * vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
> +     gtk_box_pack_start ((GtkBox *) hbox, vbox2, 1, 1, 0);
> + 
> +     label = gtk_label_new (_("Available plugins:"));
> +@@ -506,13 +510,13 @@ static void * make_config_widget ()
> +     plugin_list = create_plugin_list ();
> +     gtk_container_add ((GtkContainer *) scrolled, plugin_list);
> + 
> +-    GtkWidget * hbox2 = gtk_hbox_new (FALSE, 6);
> ++    GtkWidget * hbox2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> +     gtk_box_pack_start ((GtkBox *) vbox2, hbox2, 0, 0, 0);
> + 
> +     GtkWidget * enable_button = gtk_button_new_with_label (_("Enable"));
> +     gtk_box_pack_end ((GtkBox *) hbox2, enable_button, 0, 0, 0);
> + 
> +-    vbox2 = gtk_vbox_new (FALSE, 6);
> ++    vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
> +     gtk_box_pack_start ((GtkBox *) hbox, vbox2, 1, 1, 0);
> + 
> +     label = gtk_label_new (_("Enabled plugins:"));
> +@@ -525,7 +529,7 @@ static void * make_config_widget ()
> +     loaded_list = create_loaded_list ();
> +     gtk_container_add ((GtkContainer *) scrolled, loaded_list);
> + 
> +-    hbox2 = gtk_hbox_new (FALSE, 6);
> ++    hbox2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> +     gtk_box_pack_start ((GtkBox *) vbox2, hbox2, 0, 0, 0);
> + 
> +     GtkWidget * disable_button = gtk_button_new_with_label (_("Disable"));
> +--- src/lyricwiki/lyricwiki.cc.old
> ++++ src/lyricwiki/
> lyricwiki.cc
> 
> +@@ -296,7 +296,7 @@ static GtkWidget *build_widget(void)
> +     scrollview = gtk_scrolled_window_new(nullptr, nullptr);
> +     gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrollview), GTK_SHADOW_IN);
> +     gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollview), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
> +-    vbox = gtk_vbox_new (FALSE, 10);
> ++    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 10);
> + 
> +     gtk_container_add(GTK_CONTAINER(scrollview), textview);
> + 
> +--- src/playlist-manager/playlist-manager.cc.old
> ++++ src/playlist-manager/
> playlist-manager.cc
> 
> +@@ -218,7 +218,7 @@ static void destroy_cb (GtkWidget * window)
> + 
> + void * PlaylistManager::get_gtk_widget ()
> + {
> +-    GtkWidget * playman_vbox = gtk_vbox_new (false, 6);
> ++    GtkWidget * playman_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
> + 
> +     /* ListView */
> +     GtkWidget * playman_pl_lv = audgui_list_new (& callbacks, nullptr, aud_playlist_count ());
> +@@ -240,7 +240,7 @@ void * PlaylistManager::get_gtk_widget ()
> +     gtk_box_pack_start ((GtkBox *) playman_vbox, playman_pl_lv_sw, true, true, 0);
> + 
> +     /* ButtonBox */
> +-    GtkWidget * playman_button_hbox = gtk_hbox_new (false, 6);
> ++    GtkWidget * playman_button_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> +     GtkWidget * new_button = audgui_button_new (_("_New"), "document-new", new_cb, nullptr);
> +     GtkWidget * delete_button = audgui_button_new (_("_Remove"), "edit-delete", delete_cb, nullptr);
> +     GtkWidget * rename_button = audgui_button_new (_("Ren_ame"), "insert-text", rename_cb, nullptr);
> +--- src/scrobbler2/config_window.cc.old
> ++++ src/scrobbler2/config_window.cc
> +@@ -167,11 +167,11 @@ static void *config_status_checker () {
> +     GtkWidget *details_box;
> +     GtkWidget *additional_details_box;
> + 
> +-    config_box              = gtk_vbox_new (FALSE, 15);
> +-    permission_box          = gtk_hbox_new (FALSE, 0);
> +-    buttons_box             = gtk_vbutton_box_new ();
> +-    details_box             = gtk_vbox_new (FALSE, 0);
> +-    additional_details_box  = gtk_hbox_new (FALSE, 7);
> ++    config_box              = gtk_box_new(GTK_ORIENTATION_VERTICAL,  15);
> ++    permission_box          = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
> ++    buttons_box             = gtk_button_box_new(GTK_ORIENTATION_VERTICAL);
> ++    details_box             = gtk_box_new(GTK_ORIENTATION_VERTICAL,   0);
> ++    additional_details_box  = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 7);
> + 
> +     button                  = gtk_button_new_with_mnemonic(_("C_heck Permission"));
> +     revoke_button           = gtk_button_new_with_mnemonic(_("_Revoke Permission"));
> +@@ -183,6 +183,9 @@ static void *config_status_checker () {
> +     details_label_first  = gtk_label_new ("");
> +     url_button           = gtk_link_button_new("");
> +     details_label_second = gtk_label_new("");
> ++    gtk_widget_set_halign(details_label_first,  GTK_ALIGN_CENTER);
> ++    gtk_widget_set_halign(url_button,           GTK_ALIGN_CENTER);
> ++    gtk_widget_set_halign(details_label_second, GTK_ALIGN_CENTER);
> + 
> +     gtk_widget_hide(url_button);
> +     gtk_widget_set_no_show_all(url_button, TRUE);
> +--- src/search-tool/search-tool.cc.old
> ++++ src/search-tool/
> search-tool.cc
> 
> +@@ -677,11 +677,11 @@ static void refresh_cb (GtkButton * button, GtkWidget * chooser)
> + 
> + void * SearchTool::get_gtk_widget ()
> + {
> +-    GtkWidget * vbox = gtk_vbox_new (FALSE, 6);
> ++    GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
> + 
> +     entry = gtk_entry_new ();
> +     gtk_entry_set_icon_from_icon_name ((GtkEntry *) entry, GTK_ENTRY_ICON_PRIMARY, "edit-find");
> +-    (void) _("Search library");  // translated string is used in GTK3 branch
> ++    gtk_entry_set_placeholder_text ((GtkEntry *) entry, _("Search library"));
> +     g_signal_connect (entry, "destroy", (GCallback) gtk_widget_destroyed, & entry);
> +     gtk_box_pack_start ((GtkBox *) vbox, entry, FALSE, FALSE, 0);
> + 
> +@@ -717,7 +717,7 @@ void * SearchTool::get_gtk_widget ()
> +     gtk_widget_set_no_show_all (stats_label, TRUE);
> +     gtk_box_pack_start ((GtkBox *) vbox, stats_label, FALSE, FALSE, 0);
> + 
> +-    GtkWidget * hbox = gtk_hbox_new (FALSE, 6);
> ++    GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
> +     gtk_box_pack_end ((GtkBox *) vbox, hbox, FALSE, FALSE, 0);
> + 
> +     GtkWidget * chooser = gtk_file_chooser_button_new (_("Choose Folder"),
> +--- src/skins/draw-compat.h.old
> ++++ src/skins/draw-compat.h
> +@@ -27,22 +27,15 @@
> + static void widget_realized (GtkWidget * w)
> + {
> +     GdkWindow * window = gtk_widget_get_window (w);
> +-    gdk_window_set_back_pixmap (window, nullptr, FALSE);
> ++    gdk_window_set_background_pattern (window, nullptr);
> + }
> + 
> +-#define DRAW_SIGNAL "expose-event"
> +-#define DRAW_FUNC_BEGIN(n) static int n (GtkWidget * wid, GdkEventExpose * ev) { \
> +- cairo_t * cr = gdk_cairo_create (gtk_widget_get_window (wid));
> +-#define DRAW_FUNC_END cairo_destroy (cr); \
> +- return TRUE; }
> +-
> +-/* We set None as the background pixmap in order to avoid flickering.  Setting
> +- * a blank GtkStyle prevents GTK 2.x from overriding this. */
> ++#define DRAW_SIGNAL "draw"
> ++#define DRAW_FUNC_BEGIN(n) static gboolean n (GtkWidget * wid, cairo_t * cr) { \
> ++ g_return_val_if_fail (wid && cr, FALSE);
> ++#define DRAW_FUNC_END return FALSE; }
> + 
> + #define DRAW_CONNECT(w,f) do { \
> +-    GtkStyle * style = gtk_style_new (); \
> +-    gtk_widget_set_style (w, style); \
> +-    g_object_unref (style); \
> +     g_signal_connect (w, "realize", (GCallback) widget_realized, nullptr); \
> +     g_signal_connect (w, DRAW_SIGNAL, (GCallback) f, nullptr); \
> +  } while (0);
> +--- src/skins/menus.cc.old
> ++++ src/skins/
> menus.cc
> 
> +@@ -290,7 +290,7 @@ static void position_menu (GtkMenu * menu, int * x, int * y, gboolean * push_in,
> +     audgui_get_monitor_geometry (gtk_widget_get_screen ((GtkWidget *) menu), pos->x, pos->y, & geom);
> + 
> +     GtkRequisition request;
> +-    gtk_widget_size_request ((GtkWidget *) menu, & request);
> ++    gtk_widget_get_preferred_size ((GtkWidget *) menu, NULL, & request);
> + 
> +     if (pos->leftward)
> +         * x = aud::max (pos->x - request.width, geom.x);
> +--- src/skins/preset-list.cc.old
> ++++ src/skins/
> preset-list.cc
> 
> +@@ -259,7 +259,7 @@ static GtkWidget * equalizerwin_create_list_window
> + 
> +     audgui_destroy_on_escape (* window);
> + 
> +-    vbox = gtk_vbox_new (FALSE, 10);
> ++    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 10);
> +     gtk_container_add(GTK_CONTAINER(*window), vbox);
> + 
> +     scrolled_window = gtk_scrolled_window_new(nullptr, nullptr);
> +@@ -299,7 +299,7 @@ static GtkWidget * equalizerwin_create_list_window
> +         gtk_box_pack_start(GTK_BOX(vbox), *entry, FALSE, FALSE, 0);
> +     }
> + 
> +-    bbox = gtk_hbutton_box_new();
> ++    bbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
> +     gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
> +     gtk_box_set_spacing(GTK_BOX(bbox), 5);
> +     gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
> +--- src/skins/ui_playlist.cc.old
> ++++ src/skins/ui_playlist.cc
> +@@ -221,40 +221,45 @@ playlistwin_select_search(void)
> +       _("Cancel") , GTK_RESPONSE_REJECT , _("Search") , GTK_RESPONSE_ACCEPT , nullptr );
> + 
> +     /* help text and logo */
> +-    searchdlg_hbox = gtk_hbox_new (FALSE, 6);
> ++    searchdlg_hbox = gtk_box_new( GTK_ORIENTATION_HORIZONTAL , 4 );
> +     searchdlg_logo = gtk_image_new_from_icon_name( "edit-find" , GTK_ICON_SIZE_DIALOG );
> +     searchdlg_helptext = gtk_label_new( _("Select entries in playlist by filling one or more "
> +       "fields. Fields use regular expressions syntax, case-insensitive. If you don't know how "
> +       "regular expressions work, simply insert a literal portion of what you're searching for.") );
> ++    gtk_label_set_max_width_chars( GTK_LABEL(searchdlg_helptext), 70 );
> +     gtk_label_set_line_wrap( GTK_LABEL(searchdlg_helptext) , TRUE );
> +     gtk_box_pack_start( GTK_BOX(searchdlg_hbox) , searchdlg_logo , FALSE , FALSE , 0 );
> +     gtk_box_pack_start( GTK_BOX(searchdlg_hbox) , searchdlg_helptext , FALSE , FALSE , 0 );
> + 
> +     /* title */
> +     searchdlg_label_title = gtk_label_new( _("Title:") );
> +-    gtk_misc_set_alignment ((GtkMisc *) searchdlg_label_title, 1, 0.5);
> +     searchdlg_entry_title = gtk_entry_new();
> ++    gtk_widget_set_hexpand( searchdlg_entry_title , TRUE );
> ++    gtk_widget_set_halign( searchdlg_label_title , GTK_ALIGN_START );
> +     g_signal_connect( searchdlg_entry_title , "key-press-event" ,
> +       G_CALLBACK(playlistwin_select_search_kp_cb) , searchdlg_win );
> + 
> +     /* album */
> +     searchdlg_label_album= gtk_label_new( _("Album:") );
> +-    gtk_misc_set_alignment ((GtkMisc *) searchdlg_label_album, 1, 0.5);
> +     searchdlg_entry_album= gtk_entry_new();
> ++    gtk_widget_set_hexpand( searchdlg_entry_album , TRUE );
> ++    gtk_widget_set_halign( searchdlg_label_album , GTK_ALIGN_START );
> +     g_signal_connect( searchdlg_entry_album , "key-press-event" ,
> +       G_CALLBACK(playlistwin_select_search_kp_cb) , searchdlg_win );
> + 
> +     /* artist */
> +     searchdlg_label_performer = gtk_label_new( _("Artist:") );
> +-    gtk_misc_set_alignment ((GtkMisc *) searchdlg_label_performer, 1, 0.5);
> +     searchdlg_entry_performer = gtk_entry_new();
> ++    gtk_widget_set_hexpand( searchdlg_entry_performer , TRUE );
> ++    gtk_widget_set_halign( searchdlg_label_performer , GTK_ALIGN_START );
> +     g_signal_connect( searchdlg_entry_performer , "key-press-event" ,
> +       G_CALLBACK(playlistwin_select_search_kp_cb) , searchdlg_win );
> + 
> +     /* file name */
> +     searchdlg_label_file_name = gtk_label_new( _("File Name:") );
> +-    gtk_misc_set_alignment ((GtkMisc *) searchdlg_label_file_name, 1, 0.5);
> +     searchdlg_entry_file_name = gtk_entry_new();
> ++    gtk_widget_set_hexpand( searchdlg_entry_file_name , TRUE );
> ++    gtk_widget_set_halign( searchdlg_label_file_name , GTK_ALIGN_START );
> +     g_signal_connect( searchdlg_entry_file_name , "key-press-event" ,
> +       G_CALLBACK(playlistwin_select_search_kp_cb) , searchdlg_win );
> + 
> +@@ -274,21 +279,22 @@ playlistwin_select_search(void)
> +       G_CALLBACK(playlistwin_select_search_cbt_cb) , searchdlg_checkbt_autoenqueue );
> + 
> +     /* place fields in searchdlg_grid */
> +-    searchdlg_grid = gtk_table_new (0, 0, FALSE);
> +-    gtk_table_set_row_spacings (GTK_TABLE (searchdlg_grid), 6);
> +-    gtk_table_set_col_spacings (GTK_TABLE (searchdlg_grid), 6);
> +-    gtk_table_attach_defaults (GTK_TABLE (searchdlg_grid), searchdlg_hbox, 0, 2, 0, 1);
> +-    gtk_table_attach (GTK_TABLE (searchdlg_grid), searchdlg_label_title, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
> +-    gtk_table_attach_defaults (GTK_TABLE (searchdlg_grid), searchdlg_entry_title, 1, 2, 1, 2);
> +-    gtk_table_attach (GTK_TABLE (searchdlg_grid), searchdlg_label_album, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0);
> +-    gtk_table_attach_defaults (GTK_TABLE (searchdlg_grid), searchdlg_entry_album, 1, 2, 2, 3);
> +-    gtk_table_attach (GTK_TABLE (searchdlg_grid), searchdlg_label_performer, 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 0);
> +-    gtk_table_attach_defaults (GTK_TABLE (searchdlg_grid), searchdlg_entry_performer, 1, 2, 3, 4);
> +-    gtk_table_attach (GTK_TABLE (searchdlg_grid), searchdlg_label_file_name, 0, 1, 4, 5, GTK_FILL, GTK_FILL, 0, 0);
> +-    gtk_table_attach_defaults (GTK_TABLE (searchdlg_grid), searchdlg_entry_file_name, 1, 2, 4, 5);
> +-    gtk_table_attach_defaults (GTK_TABLE (searchdlg_grid), searchdlg_checkbt_clearprevsel, 0, 2, 5, 6);
> +-    gtk_table_attach_defaults (GTK_TABLE (searchdlg_grid), searchdlg_checkbt_autoenqueue, 0, 2, 6, 7);
> +-    gtk_table_attach_defaults (GTK_TABLE (searchdlg_grid), searchdlg_checkbt_newplaylist, 0, 2, 7, 8);
> ++    searchdlg_grid = gtk_grid_new();
> ++    gtk_grid_set_row_spacing( GTK_GRID(searchdlg_grid) , 2 );
> ++    gtk_widget_set_margin_bottom( searchdlg_hbox , 8 );
> ++    gtk_widget_set_margin_top( searchdlg_checkbt_clearprevsel , 8 );
> ++    gtk_grid_attach( GTK_GRID(searchdlg_grid) , searchdlg_hbox , 0 , 0 , 2 , 1 );
> ++    gtk_grid_attach( GTK_GRID(searchdlg_grid) , searchdlg_label_title , 0 , 1 , 1 , 1 );
> ++    gtk_grid_attach( GTK_GRID(searchdlg_grid) , searchdlg_entry_title , 1 , 1 , 1 , 1 );
> ++    gtk_grid_attach( GTK_GRID(searchdlg_grid) , searchdlg_label_album , 0 , 2 , 1 , 1 );
> ++    gtk_grid_attach( GTK_GRID(searchdlg_grid) , searchdlg_entry_album , 1 , 2 , 1 , 1 );
> ++    gtk_grid_attach( GTK_GRID(searchdlg_grid) , searchdlg_label_performer , 0 , 3 , 1 , 1 );
> ++    gtk_grid_attach( GTK_GRID(searchdlg_grid) , searchdlg_entry_performer , 1 , 3 , 1 , 1 );
> ++    gtk_grid_attach( GTK_GRID(searchdlg_grid) , searchdlg_label_file_name , 0 , 4 , 1 , 1 );
> ++    gtk_grid_attach( GTK_GRID(searchdlg_grid) , searchdlg_entry_file_name , 1 , 4 , 1 , 1 );
> ++    gtk_grid_attach( GTK_GRID(searchdlg_grid) , searchdlg_checkbt_clearprevsel , 0 , 5 , 2 , 1 );
> ++    gtk_grid_attach( GTK_GRID(searchdlg_grid) , searchdlg_checkbt_autoenqueue , 0 , 6 , 2 , 1 );
> ++    gtk_grid_attach( GTK_GRID(searchdlg_grid) , searchdlg_checkbt_newplaylist , 0 , 7 , 2 , 1 );
> + 
> +     gtk_container_set_border_width( GTK_CONTAINER(searchdlg_grid) , 5 );
> +     gtk_container_add ( GTK_CONTAINER(gtk_dialog_get_content_area
> +--- src/skins/ui_skin.cc.old
> ++++ src/skins/ui_skin.cc
> +@@ -517,7 +517,7 @@ skin_load_nolock(Skin * skin, const char * path, gboolean force)
> +         return FALSE;
> +     }
> + 
> +-    GdkRegion * masks[SKIN_MASK_COUNT];
> ++    cairo_region_t * masks[SKIN_MASK_COUNT];
> +     skin_load_masks (skin, skin_path, masks);
> +     window_set_shapes (mainwin, masks[SKIN_MASK_MAIN], masks[SKIN_MASK_MAIN_SHADE]);
> +     window_set_shapes (equalizerwin, masks[SKIN_MASK_EQ], masks[SKIN_MASK_EQ_SHADE]);
> +--- src/skins/ui_skin.h.old
> ++++ src/skins/ui_skin.h
> +@@ -198,7 +198,7 @@ void skin_draw_mainwin_titlebar (cairo_t * cr, gboolean shaded, gboolean focus);
> + /* ui_skin_load_ini.c */
> + void skin_load_hints (Skin * skin, const char * path);
> + void skin_load_pl_colors (Skin * skin, const char * path);
> +-void skin_load_masks (Skin * skin, const char * path, GdkRegion * masks[SKIN_MASK_COUNT]);
> ++void skin_load_masks (Skin * skin, const char * path, cairo_region_t * masks[SKIN_MASK_COUNT]);
> + 
> + static inline void set_cairo_color (cairo_t * cr, uint32_t c)
> + {
> +--- src/skins/ui_skin_load_ini.cc.old
> ++++ src/skins/ui_skin_load_ini.cc
> +@@ -248,7 +248,7 @@ private:
> +     }
> + };
> + 
> +-static GdkRegion * skin_create_mask (const GArray * num,
> ++static cairo_region_t * skin_create_mask (const GArray * num,
> +  const GArray * point, int width, int height)
> + {
> +     if (! num || ! point)
> +@@ -257,7 +257,7 @@ static GdkRegion * skin_create_mask (const GArray * num,
> +     width *= config.scale;
> +     height *= config.scale;
> + 
> +-    GdkRegion * mask = nullptr;
> ++    cairo_region_t * mask = nullptr;
> + 
> +     unsigned j = 0;
> +     for (unsigned i = 0; i < num->len; i ++)
> +@@ -281,12 +281,12 @@ static GdkRegion * skin_create_mask (const GArray * num,
> + 
> +         if (xmax > xmin && ymax > ymin)
> +         {
> +-            GdkRectangle rect = {xmin, ymin, xmax - xmin, ymax - ymin};
> ++            cairo_rectangle_int_t rect = {xmin, ymin, xmax - xmin, ymax - ymin};
> + 
> +             if (mask)
> +-                gdk_region_union_with_rect (mask, & rect);
> ++                cairo_region_union_rectangle (mask, & rect);
> +             else
> +-                mask = gdk_region_rectangle (& rect);
> ++                mask = cairo_region_create_rectangle (& rect);
> +         }
> + 
> +         j += n_points * 2;
> +@@ -295,7 +295,7 @@ static GdkRegion * skin_create_mask (const GArray * num,
> +     return mask;
> + }
> + 
> +-void skin_load_masks (Skin * skin, const char * path, GdkRegion * masks[SKIN_MASK_COUNT])
> ++void skin_load_masks (Skin * skin, const char * path, cairo_region_t * masks[SKIN_MASK_COUNT])
> + {
> +     int sizes[SKIN_MASK_COUNT][2] = {
> +         {skin->properties.mainwin_width, skin->properties.mainwin_height},
> +--- src/skins/ui_skinned_window.cc.old
> ++++ src/skins/ui_skinned_window.cc
> +@@ -27,7 +27,7 @@
> + typedef struct {
> +     void (* draw) (GtkWidget * window, cairo_t * cr);
> +     GtkWidget * normal, * shaded;
> +-    GdkRegion * shape, * sshape;
> ++    cairo_region_t * shape, * sshape;
> +     gboolean is_shaded, is_moving;
> + } WindowData;
> + 
> +@@ -43,7 +43,7 @@ static void window_apply_shape (GtkWidget * window)
> + {
> +     WindowData * data = (WindowData *) g_object_get_data ((GObject *) window, "windowdata");
> +     g_return_if_fail (data);
> +-    
> ++
> +     gdk_window_shape_combine_region (gtk_widget_get_window (window),
> +      data->is_shaded ? data->sshape : data->shape, 0, 0);
> + }
> +@@ -106,9 +106,9 @@ static void window_destroy (GtkWidget * window)
> +     g_object_unref (data->shaded);
> + 
> +     if (data->shape)
> +-        gdk_region_destroy (data->shape);
> ++        cairo_region_destroy (data->shape);
> +     if (data->sshape)
> +-        gdk_region_destroy (data->sshape);
> ++        cairo_region_destroy (data->sshape);
> + 
> +     g_free (data);
> + }
> +@@ -168,19 +168,19 @@ void window_set_size (GtkWidget * window, int w, int h)
> +     dock_set_size (window, w, h);
> + }
> + 
> +-void window_set_shapes (GtkWidget * window, GdkRegion * shape, GdkRegion * sshape)
> ++void window_set_shapes (GtkWidget * window, cairo_region_t * shape, cairo_region_t * sshape)
> + {
> +     WindowData * data = (WindowData *) g_object_get_data ((GObject *) window, "windowdata");
> +     g_return_if_fail (data);
> + 
> +     if (data->shape)
> +-        gdk_region_destroy (data->shape);
> ++        cairo_region_destroy (data->shape);
> +     if (data->sshape)
> +-        gdk_region_destroy (data->sshape);
> ++        cairo_region_destroy (data->sshape);
> + 
> +     data->shape = shape;
> +     data->sshape = sshape;
> +-    
> ++
> +     if (gtk_widget_get_realized (window))
> +         window_apply_shape (window);
> + }
> +@@ -205,7 +205,7 @@ void window_set_shaded (GtkWidget * window, gboolean shaded)
> +     }
> + 
> +     data->is_shaded = shaded;
> +-    
> ++
> +     if (gtk_widget_get_realized (window))
> +         window_apply_shape (window);
> + }
> +--- src/skins/ui_skinned_window.h.old
> ++++ src/skins/ui_skinned_window.h
> +@@ -27,7 +27,7 @@
> + GtkWidget * window_new (int * x, int * y, int w, int h, gboolean main,
> +  gboolean shaded, void (* draw) (GtkWidget * window, cairo_t * cr));
> + void window_set_size (GtkWidget * window, int w, int h);
> +-void window_set_shapes (GtkWidget * window, GdkRegion * shape, GdkRegion * sshape);
> ++void window_set_shapes (GtkWidget * window, cairo_region_t * shape, cairo_region_t * sshape);
> + void window_set_shaded (GtkWidget * window, gboolean shaded);
> + void window_put_widget (GtkWidget * window, gboolean shaded, GtkWidget * widget,
> +  int x, int y);
> +--- src/skins/ui_skinselector.cc.old
> ++++ src/skins/ui_skinselector.cc
> +@@ -339,6 +339,10 @@ skin_view_on_cursor_changed(GtkTreeView * treeview,
> + 
> +     selection = gtk_tree_view_get_selection(treeview);
> + 
> ++    /* workaround for Gnome bug #679291 */
> ++    if (! selection)
> ++        return;
> ++
> +     if (!gtk_tree_selection_get_selected(selection, &model, &iter))
> +         return;
> + 
> +@@ -366,7 +370,6 @@ skin_view_realize(GtkTreeView * treeview)
> + 
> +     gtk_widget_show_all(GTK_WIDGET(treeview));
> + 
> +-    gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(treeview), TRUE);
> +     gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), FALSE);
> + 
> +     store = gtk_list_store_new(SKIN_VIEW_N_COLS, GDK_TYPE_PIXBUF,
> +--- src/song_change/song_change.cc.old
> ++++ src/song_change/song_change.cc
> +@@ -334,7 +334,7 @@ static void * custom_warning (void)
> +     GtkWidget *bbox_hbox;
> +     char * temp;
> + 
> +-    bbox_hbox = gtk_hbox_new (FALSE, 6);
> ++    bbox_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
> + 
> +     cmd_warn_img = gtk_image_new_from_icon_name("dialog-warning", GTK_ICON_SIZE_MENU);
> +     gtk_box_pack_start(GTK_BOX(bbox_hbox), cmd_warn_img, FALSE, FALSE, 0);
> 
> _______________________________________________
> macports-changes mailing list
> macports-changes at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-changes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4109 bytes
Desc: not available
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20150418/9e965b19/attachment-0001.p7s>


More information about the macports-dev mailing list