From 02e2936efd910b300f63cd203598e1624b3b25e9 Mon Sep 17 00:00:00 2001 From: Duilio Protti Date: Thu, 30 Jun 2016 15:20:54 -0300 Subject: [PATCH] Removed Gtk+ dependency --- README.md | 6 +++--- autogen.sh | 2 -- configure.ac | 10 +++------- src/Makefile.am | 12 ++++++------ src/infinity.c | 17 ++--------------- 5 files changed, 14 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 332dda2..b21f567 100644 --- a/README.md +++ b/README.md @@ -13,17 +13,17 @@ saving and player control through keyboard. Requirements ------------ -Audacious >= 3.5, 1.2 <= SDL < 2, Glib >= 2.28, Gtk+ >= 2.8 +Audacious >= 3.5, 1.2 <= SDL < 2, Glib >= 2.28 **Install deps in Ubuntu** -`sudo apt -y install audacious-dev libsdl1.2-dev libglib2.0-dev libgtk2.0-dev` +`sudo apt -y install audacious-dev libsdl1.2-dev libglib2.0-dev` Install from tarball ------- - [Download](https://github.com/dprotti/infinity-plugin/releases/latest/) -- tar xf infinity-plugin-4-audacious-{version}.tar.xz +- tar xf infinity-plugin-{version}.tar.xz - ./configure - make - sudo make install diff --git a/autogen.sh b/autogen.sh index 1130dce..a4ffb4f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -266,8 +266,6 @@ forbid_m4macro gnome-cxx-check.m4 want_libtool=false want_pkg_config=false -want_gtk_doc=false -want_gnome_doc_utils=false want_maintainer_mode=false configure_files="`find $srcdir -name '{arch}' -prune -o -name '_darcs' -prune -o -name '.??*' -prune -o -name configure.ac -print -o -name configure.in -print`" diff --git a/configure.ac b/configure.ac index 3d50ca2..f4f1e92 100644 --- a/configure.ac +++ b/configure.ac @@ -38,18 +38,14 @@ PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28,,) AC_SUBST(GLIB_LIBS) AC_SUBST(GLIB_CFLAGS) -PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8,,) -AC_SUBST(GTK_LIBS) -AC_SUBST(GTK_CFLAGS) +PKG_CHECK_MODULES(SDL, sdl >= 1.2,,) +AC_SUBST(SDL_LIBS) +AC_SUBST(SDL_CFLAGS) PKG_CHECK_MODULES(AUDACIOUS, audacious >= 3.5,,) AC_SUBST(AUDACIOUS_LIBS) AC_SUBST(AUDACIOUS_CFLAGS) -PKG_CHECK_MODULES(SDL, sdl >= 1.2,,) -AC_SUBST(SDL_LIBS) -AC_SUBST(SDL_CFLAGS) - # Check for header files. AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) diff --git a/src/Makefile.am b/src/Makefile.am index e4ec6d9..7051ef8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,22 +5,22 @@ data_DATA = infinite_states datadir = $(prefix)/share/audacious -COMMON_FLAGS = @AUDACIOUS_CFLAGS@ @SDL_CFLAGS@ @GTK_CFLAGS@\ - @GLIB_CFLAGS@ $(INF_CFLAGS_EXTRA) -DDATADIR='"$(datadir)"' +COMMON_FLAGS = @AUDACIOUS_CFLAGS@ @SDL_CFLAGS@ @GLIB_CFLAGS@ \ + $(INF_CFLAGS_EXTRA) -DDATADIR='"$(datadir)"' AM_CFLAGS = @CFLAGS@ $(COMMON_FLAGS) AM_CXXFLAGS = @CXXFLAGS@ $(COMMON_FLAGS) AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir) libinfinite_la_LDFLAGS = ${CXX} -libinfinite_la_LIBADD = @AUDACIOUS_LIBS@ @SDL_LIBS@ @GTK_LIBS@ @GLIB_LIBS@ +libinfinite_la_LIBADD = @AUDACIOUS_LIBS@ @SDL_LIBS@ @GLIB_LIBS@ libinfinite_la_SOURCES = \ audacious.cc \ - infinity.c infinity.h\ + infinity.c infinity.h \ compute.c compute.h \ display.c display.h \ - effects.c effects.h\ - cputest.c cputest.h\ + effects.c effects.h \ + cputest.c cputest.h \ mmx.h music-player.h types.h EXTRA_DIST = infinite_states diff --git a/src/infinity.c b/src/infinity.c index 052482c..f5d4870 100644 --- a/src/infinity.c +++ b/src/infinity.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -215,18 +214,6 @@ static gint32 event_filter(const SDL_Event *event) return 1; } -static gint disable_func(gpointer data) -{ - infinity_finish(); - return FALSE; -} - -static void schedule_exit() { - GDK_THREADS_ENTER(); - (void)gtk_idle_add(disable_func, NULL); - GDK_THREADS_LEAVE(); -} - static void check_events() { SDL_Event event; @@ -281,7 +268,7 @@ static void check_events() * } * break;*/ case SDL_QUIT: - schedule_exit(); + player->disable_plugin(); break; case SDL_VIDEORESIZE: g_return_if_fail(SDL_LockMutex(resizing_mutex) >= 0); @@ -425,7 +412,7 @@ static int renderer(void *arg) break; if (must_resize) { if (! display_resize(width, height)) { - schedule_exit(); + player->disable_plugin(); break; } params->set_width(width);