diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ef67bf4..82dcd9b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -52,7 +52,7 @@ jobs: - name: Build app run: | - sudo apt-get update && sudo apt-get install -y libglib2.0-dev ghostscript man jq libgtk2.0-dev + sudo apt-get update && sudo apt-get install -y libglib2.0-dev ghostscript man jq libgtk-3-dev ./configure --with-werror nproc && make -j$(nproc) env: diff --git a/.github/workflows/make-dist.sh b/.github/workflows/make-dist.sh index 2a64e8f..04b5f2f 100755 --- a/.github/workflows/make-dist.sh +++ b/.github/workflows/make-dist.sh @@ -27,12 +27,6 @@ echo "appimage is <$archive>" mkdir -p dist/locale cp -vr locale/*/ dist/locale/ if [ "$os" != "linux64" ]; then - if [ "$GUI" = 1 ]; then - mkdir -p dist/share/themes dist/lib/gtk-2.0 - cp -vr $MINGW_PREFIX/share/themes/MS-Windows dist/share/themes/ - cp -vr $MINGW_PREFIX/lib/gtk-2.0/* dist/lib/gtk-2.0/ - rm -rf dist/lib/gtk-2.0/include - fi mkdir -p dist/lib ntldd -R dvdisaster for i in $(ntldd -R dvdisaster | awk '/mingw/ {print $3}' | tr \\\\ / | grep -Eo '[^/]+$') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f95431..907de31 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: if: matrix.ui == 'gui' env: HOMEBREW_NO_INSTALL_CLEANUP: 1 - run: brew install gtk+ + run: brew install gtk+3 - name: configure run: | set +x @@ -82,7 +82,7 @@ jobs: install: git diffutils make pkg-config mingw-w64-${{ matrix.arch }}-glib2 mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-ghostscript mingw-w64-${{ matrix.arch }}-ntldd-git man zip - name: install GUI prereqs if: matrix.ui == 'gui' - run: pacman -S --noconfirm mingw-w64-${{ matrix.arch }}-gtk2 + run: pacman -S --noconfirm mingw-w64-${{ matrix.arch }}-gtk3 - name: git config run: git config --global core.autocrlf input shell: bash @@ -159,7 +159,7 @@ jobs: mkdir -p /tmp/dist docker run --device /dev/fuse --privileged --name uu -d -v $PWD:/code -v /tmp/dist:/dist ubuntu:14.04 sleep 1800 - name: install prerequisites in docker - run: docker exec uu sh -c 'sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man libgtk2.0-dev gtk2-engines-pixbuf gtk2-engines libgail-common pkg-config gnome-themes-standard fuse' + run: docker exec uu sh -c 'sudo apt update && sudo apt install -y libglib2.0-dev ghostscript man libgtk3-dev libgail-common pkg-config gnome-themes-standard fuse' - name: configure in docker run: docker exec uu sh -c 'cd /code && ./configure --prefix=/usr' - name: make in docker diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b452cec..c149106 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,7 +26,7 @@ jobs: if: matrix.ui == 'gui' env: HOMEBREW_NO_INSTALL_CLEANUP: 1 - run: brew install gtk+ + run: brew install gtk+3 - name: configure run: | set +x @@ -85,7 +85,7 @@ jobs: install: git diffutils make pkg-config mingw-w64-${{ matrix.arch }}-glib2 mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-ghostscript mingw-w64-${{ matrix.arch }}-ntldd-git man zip - name: install GUI prereqs if: matrix.ui == 'gui' - run: pacman -S --noconfirm mingw-w64-${{ matrix.arch }}-gtk2 + run: pacman -S --noconfirm mingw-w64-${{ matrix.arch }}-gtk3 - name: git config run: git config --global core.autocrlf input shell: bash @@ -146,7 +146,7 @@ jobs: if: matrix.ui == 'gui' env: DEBIAN_FRONTEND: noninteractive - run: sudo apt-get install -y libgtk2.0-dev + run: sudo apt-get install -y libgtk-3-dev - name: configure run: | echo ./configure ${{ matrix.clionly }} ${{ matrix.debugprintf }} --with-werror diff --git a/GNUmakefile.template b/GNUmakefile.template index 08f4fc4..10c80b1 100644 --- a/GNUmakefile.template +++ b/GNUmakefile.template @@ -68,9 +68,9 @@ GLIB_CFLAGS = $(CFG_GLIB2_CFLAGS) GLIB_LIBS = $(CFG_GLIB2_LIBS) GLIB_BINDIR = $(CFG_GLIB2_BINDIR) -GTK_CFLAGS = $(CFG_GTK2_CFLAGS) $(CFG_GLIB2_CFLAGS) -GTK_LIBS = $(CFG_GTK2_LIBS) $(CFG_GLIB2_LIBS) -GTK_BINDIR = $(CFG_GTK2_BINDIR) $(CFG_GLIB2_BINDIR) +GTK_CFLAGS = $(CFG_GTK3_CFLAGS) $(CFG_GLIB2_CFLAGS) +GTK_LIBS = $(CFG_GTK3_LIBS) $(CFG_GLIB2_LIBS) +GTK_BINDIR = $(CFG_GTK3_BINDIR) $(CFG_GLIB2_BINDIR) EFENCE_LFLAGS = $(CFG_EFENCE_LFLAGS) EFENCE_LIBS = $(CFG_EFENCE_LIBS) diff --git a/configure b/configure index 03be4c5..d2d5937 100755 --- a/configure +++ b/configure @@ -87,7 +87,7 @@ REQUIRE_GLIB2 2 32 0 echo if test "$cfg_with_gui" == "yes"; then - REQUIRE_GTK2 2 6 0 WITH_THREADS + REQUIRE_GTK3 3 4 0 WITH_THREADS fi if ! CHECK_INCLUDE locale.h locale || ! CHECK_INCLUDE libintl.h intl ; then diff --git a/scripts/bash-based-configure b/scripts/bash-based-configure index 528d17e..dc547e5 100644 --- a/scripts/bash-based-configure +++ b/scripts/bash-based-configure @@ -1,5 +1,5 @@ # Bash based configure - library of test functions -# Copyright (C) 2004-2016 Carsten Gnörlich +# Copyright (C) 2004-2016 Carsten Gn�rlich # Copyright (C) 2019-2021 The dvdisaster development team. # # Email: support@dvdisaster.org @@ -1477,13 +1477,13 @@ EOF } # -# Require the GTK2 includes and libraries. +# Require the GTK3 includes and libraries. # Unlike with the other packages, we don't have to fid out about the includes # and libraries by ourselves, but just query pkg-config about them. # It seems that people have more trouble with getting GTK+ to work # than with other toolkits, so we try a bit harder to diagnose them here. -function REQUIRE_GTK2() +function REQUIRE_GTK3() { local want_major="$1" local want_minor="$2" local want_micro="$3" @@ -1496,33 +1496,33 @@ function REQUIRE_GTK2() if test "$want_threads" == "WITH_THREADS"; then threads="--libs gthread-2.0"; fi - echo -e "\n/* *** REQUIRE_GTK2 */\n" >>$LOGFILE + echo -e "\n/* *** REQUIRE_GTK3 */\n" >>$LOGFILE echo "Gtk+ ${want_major}.${want_minor}.${want_micro} is required..." # See if pkgconfig returns something echo -n " pkg-config... " - if pkg-config --cflags gtk+-2.0 >>config.tmp 2>&1 && pkg-config $threads --libs gtk+-2.0 >>config.tmp 2>&1 ; then + if pkg-config --cflags gtk+-3.0 >>config.tmp 2>&1 && pkg-config $threads --libs gtk+-3.0 >>config.tmp 2>&1 ; then echo "works" rm config.tmp - else + else echo "failed" echo -e "\nError message(s) from pkg-config were:" cat config.tmp rm config.tmp - cat <conftest.c < +#include CPPABUSE GTK_MAJOR_VERSION.GTK_MINOR_VERSION.GTK_MICRO_VERSION EOF @@ -1568,9 +1568,9 @@ EOF # Successfully finished - echo "CFG_GTK2_CFLAGS = $CFG_GTK2_CFLAGS" >> Makefile.config - echo "CFG_GTK2_LIBS = $CFG_GTK2_LIBS" >> Makefile.config - echo "CFG_GTK2_BINDIR = $CFG_GTK2_BINDIR" >> Makefile.config + echo "CFG_GTK3_CFLAGS = $CFG_GTK3_CFLAGS" >> Makefile.config + echo "CFG_GTK3_LIBS = $CFG_GTK3_LIBS" >> Makefile.config + echo "CFG_GTK3_BINDIR = $CFG_GTK3_BINDIR" >> Makefile.config return 1 } diff --git a/src/welcome-window.c b/src/welcome-window.c index e6209cc..ebb5d0d 100644 --- a/src/welcome-window.c +++ b/src/welcome-window.c @@ -44,8 +44,8 @@ static gboolean expose_cb(GtkWidget *widget, GdkEventExpose *event, gpointer dat { GtkWidget *box = (GtkWidget*)data; if(!Closure->colors_initialized) - { GdkColor *bg = &widget->style->bg[0]; - GdkColormap *cmap = gdk_colormap_get_system(); + { GdkColor *bg = >k_widget_get_style(widget)->bg[0]; + GdkVisual *cmap = gdk_visual_get_system(); memcpy(Closure->background, bg, sizeof(GdkColor));