diff --git a/ChangeLog b/ChangeLog index d4845cd..29bfdec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-12-16 Bernard Victor Delvaux + Version : Spectrum3d-2.7.0 : + * general changes : Thanks to SDL2, multitouch is back! + * general changes : some code cleaning; + 2016-12-11 Bernard Victor Delvaux Version : Spectrum3d-2.6.0 : * general changes : Display was distorted due to the inclusion of the SDL window in the GTK window; so Spectrum3d uses now only SDL in a separate window, like it used to be until version 2.1. Migration to SDL2 has been made, but it can still be compiled against SDL1. diff --git a/Makefile.in b/Makefile.in index e77e9e5..5095fef 100644 --- a/Makefile.in +++ b/Makefile.in @@ -205,8 +205,6 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BAMF_CFLAGS = @BAMF_CFLAGS@ -BAMF_LIBS = @BAMF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -220,8 +218,6 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -GEIS_CFLAGS = @GEIS_CFLAGS@ -GEIS_LIBS = @GEIS_LIBS@ GREP = @GREP@ GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ @@ -229,10 +225,6 @@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ -GTKGLEXT1_CFLAGS = @GTKGLEXT1_CFLAGS@ -GTKGLEXT1_LIBS = @GTKGLEXT1_LIBS@ -GTKGLEXT3_CFLAGS = @GTKGLEXT3_CFLAGS@ -GTKGLEXT3_LIBS = @GTKGLEXT3_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ diff --git a/README b/README index d69aad2..11a46ac 100644 --- a/README +++ b/README @@ -1,8 +1,8 @@ SPECTRUM 3D: 3D AUDIO SPECTRUM ANALYSER IN REAL TIME -Spectrum 3D displays a 3D audio spectrogram in real time; the source can be either the microphone or an audio file; it is also possible to record a file and to have it analysed; so analysis can be done done on the fly (harmonics are displayed while the audio file is being played), or before the file is being played (in that case, the analysis of the whole will be performed and displayed, then the file can be played afterwards). It is compatible with jack (jack-audio-connection-kit). Optionally, it supports multitouch gestures from touchscreen and touchpad. Optionally also, the audio stream can be run in realtime even if Jack is not used. It is build with the Gstreamer, SDL (or Gtkglext), OpenGl, GTK+-2.0 and uTouch-Geis free libraries and is under GPL license. It is written for Ubuntu but works for other Linux distributions except for the multitouch capabilities (the uTouch library is written for Ubuntu). +Spectrum 3D displays a 3D audio spectrogram in real time; the source can be either the microphone or an audio file; it is also possible to record a file and to have it analysed; so analysis can be done done on the fly (harmonics are displayed while the audio file is being played), or before the file is being played (in that case, the analysis of the whole will be performed and displayed, then the file can be played afterwards). It is compatible with jack (jack-audio-connection-kit). Optionally, it supports multitouch gestures from touchscreen. It is build with the Gstreamer, SDL 1 or 2, OpenGl, GTK2 or GTK3 and is under GPL license. It is written for Ubuntu but works for other Linux distributions. -Spectrum3d can be compiled against GTK2 or GTK3. It can use either SDL or GTKGLEXT libraries as OpenGL extension. For this, SDL is used by default. GTKGLEXT is a more logical choice but GTKGLEXT for GTK3 is still in development; it will probably the default when a stable version is released. However, GTKGLEXT can be used already in Spectrum3d, including the development version (GTKGLEXT3 for GTK3), but this has to be specifically enabled at the time of compiling. +Spectrum3d can be compiled against GTK2 or GTK3, against Gstreamer0.1 or Gstreamer1 and against SDL 1 or SDL2. Multitouch is now handled entirely by SDL2. ******************* | INSTALLATION: | @@ -18,17 +18,16 @@ FOR UBUNTU from 10.10 : All dependencies are available in the Ubuntu repositorie - libsdl2-dev or lidsdl1.2-dev; - - gstreamer0.10-plugins-bad, gstreamer0.10-plugins-bad-multiverse, gstreamer0.10-plugins-ugly et gstreamer0.10-plugins-ugly-multiverse (for reading files such as mp3); + - gstreamer0.10-plugins-bad, gstreamer0.10-plugins-bad-multiverse, gstreamer0.10-plugins-ugly et gstreamer0.10-plugins-ugly-multiverse (for reading files such as mp3) and the same plugins for libgstreamer1.0; For JACK support : - (optional) libjack-dev (for jack1) or libjack-jackd2-dev for jack2; note that you don't need to have the 'jackd' package installed, but only the '-dev' library; For multitouch support (touchscreen and also for multitouch touchpad from Natty): - (optional) libutouch-geis-dev version 2 untill Ubuntu 12.04; this has been renamed libgeis-dev from Ubuntu 12.10; - NOTE : For Ubuntu 11.04, the repositories version will work, but filtering on number of touches won't work (Bug#769859 in libutouch-geis); to solve this you need a version of uTouch-geis that is at least 2.1.0; you can have it either by installing the '.deb' packages from Oneiric repositories (type in a terminal 'sudo apt-get build-dep libutouch-geis-dev', then install 'libutouch-geis1' first, then 'libutouch-geis-dev'), or by compiling the latest version from source (https://launchpad.net/utouch-geis); if you compile from sources, you can type in a terminal 'sudo apt-get build-dep libutouch-geis-dev' to have all dependencies installed. For Ubuntu 10.10, do not use the repositories version; use one of the previous solutions. - + FOR OTHER DISTRIBUTIONS : - For the other distributions, the dependencies should be very similar. Only the multitouch features maybe won't work since uTouch-Geis has been build for Ubuntu. However, the uTouch Suite (including uTouch-Geis) starts beeing ported in other distributions such as Gentoo (https://sabotageandi.wordpress.com/2011/04/20/utouch-gentoo/) or Fedora. More info on this in the documentation directory. + For the other distributions, the dependencies should be very similar. 2. compilation and installation : """"""""""""""""""""""""""""""""" @@ -59,17 +58,15 @@ FOR OTHER DISTRIBUTIONS : $ ./configure --disable-sdl2 - NOTE for JACK and MULTITOUCH SUPPORT: - If Jack library is found, JACK support will be enabled. Also, if libbamf and libutouch-geis version 2 libraries are found, MULTITOUCH support will be enabled. If those libraries are not installed, JACK and MULTITOUCH support won't be enabled. However, if you have those libraries installed but don't want those features enabled, you have to type '--disable-jack' or '--disable-geis' after 'configure' ('--enable-jack=no' and '--enable-geis=no' also works). - For example : - - $ ./configure --disable-jack --disable-geis + NOTE for JACK SUPPORT: + If Jack library is found, JACK support will be enabled. Both jack and jack2 are supported.However, jack support can be disabled by typing : + + $ ./configure --disable-jack -will deactivate JACK and MULTITOUCH support if those libraries are installed. - You can combine many arguments. For example : + You can combine several arguments. For example : - $ ./configure --disable-gtk3 --enable-gtkglext --disable-jack + $ ./configure --disable-gtk3 --disable-jack If you want Spectrum3d to be installed in another directory than the default one ('/usr/local/bin'), you can add it at 'configure' step according to the 'Autoconf' standards. For example : @@ -101,7 +98,7 @@ Type in a terminal : or run it from 'Menu->Applications->Sound & Video->Spectrum3d' The 2 most important things to do first are : - - to select the type of audio source : either microphone or audio file; + - to select the type of audio source : either microphone or audio file; microphone is the default; - set if analyse will be done in real time or not : if 'analyze in real time' is checked, harmonics will be retrieved and displayed on the fly, while the sound is being played; if 'Analyse in real time' is unchecked, harmonics of the whole audio file will be retrieved and displayed first, then the file can be played afterwards. When source is set to microphone and 'Analyse in real time' is unchecked, recording can be made; it will be analysed and displayed like for an audio file; similarly it can be also played afterward. Selection of multiple audio files is not possible anymore. The 'reload' button allows to reload (i.e. analyse and display its harmonics) without reselecting the file. @@ -134,8 +131,7 @@ From the menu : - the color of the display (when analyse in real-time is selected); - whether you want the display in the same window as the GUI or in a separate window; - whether you want that the actual display is saved as preset; - - the interval of time (in milliseconds) between each new analysis of the spectral data; as for display, the smallest this value will be, the more demanding it will be on the cpu; this value should match the interval of time between 2 displays for better display but this is not mandatory; - - whether you want Spectrum3d to run in realtime mode (when JACK is not used); if so, you can choose between SCHED_RR or SCHED_FIFO policies, and set the priority; please see important note at the end of this file. + - the interval of time (in milliseconds) between each new analysis of the spectral data; as for display, the smallest this value will be, the more demanding it will be on the cpu; this value should match the interval of time between 2 displays for better display but this is not mandatory. All those preferences are kept in a 'preferences' file that is created at first use of Spectrum3d and placed in the home directory : ~/.spectrum3d/spectrum3d.pref. Everytime Spectrum3d starts, it check some values of this 'preferences' file for consistency; if out of range value is found, a new 'preferences' file with default values is created. @@ -174,37 +170,19 @@ Command Gesture Play/pause Double Tap Rotate around X axis 1 finger Drag Up/down Rotate around Y axis 1 finger Right/left -Rotate around Z axis 2 fingers Rotate -Translate along X axis 2 fingers Right/left -Translate along Y axis 2 fingers Drag Up/down -Translate along Z axis 2 fingers Pinch +Rotate around Z axis 2 (or more) fingers Rotate +Translate along X axis 2 (or more) fingers Right/left +Translate along Y axis 2 (or more) fingers Drag Up/down +Translate along Z axis 2 (or more) fingers Pinch -********************* -| IMPORTANT NOTES | -********************* +********** +| NOTES | +********** 1. Although it is 3D with OpenGL, the drivers for 3D acceleration are not needed (no need for proprietary drivers here!), but it can help to have a better rendering. -2. Spectrum 3D can use a lot of resources on your machine, given the real-time analysis and 3D display of the data's. 3 aspects are important : the power of the processor, the performance of the graphic card (with or without the 3D drivers) and the type of kernel that is being used (a preempt or real-time will allow better performance). The amount of needed resources is proportional to the width of the window. If your machine has difficulty, you can use a smaller window size (in Menu -> Edit -> Preferences), which decreases the needed resources. - -3. RealTime mode will allow Spectrum3d to have priority on other running processes, in order to not be slowed down by them; it won't decrease the amount of CPU and GPU resources needed to perform the task. IMPORTANT WARNING : If you want to take advantage of this you should edit or create an '/etc/security/limits.d/audio.conf' file and put this inside : - - @audio - rtprio 95 - -then you should add yourself as a member of the 'audio' group : - - - either go in System->Preferences->Users and Groups->Manage Groups, then select the 'audio' groups, click on 'Properties' and add yourself; - - or by typing in a terminal : sudo adduser ${LOGNAME} audio - -then reboot. - -If you don't do this, you'll have to run Spectrum3d as root, which is NOT RECOMMENDED AT ALL. -You'll find more information in the 'Realtime' file in the Doc directory. - -4. Multitouch support is provided by the uTouch-geis API. For now, the whole screen receives fingers input for Spectrum3d while Spectrum3d is running (input is not limited to the Spectrum3d window), unless you use a version of uTouch-geis that is at least 2.1.0. On the other hand, when Sprectrum3d is running, the mouse pointer cannot be used from the touchpoint on the screen, but the mouse pointer is still driven by the mouse. This behavior could be the same in Natty or later, if you have a touchpad that supports multitouch : the touchpad only receives input as multitouch gestures, and you cannot use it anymore to drive the mouse as long as Spectrum 3d is running. - -You'll find more information in the 'Multitouch' file in the Doc directory. +2. Spectrum 3D can use a lot of resources on your machine, given the real-time analysis and 3D display of the data's. 3 aspects are important : the power of the processor, the performance of the graphic card (with or without the 3D drivers) and the type of kernel that is being used (a preempt or real-time will allow better performance). The amount of needed resources is proportional to the width of the window. If your machine has difficulty, you can use a smaller window size (in Menu -> Edit -> Preferences), which decreases the needed resources. However, given the increased capabilities of computers, those precautions are now to be taken on old computers (or very basic models). Thank you for telling me whatever you want too and than you for your presence! diff --git a/configure b/configure index d1f527e..835db5f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Spectrum3d 2.6.0. +# Generated by GNU Autoconf 2.69 for Spectrum3d 2.7.0. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Spectrum3d' PACKAGE_TARNAME='spectrum3d' -PACKAGE_VERSION='2.6.0' -PACKAGE_STRING='Spectrum3d 2.6.0' +PACKAGE_VERSION='2.7.0' +PACKAGE_STRING='Spectrum3d 2.7.0' PACKAGE_BUGREPORT='nadaeck@hotmail.com' PACKAGE_URL='spectrum3d.sourceforge.net' @@ -629,18 +629,10 @@ LIBOBJS EGREP GREP CPP -GEIS_LIBS -GEIS_CFLAGS -BAMF_LIBS -BAMF_CFLAGS GSTREAMER_LIBS GSTREAMER_CFLAGS -GTKGLEXT1_LIBS -GTKGLEXT1_CFLAGS GTK2_LIBS GTK2_CFLAGS -GTKGLEXT3_LIBS -GTKGLEXT3_CFLAGS GTK3_LIBS GTK3_CFLAGS PKG_CONFIG_LIBDIR @@ -735,7 +727,6 @@ enable_option_checking enable_silent_rules enable_dependency_tracking enable_jack -enable_geis enable_gtk3 enable_gtk2 enable_sdl2 @@ -754,18 +745,10 @@ PKG_CONFIG_PATH PKG_CONFIG_LIBDIR GTK3_CFLAGS GTK3_LIBS -GTKGLEXT3_CFLAGS -GTKGLEXT3_LIBS GTK2_CFLAGS GTK2_LIBS -GTKGLEXT1_CFLAGS -GTKGLEXT1_LIBS GSTREAMER_CFLAGS GSTREAMER_LIBS -BAMF_CFLAGS -BAMF_LIBS -GEIS_CFLAGS -GEIS_LIBS CPP' @@ -1317,7 +1300,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Spectrum3d 2.6.0 to adapt to many kinds of systems. +\`configure' configures Spectrum3d 2.7.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1384,7 +1367,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Spectrum3d 2.6.0:";; + short | recursive ) echo "Configuration of Spectrum3d 2.7.0:";; esac cat <<\_ACEOF @@ -1399,7 +1382,6 @@ Optional Features: --disable-dependency-tracking speeds up one-time build --disable-jack Disable Jack support - --disable-geis Disable multitouch support --disable-gtk3 Disable Gtk-3.0 (use Gtk-2.0 instead) --enable-gtk2 Enable gtk2 support (instead of gtk3 --disable-sdl2 Disable SDL2 (use SDL1.2 instead) @@ -1420,24 +1402,12 @@ Some influential environment variables: path overriding pkg-config's built-in search path GTK3_CFLAGS C compiler flags for GTK3, overriding pkg-config GTK3_LIBS linker flags for GTK3, overriding pkg-config - GTKGLEXT3_CFLAGS - C compiler flags for GTKGLEXT3, overriding pkg-config - GTKGLEXT3_LIBS - linker flags for GTKGLEXT3, overriding pkg-config GTK2_CFLAGS C compiler flags for GTK2, overriding pkg-config GTK2_LIBS linker flags for GTK2, overriding pkg-config - GTKGLEXT1_CFLAGS - C compiler flags for GTKGLEXT1, overriding pkg-config - GTKGLEXT1_LIBS - linker flags for GTKGLEXT1, overriding pkg-config GSTREAMER_CFLAGS C compiler flags for GSTREAMER, overriding pkg-config GSTREAMER_LIBS linker flags for GSTREAMER, overriding pkg-config - BAMF_CFLAGS C compiler flags for BAMF, overriding pkg-config - BAMF_LIBS linker flags for BAMF, overriding pkg-config - GEIS_CFLAGS C compiler flags for GEIS, overriding pkg-config - GEIS_LIBS linker flags for GEIS, overriding pkg-config CPP C preprocessor Use these variables to override the choices made by `configure' or to help @@ -1507,7 +1477,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Spectrum3d configure 2.6.0 +Spectrum3d configure 2.7.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1876,7 +1846,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Spectrum3d $as_me 2.6.0, which was +It was created by Spectrum3d $as_me 2.7.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2741,7 +2711,7 @@ fi # Define the identity of the package. PACKAGE='spectrum3d' - VERSION='2.6.0' + VERSION='2.7.0' cat >>confdefs.h <<_ACEOF @@ -3886,11 +3856,6 @@ if test "${enable_jack+set}" = set; then : enableval=$enable_jack; fi -# Check whether --enable-geis was given. -if test "${enable_geis+set}" = set; then : - enableval=$enable_geis; -fi - # Check whether --enable-gtk3 was given. if test "${enable_gtk3+set}" = set; then : enableval=$enable_gtk3; @@ -3914,12 +3879,9 @@ fi ################# CHECK FOR LIBRAIRIES ###################### -BAMF_REQUIRED=0.2.53 -GEIS_REQUIRED=1.0.15 jack=1 geis=1 gtk=0 -gtkglext=0 gstreamer=0 sdl=1 @@ -4122,88 +4084,6 @@ $as_echo "yes" >&6; } $as_echo "#define GTK3 1" >>confdefs.h - if test "x$enable_gtkglext" == "xyes"; then : - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKGLEXT3" >&5 -$as_echo_n "checking for GTKGLEXT3... " >&6; } - -if test -n "$GTKGLEXT3_CFLAGS"; then - pkg_cv_GTKGLEXT3_CFLAGS="$GTKGLEXT3_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtkglext-3.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtkglext-3.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GTKGLEXT3_CFLAGS=`$PKG_CONFIG --cflags "gtkglext-3.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$GTKGLEXT3_LIBS"; then - pkg_cv_GTKGLEXT3_LIBS="$GTKGLEXT3_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtkglext-3.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtkglext-3.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GTKGLEXT3_LIBS=`$PKG_CONFIG --libs "gtkglext-3.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GTKGLEXT3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtkglext-3.0" 2>&1` - else - GTKGLEXT3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtkglext-3.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GTKGLEXT3_PKG_ERRORS" >&5 - - as_fn_error $? "GTKGLEXT library for GTK3 (libgtkglext-3.0) is required" "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "GTKGLEXT library for GTK3 (libgtkglext-3.0) is required" "$LINENO" 5 -else - GTKGLEXT3_CFLAGS=$pkg_cv_GTKGLEXT3_CFLAGS - GTKGLEXT3_LIBS=$pkg_cv_GTKGLEXT3_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - - gtkglext=1 - CFLAGS="$CFLAGS $GTKGLEXT3_CFLAGS" - LIBS="$LIBS $GTKGLEXT3_LIBS" - -$as_echo "#define GTKGLEXT3 1" >>confdefs.h - - -fi - -fi fi @@ -4288,88 +4168,6 @@ $as_echo "yes" >&6; } $as_echo "#define GTK2 1" >>confdefs.h - if test "x$enable_gtkglext" == "xyes"; then : - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKGLEXT1" >&5 -$as_echo_n "checking for GTKGLEXT1... " >&6; } - -if test -n "$GTKGLEXT1_CFLAGS"; then - pkg_cv_GTKGLEXT1_CFLAGS="$GTKGLEXT1_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtkglext-1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtkglext-1.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GTKGLEXT1_CFLAGS=`$PKG_CONFIG --cflags "gtkglext-1.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$GTKGLEXT1_LIBS"; then - pkg_cv_GTKGLEXT1_LIBS="$GTKGLEXT1_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtkglext-1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtkglext-1.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GTKGLEXT1_LIBS=`$PKG_CONFIG --libs "gtkglext-1.0" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GTKGLEXT1_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtkglext-1.0" 2>&1` - else - GTKGLEXT1_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtkglext-1.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GTKGLEXT1_PKG_ERRORS" >&5 - - as_fn_error $? "GTKGLEXT library for GTK2 (libgtkglext-1.0) is required" "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "GTKGLEXT library for GTK2 (libgtkglext-1.0) is required" "$LINENO" 5 -else - GTKGLEXT1_CFLAGS=$pkg_cv_GTKGLEXT1_CFLAGS - GTKGLEXT1_LIBS=$pkg_cv_GTKGLEXT1_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - - gtkglext=1 - CFLAGS="$CFLAGS $GTKGLEXT1_CFLAGS" - LIBS="$LIBS $GTKGLEXT1_LIBS" - -$as_echo "#define GTKGLEXT1 1" >>confdefs.h - - -fi - -fi fi @@ -4911,165 +4709,6 @@ else jack=0 fi -# Check and link for MULTITOUCH (if libbamf and libutouch-geis are present and if this option is not disabled) -# Check first for LIBBAMF; if it is there, check for LIBUTOUCH-GEIS version 2; if it is there, check if LIBUTOUCH-GEIS version is > 2.0.11 -if test "x$enable_geis" != "xno"; then : - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BAMF" >&5 -$as_echo_n "checking for BAMF... " >&6; } - -if test -n "$BAMF_CFLAGS"; then - pkg_cv_BAMF_CFLAGS="$BAMF_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbamf >= \$BAMF_REQUIRED\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libbamf >= $BAMF_REQUIRED") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_BAMF_CFLAGS=`$PKG_CONFIG --cflags "libbamf >= $BAMF_REQUIRED" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$BAMF_LIBS"; then - pkg_cv_BAMF_LIBS="$BAMF_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbamf >= \$BAMF_REQUIRED\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libbamf >= $BAMF_REQUIRED") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_BAMF_LIBS=`$PKG_CONFIG --libs "libbamf >= $BAMF_REQUIRED" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - BAMF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libbamf >= $BAMF_REQUIRED" 2>&1` - else - BAMF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libbamf >= $BAMF_REQUIRED" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$BAMF_PKG_ERRORS" >&5 - - geis=0 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - geis=0 -else - BAMF_CFLAGS=$pkg_cv_BAMF_CFLAGS - BAMF_LIBS=$pkg_cv_BAMF_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - - CFLAGS="$CFLAGS $BAMF_CFLAGS" - LIBS="$LIBS $BAMF_LIBS" - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GEIS" >&5 -$as_echo_n "checking for GEIS... " >&6; } - -if test -n "$GEIS_CFLAGS"; then - pkg_cv_GEIS_CFLAGS="$GEIS_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgeis\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libgeis") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GEIS_CFLAGS=`$PKG_CONFIG --cflags "libgeis" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$GEIS_LIBS"; then - pkg_cv_GEIS_LIBS="$GEIS_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgeis\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libgeis") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GEIS_LIBS=`$PKG_CONFIG --libs "libgeis" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - GEIS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libgeis" 2>&1` - else - GEIS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libgeis" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GEIS_PKG_ERRORS" >&5 - - geis=0 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - geis=0 -else - GEIS_CFLAGS=$pkg_cv_GEIS_CFLAGS - GEIS_LIBS=$pkg_cv_GEIS_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - - -$as_echo "#define HAVE_LIBGEIS 1" >>confdefs.h - - CFLAGS="$CFLAGS $GEIS_CFLAGS" - LIBS="$LIBS $GEIS_LIBS" - -fi - -fi -else - geis=0 -fi - # Checks for header files. ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6029,7 +5668,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Spectrum3d $as_me 2.6.0, which was +This file was extended by Spectrum3d $as_me 2.7.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6096,7 +5735,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Spectrum3d config.status 2.6.0 +Spectrum3d config.status 2.7.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -6975,18 +6614,18 @@ else $as_echo "$as_me: * Gstreamer version ..............0.10 *" >&6;} fi if test "$gtk" == "2"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: * GTK version .................GTK-2.0 *" >&5 -$as_echo "$as_me: * GTK version .................GTK-2.0 *" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: * GTK version ....................GTK2 *" >&5 +$as_echo "$as_me: * GTK version ....................GTK2 *" >&6;} else - { $as_echo "$as_me:${as_lineno-$LINENO}: * GTK version .................GTK-3.0 *" >&5 -$as_echo "$as_me: * GTK version .................GTK-3.0 *" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: * GTK version ....................GTK3 *" >&5 +$as_echo "$as_me: * GTK version ....................GTK3 *" >&6;} fi if test "$sdl" == "2"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: * SDL version.....................SDL2 *" >&5 $as_echo "$as_me: * SDL version.....................SDL2 *" >&6;} else - { $as_echo "$as_me:${as_lineno-$LINENO}: * SDL version...................SDL1.2 *" >&5 -$as_echo "$as_me: * SDL version...................SDL1.2 *" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: * SDL version.....................SDL1 *" >&5 +$as_echo "$as_me: * SDL version.....................SDL1 *" >&6;} fi if test "$jack" != "0"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: * JACK support.....................YES *" >&5 diff --git a/configure.ac b/configure.ac index 9e1a4c5..b375c67 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ ############### INITIALIZE EVERYTHING ###################### AC_INIT([Spectrum3d], - [2.6.0], + [2.7.0], [nadaeck@hotmail.com], [spectrum3d], [spectrum3d.sourceforge.net]) @@ -22,9 +22,6 @@ AC_CONFIG_HEADERS([src/config.h]) AC_ARG_ENABLE([jack], AS_HELP_STRING([--disable-jack], [Disable Jack support])) -AC_ARG_ENABLE([geis], - AS_HELP_STRING([--disable-geis], - [Disable multitouch support])) AC_ARG_ENABLE([gtk3], AS_HELP_STRING([--disable-gtk3], [Disable Gtk-3.0 (use Gtk-2.0 instead)])) @@ -40,12 +37,9 @@ AC_ARG_ENABLE([sdl], ################# CHECK FOR LIBRAIRIES ###################### -BAMF_REQUIRED=0.2.53 -GEIS_REQUIRED=1.0.15 jack=1 geis=1 gtk=0 -gtkglext=0 gstreamer=0 sdl=1 @@ -56,14 +50,6 @@ AS_IF([test "x$enable_gtk3" != "xno" && test "x$enable_gtk2" != "xyes"], [ CFLAGS="$CFLAGS $GTK3_CFLAGS" LIBS="$LIBS $GTK3_LIBS" AC_DEFINE([GTK3], [1], [Define to 1 if you have the `GTK3' library]) - AS_IF([test "x$enable_gtkglext" == "xyes"], [ - PKG_CHECK_MODULES([GTKGLEXT3], [gtkglext-3.0], [ - gtkglext=1 - CFLAGS="$CFLAGS $GTKGLEXT3_CFLAGS" - LIBS="$LIBS $GTKGLEXT3_LIBS" - AC_DEFINE([GTKGLEXT3], [1], [Define to 1 if you have the `GTKGLEXT3' library]) - ], [AC_MSG_ERROR([GTKGLEXT library for GTK3 (libgtkglext-3.0) is required])]) - ], []) ], [gtk=0]) ], []) @@ -74,14 +60,6 @@ AS_IF([test "$gtk" == "0"], [ CFLAGS="$CFLAGS $GTK2_CFLAGS" LIBS="$LIBS $GTK2_LIBS" AC_DEFINE([GTK2], [1], [Define to 1 if you have the `GTK2' library]) - AS_IF([test "x$enable_gtkglext" == "xyes"], [ - PKG_CHECK_MODULES([GTKGLEXT1], [gtkglext-1.0], [ - gtkglext=1 - CFLAGS="$CFLAGS $GTKGLEXT1_CFLAGS" - LIBS="$LIBS $GTKGLEXT1_LIBS" - AC_DEFINE([GTKGLEXT1], [1], [Define to 1 if you have the `GTKGLEXT1' library]) - ], [AC_MSG_ERROR([GTKGLEXT library for GTK2 (libgtkglext-1.0) is required])]) - ], []) ], [AC_MSG_ERROR([GTK library (libgtk-2.0 or libgtk-3.0) is required])]) ], []) @@ -126,20 +104,6 @@ AS_IF([test "x$enable_jack" != "xno"], [ AC_CHECK_LIB([jack], [jack_client_open], [], [jack=0])], [jack=0]) -# Check and link for MULTITOUCH (if libbamf and libutouch-geis are present and if this option is not disabled) -# Check first for LIBBAMF; if it is there, check for LIBUTOUCH-GEIS version 2; if it is there, check if LIBUTOUCH-GEIS version is > 2.0.11 -AS_IF([test "x$enable_geis" != "xno"], [ - PKG_CHECK_MODULES([BAMF], [libbamf >= $BAMF_REQUIRED], [ - CFLAGS="$CFLAGS $BAMF_CFLAGS" - LIBS="$LIBS $BAMF_LIBS" - PKG_CHECK_MODULES([GEIS], [libgeis], [ - AC_DEFINE([HAVE_LIBGEIS], [1], [Define to 1 if you have the Geis library.]) - CFLAGS="$CFLAGS $GEIS_CFLAGS" - LIBS="$LIBS $GEIS_LIBS" - ], [geis=0]) - ], [geis=0])], - [geis=0]) - # Checks for header files. AC_CHECK_HEADERS([stdlib.h string.h]) @@ -165,11 +129,11 @@ AS_IF([test "$gstreamer" == "1"], [AC_MSG_NOTICE([ * Gstreamer version ...............1.0 *])], [AC_MSG_NOTICE([ * Gstreamer version ..............0.10 *])]) AS_IF([test "$gtk" == "2"], - [AC_MSG_NOTICE([ * GTK version .................GTK-2.0 *])], - [AC_MSG_NOTICE([ * GTK version .................GTK-3.0 *])]) + [AC_MSG_NOTICE([ * GTK version ....................GTK2 *])], + [AC_MSG_NOTICE([ * GTK version ....................GTK3 *])]) AS_IF([test "$sdl" == "2"], [AC_MSG_NOTICE([ * SDL version.....................SDL2 *])], - [AC_MSG_NOTICE([ * SDL version...................SDL1.2 *])]) + [AC_MSG_NOTICE([ * SDL version.....................SDL1 *])]) AS_IF([test "$jack" != "0"], [AC_MSG_NOTICE([ * JACK support.....................YES *])], [AC_MSG_NOTICE([ * JACK support......................NO *])]) diff --git a/data/Makefile.in b/data/Makefile.in index c25a23a..6fd9d7b 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -157,8 +157,6 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BAMF_CFLAGS = @BAMF_CFLAGS@ -BAMF_LIBS = @BAMF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -172,8 +170,6 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -GEIS_CFLAGS = @GEIS_CFLAGS@ -GEIS_LIBS = @GEIS_LIBS@ GREP = @GREP@ GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ @@ -181,10 +177,6 @@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ -GTKGLEXT1_CFLAGS = @GTKGLEXT1_CFLAGS@ -GTKGLEXT1_LIBS = @GTKGLEXT1_LIBS@ -GTKGLEXT3_CFLAGS = @GTKGLEXT3_CFLAGS@ -GTKGLEXT3_LIBS = @GTKGLEXT3_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ diff --git a/doc/Makefile.in b/doc/Makefile.in index 9b5313f..d006987 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -124,8 +124,6 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BAMF_CFLAGS = @BAMF_CFLAGS@ -BAMF_LIBS = @BAMF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -139,8 +137,6 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -GEIS_CFLAGS = @GEIS_CFLAGS@ -GEIS_LIBS = @GEIS_LIBS@ GREP = @GREP@ GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ @@ -148,10 +144,6 @@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ -GTKGLEXT1_CFLAGS = @GTKGLEXT1_CFLAGS@ -GTKGLEXT1_LIBS = @GTKGLEXT1_LIBS@ -GTKGLEXT3_CFLAGS = @GTKGLEXT3_CFLAGS@ -GTKGLEXT3_LIBS = @GTKGLEXT3_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ diff --git a/doc/txt/F.A.Q b/doc/txt/F.A.Q index 207e5c9..d212f26 100644 --- a/doc/txt/F.A.Q +++ b/doc/txt/F.A.Q @@ -4,25 +4,4 @@ SPECTRUM3D : FAQ You should start Spectrum3d in a terminal. You'll have different messages and probably some error message that you should report to the mail address nadaeck@hotmail.com. - 2. Main display window starts but remains black when playing. - -Check if this happens only when you have chosen the 'realtime' mode; if so, you should check if you have a proper '/etc/security/limits.d/audio.conf', and if you are a member of the 'audio'group. Cfr Realtime.txt document. - - 3. Despite the installation of the uTouch-Geis library, I get this error message at Spectrum3d's start: - -"error while loading shared libraries: libutouch-geis.so.1: cannot open shared object file: No such file or directory" - -This seems related to an 'environment variable' problem. You have probably installed libutouch-geis in the '/usr/local' directory which is the default directory, unless another directory is specified), and spectrum3d doesn't look there to find it. This suggests that '/usr/local/lib' is not in the ld.so configuration. This directory should be in /etc/ld.so.conf or a .conf file in /etc/ld.so.conf.d. -For example, you can create a custom file that you will place in /etc/ld.so.conf.d : 'sudo gedit /etc/ld.so.conf.d'; then write '/usr/local/lib' in this text file and save; then type in a terminal 'sudo ldconfig'. Another way is to put '/usr/local/lib' in the '/etc/ld.so.conf' file. - - 4. When 'Touch' function is activated, everything seems 'captured' by the 'Touch' function : mouse pointer cannot be controlled by the touchpad anymore. - -See Multitouch.txt document : How is it implemented in Spectrum3d? - -5. In command line, I get this error message when multitouch is enabled : - -WARNING **: Failed to fetch view type at /org/ayatana/bamf/window73400334: Method "ViewType" with signature "" on interface "org.ayatana.bamf.view" doesn't exist - -Well, I don't have a clue to explain what it is, but this does not seem to be a real issue since everything works despite that message. It could be related somehow with Unity. - diff --git a/src/Makefile.in b/src/Makefile.in index 2232d91..067448a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -171,8 +171,6 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BAMF_CFLAGS = @BAMF_CFLAGS@ -BAMF_LIBS = @BAMF_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -186,8 +184,6 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -GEIS_CFLAGS = @GEIS_CFLAGS@ -GEIS_LIBS = @GEIS_LIBS@ GREP = @GREP@ GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@ GSTREAMER_LIBS = @GSTREAMER_LIBS@ @@ -195,10 +191,6 @@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ -GTKGLEXT1_CFLAGS = @GTKGLEXT1_CFLAGS@ -GTKGLEXT1_LIBS = @GTKGLEXT1_LIBS@ -GTKGLEXT3_CFLAGS = @GTKGLEXT3_CFLAGS@ -GTKGLEXT3_LIBS = @GTKGLEXT3_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ diff --git a/src/config.h.in b/src/config.h.in index 7a6c1ed..f0aba61 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -12,18 +12,9 @@ /* Define to 1 if you have the `GTK3' library */ #undef GTK3 -/* Define to 1 if you have the `GTKGLEXT1' library */ -#undef GTKGLEXT1 - -/* Define to 1 if you have the `GTKGLEXT3' library */ -#undef GTKGLEXT3 - /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the Geis library. */ -#undef HAVE_LIBGEIS - /* Define to 1 if you have the `GL' library (-lGL). */ #undef HAVE_LIBGL diff --git a/src/events.c b/src/events.c index b04c374..efd33c4 100644 --- a/src/events.c +++ b/src/events.c @@ -34,275 +34,9 @@ #include "events.h" -gboolean a_keyPressed = FALSE, g_keyPressed = FALSE, q_keyPressed = FALSE, shift_keyPressed = FALSE, control_keyPressed = FALSE; -gdouble oldXPos = 0, oldYPos = 0; - -gboolean on_mouse_scroll (GtkWidget *window, GdkEventScroll *event, gpointer data){ - if (event->state & GDK_BUTTON1_MASK){ - if (event->direction == GDK_SCROLL_UP){ - AngleZ+=0.4; - } - if (event->direction == GDK_SCROLL_DOWN){ - AngleZ-=0.4; - } - newEvent = TRUE; - } - else if (event->state & GDK_BUTTON3_MASK){ - - if (event->direction == GDK_SCROLL_UP){ - Z += 0.02; - } - if (event->direction == GDK_SCROLL_DOWN){ - Z -= 0.02; - } - newEvent = TRUE; - } - return FALSE; -} - - -gboolean on_mouse_motion (GtkWidget *window, GdkEventMotion *event, gpointer data){ - - if (event->state & GDK_BUTTON1_MASK){ - if (event->x > oldXPos){ - AngleH+=0.4; - } - if (event->x < oldXPos){ - AngleH-=0.4; - } - oldXPos = event->x; - if (event->y > oldYPos){ - AngleV+=0.4; - } - if (event->y < oldYPos){ - AngleV-=0.4; - } - oldYPos = event->y; - newEvent = TRUE; - } - else if (event->state & GDK_BUTTON3_MASK){ - if (event->x > oldXPos){ - X+=0.004; - } - if (event->x < oldXPos){ - X-=0.004; - } - oldXPos = event->x; - if (event->y > oldYPos){ - Y-=0.006; - } - if (event->y < oldYPos){ - Y+=0.006; - } - oldYPos = event->y; - newEvent = TRUE; - } - else if (event->state & GDK_BUTTON2_MASK){ - if (event->x > oldXPos){ - AngleZ-=0.4; - } - if (event->x < oldXPos){ - AngleZ+=0.4; - } - oldXPos = event->x; - if (event->y > oldYPos){ - Z+=0.01; - } - if (event->y < oldYPos){ - Z-=0.01; - } - oldYPos = event->y; - newEvent = TRUE; - } - return FALSE; -} - -/* Manage key press events with GDK */ -gboolean on_key_press (GtkWidget * window, GdkEventKey* event, Spectrum3dGui *spectrum3dGui){ - //printf("shift_keyPressed = %d, control_keyPressed = %d\n", shift_keyPressed, control_keyPressed); - if (event->type == GDK_KEY_PRESS){ - switch (event->keyval){ - case GDK_KEY_Escape : - on_stop (); - break; - case GDK_KEY_Left : - if (event->state == GDK_CONTROL_MASK){ - X -= 0.02; - } - else if (control_keyPressed){ - X -= 0.02; - } - else if (a_keyPressed){ - Xpointer -= (x / bandsNumber) * 10; - Ypointer -= (y_2d / bandsNumber) * 10; - } - else if (q_keyPressed){ - Xpointer -= (x / bandsNumber); - Ypointer -= (y_2d / bandsNumber); - } - else { - AngleH-=0.4; - } - break; - case GDK_KEY_Right : - if (event->state == GDK_CONTROL_MASK){ - X += 0.02; - } - else if (control_keyPressed){ - X += 0.02; - } - else if (a_keyPressed){ - Xpointer += (x / bandsNumber) * 10; - Ypointer += (y_2d / bandsNumber) * 10; - } - else if (q_keyPressed){ - Xpointer += (x / bandsNumber); - Ypointer += (y_2d / bandsNumber); - } - else { - AngleH+=0.4; - } - break; - case GDK_KEY_Up : - if (control_keyPressed && shift_keyPressed){ - Z -= 0.02; - } - else if (control_keyPressed){ - Y += 0.02; - } - else if (shift_keyPressed){ - AngleZ += 0.4; - } - else if (a_keyPressed){ - Xpointer += (x / bandsNumber) * 10; - Ypointer += (y_2d / bandsNumber) * 10; - } - else if (q_keyPressed){ - Xpointer += (x / bandsNumber); - Ypointer += (y_2d / bandsNumber); - } - else if (g_keyPressed){ - gtk_scale_button_set_value( GTK_SCALE_BUTTON(spectrum3dGui->scaleGain), (gtk_scale_button_get_value(GTK_SCALE_BUTTON(spectrum3dGui->scaleGain)) + 0.01) ); - } - else { - AngleV -= 0.4; - } - break; - case GDK_KEY_Down : - if (control_keyPressed && shift_keyPressed){ - Z += 0.02; - } - else if (control_keyPressed){ - Y -= 0.02; - } - else if (shift_keyPressed){ - AngleZ -= 0.4; - } - else if (a_keyPressed){ - Xpointer -= (x / bandsNumber) * 10; - Ypointer -= (y_2d / bandsNumber) * 10; - } - else if (q_keyPressed){ - Xpointer -= (x / bandsNumber); - Ypointer -= (y_2d / bandsNumber); - } - else if (g_keyPressed){ - gtk_scale_button_set_value( GTK_SCALE_BUTTON(spectrum3dGui->scaleGain), (gtk_scale_button_get_value(GTK_SCALE_BUTTON(spectrum3dGui->scaleGain)) - 0.01) ); - } - else { - AngleV += 0.4; - } - break; - case GDK_KEY_space : - //playFromSource(NULL, NULL); - break; - case GDK_KEY_t : - gtk_menu_item_activate(GTK_MENU_ITEM(spectrum3dGui->checkMenuText)); - break; - case GDK_KEY_l : - gtk_menu_item_activate(GTK_MENU_ITEM(spectrum3dGui->checkMenuLines)); - break; - case GDK_KEY_p : - gtk_menu_item_activate(GTK_MENU_ITEM(spectrum3dGui->checkMenuPointer)); - break; - case GDK_KEY_r : - reset_view(); - //gtk_menu_item_activate(GTK_MENU_ITEM(spectrum3dGui->reset)); - break; - case GDK_KEY_o : - front_view(); - //gtk_menu_item_activate(GTK_MENU_ITEM(spectrum3dGui->front)); - break; - case GDK_KEY_d : - if (viewType == THREE_D){ - gtk_menu_item_activate(GTK_MENU_ITEM(spectrum3dGui->radio2D)); - } - else { - gtk_menu_item_activate(GTK_MENU_ITEM(spectrum3dGui->radio3D)); - } - break; - case GDK_KEY_f : - gtk_menu_item_activate(GTK_MENU_ITEM(spectrum3dGui->radio3Dflat)); - break; - case GDK_KEY_a : - a_keyPressed = TRUE; - break; - case GDK_KEY_q : - q_keyPressed = TRUE; - break; - case GDK_KEY_g : - g_keyPressed = TRUE; - break; - case GDK_KEY_Shift_L : - shift_keyPressed = TRUE; - break; - case GDK_KEY_Shift_R : - shift_keyPressed = TRUE; - break; - case GDK_KEY_Control_L : - control_keyPressed = TRUE; - break; - case GDK_KEY_Control_R : - control_keyPressed = TRUE; - break; - } - newEvent = TRUE; - } - - return TRUE; // return TRUE instead of FALSE allows default key bindings not to be aplied to the GtkScale widgets used in the GUI -} - -/* Manage key release events with GDK; this is used for key combinations */ -gboolean on_key_release (GtkWidget *window, GdkEventKey *event, Spectrum3dGui *spectrum3dGui){ - if (event->type == GDK_KEY_RELEASE){ - //printf("key release\n"); - switch (event->keyval){ - case GDK_KEY_a : - a_keyPressed = FALSE; - break; - case GDK_KEY_q : - q_keyPressed = FALSE; - break; - case GDK_KEY_Shift_L : - shift_keyPressed = FALSE; - break; - case GDK_KEY_Shift_R : - shift_keyPressed = FALSE; - break; - case GDK_KEY_g : - g_keyPressed = FALSE; - break; - case GDK_KEY_Control_L : - control_keyPressed = FALSE; - break; - case GDK_KEY_Control_R : - control_keyPressed = FALSE; - break; - } - } - - return FALSE; -} +float previousX, previousY; +Uint32 previousTimeStamp, previousFingerDownTimeStamp, previousFingerUpId; +GtkWidget *pScaleStart; #ifdef HAVE_LIBSDL2 @@ -314,6 +48,8 @@ gboolean sdl_event(Spectrum3dGui *spectrum3dGui) const Uint8 *keystate; SDL_Event event; int MouseX,MouseY; + gdouble step_increment; + gboolean multiTouch=FALSE; while (SDL_PollEvent(&event)){ //printf("SDL_event\n"); @@ -372,6 +108,77 @@ gboolean sdl_event(Spectrum3dGui *spectrum3dGui) } break; + + /*case SDL_FINGERMOTION: + //if (event.mgesture.numFingers < 2){ + SDL_Log("Finger: %"SDL_PRIs64",x: %f, y: %f",event.tfinger.fingerId, + event.tfinger.dx,event.tfinger.dy); + //} + break;*/ + case SDL_FINGERDOWN: + //SDL_Log("Finger: %"SDL_PRIs64" down - x: %f, y: %f, timestamp = %i", event.tfinger.fingerId,event.tfinger.x,event.tfinger.y, event.tfinger.timestamp); + if (((event.tfinger.timestamp-previousFingerDownTimeStamp) < 250) && (event.tfinger.fingerId == previousFingerUpId + 1)){ + g_idle_add ((GSourceFunc)playFromSource, NULL); + } +// PreviousFingerUpId is used to be sure that the first finger has been released (= a dubble tap with one finger); other wise a double touch can also trigger this if the 2 fingers don't touch the screen exactly at the same time + previousFingerDownTimeStamp = event.tfinger.timestamp; + break; + case SDL_FINGERUP: + previousFingerUpId = event.tfinger.fingerId; + //SDL_Log("Finger: %"SDL_PRIs64" up - x: %f, y: %f", + //event.tfinger.fingerId,event.tfinger.x,event.tfinger.y); + break; + case SDL_MULTIGESTURE: + multiTouch = TRUE; + /*SDL_Log("Multi Gesture: x = %f, y = %f, dAng = %f, dR = %f", + event.mgesture.x, + event.mgesture.y, + event.mgesture.dTheta, + event.mgesture.dDist);*/ + //printf("timestamp = %i\n", event.mgesture.timestamp); + if (event.mgesture.numFingers == 2){ + Z+=(event.mgesture.dDist/200); //Pinch + AngleZ-=(event.mgesture.dTheta*10); //Rotate + if ((event.mgesture.timestamp-previousTimeStamp) < 10){ //Drag + X+=((event.mgesture.x-previousX)/300); + Y-=((event.mgesture.y-previousY)/300); + } + newEvent = TRUE; + } + + /*if ((event.mgesture.timestamp-previousTimeStamp) < 100){ + //step_increment = gtk_adjustment_get_step_increment (GTK_ADJUSTMENT(spectrum3dGui->adjustStart)); + gtk_range_set_value (GTK_RANGE(spectrum3dGui->scaleBands), + //((gtk_range_get_value (GTK_RANGE(spectrum3dGui->scaleBands))) + (event.mgesture.y-previousY))); + ((gtk_range_get_value (GTK_RANGE(spectrum3dGui->scaleBands))) + (event.mgesture.dDist))); + //printf("pinch\n"); + newEvent = TRUE; + }*/ + + + //SDL_Log("MG: numDownTouch = %i",event.mgesture.numFingers); + + previousX=event.mgesture.x; + previousY=event.mgesture.y; + previousTimeStamp=event.mgesture.timestamp; + break; + + case SDL_FINGERMOTION: + if (!multiTouch){ + //SDL_Log("Finger: %"SDL_PRIs64",x: %f, y: %f",event.tfinger.fingerId, event.tfinger.dx,event.tfinger.dy); + + AngleH+=(event.tfinger.dx/10); + AngleV+=(event.tfinger.dy/10); + newEvent = TRUE; + + /*if ((event.tfinger.timestamp-previousTimeStamp) > 400){ + gtk_range_set_value (GTK_RANGE(pScaleStart), ((gtk_range_get_value (GTK_RANGE(pScaleStart))) +((gdouble)(event.tfinger.dx)))); + printf("drag\n"); + }*/ + } + multiTouch=FALSE; + break; + case SDL_KEYDOWN: keystate = SDL_GetKeyboardState(NULL); @@ -489,8 +296,7 @@ gboolean sdl_event(Spectrum3dGui *spectrum3dGui) } default: break; - - } + } } return TRUE; } diff --git a/src/main.c b/src/main.c index 99b5f4b..a5fdc5f 100644 --- a/src/main.c +++ b/src/main.c @@ -31,10 +31,6 @@ #include #endif -#if defined (GTKGLEXT3) || defined (GTKGLEXT1) - #include -#endif - #include "spectrum3d.h" #include "main.h" @@ -101,71 +97,7 @@ void quit_spectrum3d(){ gtk_main_quit(); } -void create_external_window_drawing_area(Spectrum3dGui *spectrum3dGui){ - GtkWidget *window; - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_title(GTK_WINDOW(window), PACKAGE_NAME); - gtk_window_set_default_size (GTK_WINDOW(window), (gint)spectrum3d.width, (gint)spectrum3d.height); - g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (quit_spectrum3d), NULL); - gtk_widget_set_events (window, GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); - gtk_widget_realize(window); - spectrum3dGui->drawing_area = gtk_drawing_area_new (); - - gtk_widget_realize(spectrum3dGui->drawing_area); - //gtk_box_pack_start (GTK_BOX (vBox), spectrum3dGui->drawing_area, TRUE, TRUE, 0); - -#if defined (GTKGLEXT3) || defined (GTKGLEXT1) - GdkGLConfig *glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB | - GDK_GL_MODE_DEPTH | - GDK_GL_MODE_DOUBLE); - if (glconfig == NULL) - { - g_print ("\n*** Cannot find the double-buffered visual.\n"); - g_print ("\n*** Trying single-buffered visual.\n"); - - /* Try single-buffered visual */ - glconfig = gdk_gl_config_new_by_mode (GDK_GL_MODE_RGB | - GDK_GL_MODE_DEPTH); - if (glconfig == NULL) - { - g_print ("*** No appropriate OpenGL-capable visual found.\n"); - exit (1); - } - } - /* Set OpenGL-capability to the widget */ - gtk_widget_set_gl_capability (spectrum3dGui->drawing_area, - glconfig, - NULL, - TRUE, - GDK_GL_RGBA_TYPE); -#endif - -gtk_container_add(GTK_CONTAINER(window), spectrum3dGui->drawing_area); - -#ifdef HAVE_LIBSDL - /* Hack to get SDL to use GTK window */ - /*{ char SDL_windowhack[32]; - sprintf(SDL_windowhack,"SDL_WINDOWID=%ld", - GDK_WINDOW_XID(gtk_widget_get_window(spectrum3dGui->drawing_area))); - // GDK_WINDOW_XID( spectrum3dGui.drawing_area->window))); pour GTK2?? - putenv(SDL_windowhack); - printf("%s\n", SDL_windowhack); - } - - if (SDL_Init(SDL_INIT_VIDEO) < 0) { - fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError()); - exit(1); - }*/ -#endif - - //g_signal_connect (window, "key-press-event", G_CALLBACK (on_key_press), spectrum3dGui); - //g_signal_connect (window, "key-release-event", G_CALLBACK (on_key_release), spectrum3dGui); - //g_signal_connect (window, "motion-notify-event", G_CALLBACK (on_mouse_motion), NULL); - //g_signal_connect (window, "scroll-event", G_CALLBACK (on_mouse_scroll), NULL); - //g_signal_connect (G_OBJECT (spectrum3dGui->drawing_area), "configure_event", G_CALLBACK (configure_event), NULL); - gtk_widget_show_all(window); -} int main(int argc, char *argv[]) { @@ -512,52 +444,6 @@ int main(int argc, char *argv[]) timeLabel=gtk_label_new(" 0:00 / 0:00 "); gtk_box_pack_start(GTK_BOX(pHBox[5]), timeLabel, FALSE, FALSE, 0); -/* Create drawing area */ - if (externalWindow == FALSE){ - /* Resize spectrum3dGui.mainWindow to contain drawing_area; using gtk_window_set_defaut() allows to shrink the window (gtk_widget_set_size_request() does not allow to shrink the window below the requested size); */ - //gtk_window_set_default_size (GTK_WINDOW(spectrum3dGui.mainWindow), (gint)spectrum3d.width, initialWindowHeight + (gint)spectrum3d.height); - - //gtk_widget_realize(spectrum3dGui.mainWindow); - - spectrum3dGui.drawing_area = gtk_drawing_area_new (); - -#if defined (GTKGLEXT3) || defined (GTKGLEXT1) - /* Set OpenGL-capability to the widget */ - gtk_widget_set_gl_capability (spectrum3dGui.drawing_area, - glconfig, - NULL, - TRUE, - GDK_GL_RGBA_TYPE); -#endif - - /* drawing_area has to be put in vBox AFTER the call to gtk_widget_set_gl_capability() (if GtkGlExt is used) and BEFORE the call to the sdl-gtk hack (if sdl is used)*/ - //gtk_box_pack_start (GTK_BOX (pVBox[1]), spectrum3dGui.drawing_area, TRUE, TRUE, 0); - -#ifdef HAVE_LIBSDL - /* Hack to get SDL to use GTK window */ - /*{ char SDL_windowhack[32]; - sprintf(SDL_windowhack,"SDL_WINDOWID=%ld", - GDK_WINDOW_XID(gtk_widget_get_window(spectrum3dGui.drawing_area))); - // GDK_WINDOW_XID( spectrum3dGui.drawing_area->window))); pour GTK2?? - putenv(SDL_windowhack); - printf("%s\n", SDL_windowhack); - }*/ - - - //SDL_EnableKeyRepeat(10, 10); -#endif - - //g_signal_connect (spectrum3dGui.mainWindow, "key-press-event", G_CALLBACK (on_key_press), &spectrum3dGui); - //g_signal_connect (spectrum3dGui.mainWindow, "key-release-event", G_CALLBACK (on_key_release), &spectrum3dGui); - //g_signal_connect (spectrum3dGui.mainWindow, "motion-notify-event", G_CALLBACK (on_mouse_motion), NULL); - //g_signal_connect (spectrum3dGui.mainWindow, "scroll-event", G_CALLBACK (on_mouse_scroll), NULL); - //g_signal_connect (G_OBJECT (spectrum3dGui.drawing_area), "configure_event", G_CALLBACK (configure_event), NULL); - //gtk_widget_add_events (spectrum3dGui.mainWindow, gtk_widget_get_events (spectrum3dGui.mainWindow) | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_SCROLL_MASK); - } - else { - create_external_window_drawing_area(&spectrum3dGui); - } - /* Starting value of the display */ frame = gtk_frame_new("Start value of display (in Hz)"); gtk_widget_set_tooltip_text (frame, "The lower displayed frequency (in herz)"); diff --git a/src/main.h b/src/main.h index 7cb4cdf..b764792 100644 --- a/src/main.h +++ b/src/main.h @@ -2,7 +2,7 @@ #ifndef DEFINE_MAIN #define DEFINE_MAIN -gboolean analyse_rt, jack, newEvent, externalWindow; +gboolean analyse_rt, jack, newEvent; int playing, pose, zoomFactor, hzStep; //static GtkWidget *mainWindow; GtkWidget *timeLabel, *scaleSeek; @@ -41,8 +41,6 @@ void get_saved_values(); void initGstreamer(); void init_audio_values(); void init_display_values(); -void setupGeis(); -void geisQuit(); void print_rc_file(); void change_source_button (GtkWidget *widget, Spectrum3dGui *spectrum3dGui); @@ -68,12 +66,6 @@ void init_SDL(); gboolean configure_SDL_gl_window (int width, int height); void sdl_event(); -gboolean configure_event (GtkWidget *widget, GdkEventConfigure *event, gpointer data); -gboolean on_key_press (GtkWidget * window, GdkEventKey *event, gpointer userdata); -gboolean on_key_release (GtkWidget * window, GdkEventKey *event, gpointer userdata); -gboolean on_mouse_motion (GtkWidget * window, GdkEventMotion *event, gpointer userdata); -gboolean on_mouse_scroll (GtkWidget * window, GdkEventScroll *event, gpointer userdata); - #endif diff --git a/src/menu.c b/src/menu.c index 9a859f3..6b0dc00 100644 --- a/src/menu.c +++ b/src/menu.c @@ -61,6 +61,7 @@ void onPreferences(GtkWidget* widget, Spectrum3dGui *spectrum3dGui) "_CANCEL",GTK_RESPONSE_CANCEL, NULL); gtk_window_set_default_size(GTK_WINDOW(pPreferences), 300, 300); + gtk_window_set_transient_for (GTK_WINDOW(pPreferences), GTK_WINDOW(spectrum3dGui->mainWindow)); pNotebook = gtk_notebook_new(); @@ -118,24 +119,6 @@ void onPreferences(GtkWidget* widget, Spectrum3dGui *spectrum3dGui) gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(comboColor), "RAINBOW"); gtk_combo_box_set_active(GTK_COMBO_BOX(comboColor), 2); - /* Radio button to choose wheter the display is within the UI or in another window - DISABLED in Spectrum3d-2.6 */ - pFrame = gtk_frame_new("Display window :"); - gtk_widget_set_tooltip_text (pFrame, "Choose the window where harmonics will be displayed (same or different window than the graphical user interface"); - gtk_box_pack_start(GTK_BOX(pVBox[0]), pFrame, TRUE, TRUE, 0); - gtk_container_add(GTK_CONTAINER(pFrame), pHBox[5]); - radio[0] = gtk_radio_button_new_with_label (NULL, "all in one window"); - gtk_widget_set_tooltip_text (radio[0], "Harmonics will be displayed in the same window than the graphical user interface"); - //entry = gtk_entry_new (); - //gtk_container_add (GTK_CONTAINER (radio[0]), entry); - radio[1] = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (radio[0]), - "external window"); - gtk_widget_set_tooltip_text (radio[1], "Harmonics will be displayed in another window than the graphical user interface"); - if (externalWindow) - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(radio[1]), TRUE); - //gtk_box_pack_start (GTK_BOX (pHBox[5]), radio[0], TRUE, TRUE, 0); - //gtk_box_pack_start (GTK_BOX (pHBox[5]), radio[1], TRUE, TRUE, 0); - - /* Check button to save the current position as 'Preset' */ pCheckPreset = gtk_check_button_new_with_label("Save current position as preset"); gtk_widget_set_tooltip_text (pCheckPreset, "Save the current position of display as preset"); @@ -211,10 +194,6 @@ void onPreferences(GtkWidget* widget, Spectrum3dGui *spectrum3dGui) // get other values colorType = gtk_combo_box_get_active(GTK_COMBO_BOX(comboColor)); // ColorType enum is detailed in menu.h - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radio[1]))) - externalWindow = TRUE; - else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radio[0]))) - externalWindow = FALSE; bState = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pCheckPreset)); if (bState) { @@ -226,9 +205,9 @@ void onPreferences(GtkWidget* widget, Spectrum3dGui *spectrum3dGui) spectrum3d.presetAngleZ = AngleZ; } spectrum3d.interval_rt = gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinSpectrumInterval)); - gchar *string = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(pComboPolicy)); - sprintf(policyName, "%s", string); - spectrum3d.enableTouch = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pCheckEnableTouch)); + //gchar *string = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(pComboPolicy)); + //sprintf(policyName, "%s", string); + //spectrum3d.enableTouch = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pCheckEnableTouch)); newEvent = TRUE; break; case GTK_RESPONSE_CANCEL: diff --git a/src/spectrum3d.h b/src/spectrum3d.h index e750682..15a7953 100644 --- a/src/spectrum3d.h +++ b/src/spectrum3d.h @@ -31,8 +31,6 @@ typedef struct GtkWidget *reload; GtkWidget *record; - GtkWidget *drawing_area; - GtkWidget *cbRange; GtkWidget *scaleGain; GtkWidget *scaleBands;