mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
feat(notifications): add QtMultimedia availability check and UI feedback
Add SoundService.isAvailable property to detect QtMultimedia availability at runtime and implement conditional UI rendering in notification settings tab. When QtMultimedia is unavailable, show a warning message and hide sound-related controls instead of crashing or showing broken UI.
This commit is contained in:
+16
-12
@@ -1731,12 +1731,16 @@
|
||||
"label": "Erscheinungsbild"
|
||||
}
|
||||
},
|
||||
"title": "Benachrichtigungen",
|
||||
"sounds": {
|
||||
"enabled": {
|
||||
"description": "Soundeffekte für eingehende Benachrichtigungen aktivieren.",
|
||||
"label": "Benachrichtigungstöne aktivieren"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Überspringen Sie das Abspielen der konfigurierten Benachrichtigungstöne für bestimmte Anwendungen, die ihre eigenen integrierten Töne haben.",
|
||||
"label": "Ausgeschlossene Anwendungen",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
},
|
||||
"files": {
|
||||
"critical": {
|
||||
"description": "Pfad zur Sound-Datei, die für Benachrichtigungen mit kritischer Priorität abgespielt wird.",
|
||||
@@ -1753,17 +1757,17 @@
|
||||
"label": "Sound bei normaler Dringlichkeit",
|
||||
"select-title": "Sound-Datei für normale Dringlichkeit auswählen"
|
||||
},
|
||||
"unified": {
|
||||
"description": "Pfad zur Sound-Datei, die für Benachrichtigungen abgespielt wird.",
|
||||
"label": "Benachrichtigungssound",
|
||||
"select-title": "Benachrichtigungssound-Datei auswählen"
|
||||
},
|
||||
"placeholder": "Pfad zur Sound-Datei eingeben",
|
||||
"section": {
|
||||
"description": "Benutzerdefinierte Sound-Dateien für verschiedene Benachrichtigungsdringlichkeitsstufen konfigurieren.",
|
||||
"label": "Sound-Dateien"
|
||||
},
|
||||
"select-file": "Sound-Datei auswählen"
|
||||
"select-file": "Sound-Datei auswählen",
|
||||
"unified": {
|
||||
"description": "Pfad zur Sound-Datei, die für Benachrichtigungen abgespielt wird.",
|
||||
"label": "Benachrichtigungssound",
|
||||
"select-title": "Benachrichtigungssound-Datei auswählen"
|
||||
}
|
||||
},
|
||||
"section": {
|
||||
"description": "Benachrichtigungs-Soundeffekte und Lautstärke konfigurieren.",
|
||||
@@ -1773,16 +1777,16 @@
|
||||
"description": "Unterschiedliche Sound-Dateien für niedrige, normale und kritische Benachrichtigungsprioritäten verwenden.",
|
||||
"label": "Verschiedene Sounds pro Priorität verwenden"
|
||||
},
|
||||
"unavailable": {
|
||||
"description": "Installieren Sie Qt6 Multimedia, um Benachrichtigungstöne zu aktivieren.",
|
||||
"label": "Benachrichtigungstöne nicht verfügbar"
|
||||
},
|
||||
"volume": {
|
||||
"description": "Lautstärke für Benachrichtigungstöne anpassen.",
|
||||
"label": "Sound-Lautstärke"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Überspringen Sie das Abspielen der konfigurierten Benachrichtigungstöne für bestimmte Anwendungen, die ihre eigenen integrierten Töne haben.",
|
||||
"label": "Ausgeschlossene Anwendungen",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"title": "Benachrichtigungen",
|
||||
"toast": {
|
||||
"keyboard": {
|
||||
"description": "Zeige eine Toast-Benachrichtigung an, wenn sich das Tastaturlayout ändert.",
|
||||
|
||||
+26
-22
@@ -1731,22 +1731,16 @@
|
||||
"label": "Appearance"
|
||||
}
|
||||
},
|
||||
"title": "Notifications",
|
||||
"toast": {
|
||||
"keyboard": {
|
||||
"description": "Show a toast when the keyboard layout changes.",
|
||||
"label": "Keyboard layout"
|
||||
},
|
||||
"section": {
|
||||
"description": "Configure toast appearance and behavior.",
|
||||
"label": "Toast"
|
||||
}
|
||||
},
|
||||
"sounds": {
|
||||
"enabled": {
|
||||
"description": "Enable sound effects for incoming notifications.",
|
||||
"label": "Enable notification sounds"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Skip playing the configured notification sound for specific applications that have their own built-in sounds.",
|
||||
"label": "Excluded applications",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
},
|
||||
"files": {
|
||||
"critical": {
|
||||
"description": "Path to the sound file played for critical priority notifications.",
|
||||
@@ -1763,35 +1757,45 @@
|
||||
"label": "Normal urgency sound",
|
||||
"select-title": "Select Normal Urgency Sound File"
|
||||
},
|
||||
"unified": {
|
||||
"description": "Path to the sound file played for notifications.",
|
||||
"label": "Notification sound",
|
||||
"select-title": "Select Notification Sound File"
|
||||
},
|
||||
"placeholder": "Enter path to sound file",
|
||||
"section": {
|
||||
"description": "Configure custom sound files for different notification urgency levels.",
|
||||
"label": "Sound files"
|
||||
},
|
||||
"select-file": "Select Sound File"
|
||||
"select-file": "Select Sound File",
|
||||
"unified": {
|
||||
"description": "Path to the sound file played for notifications.",
|
||||
"label": "Notification sound",
|
||||
"select-title": "Select Notification Sound File"
|
||||
}
|
||||
},
|
||||
"section": {
|
||||
"description": "Configure notification sound effects and volume.",
|
||||
"label": "Sound settings"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Skip playing the configured notification sound for specific applications that have their own built-in sounds.",
|
||||
"label": "Excluded applications",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
},
|
||||
"separate": {
|
||||
"description": "Use different sound files for low, normal, and critical priority notifications.",
|
||||
"label": "Use different sounds per priority"
|
||||
},
|
||||
"unavailable": {
|
||||
"description": "Install Qt6 Multimedia to enable notification sounds.",
|
||||
"label": "Notification sounds unavailable"
|
||||
},
|
||||
"volume": {
|
||||
"description": "Adjust the volume level for notification sounds.",
|
||||
"label": "Sound volume"
|
||||
}
|
||||
},
|
||||
"title": "Notifications",
|
||||
"toast": {
|
||||
"keyboard": {
|
||||
"description": "Show a toast when the keyboard layout changes.",
|
||||
"label": "Keyboard layout"
|
||||
},
|
||||
"section": {
|
||||
"description": "Configure toast appearance and behavior.",
|
||||
"label": "Toast"
|
||||
}
|
||||
}
|
||||
},
|
||||
"osd": {
|
||||
|
||||
+16
-12
@@ -1731,12 +1731,16 @@
|
||||
"label": "Apariencia"
|
||||
}
|
||||
},
|
||||
"title": "Notificaciones",
|
||||
"sounds": {
|
||||
"enabled": {
|
||||
"description": "Activar efectos de sonido para notificaciones entrantes.",
|
||||
"label": "Activar sonidos de notificación"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Omitir la reproducción del sonido de notificación configurado para aplicaciones específicas que tienen sus propios sonidos integrados.",
|
||||
"label": "Aplicaciones excluidas",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
},
|
||||
"files": {
|
||||
"critical": {
|
||||
"description": "Ruta al archivo de sonido reproducido para notificaciones de prioridad crítica.",
|
||||
@@ -1753,17 +1757,17 @@
|
||||
"label": "Sonido de urgencia normal",
|
||||
"select-title": "Seleccionar Archivo de Sonido de Urgencia Normal"
|
||||
},
|
||||
"unified": {
|
||||
"description": "Ruta al archivo de sonido reproducido para notificaciones.",
|
||||
"label": "Sonido de notificación",
|
||||
"select-title": "Seleccionar Archivo de Sonido de Notificación"
|
||||
},
|
||||
"placeholder": "Introducir ruta al archivo de sonido",
|
||||
"section": {
|
||||
"description": "Configurar archivos de sonido personalizados para diferentes niveles de urgencia de notificación.",
|
||||
"label": "Archivos de sonido"
|
||||
},
|
||||
"select-file": "Seleccionar Archivo de Sonido"
|
||||
"select-file": "Seleccionar Archivo de Sonido",
|
||||
"unified": {
|
||||
"description": "Ruta al archivo de sonido reproducido para notificaciones.",
|
||||
"label": "Sonido de notificación",
|
||||
"select-title": "Seleccionar Archivo de Sonido de Notificación"
|
||||
}
|
||||
},
|
||||
"section": {
|
||||
"description": "Configurar efectos de sonido y volumen de notificaciones.",
|
||||
@@ -1773,16 +1777,16 @@
|
||||
"description": "Usar diferentes archivos de sonido para notificaciones de prioridad baja, normal y crítica.",
|
||||
"label": "Usar sonidos diferentes por prioridad"
|
||||
},
|
||||
"unavailable": {
|
||||
"description": "Instala Qt6 Multimedia para habilitar los sonidos de notificación.",
|
||||
"label": "Sonidos de notificación no disponibles"
|
||||
},
|
||||
"volume": {
|
||||
"description": "Ajustar el nivel de volumen para los sonidos de notificación.",
|
||||
"label": "Volumen del sonido"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Omitir la reproducción del sonido de notificación configurado para aplicaciones específicas que tienen sus propios sonidos integrados.",
|
||||
"label": "Aplicaciones excluidas",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"title": "Notificaciones",
|
||||
"toast": {
|
||||
"keyboard": {
|
||||
"description": "Mostrar una notificación cuando cambie la distribución del teclado.",
|
||||
|
||||
+16
-12
@@ -1731,12 +1731,16 @@
|
||||
"label": "Apparence"
|
||||
}
|
||||
},
|
||||
"title": "Notifications",
|
||||
"sounds": {
|
||||
"enabled": {
|
||||
"description": "Activer les effets sonores pour les notifications entrantes.",
|
||||
"label": "Activer les sons de notification"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Ne pas jouer le son de notification configuré pour les applications spécifiques qui ont leurs propres sons intégrés.",
|
||||
"label": "Applications exclues",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
},
|
||||
"files": {
|
||||
"critical": {
|
||||
"description": "Chemin vers le fichier sonore joué pour les notifications de priorité critique.",
|
||||
@@ -1753,17 +1757,17 @@
|
||||
"label": "Son d'urgence normale",
|
||||
"select-title": "Sélectionner le Fichier Son d'Urgence Normale"
|
||||
},
|
||||
"unified": {
|
||||
"description": "Chemin vers le fichier sonore joué pour les notifications.",
|
||||
"label": "Son de notification",
|
||||
"select-title": "Sélectionner le Fichier Son de Notification"
|
||||
},
|
||||
"placeholder": "Entrer le chemin vers le fichier sonore",
|
||||
"section": {
|
||||
"description": "Configurer des fichiers sonores personnalisés pour différents niveaux d'urgence de notification.",
|
||||
"label": "Fichiers sonores"
|
||||
},
|
||||
"select-file": "Sélectionner un Fichier Son"
|
||||
"select-file": "Sélectionner un Fichier Son",
|
||||
"unified": {
|
||||
"description": "Chemin vers le fichier sonore joué pour les notifications.",
|
||||
"label": "Son de notification",
|
||||
"select-title": "Sélectionner le Fichier Son de Notification"
|
||||
}
|
||||
},
|
||||
"section": {
|
||||
"description": "Configurer les effets sonores et le volume des notifications.",
|
||||
@@ -1773,16 +1777,16 @@
|
||||
"description": "Utiliser différents fichiers sonores pour les notifications de priorité basse, normale et critique.",
|
||||
"label": "Utiliser des sons différents par priorité"
|
||||
},
|
||||
"unavailable": {
|
||||
"description": "Installez Qt6 Multimedia pour activer les sons de notification.",
|
||||
"label": "Sons de notification non disponibles"
|
||||
},
|
||||
"volume": {
|
||||
"description": "Ajuster le niveau de volume pour les sons de notification.",
|
||||
"label": "Volume sonore"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Ne pas jouer le son de notification configuré pour les applications spécifiques qui ont leurs propres sons intégrés.",
|
||||
"label": "Applications exclues",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"title": "Notifications",
|
||||
"toast": {
|
||||
"keyboard": {
|
||||
"description": "Afficher une notification lorsque la disposition du clavier change.",
|
||||
|
||||
+16
-12
@@ -1731,12 +1731,16 @@
|
||||
"label": "外観"
|
||||
}
|
||||
},
|
||||
"title": "通知",
|
||||
"sounds": {
|
||||
"enabled": {
|
||||
"description": "着信通知の音声効果を有効にします。",
|
||||
"label": "通知音を有効にする"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "独自の通知音を持つ特定のアプリケーションについて、設定された通知音の再生をスキップします。",
|
||||
"label": "除外アプリケーション",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
},
|
||||
"files": {
|
||||
"critical": {
|
||||
"description": "緊急度の高い通知で再生される音声ファイルへのパス。",
|
||||
@@ -1753,17 +1757,17 @@
|
||||
"label": "通常優先度通知音",
|
||||
"select-title": "通常優先度通知音ファイルを選択"
|
||||
},
|
||||
"unified": {
|
||||
"description": "通知で再生される音声ファイルへのパス。",
|
||||
"label": "通知音",
|
||||
"select-title": "通知音ファイルを選択"
|
||||
},
|
||||
"placeholder": "音声ファイルへのパスを入力",
|
||||
"section": {
|
||||
"description": "通知の緊急度レベルに応じてカスタム音声ファイルを設定します。",
|
||||
"label": "音声ファイル"
|
||||
},
|
||||
"select-file": "音声ファイルを選択"
|
||||
"select-file": "音声ファイルを選択",
|
||||
"unified": {
|
||||
"description": "通知で再生される音声ファイルへのパス。",
|
||||
"label": "通知音",
|
||||
"select-title": "通知音ファイルを選択"
|
||||
}
|
||||
},
|
||||
"section": {
|
||||
"description": "通知の音声効果と音量を設定します。",
|
||||
@@ -1773,16 +1777,16 @@
|
||||
"description": "低、通常、緊急優先度の通知に異なる音声ファイルを使用します。",
|
||||
"label": "優先度ごとに異なる音を使用する"
|
||||
},
|
||||
"unavailable": {
|
||||
"description": "通知音を有効にするにはQt6マルチメディアをインストールしてください。",
|
||||
"label": "通知音は利用できません"
|
||||
},
|
||||
"volume": {
|
||||
"description": "通知音の音量レベルを調整します。",
|
||||
"label": "サウンド音量"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "独自の通知音を持つ特定のアプリケーションについて、設定された通知音の再生をスキップします。",
|
||||
"label": "除外アプリケーション",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"title": "通知",
|
||||
"toast": {
|
||||
"keyboard": {
|
||||
"description": "キーボードレイアウトの変更時にトーストを表示します。",
|
||||
|
||||
+16
-12
@@ -1731,12 +1731,16 @@
|
||||
"label": "Uiterlijk"
|
||||
}
|
||||
},
|
||||
"title": "Meldingen",
|
||||
"sounds": {
|
||||
"enabled": {
|
||||
"description": "Schakel geluidseffecten in voor inkomende meldingen.",
|
||||
"label": "Meldingsgeluiden inschakelen"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Sla het afspelen van het geconfigureerde notificatiegeluid over voor specifieke applicaties die hun eigen ingebouwde geluiden hebben.",
|
||||
"label": "Uitgesloten applicaties",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
},
|
||||
"files": {
|
||||
"critical": {
|
||||
"description": "Pad naar het geluidsbestand dat wordt afgespeeld voor meldingen met kritieke prioriteit.",
|
||||
@@ -1753,17 +1757,17 @@
|
||||
"label": "Normale urgentie geluid",
|
||||
"select-title": "Selecteer Normale Urgentie Geluidsbestand"
|
||||
},
|
||||
"unified": {
|
||||
"description": "Pad naar het geluidsbestand dat wordt afgespeeld voor meldingen.",
|
||||
"label": "Meldingsgeluid",
|
||||
"select-title": "Selecteer Meldingsgeluidsbestand"
|
||||
},
|
||||
"placeholder": "Voer pad naar geluidsbestand in",
|
||||
"section": {
|
||||
"description": "Configureer aangepaste geluidsbestanden voor verschillende meldingsurgentieniveaus.",
|
||||
"label": "Geluidsbestanden"
|
||||
},
|
||||
"select-file": "Selecteer Geluidsbestand"
|
||||
"select-file": "Selecteer Geluidsbestand",
|
||||
"unified": {
|
||||
"description": "Pad naar het geluidsbestand dat wordt afgespeeld voor meldingen.",
|
||||
"label": "Meldingsgeluid",
|
||||
"select-title": "Selecteer Meldingsgeluidsbestand"
|
||||
}
|
||||
},
|
||||
"section": {
|
||||
"description": "Configureer meldingsgeluidseffecten en volume.",
|
||||
@@ -1773,16 +1777,16 @@
|
||||
"description": "Gebruik verschillende geluidsbestanden voor lage, normale en kritieke prioriteitsmeldingen.",
|
||||
"label": "Gebruik verschillende geluiden per prioriteit"
|
||||
},
|
||||
"unavailable": {
|
||||
"description": "Installeer Qt6 Multimedia om meldingsgeluiden in te schakelen.",
|
||||
"label": "Meldingsgeluiden niet beschikbaar"
|
||||
},
|
||||
"volume": {
|
||||
"description": "Pas het volumeniveau aan voor meldingsgeluiden.",
|
||||
"label": "Geluidsvolume"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Sla het afspelen van het geconfigureerde notificatiegeluid over voor specifieke applicaties die hun eigen ingebouwde geluiden hebben.",
|
||||
"label": "Uitgesloten applicaties",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"title": "Meldingen",
|
||||
"toast": {
|
||||
"keyboard": {
|
||||
"description": "Toon een toastmelding wanneer de toetsenbordindeling verandert.",
|
||||
|
||||
+16
-12
@@ -1731,12 +1731,16 @@
|
||||
"label": "Aparência"
|
||||
}
|
||||
},
|
||||
"title": "Notificações",
|
||||
"sounds": {
|
||||
"enabled": {
|
||||
"description": "Ativar efeitos sonoros para notificações recebidas.",
|
||||
"label": "Ativar sons de notificação"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Pular a reprodução do som de notificação configurado para aplicativos específicos que têm seus próprios sons integrados.",
|
||||
"label": "Aplicativos excluídos",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
},
|
||||
"files": {
|
||||
"critical": {
|
||||
"description": "Caminho para o arquivo de som tocado para notificações de prioridade crítica.",
|
||||
@@ -1753,17 +1757,17 @@
|
||||
"label": "Som de urgência normal",
|
||||
"select-title": "Selecionar Arquivo de Som de Urgência Normal"
|
||||
},
|
||||
"unified": {
|
||||
"description": "Caminho para o arquivo de som tocado para notificações.",
|
||||
"label": "Som de notificação",
|
||||
"select-title": "Selecionar Arquivo de Som de Notificação"
|
||||
},
|
||||
"placeholder": "Digitar o caminho para o arquivo de som",
|
||||
"section": {
|
||||
"description": "Configurar arquivos de som personalizados para diferentes níveis de urgência de notificação.",
|
||||
"label": "Arquivos de som"
|
||||
},
|
||||
"select-file": "Selecionar Arquivo de Som"
|
||||
"select-file": "Selecionar Arquivo de Som",
|
||||
"unified": {
|
||||
"description": "Caminho para o arquivo de som tocado para notificações.",
|
||||
"label": "Som de notificação",
|
||||
"select-title": "Selecionar Arquivo de Som de Notificação"
|
||||
}
|
||||
},
|
||||
"section": {
|
||||
"description": "Configurar efeitos sonoros e volume de notificações.",
|
||||
@@ -1773,16 +1777,16 @@
|
||||
"description": "Usar arquivos de som diferentes para notificações de prioridade baixa, normal e crítica.",
|
||||
"label": "Usar sons diferentes por prioridade"
|
||||
},
|
||||
"unavailable": {
|
||||
"description": "Instale o Qt6 Multimedia para habilitar sons de notificação.",
|
||||
"label": "Sons de notificação indisponíveis"
|
||||
},
|
||||
"volume": {
|
||||
"description": "Ajustar o nível de volume para sons de notificação.",
|
||||
"label": "Volume do som"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Pular a reprodução do som de notificação configurado para aplicativos específicos que têm seus próprios sons integrados.",
|
||||
"label": "Aplicativos excluídos",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"title": "Notificações",
|
||||
"toast": {
|
||||
"keyboard": {
|
||||
"description": "Mostrar uma notificação quando o layout do teclado mudar.",
|
||||
|
||||
+16
-12
@@ -1731,12 +1731,16 @@
|
||||
"label": "Внешний вид"
|
||||
}
|
||||
},
|
||||
"title": "Уведомления",
|
||||
"sounds": {
|
||||
"enabled": {
|
||||
"description": "Включить звуковые эффекты для входящих уведомлений.",
|
||||
"label": "Включить звуки уведомлений"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Пропускать воспроизведение настроенного звука уведомлений для определенных приложений, имеющих собственные встроенные звуки.",
|
||||
"label": "Исключенные приложения",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
},
|
||||
"files": {
|
||||
"critical": {
|
||||
"description": "Путь к звуковому файлу, воспроизводимому для уведомлений с критическим приоритетом.",
|
||||
@@ -1753,17 +1757,17 @@
|
||||
"label": "Звук нормальной важности",
|
||||
"select-title": "Выбрать Файл Звука Нормальной Важности"
|
||||
},
|
||||
"unified": {
|
||||
"description": "Путь к звуковому файлу, воспроизводимому для уведомлений.",
|
||||
"label": "Звук уведомления",
|
||||
"select-title": "Выбрать Файл Звука Уведомления"
|
||||
},
|
||||
"placeholder": "Введите путь к звуковому файлу",
|
||||
"section": {
|
||||
"description": "Настроить пользовательские звуковые файлы для разных уровней важности уведомлений.",
|
||||
"label": "Звуковые файлы"
|
||||
},
|
||||
"select-file": "Выбрать Звуковой Файл"
|
||||
"select-file": "Выбрать Звуковой Файл",
|
||||
"unified": {
|
||||
"description": "Путь к звуковому файлу, воспроизводимому для уведомлений.",
|
||||
"label": "Звук уведомления",
|
||||
"select-title": "Выбрать Файл Звука Уведомления"
|
||||
}
|
||||
},
|
||||
"section": {
|
||||
"description": "Настроить звуковые эффекты и громкость уведомлений.",
|
||||
@@ -1773,16 +1777,16 @@
|
||||
"description": "Использовать разные звуковые файлы для уведомлений с низким, нормальным и критическим приоритетом.",
|
||||
"label": "Использовать разные звуки для разных приоритетов"
|
||||
},
|
||||
"unavailable": {
|
||||
"description": "Установите Qt6 Multimedia для включения звуков уведомлений.",
|
||||
"label": "Звуки уведомлений недоступны"
|
||||
},
|
||||
"volume": {
|
||||
"description": "Настроить уровень громкости для звуков уведомлений.",
|
||||
"label": "Громкость звука"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Пропускать воспроизведение настроенного звука уведомлений для определенных приложений, имеющих собственные встроенные звуки.",
|
||||
"label": "Исключенные приложения",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"title": "Уведомления",
|
||||
"toast": {
|
||||
"keyboard": {
|
||||
"description": "Показывать всплывающее уведомление при смене раскладки клавиатуры.",
|
||||
|
||||
+16
-12
@@ -1731,12 +1731,16 @@
|
||||
"label": "Görünüm"
|
||||
}
|
||||
},
|
||||
"title": "Bildirimler",
|
||||
"sounds": {
|
||||
"enabled": {
|
||||
"description": "Gelen bildirimler için ses efektlerini etkinleştir.",
|
||||
"label": "Bildirim seslerini etkinleştir"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Kendi dahili seslerine sahip belirli uygulamalar için ayarlanan bildirim sesini çalmayı es geçin.",
|
||||
"label": "Hariç tutulan uygulamalar",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
},
|
||||
"files": {
|
||||
"critical": {
|
||||
"description": "Kritik öncelikli bildirimler için çalınan ses dosyasının yolu.",
|
||||
@@ -1753,17 +1757,17 @@
|
||||
"label": "Normal aciliyet sesi",
|
||||
"select-title": "Normal Aciliyet Ses Dosyası Seç"
|
||||
},
|
||||
"unified": {
|
||||
"description": "Bildirimler için çalınan ses dosyasının yolu.",
|
||||
"label": "Bildirim sesi",
|
||||
"select-title": "Bildirim Ses Dosyası Seç"
|
||||
},
|
||||
"placeholder": "Ses dosyası yolunu girin",
|
||||
"section": {
|
||||
"description": "Farklı bildirim aciliyet seviyeleri için özel ses dosyaları yapılandırın.",
|
||||
"label": "Ses dosyaları"
|
||||
},
|
||||
"select-file": "Ses Dosyası Seç"
|
||||
"select-file": "Ses Dosyası Seç",
|
||||
"unified": {
|
||||
"description": "Bildirimler için çalınan ses dosyasının yolu.",
|
||||
"label": "Bildirim sesi",
|
||||
"select-title": "Bildirim Ses Dosyası Seç"
|
||||
}
|
||||
},
|
||||
"section": {
|
||||
"description": "Bildirim ses efektlerini ve ses seviyesini yapılandırın.",
|
||||
@@ -1773,16 +1777,16 @@
|
||||
"description": "Düşük, normal ve kritik öncelikli bildirimler için farklı ses dosyaları kullanın.",
|
||||
"label": "Öncelik başına farklı sesler kullan"
|
||||
},
|
||||
"unavailable": {
|
||||
"description": "Bildirim seslerini etkinleştirmek için Qt6 Multimedia'yı kurun.",
|
||||
"label": "Bildirim sesleri kullanılamıyor"
|
||||
},
|
||||
"volume": {
|
||||
"description": "Bildirim sesleri için ses seviyesini ayarlayın.",
|
||||
"label": "Ses seviyesi"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Kendi dahili seslerine sahip belirli uygulamalar için ayarlanan bildirim sesini çalmayı es geçin.",
|
||||
"label": "Hariç tutulan uygulamalar",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"title": "Bildirimler",
|
||||
"toast": {
|
||||
"keyboard": {
|
||||
"description": "Klavye düzeni değiştiğinde bir bildirim göster.",
|
||||
|
||||
@@ -1731,12 +1731,16 @@
|
||||
"label": "Зовнішній вигляд"
|
||||
}
|
||||
},
|
||||
"title": "Сповіщення",
|
||||
"sounds": {
|
||||
"enabled": {
|
||||
"description": "Увімкнути звукові ефекти для вхідних сповіщень.",
|
||||
"label": "Увімкнути звуки сповіщень"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Пропускати відтворення налаштованого звуку сповіщень для певних програм, які мають власні вбудовані звуки.",
|
||||
"label": "Виключені програми",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
},
|
||||
"files": {
|
||||
"critical": {
|
||||
"description": "Шлях до звукового файлу, що відтворюється для сповіщень із критичним пріоритетом.",
|
||||
@@ -1753,17 +1757,17 @@
|
||||
"label": "Звук нормальної терміновості",
|
||||
"select-title": "Вибрати Файл Звуку Нормальної Терміновості"
|
||||
},
|
||||
"unified": {
|
||||
"description": "Шлях до звукового файлу, що відтворюється для сповіщень.",
|
||||
"label": "Звук сповіщення",
|
||||
"select-title": "Вибрати Файл Звуку Сповіщення"
|
||||
},
|
||||
"placeholder": "Введіть шлях до звукового файлу",
|
||||
"section": {
|
||||
"description": "Налаштуйте власні звукові файли для різних рівнів терміновості сповіщень.",
|
||||
"label": "Звукові файли"
|
||||
},
|
||||
"select-file": "Вибрати Звуковий Файл"
|
||||
"select-file": "Вибрати Звуковий Файл",
|
||||
"unified": {
|
||||
"description": "Шлях до звукового файлу, що відтворюється для сповіщень.",
|
||||
"label": "Звук сповіщення",
|
||||
"select-title": "Вибрати Файл Звуку Сповіщення"
|
||||
}
|
||||
},
|
||||
"section": {
|
||||
"description": "Налаштуйте звукові ефекти та гучність сповіщень.",
|
||||
@@ -1773,16 +1777,16 @@
|
||||
"description": "Використовувати різні звукові файли для сповіщень із низьким, нормальним та критичним пріоритетом.",
|
||||
"label": "Використовувати різні звуки для різних пріоритетів"
|
||||
},
|
||||
"unavailable": {
|
||||
"description": "Встановіть Qt6 Multimedia, щоб увімкнути звуки сповіщень.",
|
||||
"label": "Звуки сповіщень недоступні"
|
||||
},
|
||||
"volume": {
|
||||
"description": "Налаштуйте рівень гучності для звуків сповіщень.",
|
||||
"label": "Гучність звуку"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "Пропускати відтворення налаштованого звуку сповіщень для певних програм, які мають власні вбудовані звуки.",
|
||||
"label": "Виключені програми",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"title": "Сповіщення",
|
||||
"toast": {
|
||||
"keyboard": {
|
||||
"description": "Показувати сповіщення при зміні розкладки клавіатури.",
|
||||
|
||||
@@ -1731,12 +1731,16 @@
|
||||
"label": "外观"
|
||||
}
|
||||
},
|
||||
"title": "通知",
|
||||
"sounds": {
|
||||
"enabled": {
|
||||
"description": "为传入通知启用音效。",
|
||||
"label": "启用通知声音"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "跳过播放具有自己内置声音的特定应用程序的配置通知声音。",
|
||||
"label": "排除的应用程序",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
},
|
||||
"files": {
|
||||
"critical": {
|
||||
"description": "为关键优先级通知播放的声音文件路径。",
|
||||
@@ -1753,17 +1757,17 @@
|
||||
"label": "普通紧急声音",
|
||||
"select-title": "选择普通紧急声音文件"
|
||||
},
|
||||
"unified": {
|
||||
"description": "为通知播放的声音文件路径。",
|
||||
"label": "通知声音",
|
||||
"select-title": "选择通知声音文件"
|
||||
},
|
||||
"placeholder": "输入声音文件路径",
|
||||
"section": {
|
||||
"description": "为不同的通知紧急级别配置自定义声音文件。",
|
||||
"label": "声音文件"
|
||||
},
|
||||
"select-file": "选择声音文件"
|
||||
"select-file": "选择声音文件",
|
||||
"unified": {
|
||||
"description": "为通知播放的声音文件路径。",
|
||||
"label": "通知声音",
|
||||
"select-title": "选择通知声音文件"
|
||||
}
|
||||
},
|
||||
"section": {
|
||||
"description": "配置通知音效和音量。",
|
||||
@@ -1773,16 +1777,16 @@
|
||||
"description": "为低、普通和关键优先级通知使用不同的声音文件。",
|
||||
"label": "按优先级使用不同声音"
|
||||
},
|
||||
"unavailable": {
|
||||
"description": "安装 Qt6 多媒体以启用通知声音。",
|
||||
"label": "通知声音不可用"
|
||||
},
|
||||
"volume": {
|
||||
"description": "调整通知声音的音量级别。",
|
||||
"label": "声音音量"
|
||||
},
|
||||
"excluded-apps": {
|
||||
"description": "跳过播放具有自己内置声音的特定应用程序的配置通知声音。",
|
||||
"label": "排除的应用程序",
|
||||
"placeholder": "discord,firefox,chrome,chromium,edge"
|
||||
}
|
||||
},
|
||||
"title": "通知",
|
||||
"toast": {
|
||||
"keyboard": {
|
||||
"description": "当键盘布局改变时显示一个Toast提示。",
|
||||
|
||||
@@ -127,10 +127,38 @@ ColumnLayout {
|
||||
description: I18n.tr("settings.notifications.sounds.section.description")
|
||||
}
|
||||
|
||||
// QtMultimedia unavailable message
|
||||
NBox {
|
||||
Layout.fillWidth: true
|
||||
visible: !SoundService.multimediaAvailable
|
||||
implicitHeight: unavailableContent.implicitHeight + Style.marginL * 2
|
||||
|
||||
RowLayout {
|
||||
id: unavailableContent
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginL
|
||||
spacing: Style.marginM
|
||||
|
||||
NIcon {
|
||||
icon: "warning"
|
||||
color: Color.mOnSurfaceVariant
|
||||
pointSize: Style.fontSizeXL
|
||||
Layout.alignment: Qt.AlignTop
|
||||
}
|
||||
|
||||
NLabel {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("settings.notifications.sounds.unavailable.label")
|
||||
description: I18n.tr("settings.notifications.sounds.unavailable.description")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("settings.notifications.sounds.enabled.label")
|
||||
description: I18n.tr("settings.notifications.sounds.enabled.description")
|
||||
checked: Settings.data.notifications?.sounds?.enabled ?? false
|
||||
visible: SoundService.multimediaAvailable
|
||||
onToggled: checked => Settings.data.notifications.sounds.enabled = checked
|
||||
}
|
||||
|
||||
@@ -138,7 +166,7 @@ ColumnLayout {
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
visible: Settings.data.notifications?.sounds?.enabled ?? false
|
||||
visible: SoundService.multimediaAvailable && (Settings.data.notifications?.sounds?.enabled ?? false)
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("settings.notifications.sounds.volume.label")
|
||||
@@ -159,7 +187,7 @@ ColumnLayout {
|
||||
// Separate Sounds Toggle
|
||||
NToggle {
|
||||
Layout.fillWidth: true
|
||||
visible: Settings.data.notifications?.sounds?.enabled ?? false
|
||||
visible: SoundService.multimediaAvailable && (Settings.data.notifications?.sounds?.enabled ?? false)
|
||||
label: I18n.tr("settings.notifications.sounds.separate.label")
|
||||
description: I18n.tr("settings.notifications.sounds.separate.description")
|
||||
checked: Settings.data.notifications?.sounds?.separateSounds ?? false
|
||||
@@ -170,7 +198,7 @@ ColumnLayout {
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
visible: (Settings.data.notifications?.sounds?.enabled ?? false) && !(Settings.data.notifications?.sounds?.separateSounds ?? false)
|
||||
visible: SoundService.multimediaAvailable && (Settings.data.notifications?.sounds?.enabled ?? false) && !(Settings.data.notifications?.sounds?.separateSounds ?? false)
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("settings.notifications.sounds.files.unified.label")
|
||||
@@ -197,7 +225,7 @@ ColumnLayout {
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
visible: (Settings.data.notifications?.sounds?.enabled ?? false) && (Settings.data.notifications?.sounds?.separateSounds ?? false)
|
||||
visible: SoundService.multimediaAvailable && (Settings.data.notifications?.sounds?.enabled ?? false) && (Settings.data.notifications?.sounds?.separateSounds ?? false)
|
||||
|
||||
// Low Urgency Sound File
|
||||
ColumnLayout {
|
||||
@@ -268,7 +296,7 @@ ColumnLayout {
|
||||
ColumnLayout {
|
||||
spacing: Style.marginXXS
|
||||
Layout.fillWidth: true
|
||||
visible: Settings.data.notifications?.sounds?.enabled ?? false
|
||||
visible: SoundService.multimediaAvailable && (Settings.data.notifications?.sounds?.enabled ?? false)
|
||||
|
||||
NLabel {
|
||||
label: I18n.tr("settings.notifications.sounds.excluded-apps.label")
|
||||
|
||||
@@ -34,6 +34,10 @@ Singleton {
|
||||
property var quickshellIdToInternalId: ({})
|
||||
property var imageQueue: []
|
||||
|
||||
// Rate limiting for notification sounds (minimum 100ms between sounds)
|
||||
property var lastSoundTime: 0
|
||||
readonly property int minSoundInterval: 100
|
||||
|
||||
PanelWindow {
|
||||
implicitHeight: 0
|
||||
implicitWidth: 0
|
||||
@@ -209,6 +213,18 @@ Singleton {
|
||||
|
||||
// Function to play notification sound using existing SoundService
|
||||
function playNotificationSound(urgency, appName) {
|
||||
// Rate limiting - prevent sound spam
|
||||
const now = Date.now();
|
||||
if (now - lastSoundTime < minSoundInterval) {
|
||||
return;
|
||||
}
|
||||
lastSoundTime = now;
|
||||
|
||||
// Check if QtMultimedia is available
|
||||
if (!SoundService.multimediaAvailable) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if notification sounds are enabled
|
||||
if (!Settings.data.notifications?.sounds?.enabled) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user