From 13525d7b0451f0a9ca7b73e83e2f374fbfb7c1bc Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 22 Oct 2017 23:07:30 +0000 Subject: Fork from Ubuntu's indicator-sound. --- ....canonical.indicator.sound.AccountsService.pkla | 6 -- ...rg.ayatana.indicator.sound.AccountsService.pkla | 6 ++ data/CMakeLists.txt | 28 +++--- data/ayatana-indicator-sound.conf.in | 9 ++ data/ayatana-indicator-sound.override | 1 + data/ayatana-indicator-sound.service.in | 8 ++ data/com.canonical.indicator.sound | 23 ----- ...anonical.indicator.sound.AccountsService.policy | 23 ----- ...m.canonical.indicator.sound.AccountsService.xml | 42 -------- data/com.canonical.indicator.sound.gschema.xml | 106 -------------------- data/indicator-sound.conf.in | 9 -- data/indicator-sound.override | 1 - data/indicator-sound.service.in | 8 -- data/org.ayatana.indicator.sound | 22 +++++ ....ayatana.indicator.sound.AccountsService.policy | 23 +++++ ...org.ayatana.indicator.sound.AccountsService.xml | 42 ++++++++ data/org.ayatana.indicator.sound.gschema.xml | 110 +++++++++++++++++++++ data/org.ayatana.sound.gschema.xml | 9 ++ 18 files changed, 241 insertions(+), 235 deletions(-) delete mode 100644 data/50-com.canonical.indicator.sound.AccountsService.pkla create mode 100644 data/50-org.ayatana.indicator.sound.AccountsService.pkla create mode 100644 data/ayatana-indicator-sound.conf.in create mode 100644 data/ayatana-indicator-sound.override create mode 100644 data/ayatana-indicator-sound.service.in delete mode 100644 data/com.canonical.indicator.sound delete mode 100644 data/com.canonical.indicator.sound.AccountsService.policy delete mode 100644 data/com.canonical.indicator.sound.AccountsService.xml delete mode 100644 data/com.canonical.indicator.sound.gschema.xml delete mode 100644 data/indicator-sound.conf.in delete mode 100644 data/indicator-sound.override delete mode 100644 data/indicator-sound.service.in create mode 100644 data/org.ayatana.indicator.sound create mode 100644 data/org.ayatana.indicator.sound.AccountsService.policy create mode 100644 data/org.ayatana.indicator.sound.AccountsService.xml create mode 100644 data/org.ayatana.indicator.sound.gschema.xml create mode 100644 data/org.ayatana.sound.gschema.xml (limited to 'data') diff --git a/data/50-com.canonical.indicator.sound.AccountsService.pkla b/data/50-com.canonical.indicator.sound.AccountsService.pkla deleted file mode 100644 index bbcca1e..0000000 --- a/data/50-com.canonical.indicator.sound.AccountsService.pkla +++ /dev/null @@ -1,6 +0,0 @@ -[Allow LightDM to set Unity AccountsService fields] -Identity=unix-user:lightdm -Action=com.canonical.indicator.sound.AccountsService.ModifyAnyUser -ResultActive=yes -ResultInactive=yes -ResultAny=yes diff --git a/data/50-org.ayatana.indicator.sound.AccountsService.pkla b/data/50-org.ayatana.indicator.sound.AccountsService.pkla new file mode 100644 index 0000000..c1da70f --- /dev/null +++ b/data/50-org.ayatana.indicator.sound.AccountsService.pkla @@ -0,0 +1,6 @@ +[Allow LightDM to set AccountsService fields] +Identity=unix-user:lightdm +Action=org.ayatana.indicator.sound.AccountsService.ModifyAnyUser +ResultActive=yes +ResultInactive=yes +ResultAny=yes diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 8e0ba0d..270e00d 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -7,12 +7,12 @@ find_package(GSettings) set( INDICATOR_DIR - "${CMAKE_INSTALL_DATADIR}/unity/indicators" - CACHE FILEPATH "Indicator directory" + "${CMAKE_INSTALL_DATADIR}/ayatana/indicators" + CACHE FILEPATH "Ayatana Indicators Directory" ) install( - FILES "com.canonical.indicator.sound" + FILES "org.ayatana.indicator.sound" DESTINATION "${INDICATOR_DIR}" ) @@ -21,9 +21,7 @@ install( ########################### # where to install -# Uncomment when we drop Vivid -# pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir) -set (SYSTEMD_USER_DIR "/usr/lib/systemd/user") +pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir) message (STATUS "${SYSTEMD_USER_DIR} is the systemd user unit file install dir") set (SYSTEMD_USER_NAME "${CMAKE_PROJECT_NAME}.service") @@ -54,11 +52,11 @@ install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.override" set( INDICATOR_SOUND_CONF - "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound.conf" + "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-sound.conf" ) configure_file( - "indicator-sound.conf.in" + "ayatana-indicator-sound.conf.in" ${INDICATOR_SOUND_CONF} @ONLY ) @@ -72,7 +70,7 @@ install( # GSettings ########################### -add_schema ("com.canonical.indicator.sound.gschema.xml") +add_schema ("org.ayatana.indicator.sound.gschema.xml") ########################### # Accounts Service @@ -84,24 +82,20 @@ set(POLKIT_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/polkit-1") set(DBUS_IFACE_DIR "${CMAKE_INSTALL_PREFIX}/share/dbus-1/interfaces") set(ACCOUNTS_IFACE_DIR "${CMAKE_INSTALL_PREFIX}/share/accountsservice/interfaces") -install(FILES com.canonical.indicator.sound.AccountsService.xml +install(FILES org.ayatana.indicator.sound.AccountsService.xml DESTINATION "${DBUS_IFACE_DIR}" ) # Create accountsservice symlink for above dbus interface install(CODE " execute_process(COMMAND mkdir -p \"\$ENV{DESTDIR}${ACCOUNTS_IFACE_DIR}\") - execute_process(COMMAND ln -sf ../../dbus-1/interfaces/com.canonical.indicator.sound.AccountsService.xml \"\$ENV{DESTDIR}${ACCOUNTS_IFACE_DIR}\") + execute_process(COMMAND ln -sf ../../dbus-1/interfaces/org.ayatana.indicator.sound.AccountsService.xml \"\$ENV{DESTDIR}${ACCOUNTS_IFACE_DIR}\") ") -install(FILES com.canonical.indicator.sound.AccountsService.policy +install(FILES org.ayatana.indicator.sound.AccountsService.policy DESTINATION "${POLKIT_DATA_DIR}/actions" ) -install(FILES 50-com.canonical.indicator.sound.AccountsService.pkla +install(FILES 50-org.ayatana.indicator.sound.AccountsService.pkla DESTINATION "${POLKIT_LIB_DIR}/localauthority/10-vendor.d" ) - - - - diff --git a/data/ayatana-indicator-sound.conf.in b/data/ayatana-indicator-sound.conf.in new file mode 100644 index 0000000..827b252 --- /dev/null +++ b/data/ayatana-indicator-sound.conf.in @@ -0,0 +1,9 @@ +description "Ayatana Indicator Sound Service" + +start on ayatana-indicator-services-start +stop on desktop-end or ayatana-indicator-services-end + +respawn +respawn limit 30 10 + +exec $SNAP@CMAKE_INSTALL_FULL_LIBEXECDIR@/ayatana-indicator-sound/ayatana-indicator-sound-service diff --git a/data/ayatana-indicator-sound.override b/data/ayatana-indicator-sound.override new file mode 100644 index 0000000..2905494 --- /dev/null +++ b/data/ayatana-indicator-sound.override @@ -0,0 +1 @@ +manual diff --git a/data/ayatana-indicator-sound.service.in b/data/ayatana-indicator-sound.service.in new file mode 100644 index 0000000..afb6b28 --- /dev/null +++ b/data/ayatana-indicator-sound.service.in @@ -0,0 +1,8 @@ +[Unit] +Description=Ayatana Indicator Sound Service +PartOf=graphical-session.target +After=ayatana-indicators-pre.target + +[Service] +ExecStart=@CMAKE_INSTALL_FULL_LIBEXECDIR@/ayatana-indicator-sound/ayatana-indicator-sound-service +Restart=on-failure diff --git a/data/com.canonical.indicator.sound b/data/com.canonical.indicator.sound deleted file mode 100644 index ae31770..0000000 --- a/data/com.canonical.indicator.sound +++ /dev/null @@ -1,23 +0,0 @@ -[Indicator Service] -Name=indicator-sound -ObjectPath=/com/canonical/indicator/sound -Position=30 - -[desktop] -ObjectPath=/com/canonical/indicator/sound/desktop - -[phone] -ObjectPath=/com/canonical/indicator/sound/phone - -[desktop_greeter] -ObjectPath=/com/canonical/indicator/sound/desktop_greeter - -[desktop_lockscreen] -ObjectPath=/com/canonical/indicator/sound/desktop_greeter - -[ubiquity] -ObjectPath=/com/canonical/indicator/sound/desktop_greeter - -[phone_greeter] -ObjectPath=/com/canonical/indicator/sound/phone_greeter - diff --git a/data/com.canonical.indicator.sound.AccountsService.policy b/data/com.canonical.indicator.sound.AccountsService.policy deleted file mode 100644 index 4d0ee75..0000000 --- a/data/com.canonical.indicator.sound.AccountsService.policy +++ /dev/null @@ -1,23 +0,0 @@ - - - - - Set properties of own user - Authentication is required to set one's own indicator sound properties. - - yes - yes - yes - - - - - Set properties of any user - Authentication is required to set another user's indicator sound properties. - - no - no - no - - - diff --git a/data/com.canonical.indicator.sound.AccountsService.xml b/data/com.canonical.indicator.sound.AccountsService.xml deleted file mode 100644 index fb7e96f..0000000 --- a/data/com.canonical.indicator.sound.AccountsService.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/data/com.canonical.indicator.sound.gschema.xml b/data/com.canonical.indicator.sound.gschema.xml deleted file mode 100644 index 06bfe74..0000000 --- a/data/com.canonical.indicator.sound.gschema.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - A list of applications blacklisted from the sound menu - [] - - Each media player which abides by the MPRIS2 spec will automatically appear in the menu. - This array should contain the desktop file names (minus .desktop suffix) of applications which - do not want to be included in the sound menu. - - - - A list of applications which at some point have registered with the sound menu - [] - - Each media player which abides by the MPRIS2 spec will automatically appear in the menu. - This array should contain the desktop file names (minus .desktop suffix) of applications which - have at some point appeared in the menU. This allows the menu remember and display offlined applications. - - - - A list of applications that will have player controls visible all the time - [ 'rhythmbox' ] - - A list of applications that will have player controls visible all the time - - - - false - Initial setting for global mute (mute all) on the menu - - On start up volume should not be muted. - - - - true - Whether or not to show the sound indicator in the menu bar. - - Whether or not to show the sound indicator in the menu bar. - - - - - - - true - Whether or not to show high volume warnings. - - If enabled on a device, a confirmation dialog will be presented to the user if - (a) something is plugged into the headphone jack (ie, no warnings for speaker volumes) AND - (b) media is playing (ie, no warnings for ringtone volumes) AND - (c) the user attempts to set the volume higher than warning-volume-decibels AND - (d) the user has not indicated approval in the last warning-volume-approval-ttl seconds. - - - - 72000 - How many seconds a user's warning-volume approval should be remembered. - - How long to remember a user's approval of the confirmation dialog discussed in the - description of 'warning-volume-enabled'. - - The default value (72,000 seconds) corresponds to the 20 hours suggested by - EU standard EN 60950-1/Al2: “The acknowledgement does not need to be repeated - more than once every 20 h of cumulative listening time.” - - - - -8.0 - Volume level that triggers a high volume warning. - - Volume level that triggers a high volume warning. - See warning-volume-enabled for details. - - - - - 0 - Normal output volume. - - The maximum volume when com.ubuntu.sound's 'allow-amplified-volume' setting is disabled. - - To conform with EU standard EN 60950-1/Al2, this value should never be - set to a dB that causes headphone sound output to exceed 100 dBA, nor - electric output to exceed 150 mV. - - The default value (0) corresponds to PulseAudio's PA_VOLUME_NORM. - - - - - 11 - Output volume to use when com.ubuntu.sound's 'allow-amplified-volume' setting is enabled. - - The maximum volume when com.ubuntu.sound's 'allow-amplified-volume' setting is enabled. - - To conform with EU standard EN 60950-1/Al2, this value should never be - set to a dB that causes headphone sound output to exceed 100 dBA, nor - electric output to exceed 150 mV. - - The default value (11) corresponds to PulseAudio's PA_VOLUME_UI_MAX. - - - - - diff --git a/data/indicator-sound.conf.in b/data/indicator-sound.conf.in deleted file mode 100644 index eb5f6a1..0000000 --- a/data/indicator-sound.conf.in +++ /dev/null @@ -1,9 +0,0 @@ -description "Indicator Sound Service" - -start on indicator-services-start -stop on desktop-end or indicator-services-end - -respawn -respawn limit 30 10 - -exec $SNAP@CMAKE_INSTALL_FULL_LIBEXECDIR@/indicator-sound/indicator-sound-service diff --git a/data/indicator-sound.override b/data/indicator-sound.override deleted file mode 100644 index 2905494..0000000 --- a/data/indicator-sound.override +++ /dev/null @@ -1 +0,0 @@ -manual diff --git a/data/indicator-sound.service.in b/data/indicator-sound.service.in deleted file mode 100644 index d0f6216..0000000 --- a/data/indicator-sound.service.in +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Indicator Sound Service -PartOf=graphical-session.target -After=indicators-pre.target - -[Service] -ExecStart=@CMAKE_INSTALL_FULL_LIBEXECDIR@/indicator-sound/indicator-sound-service -Restart=on-failure diff --git a/data/org.ayatana.indicator.sound b/data/org.ayatana.indicator.sound new file mode 100644 index 0000000..f57d9d6 --- /dev/null +++ b/data/org.ayatana.indicator.sound @@ -0,0 +1,22 @@ +[Indicator Service] +Name=indicator-sound +ObjectPath=/org/ayatana/indicator/sound +Position=30 + +[desktop] +ObjectPath=/org/ayatana/indicator/sound/desktop + +[phone] +ObjectPath=/org/ayatana/indicator/sound/phone + +[desktop_greeter] +ObjectPath=/org/ayatana/indicator/sound/desktop_greeter + +[desktop_lockscreen] +ObjectPath=/org/ayatana/indicator/sound/desktop_greeter + +[ubiquity] +ObjectPath=/org/ayatana/indicator/sound/desktop_greeter + +[phone_greeter] +ObjectPath=/org/ayatana/indicator/sound/phone_greeter diff --git a/data/org.ayatana.indicator.sound.AccountsService.policy b/data/org.ayatana.indicator.sound.AccountsService.policy new file mode 100644 index 0000000..28e15c1 --- /dev/null +++ b/data/org.ayatana.indicator.sound.AccountsService.policy @@ -0,0 +1,23 @@ + + + + + Set properties of own user + Authentication is required to set one's own indicator sound properties. + + yes + yes + yes + + + + + Set properties of any user + Authentication is required to set another user's indicator sound properties. + + no + no + no + + + diff --git a/data/org.ayatana.indicator.sound.AccountsService.xml b/data/org.ayatana.indicator.sound.AccountsService.xml new file mode 100644 index 0000000..7a8c2bd --- /dev/null +++ b/data/org.ayatana.indicator.sound.AccountsService.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/org.ayatana.indicator.sound.gschema.xml b/data/org.ayatana.indicator.sound.gschema.xml new file mode 100644 index 0000000..5255358 --- /dev/null +++ b/data/org.ayatana.indicator.sound.gschema.xml @@ -0,0 +1,110 @@ + + + + A list of applications blacklisted from the sound menu + [] + + Each media player which abides by the MPRIS2 spec will automatically appear in the menu. + This array should contain the desktop file names (minus .desktop suffix) of applications which + do not want to be included in the sound menu. + + + + A list of applications which at some point have registered with the sound menu + [] + + Each media player which abides by the MPRIS2 spec will automatically appear in the menu. + This array should contain the desktop file names (minus .desktop suffix) of applications which + have at some point appeared in the menU. This allows the menu remember and display offlined applications. + + + + A list of applications that will have player controls visible all the time + [ 'rhythmbox' ] + + A list of applications that will have player controls visible all the time + + + + false + Initial setting for global mute (mute all) on the menu + + On start up volume should not be muted. + + + + false + Whether the volume slider allows setting the volume above 100% + + + true + Whether or not to show the sound indicator in the menu bar. + + Whether or not to show the sound indicator in the menu bar. + + + + + + + true + Whether or not to show high volume warnings. + + If enabled on a device, a confirmation dialog will be presented to the user if + (a) something is plugged into the headphone jack (ie, no warnings for speaker volumes) AND + (b) media is playing (ie, no warnings for ringtone volumes) AND + (c) the user attempts to set the volume higher than warning-volume-decibels AND + (d) the user has not indicated approval in the last warning-volume-approval-ttl seconds. + + + + 72000 + How many seconds a user's warning-volume approval should be remembered. + + How long to remember a user's approval of the confirmation dialog discussed in the + description of 'warning-volume-enabled'. + + The default value (72,000 seconds) corresponds to the 20 hours suggested by + EU standard EN 60950-1/Al2: “The acknowledgement does not need to be repeated + more than once every 20 h of cumulative listening time.” + + + + -8.0 + Volume level that triggers a high volume warning. + + Volume level that triggers a high volume warning. + See warning-volume-enabled for details. + + + + + 0 + Normal output volume. + + The maximum volume when com.ubuntu.sound's 'allow-amplified-volume' setting is disabled. + + To conform with EU standard EN 60950-1/Al2, this value should never be + set to a dB that causes headphone sound output to exceed 100 dBA, nor + electric output to exceed 150 mV. + + The default value (0) corresponds to PulseAudio's PA_VOLUME_NORM. + + + + + 11 + Output volume to use when com.ubuntu.sound's 'allow-amplified-volume' setting is enabled. + + The maximum volume when com.ubuntu.sound's 'allow-amplified-volume' setting is enabled. + + To conform with EU standard EN 60950-1/Al2, this value should never be + set to a dB that causes headphone sound output to exceed 100 dBA, nor + electric output to exceed 150 mV. + + The default value (11) corresponds to PulseAudio's PA_VOLUME_UI_MAX. + + + + + diff --git a/data/org.ayatana.sound.gschema.xml b/data/org.ayatana.sound.gschema.xml new file mode 100644 index 0000000..8c3bd73 --- /dev/null +++ b/data/org.ayatana.sound.gschema.xml @@ -0,0 +1,9 @@ + + + + + false + Whether the volume slider allows setting the volume above 100% + + + -- cgit v1.2.3