Skip to content

Commit 28b05af

Browse files
committed
Release 1.0.7
* Added possibility to enable/disable Knob's scale actions.
2 parents 701b113 + b7c7c04 commit 28b05af

File tree

10 files changed

+67
-23
lines changed

10 files changed

+67
-23
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,28 @@ jobs:
8787
echo "***** MEMCHECK $test *****"; \
8888
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
8989
done
90+
opensuse_tumbleweed_clang:
91+
runs-on: ubuntu-latest
92+
container:
93+
image: opensuse/tumbleweed:latest
94+
steps:
95+
- name: Install dependencies
96+
run: zypper --non-interactive --no-gpg-checks in tar gzip git make valgrind gcc gcc-c++ libstdc++-devel clang libX11-devel libXrandr-devel libglvnd-devel Mesa-libGL-devel libsndfile-devel freetype2-devel cairo-devel
97+
- uses: actions/checkout@v3
98+
- name: Configure project
99+
run: make config TEST=1 CC=clang CXX=clang++
100+
- name: Fetch project dependencies
101+
run: make fetch
102+
- name: Build project
103+
run: make VERBOSE=1
104+
- name: Run unit tests
105+
run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1
106+
- name: Run unit tests with memcheck
107+
run: |
108+
for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \
109+
echo "***** MEMCHECK $test *****"; \
110+
valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \
111+
done
90112
debian_stable:
91113
runs-on: ubuntu-latest
92114
container:

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
* RECENT CHANGES
33
*******************************************************************************
44

5+
=== 1.0.7 ===
6+
* Added possibility to enable/disable Knob's scale actions.
7+
58
=== 1.0.6 ===
69
* Added stretch and loop markers to the AudioChannel and AudioSample widgets.
710
* Added tk::Tab and tk::TabControl widgets.

include/lsp-plug.in/tk/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#define LSP_TK_LIB_MAJOR 1
2626
#define LSP_TK_LIB_MINOR 0
27-
#define LSP_TK_LIB_MICRO 6
27+
#define LSP_TK_LIB_MICRO 7
2828

2929
#if defined(LSP_TK_LIB_PUBLISHER)
3030
#define LSP_TK_LIB_PUBLIC LSP_EXPORT_MODIFIER

include/lsp-plug.in/tk/widgets/containers/Window.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ namespace lsp
9090
mouse_handler_t hMouse; // Mouse handler
9191
key_handler_t hKeys; // Key handler
9292

93-
Window *pActor;
93+
ws::IWindow *pActor;
9494
Timer sRedraw;
9595

9696
prop::String sTitle;
@@ -222,7 +222,8 @@ namespace lsp
222222
* @param actor actor
223223
* @return status of operation
224224
*/
225-
virtual void show(Widget *actor);
225+
virtual void show(tk::Widget *actor);
226+
virtual void show(ws::IWindow *actor);
226227

227228
virtual status_t add(Widget *widget);
228229

include/lsp-plug.in/tk/widgets/simple/Knob.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ namespace lsp
4949
prop::Boolean sScaleMarks;
5050
prop::Boolean sBalanceColorCustom;
5151
prop::Boolean sFlat;
52+
prop::Boolean sScaleActive;
5253
prop::Integer sHoleSize;
5354
prop::Integer sGapSize;
5455
prop::Float sScaleBrightness;
@@ -95,6 +96,7 @@ namespace lsp
9596
prop::Boolean sScaleMarks;
9697
prop::Boolean sBalanceColorCustom;
9798
prop::Boolean sFlat;
99+
prop::Boolean sScaleActive;
98100
prop::Integer sHoleSize;
99101
prop::Integer sGapSize;
100102
prop::Float sScaleBrightness;
@@ -135,6 +137,7 @@ namespace lsp
135137
LSP_TK_PROPERTY(Boolean, scale_marks, &sScaleMarks)
136138
LSP_TK_PROPERTY(Boolean, balance_color_custom, &sBalanceColorCustom)
137139
LSP_TK_PROPERTY(Boolean, flat, &sFlat)
140+
LSP_TK_PROPERTY(Boolean, scale_active, &sScaleActive)
138141
LSP_TK_PROPERTY(Integer, hole_size, &sHoleSize)
139142
LSP_TK_PROPERTY(Integer, gap_size, &sGapSize)
140143
LSP_TK_PROPERTY(Float, scale_brightness, &sScaleBrightness)

modules.mk

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,61 +19,61 @@
1919
#
2020

2121
# Variables that describe dependencies
22-
LSP_COMMON_LIB_VERSION := 1.0.23
22+
LSP_COMMON_LIB_VERSION := 1.0.25
2323
LSP_COMMON_LIB_NAME := lsp-common-lib
2424
LSP_COMMON_LIB_TYPE := src
2525
LSP_COMMON_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_COMMON_LIB_NAME).git
2626
LSP_COMMON_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_COMMON_LIB_NAME).git
2727

