-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mac-remote and mac-mediakey extension updates #366
base: sb-trunk-oldxul
Are you sure you want to change the base?
Changes from all commits
dd7a1b6
71afcc3
ce2942c
59c498b
f507c1d
5e18789
19e54ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# | ||
# BEGIN NIGHTINGALE GPL | ||
# | ||
# This file is part of the Nightingale Media Player. | ||
# | ||
# Copyright(c) 2014 | ||
# http://getnightingale.com | ||
# | ||
# This file may be licensed under the terms of of the | ||
# GNU General Public License Version 2 (the "GPL"). | ||
# | ||
# Software distributed under the License is distributed | ||
# on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either | ||
# express or implied. See the GPL for the specific language | ||
# governing rights and limitations. | ||
# | ||
# You should have received a copy of the GPL along with this | ||
# program. If not, go to http://www.gnu.org/licenses/gpl.html | ||
# or write to the Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
# | ||
# END NIGHTINGALE GPL | ||
# | ||
|
||
DEPTH = ../../.. | ||
topsrcdir = @top_srcdir@ | ||
srcdir = @srcdir@ | ||
VPATH = @srcdir@ | ||
|
||
include $(DEPTH)/build/autodefs.mk | ||
|
||
IS_EXTENSION = 1 | ||
|
||
JAR_MANIFEST = jar.mn.in | ||
|
||
include $(topsrcdir)/build/rules.mk |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
// | ||
// BEGIN NIGHTINGALE GPL | ||
// | ||
// This file is part of the Nightingale Media Player. | ||
// | ||
// Copyright(c) 2014 | ||
// http://getnightingale.com | ||
// | ||
// This file may be licensed under the terms of of the | ||
// GNU General Public License Version 2 (the "GPL"). | ||
// | ||
// Software distributed under the License is distributed | ||
// on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either | ||
// express or implied. See the GPL for the specific language | ||
// governing rights and limitations. | ||
// | ||
// You should have received a copy of the GPL along with this | ||
// program. If not, go to http://www.gnu.org/licenses/gpl.html | ||
// or write to the Free Software Foundation, Inc., | ||
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
// | ||
// END NIGHTINGALE GPL | ||
// | ||
*/ | ||
|
||
// Make a namespace. | ||
if (typeof AppleMediaKeysFirstRun == 'undefined') { | ||
var AppleMediaKeysFirstRun = {}; | ||
} | ||
|
||
/** | ||
* UI controller that is loaded into the main player window | ||
*/ | ||
AppleMediaKeysFirstRun.Controller = { | ||
|
||
/** | ||
* Called when the window finishes loading | ||
*/ | ||
onLoad: function() { | ||
|
||
// initialization code | ||
this._initialized = true; | ||
this._strings = document.getElementById("apple-mediakeys-strings"); | ||
|
||
// Perform extra actions the first time the extension is run | ||
if (Application.prefs.get("extensions.apple-mediakeys.firstrun").value) { | ||
Application.prefs.setValue("extensions.apple-mediakeys.firstrun", false); | ||
this._firstRunSetup(); | ||
} | ||
|
||
}, | ||
|
||
/** | ||
* Perform extra setup the first time the extension is run | ||
*/ | ||
_firstRunSetup : function() { | ||
|
||
// Call this.firstrun() after a 3 second timeout | ||
setTimeout(function(controller) { controller.firstrun(); }, 3000, this); | ||
|
||
}, | ||
|
||
firstrun : function() { | ||
var welcomeTitle = this._strings.getString("WelcomeTitle"); | ||
var welcomeMsg = this._strings.getString("WelcomeMessage"); | ||
var promptService = Cc['@mozilla.org/embedcomp/prompt-service;1'] | ||
.getService(Ci.nsIPromptService); | ||
promptService.alert(null, welcomeTitle, welcomeMsg); | ||
}, | ||
|
||
}; | ||
|
||
window.addEventListener("load", function(e) { AppleMediaKeysFirstRun.Controller.onLoad(e); }, false); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!DOCTYPE overlay SYSTEM "chrome://apple-mediakeys/locale/options.dtd"> | ||
|
||
<overlay id="radio-prefs-overlay" | ||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> | ||
|
||
<prefWindow id="BrowserPreferences"> | ||
<prefpane id="mediakeysPrefPane" | ||
label="&apple-mediakeys-prefs-overlay.label;" | ||
src="chrome://apple-mediakeys/content/prefsPane.xul" /> | ||
</prefWindow> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't you do this by changing the pref type? Or is this because the extension is hidden by default? |
||
|
||
</overlay> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!DOCTYPE prefwindow SYSTEM "chrome://apple-mediakeys/locale/options.dtd"> | ||
|
||
<overlay id="radio_preferences_overlay" | ||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> | ||
|
||
<prefwindow id="BrowserPreferences"> | ||
<prefpane id="mediakeysPrefPane" label="&apple-mediakeys-prefs-overlay.label;" | ||
onpaneload="onPrefPaneLoad()"> | ||
|
||
<vbox> | ||
<groupbox> | ||
<caption label="&apple-mediakeys.prefs.disable-itunes.groupcaption;"/> | ||
<description>&apple-mediakeys.prefs.disable-itunes.description;</description> | ||
<label class="text-link" href="http://www.thebitguru.com/projects/iTunesPatch" value="&apple-mediakeys.prefs.disable-itunes.link.label;"/> | ||
</groupbox> | ||
<groupbox> | ||
<caption label="&apple-mediakeys.prefs.bluetooth.groupcaption;"/> | ||
<description>&apple-mediakeys.prefs.bluetooth.description;</description> | ||
<label class="text-link" href="https://github.com/jguice/mac-bt-headset-fix" value="&apple-mediakeys.prefs.bluetooth.link.label;"/> | ||
</groupbox> | ||
</vbox> | ||
|
||
</prefpane> | ||
</prefwindow> | ||
|
||
</overlay> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<overlay id="apple-mediakeys-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> | ||
|
||
<script src="firstrun.js"/> | ||
|
||
<stringbundleset id="stringbundleset"> | ||
<stringbundle id="apple-mediakeys-strings" src="chrome://apple-mediakeys/locale/overlay.properties"/> | ||
</stringbundleset> | ||
|
||
</overlay> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# a little about jar.mn.in... | ||
# lines starting with "#" (like this one) are comments | ||
|
||
# this says we're creating a new jar file | ||
apple-mediakeys.jar: | ||
# map the things under content/ to chrome://xpcom_helloworld/content/ | ||
% content apple-mediakeys %content/ contentaccessible=yes | ||
# map in the locale | ||
% locale apple-mediakeys en-US %locale/en-US/ | ||
# map in the skin | ||
% skin apple-mediakeys classic/1.0 %skin/ | ||
# apply an overlay to all Songbird main windows | ||
% overlay chrome://songbird/content/xul/layoutWithBrowserOverlay.xul chrome://apple-mediakeys/content/scripts-overlay.xul | ||
# include all the files in this jar | ||
% overlay chrome://browser/content/preferences/preferences.xul chrome://apple-mediakeys/content/prefsOverlay.xul | ||
@include_all_to |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!ENTITY apple-mediakeys-prefs-overlay.label "Mac Media Keys"> | ||
|
||
<!ENTITY apple-mediakeys.prefs.disable-itunes.groupcaption "Disable iTunes Launching"> | ||
<!ENTITY apple-mediakeys.prefs.disable-itunes.description "In order to disable iTunes from launching when pressing the Play/Pause media key, download and run the patch from the external link below."> | ||
<!ENTITY apple-mediakeys.prefs.disable-itunes.link.label "Play Button iTunes Patch"> | ||
|
||
<!ENTITY apple-mediakeys.prefs.bluetooth.groupcaption "Enable Bluetooth Control"> | ||
<!ENTITY apple-mediakeys.prefs.bluetooth.description "In order to enable media controls on a connected Bluetooth device, download and run the application from the external link below."> | ||
<!ENTITY apple-mediakeys.prefs.bluetooth.link.label "Mac Bluetooth Headset Fix"> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
WelcomeTitle=Welcome Mac Users! | ||
WelcomeMessage=You can use your keyboard's media keys to control playback within Nightingale. If you wish to disable launching of iTunes when pressing Play/Pause, or if you want to control playback with a Bluetooth device, navigate to Preferences --> Mac Media Keys for instructions. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: We'll have to add these strings to babelzilla. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# | ||
# BEGIN NIGHTINGALE GPL | ||
# | ||
# This file is part of the Nightingale Media Player. | ||
# | ||
# Copyright(c) 2014 | ||
# http://getnightingale.com | ||
# | ||
# This file may be licensed under the terms of of the | ||
# GNU General Public License Version 2 (the "GPL"). | ||
# | ||
# Software distributed under the License is distributed | ||
# on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either | ||
# express or implied. See the GPL for the specific language | ||
# governing rights and limitations. | ||
# | ||
# You should have received a copy of the GPL along with this | ||
# program. If not, go to http://www.gnu.org/licenses/gpl.html | ||
# or write to the Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
# | ||
# END NIGHTINGALE GPL | ||
# | ||
|
||
DEPTH = ../../.. | ||
topsrcdir = @top_srcdir@ | ||
srcdir = @srcdir@ | ||
VPATH = @srcdir@ | ||
|
||
include $(DEPTH)/build/autodefs.mk | ||
|
||
IS_EXTENSION = 1 | ||
|
||
SUBDIRS = preferences \ | ||
$(NULL) | ||
|
||
include $(topsrcdir)/build/rules.mk |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# | ||
# BEGIN NIGHTINGALE GPL | ||
# | ||
# This file is part of the Nightingale Media Player. | ||
# | ||
# Copyright(c) 2014 | ||
# http://getnightingale.com | ||
# | ||
# This file may be licensed under the terms of of the | ||
# GNU General Public License Version 2 (the "GPL"). | ||
# | ||
# Software distributed under the License is distributed | ||
# on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either | ||
# express or implied. See the GPL for the specific language | ||
# governing rights and limitations. | ||
# | ||
# You should have received a copy of the GPL along with this | ||
# program. If not, go to http://www.gnu.org/licenses/gpl.html | ||
# or write to the Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
# | ||
# END NIGHTINGALE GPL | ||
# | ||
|
||
DEPTH = ../../../.. | ||
topsrcdir = @top_srcdir@ | ||
srcdir = @srcdir@ | ||
VPATH = @srcdir@ | ||
|
||
include $(DEPTH)/build/autodefs.mk | ||
|
||
IS_EXTENSION = 1 | ||
|
||
SONGBIRD_PREFS = $(srcdir)/prefs.js \ | ||
$(NULL) | ||
|
||
include $(topsrcdir)/build/rules.mk |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Used to detect the first time the extension is run | ||
pref("extensions.apple-mediakeys.firstrun", true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentiation seems to have gotten messed up here. Generally it's two spaces, irrc.