* добавлено скрытие настройки звука через панель управления если используется ALSA (определение по calculate.env)mhiretskiy
parent
40bf7f871c
commit
35d1bc9d7c
@ -0,0 +1 @@
|
||||
# Calculate append=skip
|
@ -0,0 +1 @@
|
||||
# Calculate append=skip merge()!=
|
@ -0,0 +1,30 @@
|
||||
# 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")
|
Loading…
Reference in new issue