28-
LSP_TEST_FW_VERSION := 1.0.17
28+
LSP_TEST_FW_VERSION := 1.0.18
2929
LSP_TEST_FW_NAME := lsp-test-fw
3030
LSP_TEST_FW_TYPE := src
3131
LSP_TEST_FW_URL_RO := https://github.com/lsp-plugins/$(LSP_TEST_FW_NAME).git
3232
LSP_TEST_FW_URL_RW := [email protected]:lsp-plugins/$(LSP_TEST_FW_NAME).git
3333

34-
LSP_LLTL_LIB_VERSION := 1.0.7
34+
LSP_LLTL_LIB_VERSION := 1.0.8
3535
LSP_LLTL_LIB_NAME := lsp-lltl-lib
3636
LSP_LLTL_LIB_TYPE := src
3737
LSP_LLTL_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_LLTL_LIB_NAME).git
3838
LSP_LLTL_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_LLTL_LIB_NAME).git
3939

40-
LSP_RUNTIME_LIB_VERSION := 1.0.10
40+
LSP_RUNTIME_LIB_VERSION := 1.0.11
4141
LSP_RUNTIME_LIB_NAME := lsp-runtime-lib
4242
LSP_RUNTIME_LIB_TYPE := src
4343
LSP_RUNTIME_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_RUNTIME_LIB_NAME).git
4444
LSP_RUNTIME_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_RUNTIME_LIB_NAME).git
4545

46-
LSP_R3D_IFACE_VERSION := 1.0.7
46+
LSP_R3D_IFACE_VERSION := 1.0.8
4747
LSP_R3D_IFACE_NAME := lsp-r3d-iface
4848
LSP_R3D_IFACE_TYPE := src
4949
LSP_R3D_IFACE_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_IFACE_NAME).git
5050
LSP_R3D_IFACE_URL_RW := [email protected]:lsp-plugins/$(LSP_R3D_IFACE_NAME).git
5151

52-
LSP_R3D_BASE_LIB_VERSION := 1.0.7
52+
LSP_R3D_BASE_LIB_VERSION := 1.0.8
5353
LSP_R3D_BASE_LIB_NAME := lsp-r3d-base-lib
5454
LSP_R3D_BASE_LIB_TYPE := src
5555
LSP_R3D_BASE_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_BASE_LIB_NAME).git
5656
LSP_R3D_BASE_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_R3D_BASE_LIB_NAME).git
5757

58-
LSP_R3D_GLX_LIB_VERSION := 1.0.7
58+
LSP_R3D_GLX_LIB_VERSION := 1.0.8
5959
LSP_R3D_GLX_LIB_NAME := lsp-r3d-glx-lib
6060
LSP_R3D_GLX_LIB_TYPE := src
6161
LSP_R3D_GLX_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_GLX_LIB_NAME).git
6262
LSP_R3D_GLX_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_R3D_GLX_LIB_NAME).git
6363

64-
LSP_R3D_WGL_LIB_VERSION := 1.0.2
64+
LSP_R3D_WGL_LIB_VERSION := 1.0.3
6565
LSP_R3D_WGL_LIB_NAME := lsp-r3d-wgl-lib
6666
LSP_R3D_WGL_LIB_TYPE := src
6767
LSP_R3D_WGL_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_WGL_LIB_NAME).git
6868
LSP_R3D_WGL_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_R3D_WGL_LIB_NAME).git
6969

70-
LSP_WS_LIB_VERSION := 1.0.6
70+
LSP_WS_LIB_VERSION := 1.0.7
7171
LSP_WS_LIB_NAME := lsp-ws-lib
7272
LSP_WS_LIB_TYPE := src
7373
LSP_WS_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_WS_LIB_NAME).git
7474
LSP_WS_LIB_URL_RW := [email protected]:lsp-plugins/$(LSP_WS_LIB_NAME).git
7575

76-
LSP_DSP_LIB_VERSION := 1.0.8
76+
LSP_DSP_LIB_VERSION := 1.0.9
7777
LSP_DSP_LIB_NAME := lsp-dsp-lib
7878
LSP_DSP_LIB_TYPE := src
7979
LSP_DSP_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_DSP_LIB_NAME).git

project.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ ARTIFACT_ID = LSP_TK_LIB
2323
ARTIFACT_NAME = lsp-tk-lib
2424
ARTIFACT_DESC = Graphical toolkit library for Linux Studio Plugins Project
2525
ARTIFACT_HEADERS = lsp-plug.in
26-
ARTIFACT_VERSION = 1.0.6
26+
ARTIFACT_VERSION = 1.0.7
2727
ARTIFACT_EXPORT_ALL = 1

src/main/prop/base/Property.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ namespace lsp
173173

