Commit Graph

48 Commits

Author SHA1 Message Date
Nate Gallaher
b525d8dc23 Clarify pad tooltip to specify attenuation amount 2024-02-02 19:19:22 +10:30
Geoffrey D. Bennett
0c3bc30439 Fix dial to display focus indication
Partial cherry-pick from 5dc3ab Sebastian Kaminski
"dial ... shows focus indication".

Use has_focus() rather than has_visible_focus() as I found
has_visible_focus() to be unreliable.
2023-12-15 03:17:04 +10:30
Geoffrey D. Bennett
945ccc874d Fix dial to grab focus when clicked
Partial cherry-pick from 5dc3ab Sebastian Kaminski
"dial grabs focus when being clicked".
2023-12-15 03:14:23 +10:30
Geoffrey D. Bennett
fef139be64 Split calc_valp() into calc_valp() and calc_valp_log()
gtk_dial_drag_gesture_begin() needs a linear calc_valp().
2023-12-15 02:55:42 +10:30
Geoffrey D. Bennett
f10a383e36 Reformat keyboard accelerators to match existing code
Terminate menus[] with empty-initialised as well.
2023-12-15 02:44:37 +10:30
Trent
21f0d9dd05 Add keyboard accelerators (aka shortcuts, hotkeys) for menu items. 2023-12-12 14:25:25 -07:00
Jason A. Donenfeld
d81f9ca2bb gtkdial: use fabs() for double
Passing a double to abs() truncates it to an integer, which is probably
not intended, and also causes fatal errors on clang.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-12-05 12:29:49 +10:30
Geoffrey D. Bennett
6812c001de Fix long lines 2023-12-02 04:15:55 +10:30
Geoffrey D. Bennett
21cc6d6021 Allow the mixer window to be resized and give it scrollbars 2023-12-02 03:06:53 +10:30
Jason A. Donenfeld
4cb1cd6e57 Makefile: prefer distro cflags if specified
The compilation flags that are necessary for building and part of the
developer's intentions belong in the `+=` section, but the base flags
that distros like to override belong in a `?=` section, so that build
systems using their own are respected.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-12-01 14:19:36 +10:30
sporksnail
1211746b9e src/Makefile: Respect CFLAGS from environment 2023-11-30 12:44:03 +10:30
Geoffrey D. Bennett
32c0062367 Update drag_motion() to scroll the routing window
The routing window will be scrolled relative to the position of the
mouse within the window so all sources/sinks can be reached when
dragging.
2023-11-30 00:42:55 +10:30
Geoffrey D. Bennett
8376ce70b4 Fix typo rounting -> routing 2023-11-30 00:42:52 +10:30
Geoffrey D. Bennett
d31bd3380e Allow the routing window to be resized and give it scrollbars 2023-11-26 22:57:52 +10:30
Geoffrey D. Bennett
19ccbbb304 Fix the socket widget so that it will not shrink 2023-11-26 22:56:59 +10:30
Geoffrey D. Bennett
26db9dec52 Improve layout for larger interfaces without speaker switching
The Clarett 8Pre layout was very wide; it would be preferable if the
main window output controls were placed below the global & input
controls like for the Gen 3 18i8 and 18i20.

Rather than use the presence of speaker switching to determine which
main window layout to use, check the number of input & output
controls, and use the taller layout if the total is 12 or more.
2023-11-26 22:56:09 +10:30
Geoffrey D. Bennett
92932dbb26 Remove user-control of level meters
jandejongh reported:

In the USB Levels display, user can (attempt to) set the level of the
"slider".
Expected: These "sliders" are read-only and should not allow setting a
value (makes no sense to me?).

Fixes: #78.
2023-11-19 16:00:58 +10:30
Geoffrey D. Bennett
befce0824f Check Firmware Version before enabling Levels menu item
The level meters don't work correctly on earlier kernel versions, so
they shouldn't be displayed in that case. The "Firmware Version" ALSA
control was added to the kernel at the same time as the level meters
were fixed, so use the presence of that to determine whether or not to
enable the menu item.
2023-11-19 13:12:50 +10:30
Geoffrey D. Bennett
e92e391548 Add Clarett USB/Clarett+ models to window-hardware.c 2023-11-18 02:03:01 +10:30
fenugrec
c49a788ecd Reduce code duplication in menu.c 2023-11-18 01:58:43 +10:30
fenugrec
2936f110be Replace deprecated gtk_widget_{show,hide} calls
The replacement, gtk_widget_set_visible(), is available since 2.18.
There is some code duplication in menu.c that could eventually be
unified.
2023-11-18 01:50:42 +10:30
Geoffrey D. Bennett
fb3429ba6c Global replace "destination" with "sink"
Fixes #73.
2023-11-17 15:40:53 +10:30
Geoffrey D. Bennett
3595f5ccf5 Update Makefile to get version from $APP_VERSION
If git describe fails, check $APP_VERSION, otherwise set the version
to "Unknown".
2023-11-15 00:00:28 +10:30
Geoffrey D. Bennett
d96ced2b45 Add meter/level display 2023-11-14 01:54:42 +10:30
sporksnail
38edefb93e window-startup.c: fix typo
Fix a minor typo in window-startup.c
2023-11-13 03:24:41 +10:30
Alejandro Domínguez
2ce8450031 Do not use deprecated or non-standard keys in desktop file 2023-10-19 03:38:07 +10:30
Alejandro Domínguez
5637e411d4 Change icon file name
It's a good idea to use the new FreeDesktop conventions for
file names. It adapts better to stuff like Flatpak.
2023-10-19 03:38:07 +10:30
David Cooper
e176fad933 Add keyword to desktop file 2023-10-19 03:29:28 +10:30
Geoffrey D. Bennett
1839c18671 Specify full path to alsactl
Debian doesn't include /usr/sbin in $PATH so alsactl isn't found.
Hopefully it's in /usr/sbin for everyone.

