Commit graph

184 commits

Author SHA1 Message Date
Iain Lane
ad39840066 sound: Pass a GvcMixerControl to the stream volume sliders
Since 9d612ff1c7 this is required,
otherwise we never set up the GtkAdjustment and so the scales don't
display any values or widget to make adjustments, meaning they can't be
used.

Also call `notify_volume_cb()` from `update_ranges()` to initialise the
adjustment, since when we set the mixer control we now might not have
set the value.

Closes #652
2019-09-09 15:23:32 +00:00
Robert Ancell
9d612ff1c7 sound: Fix volume sliders regression
GVC added additional checks that break where we were using a NULL value instead
of a GvcMixerControl. Solution is to pass this object where appropriate.

(gnome-control-center:833): Gvc-CRITICAL **: 11:09:33.818: gvc_mixer_control_get_vol_max_norm: assertion 'GVC_IS_MIXER_CONTROL (control)' failed

Fixes #636
2019-08-25 09:51:31 +00:00
Georges Basile Stavracas Neto
05b531ec28 sound: Remove unused variable 2019-06-16 01:01:36 +00:00
Jordan Petridis
b542e98359 sounds: Use correct mute icon in the input section
The current code does not differenciate between input and
output, and thus it shows the same icon for muting outputs
and inputs. As per design suggesion [1], the input row
should use the "microphone-sensitivity-muted-symbolic" icon.

In order to achieve that, move the CcLevelBarStreamType enum
to a separate header, and rename it to CcStreamType. And also
pass the stream type to the volume slider.

In CcVolumeSlider, update the code to switch to the correct
mute icon depending on the stream type.

[1] https://gitlab.gnome.org/GNOME/gnome-control-center/issues/539

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/issues/539
2019-06-16 01:01:36 +00:00
Georges Basile Stavracas Neto
a9f0248376 sound: Use fallback icon when stream's icon doesn't exist
Some streams may give us an icon name that doesn't exist in the
icon theme (e.g. Spotify giving "audio"). While it's fundamentally
an application problem, we can deal with this case a bit better
than showing the ugly "image-missing" icon.

Detect when an icon doesn't exist by performing an icon theme
lookup and, if the icon really doesn't exist, use a proper fallback
icon.

It also avoids a small GIcon leak.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/issues/548
2019-06-16 01:01:36 +00:00
Georges Basile Stavracas Neto
e8bd7c24ee sound: Remove icon from sound theme buttons
Remove the icon and adjust the label to be vertically
centralized.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/issues/549
2019-06-16 01:01:36 +00:00
Benjamin Berg
6872c767bb sound: Clean up labels of devices without origin
Sound devices may not have an origin, in that case we ended up with a
trailing " - " in the label which should not be there. Add a check that
the origin is non-null and not an empty string and only show the devices
description otherwise.
2019-05-22 17:19:26 +02:00
Bastien Nocera
d36cffa290 sound: Add "input" and "output" keywords to the panel 2019-05-14 01:55:59 +00:00
Robert Ancell
82ca937ecd sound: Fix crash when sound device set to NULL
This can occur during transitions.

Introduced in f081264.
2019-03-14 11:28:08 +13:00
Robert Ancell
f0812644ae sound: Apply device changes
Was missing the code to actually apply the changes.
2019-03-14 10:58:59 +13:00
Felipe Borges
de769bbe9b sound: Add shadow to application icons
The new GNOME application icons need a shadow when placed on top
of a light background.

See https://gitlab.gnome.org/GNOME/Initiatives/issues/2
2019-03-13 13:46:53 +01:00
Adrien Plazas
c74d28009c sound: Make the panel adaptive
Use a HdyColumn and ellipsize same labels so the panel can fit in
narrower windows.
2019-02-18 15:12:53 +01:00
Robert Ancell
0799c864e8 sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
Robert Ancell
652dd8bfc8 sound: Remove old panel
This has been replaced with a new implementation that uses the new designs.
2019-02-07 09:31:18 +13:00
Robert Ancell
74b54f6336 sound: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-18 01:18:57 +00:00
Piotr Drąg
7265bd53a0 Add translator comments to .desktop files
Icons are confusing translators, and gettext
is unlikely to get fixed any time soon.
2018-02-23 18:49:35 +01:00
Robert Ancell
911e7d4e4f sound: Use g_auto for variables
https://bugzilla.gnome.org/show_bug.cgi?id=788223
2018-01-25 23:28:41 -02:00
Iñigo Martínez
0dd386f405 build: Migrate from Intltool to Gettext
Recent versions of Gettext are able to translate several formats
that are used in GNOME applications. This patch migrates from
Intltool to Gettext by using meson's i18n features.

