[149187] trunk/dports/multimedia/audacious-plugins
ionic at macports.org
ionic at macports.org
Sat Jun 4 14:57:58 PDT 2016
Revision: 149187
https://trac.macports.org/changeset/149187
Author: ionic at macports.org
Date: 2016-06-04 14:57:58 -0700 (Sat, 04 Jun 2016)
Log Message:
-----------
audacious-plugins: update to 3.7.2 including patchset.
Modified Paths:
--------------
trunk/dports/multimedia/audacious-plugins/Portfile
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-buildsys.diff
trunk/dports/multimedia/audacious-plugins/files/patch-gtk3.diff
Modified: trunk/dports/multimedia/audacious-plugins/Portfile
===================================================================
--- trunk/dports/multimedia/audacious-plugins/Portfile 2016-06-04 21:57:47 UTC (rev 149186)
+++ trunk/dports/multimedia/audacious-plugins/Portfile 2016-06-04 21:57:58 UTC (rev 149187)
@@ -8,8 +8,8 @@
name audacious-plugins
# Please keep audacious, audacious-core and audacious-plugins synchronized.
-version 3.6.2
-revision 1
+version 3.7.2
+revision 0
# FIXME: probably more licenses involved here...
license BSD GPL-2+
@@ -28,8 +28,8 @@
master_sites http://distfiles.audacious-media-player.org
use_bzip2 yes
-checksums rmd160 5f1a6d8636b4be4239e1262768e2d7b271a6023d \
- sha256 e7798936249e1601177503d148a3dd59edd289579f3f1667351eb0ba463642e8
+checksums rmd160 d0786b32eb5e4ad2a724e0ffa0195e052d0bf41f \
+ sha256 fcf7488f01781c8f51e0af5cabacdd582b22537a0085f26aa5ca636373f8e1ff
universal_variant no
@@ -61,14 +61,10 @@
--disable-gtk \
--disable-qt \
--with-system-libxml2=no \
- --enable-xsf \
- --enable-psf \
- --enable-hotkey \
+ --disable-hotkey \
--enable-songchange \
--enable-neon \
- --enable-filewriter \
--enable-rpath \
- --enable-lyricwiki \
--disable-console \
--disable-qtaudio \
--disable-pulse \
@@ -81,7 +77,6 @@
--disable-aosd-xcomp \
--disable-notify \
--disable-mpris2 \
- --disable-adplug \
--disable-vorbis \
--disable-flacng \
--disable-wavpack \
@@ -108,10 +103,6 @@
--disable-soxr \
--disable-glspectrum \
--disable-qtglspectrum \
- --enable-vtx \
- --enable-ladspa \
- --enable-blur-scope \
- --enable-cairo-spectrum \
--disable-mac-media-keys
default_variants +full
@@ -144,6 +135,7 @@
}
variant dbus description {Adds support for GNOME shortcuts and remote control via DBUS} {
+ depends_build-append path:bin/gdbus-codegen:glib2
depends_lib-append path:lib/pkgconfig/dbus-1.pc:dbus \
path:lib/pkgconfig/dbus-glib-1.pc:dbus-glib
configure.args-replace --disable-gnomeshortcuts \
@@ -176,28 +168,32 @@
--enable-notify
}
-# libbinio not ported yet
-#variant adplug description {Adds support for various DOS game sounds} {
-# depends_lib-append port:libbinio
-# configure.args-replace --disable-adplug \
-# --enable-adplug
-#}
+variant filewriter description {Add support for the filewriter output plugin} {
+ configure.args-replace --disable-filewriter \
+ --enable-filewriter
+}
variant vorbis description {Add support for the OggVorbis audio codec} {
depends_lib-append port:libvorbis
depends_lib-append port:libogg
configure.args-replace --disable-vorbis \
--enable-vorbis
- configure.args-replace --disable-filewriter \
- --enable-filewriter
+
+ if {([variant_isset gtk2] || [variant_isset gtk3]) && [variant_isset filewriter]} {
+ configure.args-replace --disable-filewriter \
+ --enable-filewriter
+ }
}
variant flac description {Add support for FLAC: Free Lossless Audio Codec} {
depends_lib-append port:flac
- configure.args-replace --disable-filewriter_flac \
- --enable-filewriter_flac
configure.args-replace --disable-flacng \
--enable-flacng
+
+ if {([variant_isset gtk2] || [variant_isset gtk3]) && [variant_isset filewriter]} {
+ configure.args-replace --disable-filewriter_flac \
+ --enable-filewriter_flac
+ }
}
variant wavpack description {Add support for wavpack audio compression tools} {
@@ -236,9 +232,9 @@
--enable-jack
}
-# libsidplayfp not ported yet
+# libsidplayfp not ported yet.
#variant sid description {Build with SID (Commodore 64 Audio) support} {
-# depends_lib-append port:SIDPLAY
+# depends_lib-append port:libsidplayfp
# configure.args-replace --disable-sid \
# --enable-sid
#}
@@ -275,28 +271,29 @@
--enable-cue
}
-variant lame description {Add support for writing MP3 files} {
+variant lame requires filewriter description {Add support for writing MP3 files} {
depends_lib-append port:lame
configure.args-replace --disable-filewriter_mp3 \
--enable-filewriter_mp3
}
variant transform description {Add support for audio transformation, most notably resampling, pitching and speed control} {
- depends_lib-append port:libsamplerate
- # enable, if soxr gets ported
- # port:libsoxr
+ depends_lib-append port:libsamplerate \
+ port:soxr
configure.args-replace --disable-resample \
--enable-resample
configure.args-replace --disable-speedpitch \
--enable-speedpitch
- #configure.args-replace --disable-soxr \
- # --enable-soxr
+ configure.args-replace --disable-soxr \
+ --enable-soxr
}
variant opengl description {Add support for spectrum visualization via OpenGL} {
- depends_lib-append path:lib/libGL.dylib:mesa
- configure.args-replace --disable-glspectrum \
- --enable-glspectrum
+ if {[variant_isset gtk2] || [variant_isset gtk3]} {
+ depends_lib-append path:lib/libGL.dylib:mesa
+ configure.args-replace --disable-glspectrum \
+ --enable-glspectrum
+ }
}
variant sdl1 conflicts sdl2 description {Add SDL audio output via libsdl1} {
@@ -319,6 +316,8 @@
variant qt5 description {Add Qt5 support} {
PortGroup qt5 1.0
+ depends_lib-append port:qt5-qtmultimedia
+
configure.args-replace --disable-qt \
--enable-qt
@@ -342,6 +341,8 @@
configure.args-replace --disable-gtk \
--enable-gtk
+ configure.args-replace --disable-hotkey \
+ --enable-hotkey
}
variant gtk3 conflicts gtk2 description {Add GTK3 support} {
@@ -352,11 +353,12 @@
configure.args-replace --disable-gtk \
--enable-gtk
+ configure.args-replace --disable-hotkey \
+ --enable-hotkey
}
-variant full requires console mp3 dbus lirc osd osd_composite notifications \
- vorbis flac wavpack aac sndfile modplug midi cdaudio \
- lastfm mms cue lame transform opengl \
+variant full requires console mp3 dbus lirc wavpack aac sndfile modplug \
+ midi cdaudio mms cue lame flac transform opengl \
description {Build all plugins, except additional sound output plugins and potentially conflicting variants} {}
if {[variant_isset jack]} {
@@ -372,11 +374,46 @@
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]} {
+# Need either one of gtk2, gtk3 or Qt5 to have a GUI. Default to gtk2, which is preferred by upstream.
+if {![variant_isset gtk2] && ![variant_isset gtk3] && ![variant_isset qt5]} {
default_variants-append +gtk2
}
+# Add other variants to the "full" set if gtk2 or gtk3 have been enabled.
+if {[variant_isset full] && ([variant_isset gtk2] || [variant_isset gtk3])} {
+ default_variants-append +filewriter +osd +osd_composite +notifications +lastfm
+}
+
+# OSD only supported with gtk2 or gtk3.
+if {![variant_isset gtk2] && ![variant_isset gtk3] && ([variant_isset osd] || [variant_isset osd_composite])} {
+ ui_debug "The osd or osd_composite variants require either the gtk2 or gtk3 variants to be enabled."
+ error "+osd or +osd_composite require +gtk2 or +gtk3."
+}
+
+# Notifications only supported with gtk2 or gtk3.
+if {![variant_isset gtk2] && ![variant_isset gtk3] && [variant_isset notifications]} {
+ ui_debug "The notifications variant requires either the gtk2 or gtk3 variants to be enabled."
+ error "+notifications requires +gtk2 or +gtk3."
+}
+
+# LastFM/scrobbler2 only supported with gtk2 or gtk3.
+if {![variant_isset gtk2] && ![variant_isset gtk3] && [variant_isset lastfm]} {
+ ui_debug "The lastfm variant requires either the gtk2 or gtk3 variants to be enabled."
+ error "+lastfm requires +gtk2 or +gtk3."
+}
+
+# Filewriter only supported with gtk2 or gtk3.
+if {![variant_isset gtk2] && ![variant_isset gtk3] && [variant_isset filewriter]} {
+ ui_debug "The filewriter variant requires either the gtk2 or gtk3 variants to be enabled."
+ error "+filewriter requires +gtk2 or +gtk3."
+}
+
+# OpenGL only supported with gtk2, gtk3 or Qt5.
+if {![variant_isset gtk2] && ![variant_isset gtk3] && ![variant_isset qt5] && [variant_isset opengl]} {
+ ui_debug "The opengl variant requires either the gtk2, gtk3 or qt5 variants to be enabled."
+ error "+opengl requires +gtk2, +gtk3 or +qt5."
+}
+
livecheck.type regex
livecheck.url ${master_sites}
livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Modified: 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-acinclude.m4-drop-libc++-switch-from-gnu++11-to-c++11.diff 2016-06-04 21:57:47 UTC (rev 149186)
+++ trunk/dports/multimedia/audacious-plugins/files/patch-acinclude.m4-drop-libc++-switch-from-gnu++11-to-c++11.diff 2016-06-04 21:57:58 UTC (rev 149187)
@@ -2,14 +2,14 @@
+++ 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"
+ CFLAGS="$CFLAGS -std=gnu99 -ffast-math -Wall -pipe -Wno-deprecated-declarations"
if test "x$HAVE_DARWIN" = "xyes"; then
-- CXXFLAGS="$CXXFLAGS -stdlib=libc++ -std=gnu++11 -ffast-math -Wall -pipe"
+- CXXFLAGS="$CXXFLAGS -stdlib=libc++ -std=gnu++11 -ffast-math -Wall -pipe -Wno-deprecated-declarations"
- LDFLAGS="$LDFLAGS -lc++ -stdlib=libc++"
-+ CXXFLAGS="$CXXFLAGS -std=c++11 -ffast-math -Wall -pipe"
++ CXXFLAGS="$CXXFLAGS -std=c++11 -ffast-math -Wall -pipe -Wno-deprecated-declarations"
+ LDFLAGS="$LDFLAGS"
else
- CXXFLAGS="$CXXFLAGS -std=gnu++11 -ffast-math -Wall -pipe"
+ CXXFLAGS="$CXXFLAGS -std=gnu++11 -ffast-math -Wall -pipe -Wno-deprecated-declarations"
fi
@@ -101,7 +101,7 @@ if test "x$HAVE_DARWIN" = "xyes"; then
AC_PROG_OBJCXX
Modified: trunk/dports/multimedia/audacious-plugins/files/patch-buildsys.diff
===================================================================
--- trunk/dports/multimedia/audacious-plugins/files/patch-buildsys.diff 2016-06-04 21:57:47 UTC (rev 149186)
+++ trunk/dports/multimedia/audacious-plugins/files/patch-buildsys.diff 2016-06-04 21:57:58 UTC (rev 149187)
@@ -1,6 +1,21 @@
--- buildsys.mk.in.orig
+++ buildsys.mk.in
-@@ -107,19 +107,24 @@ PLUGIN_OBJS = ${OBJS:.o=.plugin.o}
+@@ -1,5 +1,5 @@
+ #
+-# Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012
++# Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
+ # Jonathan Schleifer <js at webkeks.org>
+ #
+ # https://webkeks.org/git/?p=buildsys.git
+@@ -45,6 +45,7 @@ OBJCFLAGS = @OBJCFLAGS@
+ OBJCXXFLAGS = @OBJCXXFLAGS@
+ LDFLAGS = @LDFLAGS@
+ LDFLAGS_RPATH = @LDFLAGS_RPATH@
++LDFLAGS_INSTALL_NAME = @LDFLAGS_INSTALL_NAME@
+ LIBS = @LIBS@
+ PYTHON_FLAGS = @PYTHON_FLAGS@
+ PROG_IMPLIB_NEEDED = @PROG_IMPLIB_NEEDED@
+@@ -107,19 +108,24 @@ PLUGIN_OBJS = ${OBJS:.o=.plugin.o}
MO_FILES = ${LOCALES:.po=.mo}
@@ -28,7 +43,7 @@
for i in $@; do \
${DIR_ENTER}; \
${MAKE} ${MFLAGS} || exit $$?; \
-@@ -205,6 +210,7 @@ pre-depend:
+@@ -205,6 +211,7 @@ pre-depend:
${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS} ${OBJS_EXTRA}
${LINK_STATUS}
@@ -36,7 +51,7 @@
if ${LD} -o $@ ${OBJS} ${OBJS_EXTRA} ${LDFLAGS} ${LIBS}; then \
${LINK_OK}; \
else \
-@@ -228,7 +234,8 @@ ${JARFILE}: ${EXT_DEPS} ${JAR_MANIFEST} ${OBJS} ${OBJS_EXTRA}
+@@ -228,7 +235,8 @@ ${JARFILE}: ${EXT_DEPS} ${JAR_MANIFEST} ${OBJS} ${OBJS_EXTRA}
fi
${SHARED_LIB} ${SHARED_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
@@ -46,7 +61,16 @@
objs=""; \
ars=""; \
for i in ${LIB_OBJS} ${LIB_OBJS_EXTRA}; do \
-@@ -264,6 +271,7 @@ ${SHARED_LIB} ${SHARED_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
+@@ -252,7 +260,7 @@ ${SHARED_LIB} ${SHARED_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
+ done; \
+ cd ..; \
+ done; \
+- if ${LD} -o $@ $$objs ${LIB_LDFLAGS} ${LDFLAGS} ${LIBS}; then \
++ if ${LD} -o $@ $$objs ${LIB_LDFLAGS} ${LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${LIBS}; then \
+ ${LINK_OK}; \
+ else \
+ ${LINK_FAILED}; \
+@@ -264,6 +272,7 @@ ${SHARED_LIB} ${SHARED_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
${PLUGIN} ${PLUGIN_NOINST}: ${EXT_DEPS} ${PLUGIN_OBJS}
${LINK_STATUS}
@@ -54,7 +78,7 @@
objs=""; \
ars=""; \
for i in ${PLUGIN_OBJS}; do \
-@@ -300,6 +308,7 @@ ${PLUGIN} ${PLUGIN_NOINST}: ${EXT_DEPS} ${PLUGIN_OBJS}
+@@ -300,6 +309,7 @@ ${PLUGIN} ${PLUGIN_NOINST}: ${EXT_DEPS} ${PLUGIN_OBJS}
${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS} ${OBJS_EXTRA}
${LINK_STATUS}
rm -f $@
@@ -62,7 +86,7 @@
objs=""; \
ars=""; \
for i in ${OBJS} ${OBJS_EXTRA}; do \
-@@ -337,6 +346,7 @@ ${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS} ${OBJS_EXTRA}
+@@ -337,6 +347,7 @@ ${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS} ${OBJS_EXTRA}
${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
${LINK_STATUS}
rm -f $@
@@ -70,61 +94,69 @@
objs=""; \
ars=""; \
for i in ${LIB_OBJS} ${LIB_OBJS_EXTRA}; do \
-@@ -375,6 +385,8 @@ locales: ${MO_FILES}
+@@ -375,21 +386,27 @@ locales: ${MO_FILES}
.c.o:
${COMPILE_STATUS}
+- if ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
++ if ${CC} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$@} -c -o $@ $<; then \
${COMPILE_OK}; \
else \
-@@ -382,6 +394,8 @@ locales: ${MO_FILES}
+ ${COMPILE_FAILED}; \
fi
.c.lib.o:
${COMPILE_LIB_STATUS}
+- if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
++ if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$@} -c -o $@ $<; then \
${COMPILE_LIB_OK}; \
else \
-@@ -389,6 +403,8 @@ locales: ${MO_FILES}
+ ${COMPILE_LIB_FAILED}; \
fi
.c.plugin.o:
${COMPILE_PLUGIN_STATUS}
+- if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
++ if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$@} -c -o $@ $<; then \
${COMPILE_PLUGIN_OK}; \
else \
-@@ -397,6 +413,8 @@ locales: ${MO_FILES}
+ ${COMPILE_PLUGIN_FAILED}; \
+@@ -397,21 +414,27 @@ locales: ${MO_FILES}
.cc.o .cxx.o:
${COMPILE_STATUS}
+- if ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
++ if ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$@} -c -o $@ $<; then \
${COMPILE_OK}; \
else \
-@@ -404,6 +422,8 @@ locales: ${MO_FILES}
+ ${COMPILE_FAILED}; \
fi
.cc.lib.o .cxx.lib.o:
${COMPILE_LIB_STATUS}
+- if ${CXX} ${LIB_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${CXX} ${LIB_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
++ if ${CXX} ${LIB_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$@} -c -o $@ $<; then \
${COMPILE_LIB_OK}; \
else \
-@@ -411,6 +431,8 @@ locales: ${MO_FILES}
+ ${COMPILE_LIB_FAILED}; \
fi
.cc.plugin.o .cxx.plugin.o:
${COMPILE_PLUGIN_STATUS}
+- if ${CXX} ${PLUGIN_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${CXX} ${PLUGIN_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
++ if ${CXX} ${PLUGIN_CFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${CXXFLAGS_$@} -c -o $@ $<; then \
${COMPILE_PLUGIN_OK}; \
else \
-@@ -419,6 +441,8 @@ locales: ${MO_FILES}
+ ${COMPILE_PLUGIN_FAILED}; \
+@@ -419,6 +442,8 @@ locales: ${MO_FILES}
.d.o:
${COMPILE_STATUS}
@@ -133,7 +165,7 @@
if test x"$(basename ${DC})" = x"dmd"; then \
if ${DC} ${DFLAGS} -c -of$@ $<; then \
${COMPILE_OK}; \
-@@ -435,6 +459,8 @@ locales: ${MO_FILES}
+@@ -435,6 +460,8 @@ locales: ${MO_FILES}
.erl.beam:
${COMPILE_STATUS}
@@ -142,7 +174,7 @@
if ${ERLC} ${ERLCFLAGS} -o $@ $<; then \
${COMPILE_OK}; \
else \
-@@ -443,6 +469,8 @@ locales: ${MO_FILES}
+@@ -443,6 +470,8 @@ locales: ${MO_FILES}
.java.class:
${COMPILE_STATUS}
@@ -151,61 +183,69 @@
if ${JAVAC} ${JAVACFLAGS} $<; then \
${COMPILE_OK}; \
else \
-@@ -451,6 +479,8 @@ locales: ${MO_FILES}
+@@ -451,21 +480,27 @@ locales: ${MO_FILES}
.m.o:
${COMPILE_STATUS}
+- if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
++ if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$@} -c -o $@ $<; then \
${COMPILE_OK}; \
else \
-@@ -458,6 +488,8 @@ locales: ${MO_FILES}
+ ${COMPILE_FAILED}; \
fi
.m.lib.o:
${COMPILE_LIB_STATUS}
+- if ${OBJC} ${LIB_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${OBJC} ${LIB_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
++ if ${OBJC} ${LIB_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$@} -c -o $@ $<; then \
${COMPILE_LIB_OK}; \
else \
-@@ -465,6 +497,8 @@ locales: ${MO_FILES}
+ ${COMPILE_LIB_FAILED}; \
fi
.m.plugin.o:
${COMPILE_PLUGIN_STATUS}
+- if ${OBJC} ${PLUGIN_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${OBJC} ${PLUGIN_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
++ if ${OBJC} ${PLUGIN_CFLAGS} ${OBJCFLAGS} ${CPPFLAGS} ${OBJCFLAGS_$@} -c -o $@ $<; then \
${COMPILE_PLUGIN_OK}; \
else \
-@@ -473,6 +507,8 @@ locales: ${MO_FILES}
+ ${COMPILE_PLUGIN_FAILED}; \
+@@ -473,21 +508,27 @@ locales: ${MO_FILES}
.mm.o:
${COMPILE_STATUS}
+- if ${OBJCXX} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${OBJCXX} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
++ if ${OBJCXX} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$@} -c -o $@ $<; then \
${COMPILE_OK}; \
else \
-@@ -480,6 +516,8 @@ locales: ${MO_FILES}
+ ${COMPILE_FAILED}; \
fi
.mm.lib.o:
${COMPILE_LIB_STATUS}
+- if ${OBJCXX} ${LIB_CFLAGS} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${OBJCXX} ${LIB_CFLAGS} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
++ if ${OBJCXX} ${LIB_CFLAGS} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$@} -c -o $@ $<; then \
${COMPILE_LIB_OK}; \
else \
-@@ -487,6 +525,8 @@ locales: ${MO_FILES}
+ ${COMPILE_LIB_FAILED}; \
fi
.mm.plugin.o:
${COMPILE_PLUGIN_STATUS}
+- if ${OBJCXX} ${PLUGIN_CFLAGS} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${OBJCXX} ${PLUGIN_CFLAGS} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
++ if ${OBJCXX} ${PLUGIN_CFLAGS} ${OBJCXXFLAGS} ${OBJCFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${OBJCXXFLAGS_$@} -c -o $@ $<; then \
${COMPILE_PLUGIN_OK}; \
else \
-@@ -495,6 +535,8 @@ locales: ${MO_FILES}
+ ${COMPILE_PLUGIN_FAILED}; \
+@@ -495,6 +536,8 @@ locales: ${MO_FILES}
.po.mo:
${COMPILE_STATUS}
@@ -214,7 +254,7 @@
if ${MSGFMT} -c -o $@ $<; then \
${COMPILE_OK}; \
else \
-@@ -503,6 +545,8 @@ locales: ${MO_FILES}
+@@ -503,6 +546,8 @@ locales: ${MO_FILES}
.py.pyc:
${COMPILE_STATUS}
@@ -223,7 +263,7 @@
if ${PYTHON} ${PYTHON_FLAGS} -c "import py_compile; py_compile.compile('$<')"; then \
${COMPILE_OK}; \
else \
-@@ -511,7 +555,9 @@ locales: ${MO_FILES}
+@@ -511,7 +556,9 @@ locales: ${MO_FILES}
.rc.o .rc.lib.o .rc.plugin.o:
${COMPILE_STATUS}
@@ -234,58 +274,65 @@
${COMPILE_OK}; \
else \
${COMPILE_FAILED}; \
-@@ -519,6 +565,8 @@ locales: ${MO_FILES}
+@@ -519,21 +566,27 @@ locales: ${MO_FILES}
.S.o:
${COMPILE_STATUS}
+- if ${AS} ${ASFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${AS} ${ASFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
++ if ${AS} ${ASFLAGS} ${CPPFLAGS} ${ASFLAGS_$@} -c -o $@ $<; then \
${COMPILE_OK}; \
else \
-@@ -526,6 +574,8 @@ locales: ${MO_FILES}
+ ${COMPILE_FAILED}; \
fi
.S.lib.o:
${COMPILE_LIB_STATUS}
+- if ${AS} ${LIB_CFLAGS} ${ASFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${AS} ${LIB_CFLAGS} ${ASFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
++ if ${AS} ${LIB_CFLAGS} ${ASFLAGS} ${CPPFLAGS} ${ASFLAGS_$@} -c -o $@ $<; then \
${COMPILE_LIB_OK}; \
else \
-@@ -533,6 +583,8 @@ locales: ${MO_FILES}
+ ${COMPILE_LIB_FAILED}; \
fi
.S.plugin.o:
${COMPILE_PLUGIN_STATUS}
+- if ${AS} ${PLUGIN_CFLAGS} ${ASFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${AS} ${PLUGIN_CFLAGS} ${ASFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
++ if ${AS} ${PLUGIN_CFLAGS} ${ASFLAGS} ${CPPFLAGS} ${ASFLAGS_$@} -c -o $@ $<; then \
${COMPILE_PLUGIN_OK}; \
else \
-@@ -541,6 +593,8 @@ locales: ${MO_FILES}
+ ${COMPILE_PLUGIN_FAILED}; \
+@@ -541,28 +594,34 @@ locales: ${MO_FILES}
.xpm.o:
${COMPILE_STATUS}
+- if ${CC} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${CC} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \
++ if ${CC} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$@} -x c -c -o $@ $<; then \
${COMPILE_OK}; \
else \
-@@ -548,6 +602,8 @@ locales: ${MO_FILES}
+ ${COMPILE_FAILED}; \
fi
.xpm.lib.o:
${COMPILE_LIB_STATUS}
+- if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \
++ if ${CC} ${LIB_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$@} -x c -c -o $@ $<; then \
${COMPILE_LIB_OK}; \
else \
-@@ -555,14 +611,16 @@ locales: ${MO_FILES}
+ ${COMPILE_LIB_FAILED}; \
fi
.xpm.plugin.o:
${COMPILE_PLUGIN_STATUS}
+- if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \
+ in="$<"; \
+ out="$@"; \
- if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \
++ if ${CC} ${PLUGIN_CFLAGS} ${CFLAGS} ${CPPFLAGS} ${CFLAGS_$@} -x c -c -o $@ $<; then \
${COMPILE_PLUGIN_OK}; \
else \
${COMPILE_PLUGIN_FAILED}; \
@@ -298,7 +345,7 @@
${DIR_ENTER}; \
${MAKE} ${MFLAGS} install || exit $$?; \
${DIR_LEAVE}; \
-@@ -643,7 +701,7 @@ install: install-extra
+@@ -643,7 +702,7 @@ install: install-extra
install-extra:
uninstall: uninstall-extra
@@ -307,7 +354,7 @@
${DIR_ENTER}; \
${MAKE} ${MFLAGS} uninstall || exit $$?; \
${DIR_LEAVE}; \
-@@ -736,7 +794,7 @@ uninstall: uninstall-extra
+@@ -736,7 +795,7 @@ uninstall: uninstall-extra
uninstall-extra:
clean:
@@ -316,7 +363,7 @@
${DIR_ENTER}; \
${MAKE} ${MFLAGS} clean || exit $$?; \
${DIR_LEAVE}; \
-@@ -753,7 +811,7 @@ clean:
+@@ -753,7 +812,7 @@ clean:
done
distclean: clean
@@ -325,7 +372,7 @@
${DIR_ENTER}; \
${MAKE} ${MFLAGS} distclean || exit $$?; \
${DIR_LEAVE}; \
-@@ -769,27 +827,39 @@ distclean: clean
+@@ -769,27 +828,39 @@ distclean: clean
fi \
done
@@ -340,7 +387,7 @@
+ done
+
+print-var:
-+ echo '${${VAR}}'
++ printf '%s\n' '${${VAR}}'
+
+DIR_ENTER = printf "@TERM_EL@@TERM_SETAF6 at Entering directory @TERM_BOLD@%s at TERM_SGR0@@TERM_SETAF6 at .@TERM_SGR0@\n" "$$i"; cd $$i || exit $$?
+DIR_LEAVE = printf "@TERM_EL@@TERM_SETAF6 at Leaving directory @TERM_BOLD@%s at TERM_SGR0@@TERM_SETAF6 at .@TERM_SGR0@\n" "$$i"; cd .. || exit $$?
@@ -383,23 +430,241 @@
+
+.CURDIR ?= .
+include ${.CURDIR}/.deps
+--- configure.ac.old
++++ configure.ac
+@@ -8,6 +8,8 @@ AC_PREREQ([2.59])
+ AC_INIT([audacious-plugins], [3.7.2])
+ AC_COPYRIGHT([Copyright (C) 2001-2016 Audacious developers and others])
+
++BUILDSYS_INIT
++
+ AC_DEFINE_UNQUOTED([PACKAGE], "$PACKAGE_NAME", [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], "$PACKAGE_VERSION", [Version number of package])
+
--- m4/buildsys.m4.orig
+++ m4/buildsys.m4
-@@ -108,13 +108,13 @@ AC_DEFUN([BUILDSYS_SHARED_LIB], [
+@@ -1,5 +1,5 @@
+ dnl
+-dnl Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012
++dnl Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
+ dnl Jonathan Schleifer <js at webkeks.org>
+ dnl
+ dnl https://webkeks.org/git/?p=buildsys.git
+@@ -21,65 +21,76 @@ dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ dnl POSSIBILITY OF SUCH DAMAGE.
+ dnl
+
+-AC_CONFIG_COMMANDS_PRE([
+- AC_SUBST(CC_DEPENDS, $GCC)
+- AC_SUBST(CXX_DEPENDS, $GXX)
+- AC_SUBST(OBJC_DEPENDS, $GOBJC)
+- AC_SUBST(OBJCXX_DEPENDS, $GOBJCXX)
++AC_DEFUN([BUILDSYS_INIT], [
++ AC_CONFIG_COMMANDS_PRE([
++ AC_SUBST(CC_DEPENDS, $GCC)
++ AC_SUBST(CXX_DEPENDS, $GXX)
++ AC_SUBST(OBJC_DEPENDS, $GOBJC)
++ AC_SUBST(OBJCXX_DEPENDS, $GOBJCXX)
+
+- AC_PATH_PROG(TPUT, tput)
++ AC_PATH_PROG(TPUT, tput)
+
+- AS_IF([test x"$TPUT" != x""], [
+- if x=$($TPUT el 2>/dev/null); then
+- AC_SUBST(TERM_EL, "$x")
+- else
+- AC_SUBST(TERM_EL, "$($TPUT ce 2>/dev/null)")
+- fi
++ AS_IF([test x"$TPUT" != x""], [
++ if x=$($TPUT el 2>/dev/null); then
++ AC_SUBST(TERM_EL, "$x")
++ else
++ AC_SUBST(TERM_EL, "$($TPUT ce 2>/dev/null)")
++ fi
+
+- if x=$($TPUT sgr0 2>/dev/null); then
+- AC_SUBST(TERM_SGR0, "$x")
+- else
+- AC_SUBST(TERM_SGR0, "$($TPUT me 2>/dev/null)")
+- fi
++ if x=$($TPUT sgr0 2>/dev/null); then
++ AC_SUBST(TERM_SGR0, "$x")
++ else
++ AC_SUBST(TERM_SGR0, "$($TPUT me 2>/dev/null)")
++ fi
+
+- if x=$($TPUT bold 2>/dev/null); then
+- AC_SUBST(TERM_BOLD, "$x")
+- else
+- AC_SUBST(TERM_BOLD, "$($TPUT md 2>/dev/null)")
+- fi
++ if x=$($TPUT bold 2>/dev/null); then
++ AC_SUBST(TERM_BOLD, "$x")
++ else
++ AC_SUBST(TERM_BOLD, "$($TPUT md 2>/dev/null)")
++ fi
+
+- if x=$($TPUT setaf 1 2>/dev/null); then
+- AC_SUBST(TERM_SETAF1, "$x")
+- AC_SUBST(TERM_SETAF2, "$($TPUT setaf 2 2>/dev/null)")
+- AC_SUBST(TERM_SETAF3, "$($TPUT setaf 3 2>/dev/null)")
+- AC_SUBST(TERM_SETAF4, "$($TPUT setaf 4 2>/dev/null)")
+- AC_SUBST(TERM_SETAF6, "$($TPUT setaf 6 2>/dev/null)")
+- else
+- AC_SUBST(TERM_SETAF1, "$($TPUT AF 1 2>/dev/null)")
+- AC_SUBST(TERM_SETAF2, "$($TPUT AF 2 2>/dev/null)")
+- AC_SUBST(TERM_SETAF3, "$($TPUT AF 3 2>/dev/null)")
+- AC_SUBST(TERM_SETAF4, "$($TPUT AF 4 2>/dev/null)")
+- AC_SUBST(TERM_SETAF6, "$($TPUT AF 6 2>/dev/null)")
+- fi
+- ], [
+- AC_SUBST(TERM_EL, '\033\133K')
+- AC_SUBST(TERM_SGR0, '\033\133m')
+- AC_SUBST(TERM_BOLD, '\033\1331m')
+- AC_SUBST(TERM_SETAF1, '\033\13331m')
+- AC_SUBST(TERM_SETAF2, '\033\13332m')
+- AC_SUBST(TERM_SETAF3, '\033\13333m')
+- AC_SUBST(TERM_SETAF4, '\033\13334m')
+- AC_SUBST(TERM_SETAF6, '\033\13336m')
++ if x=$($TPUT setaf 1 2>/dev/null); then
++ AC_SUBST(TERM_SETAF1, "$x")
++ AC_SUBST(TERM_SETAF2,
++ "$($TPUT setaf 2 2>/dev/null)")
++ AC_SUBST(TERM_SETAF3,
++ "$($TPUT setaf 3 2>/dev/null)")
++ AC_SUBST(TERM_SETAF4,
++ "$($TPUT setaf 4 2>/dev/null)")
++ AC_SUBST(TERM_SETAF6,
++ "$($TPUT setaf 6 2>/dev/null)")
++ else
++ AC_SUBST(TERM_SETAF1,
++ "$($TPUT AF 1 2>/dev/null)")
++ AC_SUBST(TERM_SETAF2,
++ "$($TPUT AF 2 2>/dev/null)")
++ AC_SUBST(TERM_SETAF3,
++ "$($TPUT AF 3 2>/dev/null)")
++ AC_SUBST(TERM_SETAF4,
++ "$($TPUT AF 4 2>/dev/null)")
++ AC_SUBST(TERM_SETAF6,
++ "$($TPUT AF 6 2>/dev/null)")
++ fi
++ ], [
++ AC_SUBST(TERM_EL, '\033\133K')
++ AC_SUBST(TERM_SGR0, '\033\133m')
++ AC_SUBST(TERM_BOLD, '\033\1331m')
++ AC_SUBST(TERM_SETAF1, '\033\13331m')
++ AC_SUBST(TERM_SETAF2, '\033\13332m')
++ AC_SUBST(TERM_SETAF3, '\033\13333m')
++ AC_SUBST(TERM_SETAF4, '\033\13334m')
++ AC_SUBST(TERM_SETAF6, '\033\13336m')
++ ])
+ ])
+-])
+
+-AC_CONFIG_COMMANDS_POST([
+- ${as_echo:="echo"} ${as_me:="configure"}": touching .deps files"
+- for i in $(find . -name Makefile); do
+- DEPSFILE="$(dirname $i)/.deps"
+- test -f "$DEPSFILE" && rm "$DEPSFILE"
+- touch -t 0001010000 "$DEPSFILE"
+- done
++ AC_CONFIG_COMMANDS_POST([
++ ${as_echo:="echo"} ${as_me:="configure"}": touching .deps files"
++ for i in $(find . -name Makefile); do
++ DEPSFILE="$(dirname $i)/.deps"
++ test -f "$DEPSFILE" && rm "$DEPSFILE"
++ touch -t 0001010000 "$DEPSFILE"
++ done
++ ])
+ ])
+
+ AC_DEFUN([BUILDSYS_PROG_IMPLIB], [
+@@ -108,31 +119,32 @@ AC_DEFUN([BUILDSYS_SHARED_LIB], [
case "$host_os" in
darwin*)
AC_MSG_RESULT(Darwin)
- 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_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}'
LIB_PREFIX='lib'
LIB_SUFFIX='.dylib'
LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
- PLUGIN_CFLAGS='-fPIC -DPIC -mmacosx-version-min=10.7'
- PLUGIN_LDFLAGS='-bundle -undefined dynamic_lookup -mmacosx-version-min=10.7'
++ LDFLAGS_INSTALL_NAME='-Wl,-install_name,${libdir}/$${out%.dylib}.${LIB_MAJOR}.dylib'
+ 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 && ${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=''
+ ;;
+- solaris*)
+- AC_MSG_RESULT(Solaris)
+- LIB_CFLAGS='-fPIC -DPIC'
+- LIB_LDFLAGS='-shared -Wl,-soname=${SHARED_LIB}.${LIB_MAJOR}.${LIB_MINOR}'
++ mingw* | cygwin*)
++ AC_MSG_RESULT(MinGW / Cygwin)
++ LIB_CFLAGS=''
++ LIB_LDFLAGS='-shared -Wl,--out-implib,${SHARED_LIB}.a'
+ LIB_PREFIX='lib'
+- LIB_SUFFIX='.so'
++ LIB_SUFFIX='.dll'
+ LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
+- PLUGIN_CFLAGS='-fPIC -DPIC'
++ PLUGIN_CFLAGS=''
+ PLUGIN_LDFLAGS='-shared'
+- PLUGIN_SUFFIX='.so'
+- INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR} && rm -f ${DESTDIR}${libdir}/$$i && ${LN_S} $$i.${LIB_MAJOR}.${LIB_MINOR} ${DESTDIR}${libdir}/$$i'
+- UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}'
+- CLEAN_LIB=''
++ PLUGIN_SUFFIX='.dll'
++ INSTALL_LIB='&& ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i && ${INSTALL} -m 755 $$i.a ${DESTDIR}${libdir}/$$i.a'
++ UNINSTALL_LIB='&& rm -f ${DESTDIR}${bindir}/$$i ${DESTDIR}${libdir}/$$i.a'
++ CLEAN_LIB='${SHARED_LIB}.a'
+ ;;
+ openbsd* | mirbsd*)
+ AC_MSG_RESULT(OpenBSD)
+@@ -148,22 +160,22 @@ AC_DEFUN([BUILDSYS_SHARED_LIB], [
+ UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i'
+ CLEAN_LIB=''
+ ;;
+- cygwin* | mingw*)
+- AC_MSG_RESULT(Win32)
+- LIB_CFLAGS=''
+- LIB_LDFLAGS='-shared -Wl,--out-implib,${SHARED_LIB}.a'
++ solaris*)
++ AC_MSG_RESULT(Solaris)
++ LIB_CFLAGS='-fPIC -DPIC'
++ LIB_LDFLAGS='-shared -Wl,-soname=${SHARED_LIB}.${LIB_MAJOR}.${LIB_MINOR}'
+ LIB_PREFIX='lib'
+- LIB_SUFFIX='.dll'
++ LIB_SUFFIX='.so'
+ LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
+- PLUGIN_CFLAGS=''
++ PLUGIN_CFLAGS='-fPIC -DPIC'
+ PLUGIN_LDFLAGS='-shared'
+- PLUGIN_SUFFIX='.dll'
+- INSTALL_LIB='&& ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i && ${INSTALL} -m 755 $$i.a ${DESTDIR}${libdir}/$$i.a'
+- UNINSTALL_LIB='&& rm -f ${DESTDIR}${bindir}/$$i ${DESTDIR}${libdir}/$$i.a'
+- CLEAN_LIB='${SHARED_LIB}.a'
++ PLUGIN_SUFFIX='.so'
++ INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR} && rm -f ${DESTDIR}${libdir}/$$i && ${LN_S} $$i.${LIB_MAJOR}.${LIB_MINOR} ${DESTDIR}${libdir}/$$i'
++ UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}'
++ CLEAN_LIB=''
+ ;;
+ *)
+- AC_MSG_RESULT(GNU)
++ AC_MSG_RESULT(ELF)
+ LIB_CFLAGS='-fPIC -DPIC'
+ LIB_LDFLAGS='-shared -Wl,-soname=${SHARED_LIB}.${LIB_MAJOR}'
+ LIB_PREFIX='lib'
+@@ -183,6 +195,7 @@ AC_DEFUN([BUILDSYS_SHARED_LIB], [
+ AC_SUBST(LIB_PREFIX)
+ AC_SUBST(LIB_SUFFIX)
+ AC_SUBST(LDFLAGS_RPATH)
++ AC_SUBST(LDFLAGS_INSTALL_NAME)
+ AC_SUBST(PLUGIN_CFLAGS)
+ AC_SUBST(PLUGIN_LDFLAGS)
+ AC_SUBST(PLUGIN_SUFFIX)
Modified: trunk/dports/multimedia/audacious-plugins/files/patch-gtk3.diff
===================================================================
--- trunk/dports/multimedia/audacious-plugins/files/patch-gtk3.diff 2016-06-04 21:57:47 UTC (rev 149186)
+++ trunk/dports/multimedia/audacious-plugins/files/patch-gtk3.diff 2016-06-04 21:57:58 UTC (rev 149187)
@@ -11,19 +11,19 @@
--- configure.ac.old
+++ configure.ac
-@@ -72,7 +72,7 @@ CONTAINER_PLUGINS="asx asx3 audpl m3u pls xspf"
- TRANSPORT_PLUGINS="gio"
+@@ -75,7 +75,7 @@ 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"
+ EFFECT_PLUGINS="$EFFECT_PLUGINS ladspa"
+- GENERAL_PLUGINS="$GENERAL_PLUGINS alarm albumart delete-files lyricwiki playlist-manager search-tool statusicon"
++ GENERAL_PLUGINS="$GENERAL_PLUGINS alarm albumart delete-files lyricwiki playlist-manager search-tool"
GENERAL_PLUGINS="$GENERAL_PLUGINS gtkui skins"
+ VISUALIZATION_PLUGINS="$VISUALIZATION_PLUGINS blur_scope cairo-spectrum"
fi
+@@ -194,11 +194,11 @@ if test $enable_hotkey = yes -a $USE_GTK != yes ; then
+ fi
-@@ -204,11 +204,11 @@ AC_ARG_ENABLE(hotkey,
-
- have_hotkey=no
- if test "x$enable_hotkey" != "xno"; then
+ if test $enable_hotkey != no -a $USE_GTK = yes ; then
- PKG_CHECK_MODULES(GDKX11, [gdk-x11-2.0],
+ PKG_CHECK_MODULES(GDKX11, [gdk-x11-3.0],
[have_hotkey="yes"
@@ -33,8 +33,8 @@
+ 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
+@@ -260,6 +260,21 @@ if test $enable_songchange != no ; then
)
fi
@@ -45,22 +45,26 @@
+ [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
++if test $have_statusicon = yes -a $USE_GTK != yes ; then
++ AC_MSG_ERROR([--enable-statusicon cannot be used without --enable-gtk])
++fi
++
++if test $have_statusicon != no ; 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"
+@@ -1112,7 +1127,7 @@ echo " Search Tool: $USE_GTK"
+ echo " Search Tool (Qt): $USE_QT"
echo " Song Change: $have_songchange"
+ echo " Song Info (Qt): $USE_QT"
-echo " Status Icon: $USE_GTK"
+echo " Status Icon: $have_statusicon"
+ echo " Status Icon (Qt): $USE_QT"
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 @@
@@ -68,25 +72,25 @@
#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)
++#define gtk_widget_set_margin_right gtk_widget_set_margin_end
+#endif
+
- const char *help[] =
- {
- N_("Time\n"
-@@ -169,62 +173,67 @@ GtkWidget *create_config_notebook (void)
+ static const char help_text[] =
+ N_("Time\n"
+ " Alarm at:\n"
+@@ -164,62 +168,67 @@ GtkWidget *create_config_notebook ()
/* Page 1 */
frame = gtk_frame_new (_("Time"));
- gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
-- grid = gtk_table_new (0, 0, FALSE);
+- 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_grid_set_row_homogeneous (GTK_GRID (grid), true);
+ gtk_container_set_border_width (GTK_CONTAINER (grid), 5);
label = gtk_label_new (_("Alarm at (default):"));
@@ -99,8 +103,8 @@
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_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);
@@ -113,8 +117,8 @@
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_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);
@@ -135,8 +139,8 @@
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_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);
@@ -150,8 +154,8 @@
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_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);
@@ -161,19 +165,19 @@
gtk_container_add (GTK_CONTAINER (frame), grid);
label = gtk_label_new (_("Time"));
-@@ -233,24 +242,25 @@ GtkWidget *create_config_notebook (void)
+@@ -228,24 +237,25 @@ GtkWidget *create_config_notebook ()
/* 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);
+- 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_grid_set_row_homogeneous (GTK_GRID (grid), true);
+ gtk_container_set_border_width (GTK_CONTAINER (grid), 5);
label = gtk_label_new (_("Day"));
@@ -186,19 +190,19 @@
for (i = 0; i < 7; i ++)
{
- widget[i] = gtk_check_button_new_with_label (weekdays[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_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);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget[6]), false);
-@@ -259,30 +269,31 @@ GtkWidget *create_config_notebook (void)
+@@ -254,30 +264,31 @@ GtkWidget *create_config_notebook ()
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_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);
@@ -233,12 +237,12 @@
}
label = gtk_label_new (_("Days"));
-@@ -291,110 +302,117 @@ GtkWidget *create_config_notebook (void)
+@@ -286,110 +297,117 @@ GtkWidget *create_config_notebook ()
/* Page 3 */
-- vbox = gtk_vbox_new (FALSE, 6);
-- hbox = gtk_hbox_new (FALSE, 6);
+- 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);
@@ -251,20 +255,20 @@
+ 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_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_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_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_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);
+- 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);
@@ -272,7 +276,7 @@
+ 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_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);
@@ -283,21 +287,21 @@
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_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_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);
+- 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);
++ 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_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);
@@ -308,11 +312,11 @@
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_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_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);
@@ -320,11 +324,11 @@
+ 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_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_box_pack_start (GTK_BOX (vbox), frame, false, false, 0);
+ gtk_container_add (GTK_CONTAINER (vbox), frame);
label = gtk_label_new (_("Volume"));
@@ -332,10 +336,10 @@
/* Page 4 */
-- vbox = gtk_vbox_new (FALSE, 6);
+- 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);
+- 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);
@@ -345,15 +349,15 @@
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_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_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);
+- 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);
@@ -365,15 +369,15 @@
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_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_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);
+- 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);
@@ -383,49 +387,49 @@
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_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_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)
+@@ -397,7 +415,7 @@ GtkWidget *create_config_notebook ()
/* 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);
+ 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)
+@@ -218,9 +218,8 @@ void * create_soundfont_list ()
g_strfreev (sffiles);
}
-- soundfont_file_hbox = gtk_hbox_new (FALSE, 2);
+- 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);
+- 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)
+@@ -243,7 +242,7 @@ void * create_soundfont_list ()
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_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,
+@@ -49,11 +49,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);
@@ -444,50 +448,50 @@
}
-@@ -139,7 +142,7 @@ void i_fileinfo_gui (const char * filename_uri, VFSFile & file)
+@@ -141,7 +144,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_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)
+@@ -153,13 +156,12 @@ void i_fileinfo_gui (const char * filename_uri, VFSFile & file)
/******************
*** TITLE LINE ***/
-- title_hbox = gtk_hbox_new (FALSE, 5);
+- 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);
+ 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);
+ 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)
+@@ -171,12 +173,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);
+ 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_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);
+ 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_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);
+ 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)
+@@ -185,10 +187,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_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);
@@ -498,25 +502,25 @@
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)
+@@ -225,7 +227,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_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);
+ 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)
+@@ -233,7 +235,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);
+ 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);
+ 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)
+@@ -297,7 +299,7 @@ void i_fileinfo_gui (const char * filename_uri, VFSFile & file)
/**************
*** FOOTER ***/
@@ -556,7 +560,7 @@
- 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_use_alpha (chooser, true);
- gtk_color_button_set_alpha (chooser, color->alpha);
+ GdkRGBA rgba = {
+ color->red / 65535.0,
@@ -565,7 +569,7 @@
+ color->alpha / 65535.0
+ };
+
-+ gtk_color_chooser_set_use_alpha (chooser, TRUE);
++ gtk_color_chooser_set_use_alpha (chooser, true);
+ gtk_color_chooser_set_rgba (chooser, & rgba);
}
@@ -586,24 +590,24 @@
cairo_fill ( cr );
- cairo_destroy (cr);
- return FALSE;
+ 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_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_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 );
+ 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_table_new (0, 0, false);
+ pos_placement_grid = gtk_grid_new();
for ( i = 0 ; i < 9 ; i++ )
{
@@ -620,15 +624,15 @@
+ 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 );
+ 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 );
+ 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 );
+- 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);
+- 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();
@@ -664,12 +668,12 @@
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 );
+ 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_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 );
@@ -678,20 +682,20 @@
aosd_ui_configure_animation_timing ( char * label_string )
{
GtkWidget *hbox, *desc_label, *spinbt;
-- hbox = gtk_hbox_new( FALSE , 4 );
+- 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 );
+ 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_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_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 );
@@ -699,15 +703,15 @@
@@ -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 );
+ 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 );
+ 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 );
@@ -737,12 +741,12 @@
GtkWidget *tex_font_shadow_colorbt[3];
int i = 0;
-- tex_vbox = gtk_vbox_new( FALSE , 4 );
+- 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_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 );
@@ -753,10 +757,10 @@
{
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_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 );
++ 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],
@@ -764,14 +768,14 @@
& 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 );
+ 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 );
+ 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]) ,
@@ -802,22 +806,22 @@
GtkWidget *dec_rstyleopts_frame, *dec_rstyleopts_grid;
int colors_max_num = 0, i = 0;
-- dec_hbox = gtk_hbox_new( FALSE , 4 );
+- 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 );
+ 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_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 );
+ 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_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 );
@@ -829,7 +833,7 @@
{
GtkWidget *hbox, *label;
char *label_str = nullptr;
-- hbox = gtk_hbox_new( FALSE , 4 );
+- 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 );
@@ -839,18 +843,18 @@
- 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_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 );
+ 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_hbox_new( false , 4 );
+ tri_hbox = gtk_box_new( GTK_ORIENTATION_HORIZONTAL , 4 );
gtk_container_set_border_width( GTK_CONTAINER(tri_hbox) , 6 );
@@ -859,60 +863,60 @@
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_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_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 );
+ 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 );
+ 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_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_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 );
+ 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_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 );
+ 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 );
+ 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:
+@@ -71,13 +71,14 @@ public:
private:
void resize (int w, int h);
@@ -928,7 +932,7 @@
GtkWidget * area = nullptr;
int width = 0, height = 0, stride = 0, image_size = 0;
-@@ -115,17 +116,22 @@ void BlurScope::resize (int w, int h)
+@@ -113,17 +114,22 @@ void BlurScope::resize (int w, int h)
corner = image + stride + 1;
}
@@ -956,8 +960,8 @@
cairo_destroy (cr);
}
-@@ -135,9 +141,9 @@ gboolean BlurScope::configure_event (GtkWidget * widget, GdkEventConfigure * eve
- return TRUE;
+@@ -133,9 +139,9 @@ gboolean BlurScope::configure_event (GtkWidget * widget, GdkEventConfigure * eve
+ return true;
}
-gboolean BlurScope::expose_event (GtkWidget * widget, GdkEventExpose * event, void * user)
@@ -965,19 +969,19 @@
{
- ((BlurScope *) user)->draw ();
+ ((BlurScope *) user)->draw_to_cairo (cr);
- return TRUE;
+ 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);
+@@ -143,7 +149,7 @@ void * BlurScope::get_gtk_widget ()
+ {
+ area = gtk_drawing_area_new ();
- 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)
+@@ -212,17 +218,25 @@ void BlurScope::render_mono_pcm (const float * pcm)
static void color_set_cb (GtkWidget * chooser)
{
@@ -993,12 +997,12 @@
+ bscope_color = (red << 16) | (green << 8) | blue;
}
- static void /* GtkWidget */ * bscope_get_color_chooser (void)
+ static void /* GtkWidget */ * bscope_get_color_chooser ()
{
- 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);
+- gtk_color_button_set_use_alpha ((GtkColorButton *) chooser, false);
+ GdkRGBA rgba = {
+ ((bscope_color & 0xff0000) >> 16) / 255.0,
+ ((bscope_color & 0xff00) >> 8) / 255.0,
@@ -1012,7 +1016,7 @@
--- 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 *
+@@ -184,12 +184,29 @@ static void hsv_to_rgb (float h, float s, float v, float * r, float * g, float *
* b = v * (1 - s * (1 - * b));
}
@@ -1022,7 +1026,7 @@
- GdkColor * c = (gtk_widget_get_style (widget))->base + GTK_STATE_SELECTED;
- float h, s, v;
+ static GdkRGBA c;
-+ static gboolean valid = FALSE;
++ 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);
@@ -1039,14 +1043,14 @@
+ gtk_style_context_get_background_color (style,
+ (GtkStateFlags) (GTK_STATE_FLAG_FOCUSED | GTK_STATE_FLAG_SELECTED), & c);
+ g_object_unref (style);
-+ valid = TRUE;
++ 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 *
+@@ -197,8 +214,9 @@ static void get_color (GtkWidget * widget, int i, float * r, float * g, float *
s = 0.75;
}
@@ -1058,7 +1062,7 @@
hsv_to_rgb (h, s, v, r, g, b);
}
-@@ -218,7 +236,7 @@ static void draw_visualizer (GtkWidget *widget, cairo_t *cr)
+@@ -219,7 +237,7 @@ static void draw_visualizer (GtkWidget *widget, cairo_t *cr)
int x = ((width / bands) * i) + 2;
float r, g, b;
@@ -1067,8 +1071,8 @@
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;
+@@ -240,14 +258,11 @@ static gboolean configure_event (GtkWidget * widget, GdkEventConfigure * event)
+ return true;
}
-static gboolean draw_event (GtkWidget * widget)
@@ -1080,10 +1084,10 @@
draw_visualizer (widget, cr);
- cairo_destroy (cr);
- return TRUE;
+ return true;
}
-@@ -255,7 +270,7 @@ void * CairoSpectrum::get_gtk_widget ()
+@@ -256,7 +271,7 @@ void * CairoSpectrum::get_gtk_widget ()
GtkWidget *area = gtk_drawing_area_new();
spect_widget = area;
@@ -1092,220 +1096,159 @@
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)
+@@ -563,10 +563,10 @@ void * mp3_configure ()
/* Quality */
-- quality_vbox = gtk_vbox_new (FALSE, 5);
+- 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_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);
+ 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);
+ /* Algorithm Quality */
+@@ -574,7 +574,7 @@ void * mp3_configure ()
+ alg_quality_frame = gtk_frame_new(_("Algorithm Quality:"));
+ gtk_box_pack_start(GTK_BOX(quality_hbox1), alg_quality_frame, true, true, 0);
-- alg_quality_hbox = gtk_hbox_new (FALSE, 5);
+- 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_set_border_width(GTK_CONTAINER(alg_quality_hbox), 5);
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);
+ alg_quality_hbox);
+@@ -594,7 +594,7 @@ void * mp3_configure ()
+ samplerate_frame = gtk_frame_new(_("Output Sample Rate:"));
+ gtk_box_pack_start(GTK_BOX(quality_hbox1), samplerate_frame, true, true, 0);
-- samplerate_hbox = gtk_hbox_new (FALSE, 5);
+- 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_set_border_width(GTK_CONTAINER(samplerate_hbox), 5);
gtk_container_add(GTK_CONTAINER(samplerate_frame),
samplerate_hbox);
-@@ -731,7 +731,7 @@ static void mp3_configure(void)
+@@ -619,7 +619,7 @@ void * mp3_configure ()
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);
+ gtk_box_pack_start(GTK_BOX(samplerate_hbox), samplerate_label, false, false, 0);
-@@ -744,14 +744,14 @@ static void mp3_configure(void)
- FALSE, 0);
+ /* Encoder Quality */
+@@ -628,14 +628,14 @@ void * mp3_configure ()
+ gtk_box_pack_start(GTK_BOX(quality_vbox), enc_quality_frame, false, false, 0);
// vbox sorrounding hbox1 and hbox2
-- enc_quality_vbox = gtk_vbox_new (FALSE, 5);
+- 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);
+ gtk_container_set_border_width(GTK_CONTAINER(enc_quality_vbox), 5);
// 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_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)
+@@ -664,7 +664,7 @@ void * mp3_configure ()
g_signal_connect (combo, "changed", (GCallback) bitrate_changed, nullptr);
// hbox2 for compression ratio
-- hbox2 = gtk_hbox_new (FALSE, 5);
+- 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);
+@@ -703,7 +703,7 @@ void * mp3_configure ()
+ mode_frame = gtk_frame_new(_("Audio Mode:"));
+ 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);
+- mode_hbox = gtk_hbox_new (false, 5);
++ mode_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
+ gtk_container_set_border_width(GTK_CONTAINER(mode_hbox), 5);
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);
+@@ -727,7 +727,7 @@ void * mp3_configure ()
+ misc_frame = gtk_frame_new(_("Miscellaneous:"));
+ gtk_box_pack_start(GTK_BOX(quality_vbox), misc_frame, false, false, 0);
-- misc_vbox = gtk_vbox_new (FALSE, 5);
+- 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)
+@@ -758,7 +758,7 @@ void * mp3_configure ()
/* VBR/ABR */
-- vbr_vbox = gtk_vbox_new (FALSE, 5);
+- 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);
+@@ -767,7 +767,7 @@ void * mp3_configure ()
+ gtk_box_pack_start(GTK_BOX(vbr_vbox), vbr_toggle, false, false, 0);
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);
+- vbr_options_vbox = gtk_vbox_new (false, 5);
++ vbr_options_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
gtk_container_add(GTK_CONTAINER(vbr_vbox), vbr_options_vbox);
- gtk_widget_set_sensitive(vbr_options_vbox, FALSE);
+ 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);
+@@ -776,7 +776,7 @@ void * mp3_configure ()
+ vbr_type_frame = gtk_frame_new(_("Type:"));
+ gtk_box_pack_start(GTK_BOX(vbr_options_vbox), vbr_type_frame, false, false, 0);
-- vbr_type_hbox = gtk_hbox_new (FALSE, 5);
+- 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);
+@@ -804,16 +804,16 @@ void * mp3_configure ()
+ vbr_frame = gtk_frame_new(_("VBR Options:"));
+ gtk_box_pack_start(GTK_BOX(vbr_options_vbox), vbr_frame, false, false, 0);
-- vbr_options_vbox2 = gtk_vbox_new (FALSE, 5);
+- 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_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_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);
+ gtk_box_pack_start(GTK_BOX(vbr_options_hbox1), vbr_min_label, false, false, 0);
-@@ -964,14 +964,14 @@ static void mp3_configure(void)
- 0);
+ combo = gtk_combo_box_text_new ();
+@@ -831,12 +831,12 @@ void * mp3_configure ()
+ gtk_box_pack_start ((GtkBox *) vbr_options_hbox1, combo, false, false, 0);
g_signal_connect (combo, "changed", (GCallback) vbr_min_changed, nullptr);
-- vbr_options_hbox2 = gtk_hbox_new (FALSE, 5);
+- 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);
+ gtk_box_pack_start(GTK_BOX(vbr_options_hbox2), vbr_max_label, false, false, 0);
-@@ -1010,12 +1010,12 @@ static void mp3_configure(void)
- FALSE, 2);
- gtk_widget_set_sensitive(abr_frame, FALSE);
+ combo = gtk_combo_box_text_new ();
+@@ -871,12 +871,12 @@ void * mp3_configure ()
+ gtk_box_pack_start(GTK_BOX(vbr_options_vbox), abr_frame, false, false, 0);
+ gtk_widget_set_sensitive(abr_frame, false);
-- abr_hbox = gtk_hbox_new (FALSE, 5);
+- 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);
@@ -1313,88 +1256,92 @@
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);
+ gtk_box_pack_start(GTK_BOX(abr_hbox), abr_label, false, false, 0);
combo = gtk_combo_box_text_new ();
-@@ -1035,14 +1035,14 @@ static void mp3_configure(void)
+@@ -896,12 +896,12 @@ void * mp3_configure ()
/* Quality Level */
-- vbr_options_hbox3 = gtk_hbox_new (FALSE, 5);
+- 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);
+ gtk_box_pack_start(GTK_BOX(vbr_options_hbox3), vbr_quality_label, false, false, 0);
-@@ -1077,7 +1077,7 @@ static void mp3_configure(void)
+ vbr_quality_adj = (GtkAdjustment *) gtk_adjustment_new (4, 0, 9, 1, 1, 0);
+@@ -933,7 +933,7 @@ void * mp3_configure ()
/* Tags */
-- tags_vbox = gtk_vbox_new (FALSE, 5);
+- 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);
+@@ -941,7 +941,7 @@ void * mp3_configure ()
+ tags_frames_frame = gtk_frame_new(_("Frame Parameters:"));
+ gtk_box_pack_start(GTK_BOX(tags_vbox), tags_frames_frame, false, false, 0);
-- tags_frames_hbox = gtk_hbox_new (FALSE, 5);
+- 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);
+@@ -972,7 +972,7 @@ void * mp3_configure ()
+ tags_id3_frame = gtk_frame_new(_("ID3 Parameters:"));
+ gtk_box_pack_start(GTK_BOX(tags_vbox), tags_id3_frame, false, false, 0);
-- tags_id3_vbox = gtk_vbox_new (FALSE, 5);
+- 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)
+@@ -983,7 +983,7 @@ void * mp3_configure ()
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_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);
+@@ -188,22 +188,22 @@ static void quality_change(GtkAdjustment *adjustment, void * user_data)
-- quality_vbox = gtk_vbox_new (FALSE, 5);
+ void * vorbis_configure ()
+ {
+- GtkWidget * vbox = gtk_vbox_new (false, 5);
++ GtkWidget * vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
+
+ /* quality options */
+ quality_frame = gtk_frame_new(_("Quality"));
+ gtk_box_pack_start(GTK_BOX(vbox), quality_frame, false, false, 0);
+
+- 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_set_border_width(GTK_CONTAINER(quality_vbox), 5);
gtk_container_add(GTK_CONTAINER(quality_frame), quality_vbox);
/* quality option: vbr level */
-- quality_hbox1 = gtk_hbox_new (FALSE, 5);
+- 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);
+ gtk_box_pack_start(GTK_BOX(quality_hbox1), quality_label, false, false, 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 ()
+@@ -245,7 +245,7 @@ static void draw_bars ()
glPopMatrix ();
}
@@ -1411,19 +1358,19 @@
+ 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);
-
+ g_signal_connect (s_widget, "configure-event", (GCallback) widget_resize, nullptr);
--- src/gtkui/columns.cc.old
+++ src/gtkui/columns.cc
-@@ -294,7 +294,7 @@ void * pw_col_create_chooser ()
+@@ -299,7 +299,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);
+ gtk_widget_set_size_request (hbox, -1, audgui_get_dpi () * 5 / 4);
GtkWidget * scroll = gtk_scrolled_window_new (nullptr, nullptr);
-@@ -308,7 +308,7 @@ void * pw_col_create_chooser ()
+@@ -313,7 +313,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);
@@ -1440,7 +1387,7 @@
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);
++ layout = gtk_frame_new (nullptr);
+ gtk_frame_set_shadow_type ((GtkFrame *) layout, GTK_SHADOW_NONE);
+ gtk_container_set_border_width ((GtkContainer *) layout, 3);
NULL_ON_DESTROY (layout);
@@ -1464,7 +1411,7 @@
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)
+@@ -228,10 +229,13 @@ static void restore_size_cb (GtkPaned * paned, GdkRectangle *, RestoreSizeData *
static GtkWidget * paned_new (bool vertical, bool after, int w, int h)
{
@@ -1483,7 +1430,7 @@
--- src/gtkui/ui_gtk.cc.old
+++ src/gtkui/ui_gtk.cc
-@@ -794,14 +794,16 @@ bool GtkUI::init ()
+@@ -781,15 +781,17 @@ bool GtkUI::init ()
accel = gtk_accel_group_new ();
gtk_window_add_accel_group ((GtkWindow *) window, accel);
@@ -1497,12 +1444,13 @@
toolbar = gtk_toolbar_new ();
gtk_toolbar_set_style ((GtkToolbar *) toolbar, GTK_TOOLBAR_ICONS);
+ gtk_toolbar_set_show_arrow ((GtkToolbar *) toolbar, false);
+ 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 ()
+@@ -817,12 +819,13 @@ bool GtkUI::init ()
gtk_tool_item_set_expand (boxitem1, true);
gtk_toolbar_insert ((GtkToolbar *) toolbar, boxitem1, -1);
@@ -1513,12 +1461,12 @@
- 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_size_request (slider, audgui_get_dpi () * 5 / 4, -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 ()
+@@ -844,7 +847,7 @@ bool GtkUI::init ()
GtkToolItem * boxitem2 = gtk_tool_item_new ();
gtk_toolbar_insert ((GtkToolbar *) toolbar, boxitem2, -1);
@@ -1527,7 +1475,7 @@
gtk_container_add ((GtkContainer *) boxitem2, box2);
volume = gtk_volume_button_new ();
-@@ -874,7 +877,7 @@ bool GtkUI::init ()
+@@ -864,7 +867,7 @@ bool GtkUI::init ()
GtkWidget * layout = layout_new ();
gtk_box_pack_start ((GtkBox *) vbox_outer, layout, true, true, 0);
@@ -1536,7 +1484,7 @@
layout_add_center (vbox);
ui_playlist_notebook_new ();
-@@ -969,15 +972,13 @@ void GtkUI::cleanup ()
+@@ -947,15 +950,13 @@ void GtkUI::cleanup ()
static void menu_position_cb (GtkMenu * menu, int * x, int * y, int * push, void * button)
{
@@ -1555,7 +1503,7 @@
--- 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,
+@@ -240,12 +240,29 @@ static void hsv_to_rgb (float h, float s, float v, float * r, float * g,
* b = v * (1 - s * (1 - * b));
}
@@ -1565,7 +1513,7 @@
- GdkColor * c = (gtk_widget_get_style (widget))->base + GTK_STATE_SELECTED;
- float h, s, v;
+ static GdkRGBA c;
-+ static gboolean valid = FALSE;
++ static gboolean valid = false;
+
+ if (! valid)
+ {
@@ -1580,7 +1528,7 @@
+ gtk_style_context_get_background_color (style,
+ (GtkStateFlags) (GTK_STATE_FLAG_FOCUSED | GTK_STATE_FLAG_SELECTED), & c);
+ g_object_unref (style);
-+ valid = TRUE;
++ valid = true;
+ }
- rgb_to_hsv (c->red / 65535.0, c->green / 65535.0, c->blue / 65535.0, & h, & s, & v);
@@ -1588,8 +1536,8 @@
+ 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 *
+ h = 5;
+@@ -256,10 +273,8 @@ static void get_color (GtkWidget * widget, int i, float * r, float * g, float *
hsv_to_rgb (h, s, v, r, g, b);
}
@@ -1601,16 +1549,16 @@
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);
+@@ -269,7 +284,7 @@ static int expose_vis_cb (GtkWidget * widget, GdkEventExpose * event)
+ int m = aud::min (VIS_CENTER + v, 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_rectangle (cr, x, VIS_CENTER - v, BAND_WIDTH, v);
+@@ -280,7 +295,6 @@ static int expose_vis_cb (GtkWidget * widget, GdkEventExpose * event)
cairo_fill (cr);
}
@@ -1618,7 +1566,7 @@
return true;
}
-@@ -326,16 +340,15 @@ static void draw_title (cairo_t * cr)
+@@ -335,16 +349,15 @@ static void draw_title (cairo_t * cr)
0.7, 0.7, area->last_alpha, "9", area->last_album);
}
@@ -1626,7 +1574,7 @@
+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);
++ g_return_val_if_fail (area, false);
clear (widget, cr);
@@ -1637,7 +1585,7 @@
return true;
}
-@@ -480,7 +493,7 @@ void ui_infoarea_show_vis (bool show)
+@@ -472,7 +485,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);
@@ -1646,15 +1594,15 @@
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 ();
+@@ -519,13 +532,13 @@ GtkWidget * ui_infoarea_new ()
+ compute_sizes ();
+ 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_widget_set_size_request (area->main, HEIGHT, HEIGHT);
gtk_box_pack_start ((GtkBox *) area->box, area->main, true, true, 0);
- g_signal_connect (area->main, "expose-event", (GCallback) expose_cb, nullptr);
@@ -1664,15 +1612,15 @@
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)
+@@ -47,6 +47,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);
++ gtk_tree_view_column_set_expand (col, false);
}
}
-@@ -110,14 +111,6 @@ static void close_button_cb (GtkWidget * button, void * id)
+@@ -103,14 +104,6 @@ static void close_button_cb (GtkWidget * button, void * id)
audgui_confirm_playlist_delete (aud_playlist_by_unique_id (GPOINTER_TO_INT (id)));
}
@@ -1687,7 +1635,7 @@
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)
+@@ -123,19 +116,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)));
@@ -1723,7 +1671,7 @@
gtk_widget_show (button);
-@@ -304,7 +300,7 @@ void ui_playlist_notebook_create_tab (int playlist)
+@@ -295,7 +291,7 @@ void ui_playlist_notebook_create_tab (int playlist)
GtkWidget * ebox = gtk_event_box_new ();
gtk_event_box_set_visible_window ((GtkEventBox *) ebox, false);
@@ -1749,7 +1697,7 @@
}
controls->combobox = gtk_combo_box_text_new();
-+ gtk_widget_set_hexpand(controls->combobox, TRUE);
++ 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]));
@@ -1761,9 +1709,9 @@
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_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);
+ gtk_editable_set_editable(GTK_EDITABLE(controls->keytext), false);
@@ -351,7 +353,7 @@ KeyControls* add_event_controls(KeyControls* list,
@@ -1787,20 +1735,20 @@
ungrab_keys();
-- main_vbox = gtk_vbox_new (FALSE, 4);
+- 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_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);
+- 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);
++ 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);
+ 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_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);
@@ -1808,13 +1756,13 @@
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_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);
+- 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 ();
@@ -1844,13 +1792,13 @@
add_event_controls(current_controls, grid, i, &temphotkey);
-- hbox = gtk_hbox_new (FALSE, 0);
+- 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);
+ 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_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)
@@ -1868,7 +1816,7 @@
g_object_unref(c->keytext);
--- src/ladspa/plugin.cc.old
+++ src/ladspa/plugin.cc
-@@ -33,6 +33,10 @@
+@@ -34,6 +34,10 @@
#include "plugin.h"
@@ -1879,29 +1827,29 @@
const char * const LADSPAHost::defaults[] = {
"plugin_count", "0",
nullptr};
-@@ -423,7 +427,7 @@ static void configure_plugin (LoadedPlugin & loaded)
+@@ -424,7 +428,7 @@ static void configure_plugin (LoadedPlugin & loaded)
{
ControlData & control = plugin.controls[i];
-- GtkWidget * hbox = gtk_hbox_new (FALSE, 6);
+- 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 ()
+@@ -472,10 +476,10 @@ static void * make_config_widget ()
{
-- GtkWidget * vbox = gtk_vbox_new (FALSE, 6);
+ int dpi = audgui_get_dpi ();
+
+- GtkWidget * vbox = gtk_vbox_new (false, 6);
+ GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
- gtk_widget_set_size_request (vbox, 480, 360);
+ gtk_widget_set_size_request (vbox, 5 * dpi, 4 * dpi);
-- GtkWidget * hbox = gtk_hbox_new (FALSE, 6);
+- 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 ()
+@@ -486,17 +490,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>"));
@@ -1914,54 +1862,63 @@
GtkWidget * entry = gtk_entry_new ();
gtk_box_pack_start ((GtkBox *) hbox, entry, 1, 1, 0);
-- hbox = gtk_hbox_new (FALSE, 6);
+- 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_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 ()
+@@ -509,13 +513,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_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_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 ()
+@@ -528,7 +532,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_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);
+@@ -339,7 +339,7 @@ static GtkWidget * build_widget ()
+ GtkWidget * scrollview = gtk_scrolled_window_new (nullptr, nullptr);
+ gtk_scrolled_window_set_shadow_type ((GtkScrolledWindow *) scrollview, GTK_SHADOW_IN);
+ gtk_scrolled_window_set_policy ((GtkScrolledWindow *) scrollview, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+- GtkWidget * vbox = gtk_vbox_new (false, 6);
++ GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
- gtk_container_add(GTK_CONTAINER(scrollview), textview);
+ gtk_container_add ((GtkContainer *) scrollview, (GtkWidget *) textview);
+ gtk_box_pack_start ((GtkBox *) vbox, scrollview, true, true, 0);
+@@ -350,7 +350,7 @@ static GtkWidget * build_widget ()
+ gtk_text_buffer_create_tag (textbuffer, "size_x_large", "scale", PANGO_SCALE_X_LARGE, nullptr);
+ gtk_text_buffer_create_tag (textbuffer, "style_italic", "style", PANGO_STYLE_ITALIC, 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);
+
+ edit_button = gtk_button_new_with_mnemonic (_("Edit lyrics ..."));
--- src/playlist-manager/playlist-manager.cc.old
+++ src/playlist-manager/playlist-manager.cc
-@@ -218,7 +218,7 @@ static void destroy_cb (GtkWidget * window)
+@@ -213,7 +213,7 @@ static void destroy_cb (GtkWidget * window)
void * PlaylistManager::get_gtk_widget ()
{
@@ -1970,26 +1927,26 @@
/* ListView */
GtkWidget * playman_pl_lv = audgui_list_new (& callbacks, nullptr, aud_playlist_count ());
-@@ -240,7 +240,7 @@ void * PlaylistManager::get_gtk_widget ()
+@@ -235,7 +235,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 * new_button = audgui_button_new (_("_New"), "document-new",
+ (AudguiCallback) aud_playlist_new, 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);
+- 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);
+- 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);
@@ -2007,14 +1964,14 @@
+ gtk_widget_set_halign(details_label_second, GTK_ALIGN_CENTER);
gtk_widget_hide(url_button);
- gtk_widget_set_no_show_all(url_button, TRUE);
+ 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)
+@@ -675,11 +675,11 @@ static void refresh_cb (GtkButton * button, GtkWidget * chooser)
void * SearchTool::get_gtk_widget ()
{
-- GtkWidget * vbox = gtk_vbox_new (FALSE, 6);
+- GtkWidget * vbox = gtk_vbox_new (false, 6);
+ GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
entry = gtk_entry_new ();
@@ -2022,341 +1979,318 @@
- (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);
+ 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);
+@@ -716,7 +716,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_hbox_new (false, 6);
+ GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
- gtk_box_pack_end ((GtkBox *) vbox, hbox, FALSE, FALSE, 0);
+ 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,
+@@ -319,7 +319,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);
++ gtk_widget_get_preferred_size ((GtkWidget *) menu, nullptr, & 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
+--- src/skins/search-select.cc.old
++++ src/skins/search-select.cc
+@@ -76,39 +76,43 @@ void action_playlist_search_and_select ()
+ _("Cancel"), GTK_RESPONSE_REJECT, _("Search"), GTK_RESPONSE_ACCEPT, nullptr);
- 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 );
+- GtkWidget * hbox = gtk_hbox_new (false, 6);
++ GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ GtkWidget * logo = gtk_image_new_from_icon_name ("edit-find", GTK_ICON_SIZE_DIALOG);
+ GtkWidget * 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 ((GtkLabel *) helptext, 70);
+ gtk_label_set_line_wrap ((GtkLabel *) helptext, true);
+ gtk_box_pack_start ((GtkBox *) hbox, logo, false, false, 0);
+ gtk_box_pack_start ((GtkBox *) hbox, 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 );
+ GtkWidget * label_title = gtk_label_new (_("Title:"));
+- gtk_misc_set_alignment ((GtkMisc *) label_title, 1, 0.5);
+ GtkWidget * entry_title = gtk_entry_new ();
++ gtk_widget_set_hexpand (entry_title, true);
++ gtk_widget_set_halign (label_title, GTK_ALIGN_START);
+ g_signal_connect (entry_title, "key-press-event", (GCallback) search_kp_cb, dialog);
/* 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 );
+ GtkWidget * label_album = gtk_label_new (_("Album:"));
+- gtk_misc_set_alignment ((GtkMisc *) label_album, 1, 0.5);
+ GtkWidget * entry_album = gtk_entry_new ();
++ gtk_widget_set_hexpand (entry_album, true);
++ gtk_widget_set_halign (label_album, GTK_ALIGN_START);
+ g_signal_connect (entry_album, "key-press-event", (GCallback) search_kp_cb, dialog);
/* 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 );
+ GtkWidget * label_performer = gtk_label_new (_("Artist:"));
+- gtk_misc_set_alignment ((GtkMisc *) label_performer, 1, 0.5);
+ GtkWidget * entry_performer = gtk_entry_new ();
++ gtk_widget_set_hexpand (entry_performer, true);
++ gtk_widget_set_halign (label_performer, GTK_ALIGN_START);
+ g_signal_connect (entry_performer, "key-press-event", (GCallback) search_kp_cb, dialog);
/* 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 );
+ GtkWidget * label_file_name = gtk_label_new (_("File Name:"));
+- gtk_misc_set_alignment ((GtkMisc *) label_file_name, 1, 0.5);
+ GtkWidget * entry_file_name = gtk_entry_new ();
+- g_signal_connect (entry_file_name, "key-press-event",
+- (GCallback) search_kp_cb, dialog);
++ gtk_widget_set_hexpand (entry_file_name, true);
++ gtk_widget_set_halign (label_file_name, GTK_ALIGN_START);
++ g_signal_connect (entry_file_name, "key-press-event", (GCallback) search_kp_cb, dialog);
-@@ -274,21 +279,22 @@ playlistwin_select_search(void)
- G_CALLBACK(playlistwin_select_search_cbt_cb) , searchdlg_checkbt_autoenqueue );
+ /* some options that control behaviour */
+ GtkWidget * checkbt_clearprevsel = gtk_check_button_new_with_label (
+@@ -127,21 +131,22 @@ void action_playlist_search_and_select ()
+ (GCallback) search_cbt_cb, 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 );
+ /* place fields in grid */
+- GtkTable * grid = (GtkTable *) gtk_table_new (0, 0, false);
+- gtk_table_set_row_spacings (grid, 6);
+- gtk_table_set_col_spacings (grid, 6);
+- gtk_table_attach_defaults (grid, hbox, 0, 2, 0, 1);
+- gtk_table_attach (grid, label_title, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
+- gtk_table_attach_defaults (grid, entry_title, 1, 2, 1, 2);
+- gtk_table_attach (grid, label_album, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0);
+- gtk_table_attach_defaults (grid, entry_album, 1, 2, 2, 3);
+- gtk_table_attach (grid, label_performer, 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 0);
+- gtk_table_attach_defaults (grid, entry_performer, 1, 2, 3, 4);
+- gtk_table_attach (grid, label_file_name, 0, 1, 4, 5, GTK_FILL, GTK_FILL, 0, 0);
+- gtk_table_attach_defaults (grid, entry_file_name, 1, 2, 4, 5);
+- gtk_table_attach_defaults (grid, checkbt_clearprevsel, 0, 2, 5, 6);
+- gtk_table_attach_defaults (grid, checkbt_autoenqueue, 0, 2, 6, 7);
+- gtk_table_attach_defaults (grid, checkbt_newplaylist, 0, 2, 7, 8);
++ GtkGrid * grid = (GtkGrid *) gtk_grid_new ();
++ gtk_grid_set_row_spacing (grid, 2);
++ gtk_widget_set_margin_bottom (hbox, 8);
++ gtk_widget_set_margin_top (checkbt_clearprevsel, 8);
++ gtk_grid_attach (grid, hbox, 0, 0, 2, 1);
++ gtk_grid_attach (grid, label_title, 0, 1, 1, 1);
++ gtk_grid_attach (grid, entry_title, 1, 1, 1, 1);
++ gtk_grid_attach (grid, label_album, 0, 2, 1, 1);
++ gtk_grid_attach (grid, entry_album, 1, 2, 1, 1);
++ gtk_grid_attach (grid, label_performer, 0, 3, 1, 1);
++ gtk_grid_attach (grid, entry_performer, 1, 3, 1, 1);
++ gtk_grid_attach (grid, label_file_name, 0, 4, 1, 1);
++ gtk_grid_attach (grid, entry_file_name, 1, 4, 1, 1);
++ gtk_grid_attach (grid, checkbt_clearprevsel, 0, 5, 2, 1);
++ gtk_grid_attach (grid, checkbt_autoenqueue, 0, 6, 2, 1);
++ gtk_grid_attach (grid, 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;
- }
+ gtk_container_set_border_width ((GtkContainer *) grid, 5);
+ gtk_container_add ((GtkContainer *) gtk_dialog_get_content_area
+--- src/skins/skinselector.cc.old
++++ src/skins/skinselector.cc
+@@ -190,6 +190,11 @@ static void skin_view_on_cursor_changed (GtkTreeView * treeview)
+ GtkTreeIter iter;
-- 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]);
+ auto 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;
- static inline void set_cairo_color (cairo_t * cr, uint32_t c)
+@@ -206,7 +211,6 @@ void skin_view_realize (GtkTreeView * treeview)
{
---- src/skins/ui_skin_load_ini.cc.old
-+++ src/skins/ui_skin_load_ini.cc
-@@ -248,7 +248,7 @@ private:
- }
- };
+ gtk_widget_show_all ((GtkWidget *) treeview);
--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;
+- gtk_tree_view_set_rules_hint (treeview, true);
+ gtk_tree_view_set_headers_visible (treeview, false);
-- GdkRegion * mask = nullptr;
-+ cairo_region_t * mask = nullptr;
+ GtkListStore * store = gtk_list_store_new (SKIN_VIEW_N_COLS, GDK_TYPE_PIXBUF,
+--- src/skins/view.cc.old
++++ src/skins/view.cc
+@@ -245,13 +245,13 @@ void view_apply_show_remaining ()
+ mainwin_update_song_info ();
+ }
- unsigned j = 0;
- for (unsigned i = 0; i < num->len; i ++)
-@@ -281,12 +281,12 @@ static GdkRegion * skin_create_mask (const GArray * num,
+-static GdkRegion * scale_mask (const Index<GdkRectangle> & mask, int scale)
++static cairo_region_t * scale_mask (const Index<GdkRectangle> & mask, int scale)
+ {
+- GdkRegion * region = nullptr;
++ cairo_region_t * region = nullptr;
- if (xmax > xmin && ymax > ymin)
- {
-- GdkRectangle rect = {xmin, ymin, xmax - xmin, ymax - ymin};
-+ cairo_rectangle_int_t rect = {xmin, ymin, xmax - xmin, ymax - ymin};
+ for (auto & rect : mask)
+ {
+- GdkRectangle scaled = {
++ cairo_rectangle_int_t scaled = {
+ rect.x * scale,
+ rect.y * scale,
+ rect.width * scale,
+@@ -259,9 +259,9 @@ static GdkRegion * scale_mask (const Index<GdkRectangle> & mask, int scale)
+ };
- 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);
- }
+ if (region)
+- gdk_region_union_with_rect (region, & scaled);
++ cairo_region_union_rectangle (region, & scaled);
+ else
+- region = gdk_region_rectangle (& scaled);
++ region = cairo_region_create_rectangle (& scaled);
+ }
- 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])
+ return region;
+--- src/skins/widget.cc.old
++++ src/skins/widget.cc
+@@ -55,7 +55,7 @@ void Widget::set_drawable (GtkWidget * widget)
{
- 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;
+ m_drawable = widget;
+ g_signal_connect (widget, "realize", (GCallback) Widget::realize_cb, this);
+- g_signal_connect (widget, "expose-event", (GCallback) Widget::draw_cb, this);
++ g_signal_connect (widget, "draw", (GCallback) Widget::draw_cb, this);
-@@ -43,7 +43,7 @@ static void window_apply_shape (GtkWidget * window)
+ if (! m_widget)
+ {
+@@ -98,28 +98,30 @@ void Widget::add_drawable (int width, int height)
+
+ void Widget::draw_now ()
{
- WindowData * data = (WindowData *) g_object_get_data ((GObject *) window, "windowdata");
- g_return_if_fail (data);
--
+- if (m_drawable && gtk_widget_is_drawable (m_drawable))
+- draw_cb (m_drawable, nullptr, this);
+-}
++ if (! m_drawable || ! gtk_widget_is_drawable (m_drawable))
++ return;
+
+-gboolean Widget::draw_cb (GtkWidget * widget, GdkEventExpose * event, Widget * me)
+-{
+- cairo_t * cr = gdk_cairo_create (gtk_widget_get_window (widget));
++ cairo_t * cr = gdk_cairo_create (gtk_widget_get_window (m_drawable));
+
+- if (! gtk_widget_get_has_window (widget))
++ if (! gtk_widget_get_has_window (m_drawable))
+ {
+ GtkAllocation alloc;
+- gtk_widget_get_allocation (widget, & alloc);
++ gtk_widget_get_allocation (m_drawable, & alloc);
+ cairo_translate (cr, alloc.x, alloc.y);
+ cairo_rectangle (cr, 0, 0, alloc.width, alloc.height);
+ cairo_clip (cr);
+ }
+
++ draw_cb (m_drawable, cr, this);
+
- gdk_window_shape_combine_region (gtk_widget_get_window (window),
- data->is_shaded ? data->sshape : data->shape, 0, 0);
++ cairo_destroy (cr);
++}
++
++gboolean Widget::draw_cb (GtkWidget * widget, cairo_t * cr, Widget * me)
++{
+ if (me->m_scale != 1)
+ cairo_scale (cr, me->m_scale, me->m_scale);
+
+ me->draw (cr);
+-
+- cairo_destroy (cr);
+ return false;
}
-@@ -106,9 +106,9 @@ static void window_destroy (GtkWidget * window)
- g_object_unref (data->shaded);
+--- src/skins/widget.h.old
++++ src/skins/widget.h
+@@ -68,7 +68,7 @@ private:
+ static void realize_cb (GtkWidget * widget, Widget * me)
+ { me->realize (); }
- 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);
+- static gboolean draw_cb (GtkWidget * widget, GdkEventExpose * event, Widget * me);
++ static gboolean draw_cb (GtkWidget * widget, cairo_t * cr, Widget * me);
- g_free (data);
- }
-@@ -168,19 +168,19 @@ void window_set_size (GtkWidget * window, int w, int h)
- dock_set_size (window, w, h);
- }
+ static gboolean keypress_cb (GtkWidget * widget, GdkEventKey * event, Widget * me)
+ { return me->keypress (event); }
+--- src/skins/window.cc.old
++++ src/skins/window.cc
+@@ -33,7 +33,6 @@ void Window::apply_shape ()
--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::realize ()
{
- WindowData * data = (WindowData *) g_object_get_data ((GObject *) window, "windowdata");
- g_return_if_fail (data);
+- gdk_window_set_back_pixmap (gtk_widget_get_window (gtk ()), nullptr, false);
+ apply_shape ();
+ }
- 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);
+@@ -44,11 +43,11 @@ bool Window::button_press (GdkEventButton * event)
+ return false;
- 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)
- }
+ if (m_is_moving)
+- return true;
++ return false;
- data->is_shaded = shaded;
--
-+
- if (gtk_widget_get_realized (window))
- window_apply_shape (window);
+ dock_move_start (m_id, event->x_root, event->y_root);
+ m_is_moving = true;
+- return true;
++ return false;
}
---- 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);
+ bool Window::button_release (GdkEventButton * event)
+@@ -57,16 +56,16 @@ bool Window::button_release (GdkEventButton * event)
+ return false;
-+ /* workaround for Gnome bug #679291 */
-+ if (! selection)
-+ return;
-+
- if (!gtk_tree_selection_get_selected(selection, &model, &iter))
- return;
+ m_is_moving = false;
+- return true;
++ return false;
+ }
-@@ -366,7 +370,6 @@ skin_view_realize(GtkTreeView * treeview)
+ bool Window::motion (GdkEventMotion * event)
+ {
+ if (! m_is_moving)
+- return true;
++ return false;
- gtk_widget_show_all(GTK_WIDGET(treeview));
+ dock_move (event->x_root, event->y_root);
+- return true;
++ return false;
+ }
-- gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(treeview), TRUE);
- gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), FALSE);
+ bool Window::close ()
+@@ -108,12 +107,6 @@ Window::Window (int id, int * x, int * y, int w, int h, bool shaded) :
+ GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_SCROLL_MASK);
+ gtk_window_add_accel_group ((GtkWindow *) window, menu_get_accel_group ());
- 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;
+- /* We set None as the background pixmap in order to avoid flickering.
+- * Setting a blank GtkStyle prevents GTK 2.x from overriding this. */
+- GtkStyle * style = gtk_style_new ();
+- gtk_widget_set_style (window, style);
+- g_object_unref (style);
+-
+ set_input (window);
+ set_drawable (window);
+ set_scale (config.scale);
+@@ -144,7 +137,7 @@ void Window::resize (int w, int h)
+ dock_set_size (m_id, w, h);
+ }
-- bbox_hbox = gtk_hbox_new (FALSE, 6);
-+ bbox_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
+-void Window::set_shapes (GdkRegion * shape, GdkRegion * sshape)
++void Window::set_shapes (cairo_region_t * shape, cairo_region_t * sshape)
+ {
+ m_shape.capture (shape);
+ m_sshape.capture (sshape);
+--- src/skins/window.h.old
++++ src/skins/window.h
+@@ -40,7 +40,7 @@ public:
+ ~Window ();
- 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);
+ void resize (int w, int h);
+- void set_shapes (GdkRegion * shape, GdkRegion * sshape);
++ void set_shapes (cairo_region_t * shape, cairo_region_t * sshape);
+ bool is_shaded () { return m_is_shaded; }
+ void set_shaded (bool shaded);
+ void put_widget (bool shaded, Widget * widget, int x, int y);
+@@ -68,7 +68,7 @@ private:
+ bool m_is_shaded = false;
+ bool m_is_moving = false;
+ GtkWidget * m_normal = nullptr, * m_shaded = nullptr;
+- SmartPtr<GdkRegion, gdk_region_destroy> m_shape, m_sshape;
++ SmartPtr<cairo_region_t, cairo_region_destroy> m_shape, m_sshape;
+ };
+
+ void dock_add_window (int id, Window * window, int * x, int * y, int w, int h);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160604/0fdf43d1/attachment-0001.html>
More information about the macports-changes
mailing list