Skip to content

Commit

Permalink
New release
Browse files Browse the repository at this point in the history
  • Loading branch information
sconix committed Oct 31, 2011
1 parent 1e9e017 commit 910b8ce
Show file tree
Hide file tree
Showing 8 changed files with 493 additions and 360 deletions.
571 changes: 299 additions & 272 deletions c-binary/papctl.sh

Large diffs are not rendered by default.

53 changes: 49 additions & 4 deletions control/postinst
Original file line number Diff line number Diff line change
@@ -1,16 +1,61 @@
#!/bin/sh

SID="org.webosinternals.pulsecontrol.srv"

APPS="/media/cryptofs/apps"

SDIR="${APPS}/usr/palm/services/${SID}"

# Handle execution as pmPostInstall.script
if [ -z "$IPKG_OFFLINE_ROOT" ]; then

if [ ! -d ${APPS} ]; then
echo "Requires webOS 1.3.5 or later"
exit 1
fi

if [ -z "${IPKG_OFFLINE_ROOT}" ]; then
IPKG_OFFLINE_ROOT=/media/cryptofs/apps
mount -o remount,rw /
fi

SRV_ID=org.webosinternals.pulsecontrol.srv
SRV_DIR=/media/cryptofs/apps/usr/palm/services/${SRV_ID}
# Remove the upstart configuration

rm -f /var/palm/event.d/${SID}

# Remove the ls2 configuration

rm -f /var/palm/ls2/roles/prv/${SID}.json
rm -f /var/palm/ls2/roles/pub/${SID}.json

# Remove the dbus service configuration

rm -f /var/palm/ls2/services/prv/${SID}.service
rm -f /var/palm/ls2/services/pub/${SID}.service

# Install the upstart configuration

mkdir -p /var/palm/event.d

cp -f ${SRV_DIR}/configuration/event.d/${SRV_ID} /var/palm/event.d/
cp -f ${SDIR}/configuration/event.d/${SID} /var/palm/event.d/

# Install the ls2 roles configuration

mkdir -p /var/palm/ls2/roles/prv /var/palm/ls2/roles/pub

cp ${SDIR}/${SID}.json /var/palm/ls2/roles/prv/${SID}.json
cp ${SDIR}/${SID}.json /var/palm/ls2/roles/pub/${SID}.json

# Install the dbus service configuration

mkdir -p /var/palm/ls2/services/prv /var/palm/ls2/services/pub

cp ${SDIR}/${SID}.service /var/palm/ls2/services/prv/${SID}.service
cp ${SDIR}/${SID}.service /var/palm/ls2/services/pub/${SID}.service

# Stop the JS service if running

/usr/bin/luna-send -n 1 palm://${SID}/__quit '{}'

/usr/bin/ls-control scan-services || true

exit 0
47 changes: 39 additions & 8 deletions control/prerm
Original file line number Diff line number Diff line change
@@ -1,18 +1,49 @@
#!/bin/sh

# Handle execution as pmPostInstall.script
if [ -z "$IPKG_OFFLINE_ROOT" ]; then
SID="org.webosinternals.pulsecontrol.srv"

APPS="/media/cryptofs/apps"

SDIR="${APPS}/usr/palm/services/${SID}"

# Handle execution as pmPreRemove.script

if [ ! -d ${APPS} ]; then
echo "Requires webOS 1.3.5 or later"
exit 1
fi

if [ -z "${IPKG_OFFLINE_ROOT}" ]; then
IPKG_OFFLINE_ROOT=/media/cryptofs/apps
mount -o remount,rw /
fi

SRV_ID=org.webosinternals.pulsecontrol.srv
SRV_DIR=/media/cryptofs/apps/usr/palm/services/${SRV_ID}
# Remove the upstart configuration

rm -f /var/palm/event.d/${SID}

# Remove the ls2 configuration

rm -f /var/palm/ls2/roles/prv/${SID}.json
rm -f /var/palm/ls2/roles/pub/${SID}.json

# Remove the dbus service configuration

rm -f /var/palm/ls2/services/prv/${SID}.service
rm -f /var/palm/ls2/services/pub/${SID}.service

# Stop the JS service if running

/usr/bin/luna-send -n 1 palm://${SID}/__quit '{}'

#
# Cleanup the JS service here due to WebOS bugs
#

rm -f /var/cache/configurator/_media_cryptofs_apps_usr_palm_services_${SRV_ID}_configuration_db_permissions_${SRV_ID}
rm -f /var/cache/configurator/*webosinternals.pulsecontrol*

rm -f /var/palm/event.d/${SRV_ID}
rm -f /var/palm/ls2/roles/*/*webosinternals.pulsecontrol*