Fixes #65.
2023-10-19 02:08:58 +10:30
Geoffrey D. Bennett
ea920d6343 Apply correction curve to the dials
Display the volume levels on the dials with a correction curve that
resembles what the volume knob on the hardware does.
2023-10-09 02:05:21 +10:30
Geoffrey D. Bennett
7c9ec68d7c Fix input counting for Clarett+ series
The Clarett+ series don't have a pad function, so can't rely on that
for creating input controls. Look for "Line ... Capture Switch" rather
than "Line ... Pad Capture Switch".
2023-09-20 03:36:53 +09:30
Geoffrey D. Bennett
fb9ccfed49 Fix building with Gtk 4.10
Add -Wno-error=deprecated-declarations to the Makefile so that it
can build when using Gtk 4.10.
2023-09-07 02:10:48 +09:30
Geoffrey D. Bennett
65c0f6aa43 Add Clarett support 2022-08-12 01:42:54 +09:30
Sebastian Kaminski
50b7531dd2 Prevent the boolean widget from changing size when toggled
When the label of the button for the boolean widget changes, the size
of the button was also changing. This commit sets the minimum size of
the widget so that it will accommodate both labels.
2022-04-02 23:14:50 +10:30
Geoffrey D. Bennett
c175afbad7 Clarify comments and variable names in choose_line_colour() 2022-04-01 17:42:19 +10:30
Szabolcs Szőke
b9f0b64d18 Make routing sources and destinations the same width
Fixes #4.
2022-03-27 15:38:56 +02:00
Geoffrey D. Bennett
52f8c7ab8c Fix format-security warning in error.c
gtk_message_dialog_new() takes a format string which should be "%s" in
this case, not the string to display. Reported by Sebastian.
2022-03-17 17:06:19 +10:30
Geoffrey D. Bennett
f70c0cb409 Add help target to src/Makefile 2022-03-17 01:32:22 +10:30
KottV
c7881dfae9 Fix linking in OBS
Fixes #5.
2022-03-17 00:46:42 +10:30
Geoffrey D. Bennett
f0b3d3d01d Don't hardcode the version number in the about dialog
Update the Makefile to use git describe to get the version number and
define that as a macro that about.c can use.
2022-03-15 23:21:17 +10:30
Geoffrey D. Bennett
a55fe4cb5b Add copyright info to the Makefile 2022-03-15 23:15:53 +10:30
Geoffrey D. Bennett
8257949e5d Add desktop and icon files and install into the correct place
Remove 48x48 icon; use 256x256 icon only.
Remove icons from the executable.
No need to call gtk_window_set_default_icon_name() anymore.
Add desktop file.
Add install and uninstall Makefile targets.
Update USAGE.md with installation instructions.
Thanks to @szszoke for figuring this one out!

Fixes #2.
2022-03-15 01:29:56 +10:30
Geoffrey D. Bennett
5b1f4f2b61 Change route-label hover background colour to work with dark theme
Hard-coding a light background for route-label hovering didn't work
well with dark themes which have text in a light colour. Use
@theme_selected_bg_color as suggested by @szszoke.

Fixes #3.
2022-03-15 00:12:18 +10:30
Geoffrey D. Bennett
3beee99c78 Reformat CSS to not be so squishy
Whitespace changes only.
2022-03-15 00:06:22 +10:30
Geoffrey D. Bennett
c661b4a915 Display input labels across the top of the mixer window
Especially for the 18i20, having labels across the top as well as
along the bottom makes it easier to follow the grid.
2022-03-14 09:24:52 +10:30
Geoffrey D. Bennett
7df79349f9 Reduce button padding as intended
Fix typo in CSS file.
2022-03-14 09:24:52 +10:30
Geoffrey D. Bennett
fc8714ec1e Fix size of mixer output sockets on Gen 3 18i20 routing
Set the alignment on the socket picture to be center rather than fill
so if there's extra space available the image doesn't get expanded and
look awful.

Fixes #1.
2022-03-14 09:24:52 +10:30
Geoffrey D. Bennett
17b4d2f055 Initial revision 2022-03-14 09:24:43 +10:30