30 case "menuitem_file_new":
31 var enumerator =
null;
34 gBrowser.selectedTab &&
35 gBrowser.selectedTab.mediaListView)
37 enumerator = gBrowser.selectedTab
44 SBNewPlaylist(enumerator,
false);
47 case "menuitem_file_smart":
50 case "menuitem_file_remote":
53 case "menuitem_file_podcast":
56 case "menuitem_file_file":
59 case "menuitem_file_url":
62 case "menuitem_file_playlist":
65 case "menuitem_file_library":
66 SBLibraryOpen(
null,
false);
68 case "menuitem_file_newtab":
72 window.setTimeout(
function _locationbarFocus() {
73 var locationbar = document.getElementById(
"location_bar");
74 locationbar.value =
"";
78 case "menuitem_file_closetab":
79 gBrowser.removeTab(gBrowser.selectedTab);
81 case "menuitem_file_scan":
87 case "menu_FileQuitItem":
90 case "menuitem_control_play":
92 var state =
gMM.status.state;
93 if ( state == sbIMediacoreStatus.STATUS_PLAYING ||
94 state == sbIMediacoreStatus.STATUS_BUFFERING) {
95 gMM.playbackControl.pause();
97 else if(state == sbIMediacoreStatus.STATUS_PAUSED) {
98 gMM.playbackControl.play();
104 var
event = document.createEvent(
"Events");
105 event.initEvent(
"Play",
true,
true);
109 case "menuitem_control_next":
110 gMM.sequencer.next();
112 case "menuitem_control_prev":
113 gMM.sequencer.previous();
115 case "menuitem_control_shuf": {
116 let sequencer =
gMM.sequencer;
117 let sequencerMode = sequencer.mode;
119 (sequencerMode != sequencer.MODE_SHUFFLE) ?
120 sequencer.MODE_SHUFFLE : sequencer.MODE_FORWARD;
123 case "menuitem_control_repa":
124 gMM.sequencer.repeatMode =
gMM.sequencer.MODE_REPEAT_ALL;
126 case "menuitem_control_rep1":
127 gMM.sequencer.repeatMode =
gMM.sequencer.MODE_REPEAT_ONE;
129 case "menuitem_control_repx":
130 gMM.sequencer.repeatMode =
gMM.sequencer.MODE_REPEAT_NONE;
132 case "menuitem_control_stop":
133 gMM.playbackControl.stop();
135 case "menu_extensions":
136 SBOpenPreferences(
"paneAddons");
138 case "menu_preferences":
141 case "menu_downloadmgr":
142 SBOpenDownloadManager();
144 case "menuitem_tools_clearprivatedata":
148 case "javascriptConsole":
151 case "checkForUpdates": {
153 Components.classes[
"@mozilla.org/updates/update-manager;1"].
154 getService(Components.interfaces.nsIUpdateManager);
156 Components.classes[
"@mozilla.org/updates/update-prompt;1"].
162 if (um.activeUpdate && um.activeUpdate.state ==
"pending")
163 prompter.showUpdateDownloaded(um.activeUpdate);
165 prompter.checkForUpdates();
168 case "services.browse":
169 var addonsURL =
Application.prefs.get(
"songbird.url.addons").value;
170 gBrowser.loadURI(addonsURL);
189 if (pref && pref.value) {
190 if (typeof gBrowser !=
'undefined') {
191 gBrowser.loadURI(pref.value);
193 SBBrowserOpenURLInNewWindow(pref.value);
getService(Ci.sbIFaceplateManager)