You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calculate-overlay/profiles/templates/3.6/6_ac_install_patch/gnome-extra/cinnamon/cinnamon-3.8.8-sound_settin...

31 lines
1.2 KiB

# Calculate format=diff
diff --git a/files/usr/share/cinnamon/cinnamon-settings/modules/cs_sound.py b/files/usr/share/cinnamon/cinnamon-settings/modules/cs_sound.py
index fe0e2f0..e1d1b11 100755
--- a/files/usr/share/cinnamon/cinnamon-settings/modules/cs_sound.py
+++ b/files/usr/share/cinnamon/cinnamon-settings/modules/cs_sound.py
@@ -6,6 +6,7 @@ gi.require_version('Gtk', '3.0')
from gi.repository import GLib, Gtk, Gdk, Cvc, GdkPixbuf, Gio
from GSettingsWidgets import *
import dbus
+from configparser import ConfigParser, Error as ConfigParserError
CINNAMON_SOUNDS = "org.cinnamon.sounds"
CINNAMON_DESKTOP_SOUNDS = "org.cinnamon.desktop.sound"
@@ -494,6 +495,16 @@ class Module:
self.sidePage = SidePage(_("Sound"), "cs-sound", keywords, content_box, module=self)
self.sound_settings = Gio.Settings(CINNAMON_DESKTOP_SOUNDS)
+ def _loadCheck(self):
+ cp = ConfigParser()
+ try:
+ cp.read('/var/lib/calculate/calculate.env')
+ if cp['install']['os_audio'] == 'alsa':
+ return False
+ except (KeyError,ConfigParserError):
+ pass
+ return True
+
def on_module_selected(self):
if not self.loaded:
print("Loading Sound module")