https://bugzilla.gnome.org/show_bug.cgi?id=787588
2018-01-23 10:49:31 +01:00
Piotr Drąg
9db20522d3 sound: specify encoding in the XML declaration of gnome-sounds-default.xml
Without it, gettext mangles UTF-8 characters.

See https://savannah.gnu.org/bugs/?52932

https://bugzilla.gnome.org/show_bug.cgi?id=787588
2018-01-19 16:41:30 +01:00
Iñigo Martínez
dc0988d47c build: Remove autotools
To avoid the burden of maintaining multiple build systems, this
patch removes autotools support.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-18 12:20:08 +01:00
Iñigo Martínez
32edd6789e build: Port to meson build system
Meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 20:09:35 -02:00
Iñigo Martínez
d7012d0337 build: Move libgd and gvc modules to subprojects
In order to share the libgd and gvc modules between autotools and
meson, this patch moves their directories to subprojects
directory and updates autotools.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 19:02:57 -02:00
Bastien Nocera
7ce6bd1e55 sound: Respect allow-volume-above-100-percent setting
Instead of always allowing above 100% volumes for hardware that supports
it, only enable it when the allow-volume-above-100-percent setting is
set to true as well.

See https://bugzilla.gnome.org/show_bug.cgi?id=790988

https://bugzilla.gnome.org/show_bug.cgi?id=791272
2018-01-12 20:13:00 +01:00
Felipe Borges
b3d51d9051 sound: Embed the "Applications" tab content in a scrolled window
The "Applications" tab might expand vertically indefinitely depending
on the amount of applications playing sounds simultaneously. This
causes the whole Control Center window to grow vertically.

To reproduce the issue you'd need to launch multiple sound sources.
  1. Launch "gst-play-1.0 <music file>"
  2. Press space to pause the playback
  3. Press Ctrl+Z to send it into the background
  4. Goto 1.

These changes pack the content of the "Applications" tab in a
GtkScrolledWindow.

To avoid having the scrollbar overlapping the switchers, we set a
10px margin-end to the inner container.

https://bugzilla.gnome.org/show_bug.cgi?id=786684
2018-01-09 16:48:40 +01:00
Andrea Azzarone
dc46487081 sound: Discard selection-changed events that are not triggered by the user
The tree view in the input and the output tab uses the "selection-changed"
signal. This implies that when a row is removed (e.g. when unplugging heaphones) g-c-c
will receive the signal and try to change the active port. G-c-c should not be the one
deciding deciding which port should be active, the user or PA are smart enough. We
should descard selection-changed events that are not triggered by an user interaction.

https://bugzilla.gnome.org/show_bug.cgi?id=789551
2017-10-30 16:49:26 +01:00
Jakub Steiner
8bfd0b97d6 sound: update artwork
- restyle all assets symbolic
- add missing mono speaker

