From 35d1bc9d7c53e1f4cee74d0d11f7b7c79189ede1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Tue, 2 Oct 2018 10:51:27 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20patch=20=D0=B4=D0=BB=D1=8F=20cinnamon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * добавлено скрытие настройки звука через панель управления если используется ALSA (определение по calculate.env) --- .../gnome-extra/.calculate_directory | 1 + .../gnome-extra/cinnamon/.calculate_directory | 1 + .../cinnamon-3.8.8-sound_settings.patch | 30 +++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 profiles/templates/3.6/6_ac_install_patch/gnome-extra/.calculate_directory create mode 100644 profiles/templates/3.6/6_ac_install_patch/gnome-extra/cinnamon/.calculate_directory create mode 100644 profiles/templates/3.6/6_ac_install_patch/gnome-extra/cinnamon/cinnamon-3.8.8-sound_settings.patch diff --git a/profiles/templates/3.6/6_ac_install_patch/gnome-extra/.calculate_directory b/profiles/templates/3.6/6_ac_install_patch/gnome-extra/.calculate_directory new file mode 100644 index 000000000..720d52e47 --- /dev/null +++ b/profiles/templates/3.6/6_ac_install_patch/gnome-extra/.calculate_directory @@ -0,0 +1 @@ +# Calculate append=skip diff --git a/profiles/templates/3.6/6_ac_install_patch/gnome-extra/cinnamon/.calculate_directory b/profiles/templates/3.6/6_ac_install_patch/gnome-extra/cinnamon/.calculate_directory new file mode 100644 index 000000000..615bc8bdf --- /dev/null +++ b/profiles/templates/3.6/6_ac_install_patch/gnome-extra/cinnamon/.calculate_directory @@ -0,0 +1 @@ +# Calculate append=skip merge()!= diff --git a/profiles/templates/3.6/6_ac_install_patch/gnome-extra/cinnamon/cinnamon-3.8.8-sound_settings.patch b/profiles/templates/3.6/6_ac_install_patch/gnome-extra/cinnamon/cinnamon-3.8.8-sound_settings.patch new file mode 100644 index 000000000..7138e816f --- /dev/null +++ b/profiles/templates/3.6/6_ac_install_patch/gnome-extra/cinnamon/cinnamon-3.8.8-sound_settings.patch @@ -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")