#/usr/bin/pkill switcher.srv.js || true
rm -f /var/palm/ls2/services/*/*webosinternals.pulsecontrol*

/usr/bin/ls-control scan-services || true
exit 0
2 changes: 1 addition & 1 deletion enyo-app/appinfo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "PulseAudio Settings",
"id": "org.webosinternals.pulsecontrol",
"version": "0.4.0",
"version": "0.5.0",
"release_date": "30-Sep-2011",
"vendor": "WebOS Internals",
"vendor_email": "[email protected]",
Expand Down
5 changes: 4 additions & 1 deletion enyo-app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
if(params.dashboard == "none") {
this.appUI.$.controlDashboard.setLayers([]);
} else if(params.dashboard == "error") {
enyo.windows.addBannerMessage("PulseAudio server connection failed", "{}", "images/icon-dash.png");
if(params.reason == "usb")
enyo.windows.addBannerMessage("No USB audio device was found", "{}", "images/icon-dash.png");
else
enyo.windows.addBannerMessage("PulseAudio server connection failed", "{}", "images/icon-dash.png");
} else if(params.dashboard == "auto") {
var hasNotification = false;

Expand Down
25 changes: 16 additions & 9 deletions enyo-app/source/Control.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ enyo.kind({
_ready: false,

_prefs: {
_kind: "org.webosinternals.pulsecontrol:1",
usbAudio: false,
paServers: [],
tcpServer: false,
Expand Down Expand Up @@ -45,7 +46,7 @@ enyo.kind({
{content: $L("Loading PulseAudio Settings...")}
]},
{kind:"Control", name:"prefView", className:"box-center enyo-bg", components: [
{layoutKind: "VFlexLayout", align: "center", style: "min-width: 100%;", components: [
{layoutKind: "VFlexLayout", align: "left", style: "min-width: 100%;", components: [
{name: "usbSettings", layoutKind: "HFlexLayout", align: "center", style: "width: 500px;max-width: 100%;", components: [
{kind: "RowGroup", flex: 1, caption: "USB Audio Settings", components: [
{kind: "Item", layoutKind: "HFlexLayout", align: "center", flex: 1, tapHighlight: true, components: [
Expand All @@ -55,6 +56,8 @@ enyo.kind({
]}
]},

{name: "usbInformation", content: "Note: network audio is disabled while USB audio is enabled.", className: "enyo-item-secondary", style: "margin-left: 5px;margin-bottom: 2px;"},

{layoutKind: "HFlexLayout", align: "center", style: "width: 500px;max-width: 100%;", components: [
{kind: "RowGroup", flex: 1, caption: "Network Client Settings", components: [
{name: "configuredServers", kind: "VirtualRepeater", onSetupRow: "getConfiguredServer", style: "margin: -10px;", components: [
Expand Down Expand Up @@ -83,13 +86,16 @@ enyo.kind({
]},
]},
]},


{style: "padding-top:0px;padding-bottom:6px;padding-left:3px;padding-right: 8px;max-width:100%;-webkit-box-sizing: border-box;", components: [
{kind: "Button", className: "enyo-button-light", width: "488px", caption: "Show Audio Sources", onclick: "handleEditAdvanced"},
]},

{style: "padding-top:6px;padding-bottom:6px;padding-left:3px;padding-right: 8px;max-width:100%;-webkit-box-sizing: border-box;", components: [
{name: "applySettingsButton", kind: "Button", className: "enyo-button-affirmative", width: "488px", caption: "Apply Configuration", onclick: "handleApplySettings"},
]},
{style: "padding-top:0px;padding-bottom:6px;padding-left:3px;padding-right: 8px;max-width:100%;-webkit-box-sizing: border-box;", components: [
{kind: "Button", className: "enyo-button-light", width: "488px", caption: "Show Audio Sources", onclick: "handleEditAdvanced"},
]}

{content: "You need to apply settings after changing the above settings.", className: "enyo-item-secondary", style: "margin-left: 5px;margin-bottom: 2px;"}
]},
]},

Expand Down Expand Up @@ -223,10 +229,11 @@ enyo.kind({
create: function() {
this.inherited(arguments);

this.$.usbSettings.hide();

if(enyo.fetchDeviceInfo().modelNameAscii != "TouchPad") {
if((enyo.fetchDeviceInfo().modelNameAscii != "TouchPad") &&
(enyo.fetchDeviceInfo().modelNameAscii != "Emulator"))
{
this.$.usbSettings.hide();
this.$.usbInformation.hide();

for(var i = 0; i < this._sinks.length; i++)
this.$[this._sinks[i]].items.splice(2, 2);
Expand Down Expand Up @@ -287,7 +294,7 @@ enyo.kind({
},

handlePrefsSaved: function(inSender, inResponse) {
if (inResponse.results.length === 1) {
if(inResponse.results.length === 1) {
this._prefs._id = inResponse.results[0].id;

this._prefs._rev = inResponse.results[0].rev;
Expand Down
Loading

0 comments on commit 910b8ce

Please sign in to comment.