https://bugzilla.gnome.org/show_bug.cgi?id=775170
2017-10-17 23:54:28 +02:00
Robert Ancell
43129a1cfd sound: Use G_DEFINE_TYPE 2017-09-26 21:09:56 -04:00
Bastien Nocera
27a8ca6e02 sound: Memory leaks and Bluetooth handling fixes 2017-04-06 15:17:20 +02:00
Bastien Nocera
3f0510cac8 build: Better libm checks
Use AC_CHECK_LIBM instead of AC_CHECK_LIB(m,...
and use $(LIBM) instead of hardcoding "-lm" in Makefiles.
2017-02-08 19:21:53 +01:00
Bastien Nocera
65d9bd0441 sound: Fix "format not a string literal" error
https://bugzilla.gnome.org/show_bug.cgi?id=764727
2016-04-08 11:31:24 +02:00
Christophe Fergeau
c84722248e shell: Revert "Let panels have their own commandline flags"
This reverts commit 31a8a99440.

This was meant for bgo#695885 which has stalled for a while, so this
feature has no in-tree user. This commit removes it for now, this can be
readded when users for it materialize.

https://bugzilla.gnome.org/show_bug.cgi?id=751597
2015-07-16 11:49:34 +02:00
David Henningsson
c4b4b8bdc5 sound: Support more channels in speaker test
Add support for mono, front-left-of-center and
right-left-of-center channels in speaker test dialogue.

https://bugzilla.gnome.org/show_bug.cgi?id=750324
2015-06-30 14:55:24 +02:00
Bastien Nocera
b410ec353c sound: Fix gtk_tree_model_get_iter_first() retval
https://bugzilla.gnome.org/show_bug.cgi?id=749892
2015-05-27 11:06:02 +02:00
Bastien Nocera
7ae145cc2b sound: Update submodule to fix duplicated Bluetooth devices
https://bugzilla.gnome.org/show_bug.cgi?id=697545
2015-04-01 14:18:03 +02:00
Bastien Nocera
2e18538cc8 sound: Remove unused enumeration
Left-over from when we had a separate hardware tab.
2015-04-01 14:18:03 +02:00
Bastien Nocera
5e7c1544fd sound: Fix output/output bars not following external changes
When looking up a bar for a particular stream, special-case the input
and output bars/streams, as they will not be added to the "bars"
hashtable (which is, as per comment, only for applications and the sound
events bar).

https://bugzilla.gnome.org/show_bug.cgi?id=738869
2015-03-17 12:21:22 +01:00
Bastien Nocera
2476dde3b5 Revert "sound: Fix the main volume bars to correctly display changes in volume"
This results in crashes when switching inputs or outputs, as other parts
of the code expect only application bars being added to that hashtable.
The bar was destroyed when switching outputs (as the stream is removed before
a new one being added) but with the bar pointing to freed memory.

This reverts commit 22fa7f1292.

https://bugzilla.gnome.org/show_bug.cgi?id=746227
2015-03-17 12:21:15 +01:00
Bastien Nocera
857f6ea8ef sound: Default to horizontal channel bars
This stops unnecessary orientation changes on panel startup.
2015-03-17 11:49:24 +01:00
Bastien Nocera
e9a833af12 sound: Fix visibility of bar when orientation is the same as the default
This will fix the bar not showing up when we switch the default
orientation. When we changed the orientation, we went through
update_layout() which shows the frame at the end. _init() didn't do
that.
2015-03-17 11:31:54 +01:00
Cosimo Cecchi
6137c60195 sound: use row-activated to listen to alert sound changes
We currently install two signal handlers for button-press-event and
selection-changed. As the former also calls the latter, the two interact
in non-obvious ways that can lead to two alerts being played at the same
time under certain circumstances.
Avoid this problem by setting activate-on-single-click on the tree view
and listening to the row-activated signal to drive previews and model
changes.

https://bugzilla.gnome.org/show_bug.cgi?id=671446
2015-03-15 12:28:22 -07:00
Rui Matos
70c33f473a sound: Fix deprecated API usage
https://bugzilla.gnome.org/show_bug.cgi?id=740986
2014-12-05 16:23:07 +01:00
Rui Matos
3d2576b5f3 sound/speaker-test: Port to GtkGrid
https://bugzilla.gnome.org/show_bug.cgi?id=740986
2014-12-05 16:13:29 +01:00
Rui Matos
22fa7f1292 sound: Fix the main volume bars to correctly display changes in volume
The active input and output streams aren't added through add_stream()
so they weren't being mapped to their respective volume bars,
resulting in updates to the volume through other means not being
reflected in our UI.

Moving the mapping to bar_set_stream() which is called for every
stream fixes the problem. Also, there's no value in having a
helper function to do a g_hash_table_insert() and not doing the same
for the respective g_hash_table_remove()s so remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=738869
2014-10-21 15:07:17 +02:00
Debarshi Ray
fa35a97fb2 sound: Use GtkBox instead of GtkHBox
We need to account for the fact that unlike GtkHBox, GtkBox does not
expand the child in gtk_container_add.

https://bugzilla.gnome.org/show_bug.cgi?id=732624
2014-07-02 17:44:51 +02:00
Yosef Or Boczko
62c00c7a9a sound: Use header bar in the testing dialog
https://bugzilla.gnome.org/show_bug.cgi?id=724299
2014-04-28 17:29:18 +03:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Jasper St. Pierre
dd52ac9417 Add NoDisplay to all gnome-control-center panel .desktop files
These aren't apps -- they're simply launchers for gnome-control-center.
They should not be shown as apps in the UI at all.

https://bugzilla.gnome.org/show_bug.cgi?id=712246
2013-11-15 08:44:53 -05:00
Debarshi Ray
f06a349a2a Use a consistent set of permissions when creating directories
https://bugzilla.gnome.org/show_bug.cgi?id=709417
2013-10-04 12:10:14 +02:00
Jasper St. Pierre
84b186803e Update gvc 2013-09-04 13:01:13 -04:00
Yosef Or Boczko
4fc66a57fa sound: drop GtkStock
https://bugzilla.gnome.org/show_bug.cgi?id=704178
2013-07-19 15:58:30 +03:00