Viewport: Only zoom in/out at vertical wheel events
Viewport always zoomed the signals in and out on a wheel event. Moving the
scroll wheel up or down caused the intended effect of zooming in or zooming out,
respectively. This works flawlessly on mice with only a vertical wheel.
On mice with a horizontal or tilting wheel, horizontal scrolling or tilting was
still treated as zooming in and out. This created a non-intuitive experience,
as the user expects the signals to scroll left or right with this gesture.
Check to make sure the wheel event is a vertical one, and only then zoom in/out.
Do nothing if the wheel event is not vertical.
Uwe Hermann [Wed, 12 Dec 2012 21:00:09 +0000 (22:00 +0100)]
cmake: Add boost-thread as explicit dependency.
Apparently boost-thread requires boost-system even if not explicitly
used in the code.
See also: https://svn.boost.org/trac/boost/ticket/7241
On Debian with libboost-thread1.50.0 and libboost-system1.50.0 the
following error occurs during linking:
/usr/bin/ld: CMakeFiles/pulseview.dir/main.cpp.o: undefined reference to symbol 'boost::system::system_category()'
/usr/bin/ld: note: 'boost::system::system_category()' is defined in DSO /usr/lib/libboost_system.so.1.50.0 so try adding it to the linker command line
/usr/lib/libboost_system.so.1.50.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
This commit fixes the issue.
It's unclear whether this is an issue that should be fixed in PulseView
in general, or whether it's a Boost issue.
Peter Stuge [Mon, 3 Dec 2012 03:23:37 +0000 (04:23 +0100)]
Add struct sr_context * to sr_driver_init() calls
libsigrok.git commit 193691ae1590eb31025d943ffbb0ea5c1047e6ca changes
the API of sr_driver_init() to take a struct sr_context * parameter as
allocated by sr_init().
Move our struct sr_context *sr_ctx out of main() into file global scope
so that it can be used easily in all calls to sr_driver_init().
Peter Stuge [Sun, 21 Oct 2012 23:12:52 +0000 (01:12 +0200)]
Add struct sr_context to the sr_init() and sr_exit() calls
libsigrok.git commit b8072700c1bc7d13ba004fd897668b56cec4ac62 adds
struct sr_context to the public API, and changes sr_init() and sr_exit()
to take a struct sr_context ** and struct sr_context * parameter
respectively.
struct sr_context is opaque, and all sr_init() and sr_exit() calls must
be balanced.
-DBOOST_TEST_DYN_LINK is meant to be passed only to pulseview-test,
not to pulseview. When test were enabled, this flag was defined
globally, and as a result, also passed to pulseview.
Create a CMakeLists.txt for test, and add test as a subdirectory
when tests are enabled. This way, -DBOOST_TEST_DYN_LINK is only
defined for our test app.
Versioning was already handled in CMakeLists.txt, but it was handled
in a non-standard and unclear manner. We used
set(VERSION
for starters. While this is valid CMake syntax, VERSION is also a
reserved word in cmake, depending on the context. We were
communicating the version information by a compile-time define, again,
not a recommended practice.
Change versioning to the more standard way of
set(*VERSION_MAJOR
set(*VERSION_MINOR
set(*VERSION_MICRO
set(*VERSION_STRING
Instead of defining the version at compile time, generate a config.h
file with the version information.
The if(WIN32)/else(WIN32)/endif(WIN32) is an archaic cmake syntax.
Remove all the if(WIN32) clauses, and use an option to specify whether
we want to link to the static versions of libsigrok*. That's basically
what the WIN32 clauses were doing anyway. This makes the "what is
going on" more readeable.
On WIN32, automatically set this option to link to the static libraries.