174174
const prop::enum_t *Property::find_enum(const LSPString *s, const prop::enum_t *xenum)
175175
{
176-
for (size_t i=0; (xenum != NULL) && (xenum->name != NULL); ++i, ++xenum)
176+
for (; (xenum != NULL) && (xenum->name != NULL); ++xenum)
177177
{
178178
if (s->equals_ascii_nocase(xenum->name))
179179
return xenum;
@@ -183,7 +183,7 @@ namespace lsp
183183

184184
const prop::enum_t *Property::find_enum(const char *s, const prop::enum_t *xenum)
185185
{
186-
for (size_t i=0; (xenum != NULL) && (xenum->name != NULL); ++i, ++xenum)
186+
for (; (xenum != NULL) && (xenum->name != NULL); ++xenum)
187187
{
188188
if (!strcasecmp(xenum->name, s))
189189
return xenum;

src/main/widgets/containers/Window.cpp

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,8 @@ namespace lsp
555555
void Window::show_widget()
556556
{
557557
// Remember last actor and reset
558-
Window *wnd = pActor;
559-
pActor = NULL;
558+
ws::IWindow *wnd = pActor;
559+
pActor = NULL;
560560

561561
// Update window parameters
562562
if (pWindow != NULL)
@@ -593,7 +593,7 @@ namespace lsp
593593
rw.nWidth = 0;
594594
rw.nHeight = 0;
595595

596-
wnd->get_screen_rectangle(&r);
596+
wnd->get_absolute_geometry(&r);
597597
pWindow->get_geometry(&rw);
598598

599599
ssize_t left = r.nLeft + ((r.nWidth - rw.nWidth) / 2);
@@ -607,7 +607,7 @@ namespace lsp
607607
}
608608

609609
// Show over the actor window
610-
pWindow->show(wnd->pWindow);
610+
pWindow->show(wnd);
611611
}
612612

613613
void Window::show()
@@ -616,13 +616,24 @@ namespace lsp
616616
return WidgetContainer::show();
617617
}
618618

619-
void Window::show(Widget *actor)
619+
void Window::show(tk::Widget *actor)
620+
{
621+
// Already visible?
622+
if (sVisibility.get())
623+
return;
624+
625+
tk::Window *w_actor = (actor != NULL) ? widget_cast<tk::Window>(actor->toplevel()) : NULL;
626+
pActor = (w_actor != NULL) ? w_actor->pWindow : NULL;
627+
return WidgetContainer::show();
628+
}
629+
630+
void Window::show(ws::IWindow *actor)
620631
{
621632
// Already visible?
622633
if (sVisibility.get())
623634
return;
624635

625-
pActor = (actor != NULL) ? widget_cast<Window>(actor->toplevel()) : NULL;
636+
pActor = actor;
626637
return WidgetContainer::show();
627638
}
628639

src/main/widgets/simple/Knob.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ namespace lsp
4747
sScaleMarks.bind("scale.marks", this);
4848
sBalanceColorCustom.bind("balance.color.custom", this);
4949
sFlat.bind("flat", this);
50+
sScaleActive.bind("scale.active", this);
5051
sHoleSize.bind("hole.size", this);
5152
sGapSize.bind("gap.size", this);
5253
sScaleBrightness.bind("scale.brightness", this);
@@ -68,6 +69,7 @@ namespace lsp
6869
sScaleMarks.set(true);
6970
sBalanceColorCustom.set(false);
7071
sFlat.set(false);
72+
sScaleActive.set(true);
7173
sHoleSize.set(1);
7274
sGapSize.set(1);
7375
sScaleBrightness.set(0.75f);
@@ -96,6 +98,7 @@ namespace lsp
9698
sScaleMarks(&sProperties),
9799
sBalanceColorCustom(&sProperties),
98100
sFlat(&sProperties),
101+
sScaleActive(&sProperties),
99102
sHoleSize(&sProperties),
100103
sGapSize(&sProperties),
101104
sScaleBrightness(&sProperties),
@@ -134,6 +137,7 @@ namespace lsp
134137
sScaleMarks.bind("scale.marks", &sStyle);
135138
sBalanceColorCustom.bind("balance.color.custom", &sStyle);
136139
sFlat.bind("flat", &sStyle);
140+
sScaleActive.bind("scale.active", &sStyle);
137141
sHoleSize.bind("hole.size", &sStyle);
138142
sGapSize.bind("gap.size", &sStyle);
139143
sScaleBrightness.bind("scale.brightness", &sStyle);
@@ -281,7 +285,7 @@ namespace lsp
281285
if (delta > ssize_t(xr*xr))
282286
return S_NONE;
283287

284-
if (scale > 0)
288+
if ((scale > 0) && (sScaleActive.get()))
285289
{
286290
xr -= scale;
287291
if (delta >= ssize_t(xr*xr))

0 commit comments

Comments
 (0)