Source code

Revision control

Other Tools

1
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2
# This Source Code Form is subject to the terms of the Mozilla Public
3
# License, v. 2.0. If a copy of the MPL was not distributed with this
4
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
6
<menubar id="main-menubar"
7
onpopupshowing="if (event.target.parentNode.parentNode == this &amp;&amp;
8
!('@mozilla.org/widget/nativemenuservice;1' in Cc))
9
this.setAttribute('openedwithkey',
10
event.target.parentNode.openedWithKey);">
11
<menu id="file-menu" data-l10n-id="menu-file">
12
<menupopup id="menu_FilePopup"
13
onpopupshowing="updateFileMenuUserContextUIVisibility('menu_newUserContext');
14
updateFileMenuImportUIVisibility('cmd_importFromAnotherBrowser');">
15
<menuitem id="menu_newNavigatorTab"
16
command="cmd_newNavigatorTab"
17
key="key_newNavigatorTab" data-l10n-id="menu-file-new-tab"/>
18
<menu id="menu_newUserContext"
19
hidden="true" data-l10n-id="menu-file-new-container-tab">
20
<menupopup onpopupshowing="return createUserContextMenu(event);" />
21
</menu>
22
<menuitem id="menu_newNavigator"
23
key="key_newNavigator"
24
command="cmd_newNavigator" data-l10n-id="menu-file-new-window"/>
25
<menuitem id="menu_newPrivateWindow"
26
command="Tools:PrivateBrowsing"
27
key="key_privatebrowsing" data-l10n-id="menu-file-new-private-window"/>
28
<menuitem id="menu_openLocation"
29
hidden="true"
30
command="Browser:OpenLocation"
31
key="focusURLBar" data-l10n-id="menu-file-open-location"/>
32
<menuitem id="menu_openFile"
33
command="Browser:OpenFile"
34
key="openFileKb" data-l10n-id="menu-file-open-file"/>
35
<menuitem id="menu_close"
36
class="show-only-for-keyboard"
37
key="key_close"
38
command="cmd_close" data-l10n-id="menu-file-close"/>
39
<menuitem id="menu_closeWindow"
40
class="show-only-for-keyboard"
41
hidden="true"
42
command="cmd_closeWindow"
43
key="key_closeWindow" data-l10n-id="menu-file-close-window"/>
44
<menuseparator/>
45
<menuitem id="menu_savePage"
46
key="key_savePage"
47
command="Browser:SavePage" data-l10n-id="menu-file-save-page"/>
48
<menuitem id="menu_sendLink"
49
command="Browser:SendLink" data-l10n-id="menu-file-email-link"/>
50
<menuseparator/>
51
#if !defined(MOZ_WIDGET_GTK)
52
<menuitem id="menu_printSetup"
53
command="cmd_pageSetup" data-l10n-id="menu-file-print-setup"/>
54
#endif
55
#ifndef XP_MACOSX
56
<menuitem id="menu_printPreview"
57
command="cmd_printPreview" data-l10n-id="menu-file-print-preview"/>
58
#endif
59
<menuitem id="menu_print"
60
key="printKb"
61
command="cmd_print" data-l10n-id="menu-file-print"/>
62
<menuseparator/>
63
<menuitem id="menu_importFromAnotherBrowser"
64
command="cmd_importFromAnotherBrowser" data-l10n-id="menu-file-import-from-another-browser"/>
65
<menuseparator/>
66
<menuitem id="goOfflineMenuitem"
67
type="checkbox"
68
command="cmd_toggleOfflineStatus" data-l10n-id="menu-file-go-offline"/>
69
<!-- We need to leave those strings in DTD until bug 1568133 is fixed. -->
70
<menuitem id="menu_FileQuitItem"
71
#ifdef XP_WIN
72
label="&quitApplicationCmdWin2.label;"
73
accesskey="&quitApplicationCmdWin2.accesskey;"
74
#elifdef XP_MACOSX
75
label="&quitApplicationCmdMac2.label;"
76
#else
77
label="&quitApplicationCmd.label;"
78
accesskey="&quitApplicationCmd.accesskey;"
79
#endif
80
key="key_quitApplication"
81
command="cmd_quitApplication"/>
82
</menupopup>
83
</menu>
84
85
<menu id="edit-menu" data-l10n-id="menu-edit">
86
<menupopup id="menu_EditPopup"
87
onpopupshowing="updateEditUIVisibility()"
88
onpopuphidden="updateEditUIVisibility()">
89
<menuitem id="menu_undo"
90
key="key_undo"
91
command="cmd_undo" data-l10n-id="menu-edit-undo"/>
92
<menuitem id="menu_redo"
93
key="key_redo"
94
command="cmd_redo" data-l10n-id="menu-edit-redo"/>
95
<menuseparator/>
96
<menuitem id="menu_cut"
97
key="key_cut"
98
command="cmd_cut" data-l10n-id="menu-edit-cut"/>
99
<menuitem id="menu_copy"
100
key="key_copy"
101
command="cmd_copy" data-l10n-id="menu-edit-copy"/>
102
<menuitem id="menu_paste"
103
key="key_paste"
104
command="cmd_paste" data-l10n-id="menu-edit-paste"/>
105
<menuitem id="menu_delete"
106
key="key_delete"
107
command="cmd_delete" data-l10n-id="menu-edit-delete"/>
108
<menuseparator/>
109
<menuitem id="menu_selectAll"
110
key="key_selectAll"
111
command="cmd_selectAll" data-l10n-id="menu-edit-select-all"/>
112
<menuseparator/>
113
<menuitem id="menu_find"
114
key="key_find"
115
command="cmd_find" data-l10n-id="menu-edit-find-on"/>
116
<menuitem id="menu_findAgain"
117
class="show-only-for-keyboard"
118
key="key_findAgain"
119
command="cmd_findAgain" data-l10n-id="menu-edit-find-again"/>
120
<menuseparator hidden="true" id="textfieldDirection-separator"/>
121
<menuitem id="textfieldDirection-swap"
122
command="cmd_switchTextDirection"
123
key="key_switchTextDirection"
124
hidden="true" data-l10n-id="menu-edit-bidi-switch-text-direction"/>
125
#ifdef XP_UNIX
126
#ifndef XP_MACOSX
127
<menuseparator/>
128
<menuitem id="menu_preferences"
129
oncommand="openPreferences(undefined);" data-l10n-id="menu-preferences"/>
130
#endif
131
#endif
132
</menupopup>
133
</menu>
134
135
<menu id="view-menu" data-l10n-id="menu-view">
136
<menupopup id="menu_viewPopup"
137
onpopupshowing="updateCharacterEncodingMenuState();">
138
<menu id="viewToolbarsMenu" data-l10n-id="menu-view-toolbars-menu">
139
<menupopup onpopupshowing="onViewToolbarsPopupShowing(event);">
140
<menuseparator/>
141
<menuitem id="menu_customizeToolbars"
142
command="cmd_CustomizeToolbars" data-l10n-id="menu-view-customize-toolbar"/>
143
</menupopup>
144
</menu>
145
<menu id="viewSidebarMenuMenu" data-l10n-id="menu-view-sidebar">
146
<menupopup id="viewSidebarMenu">
147
<menuitem id="menu_bookmarksSidebar"
148
type="checkbox"
149
key="viewBookmarksSidebarKb"
150
oncommand="SidebarUI.toggle('viewBookmarksSidebar');" data-l10n-id="menu-view-bookmarks"/>
151
<menuitem id="menu_historySidebar"
152
type="checkbox"
153
key="key_gotoHistory"
154
oncommand="SidebarUI.toggle('viewHistorySidebar');" data-l10n-id="menu-view-history-button"/>
155
<menuitem id="menu_tabsSidebar"
156
type="checkbox"
157
class="sync-ui-item"
158
oncommand="SidebarUI.toggle('viewTabsSidebar');" data-l10n-id="menu-view-synced-tabs-sidebar"/>
159
</menupopup>
160
</menu>
161
<menuseparator/>
162
<menu id="viewFullZoomMenu"
163
onpopupshowing="FullZoom.updateMenu();" data-l10n-id="menu-view-full-zoom">
164
<menupopup>
165
<menuitem id="menu_zoomEnlarge"
166
key="key_fullZoomEnlarge"
167
command="cmd_fullZoomEnlarge" data-l10n-id="menu-view-full-zoom-enlarge"/>
168
<menuitem id="menu_zoomReduce"
169
key="key_fullZoomReduce"
170
command="cmd_fullZoomReduce" data-l10n-id="menu-view-full-zoom-reduce"/>
171
<menuseparator/>
172
<menuitem id="menu_zoomReset"
173
key="key_fullZoomReset"
174
command="cmd_fullZoomReset" data-l10n-id="menu-view-full-zoom-reset"/>
175
<menuseparator/>
176
<menuitem id="toggle_zoom"
177
type="checkbox"
178
command="cmd_fullZoomToggle"
179
checked="false" data-l10n-id="menu-view-full-zoom-toggle"/>
180
</menupopup>
181
</menu>
182
<menu id="pageStyleMenu" data-l10n-id="menu-view-page-style-menu">
183
<menupopup onpopupshowing="gPageStyleMenu.fillPopup(this);">
184
<menuitem id="menu_pageStyleNoStyle"
185
oncommand="gPageStyleMenu.disableStyle();"
186
type="radio" data-l10n-id="menu-view-page-style-no-style"/>
187
<menuitem id="menu_pageStylePersistentOnly"
188
oncommand="gPageStyleMenu.switchStyleSheet('');"
189
type="radio"
190
checked="true" data-l10n-id="menu-view-page-basic-style"/>
191
<menuseparator/>
192
</menupopup>
193
</menu>
194
<menu id="charsetMenu"
195
oncommand="BrowserSetForcedCharacterSet(event.target.getAttribute('charset'));"
196
onpopupshowing="CharsetMenu.build(event.target); UpdateCurrentCharset(this);" data-l10n-id="menu-view-charset">
197
<menupopup>
198
</menupopup>
199
</menu>
200
<menuseparator/>
201
#ifdef XP_MACOSX
202
<menuitem id="enterFullScreenItem"
203
key="key_fullScreen" data-l10n-id="menu-view-enter-full-screen">
204
<observes element="View:FullScreen" attribute="oncommand"/>
205
<observes element="View:FullScreen" attribute="disabled"/>
206
</menuitem>
207
<menuitem id="exitFullScreenItem"
208
key="key_fullScreen"
209
hidden="true" data-l10n-id="menu-view-exit-full-screen">
210
<observes element="View:FullScreen" attribute="oncommand"/>
211
<observes element="View:FullScreen" attribute="disabled"/>
212
</menuitem>
213
#else
214
<menuitem id="fullScreenItem"
215
key="key_fullScreen"
216
type="checkbox"
217
observes="View:FullScreen" data-l10n-id="menu-view-full-screen"/>
218
#endif
219
<menuitem id="menu_readerModeItem"
220
observes="View:ReaderView"
221
key="key_toggleReaderMode"
222
hidden="true"/>
223
<menuitem id="menu_showAllTabs"
224
hidden="true"
225
command="Browser:ShowAllTabs"
226
key="key_showAllTabs" data-l10n-id="menu-view-show-all-tabs"/>
227
<menuseparator hidden="true" id="documentDirection-separator"/>
228
<menuitem id="documentDirection-swap"
229
hidden="true"
230
oncommand="gBrowser.selectedBrowser.sendMessageToActor('SwitchDocumentDirection', {}, 'SwitchDocumentDirection', true);" data-l10n-id="menu-view-bidi-switch-page-direction"/>
231
</menupopup>
232
</menu>
233
234
<menu id="history-menu" data-l10n-id="menu-history">
235
<menupopup id="goPopup"
236
#ifndef XP_MACOSX
237
placespopup="true"
238
is="places-popup"
239
#endif
240
oncommand="this.parentNode._placesView._onCommand(event);"
241
onclick="checkForMiddleClick(this, event);"
242
onpopupshowing="if (!this.parentNode._placesView)
243
new HistoryMenu(event);"
244
tooltip="bhTooltip"
245
popupsinherittooltip="true">
246
<menuitem id="menu_showAllHistory"
247
#ifndef XP_MACOSX
248
key="showAllHistoryKb"
249
#endif
250
command="Browser:ShowAllHistory" data-l10n-id="menu-history-show-all-history"/>
251
<menuitem id="sanitizeItem"
252
key="key_sanitize"
253
command="Tools:Sanitize" data-l10n-id="menu-history-clear-recent-history"/>
254
<menuseparator id="sanitizeSeparator"/>
255
<menuitem id="sync-tabs-menuitem"
256
oncommand="gSync.openSyncedTabsPanel();"
257
hidden="true" data-l10n-id="menu-history-synced-tabs"/>
258
<menuitem id="historyRestoreLastSession"
259
command="Browser:RestoreLastSession" data-l10n-id="menu-history-restore-last-session"/>
260
<menuitem id="hiddenTabsMenu"
261
oncommand="gTabsPanel.showHiddenTabsPanel();"
262
hidden="true" data-l10n-id="menu-history-hidden-tabs"/>
263
<menu id="historyUndoMenu"
264
disabled="true" data-l10n-id="menu-history-undo-menu">
265
<menupopup id="historyUndoPopup"
266
#ifndef XP_MACOSX
267
placespopup="true"
268
is="places-popup"
269
#endif
270
onpopupshowing="document.getElementById('history-menu')._placesView.populateUndoSubmenu();"/>
271
</menu>
272
<menu id="historyUndoWindowMenu"
273
disabled="true" data-l10n-id="menu-history-undo-window-menu">
274
<menupopup id="historyUndoWindowPopup"
275
#ifndef XP_MACOSX
276
placespopup="true"
277
is="places-popup"
278
#endif
279
onpopupshowing="document.getElementById('history-menu')._placesView.populateUndoWindowSubmenu();"/>
280
</menu>
281
<menuseparator id="startHistorySeparator"
282
class="hide-if-empty-places-result"/>
283
</menupopup>
284
</menu>
285
286
<menu id="bookmarksMenu"
287
ondragenter="PlacesMenuDNDHandler.onDragEnter(event);"
288
ondragover="PlacesMenuDNDHandler.onDragOver(event);"
289
ondrop="PlacesMenuDNDHandler.onDrop(event);" data-l10n-id="menu-bookmarks-menu">
290
<menupopup id="bookmarksMenuPopup"
291
#ifndef XP_MACOSX
292
placespopup="true"
293
is="places-popup"
294
#endif
295
context="placesContext"
296
openInTabs="children"
297
onmouseup="BookmarksEventHandler.onMouseUp(event);"
298
oncommand="BookmarksEventHandler.onCommand(event);"
299
onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
300
onpopupshowing="BookmarkingUI.onMainMenuPopupShowing(event);
301
if (!this.parentNode._placesView)
302
new PlacesMenu(event, `place:parent=${PlacesUtils.bookmarks.menuGuid}`);"
303
tooltip="bhTooltip" popupsinherittooltip="true">
304
<menuitem id="bookmarksShowAll"
305
command="Browser:ShowAllBookmarks"
306
key="manBookmarkKb" data-l10n-id="menu-bookmarks-show-all"/>
307
<menuseparator id="organizeBookmarksSeparator"/>
308
<menuitem id="menu_bookmarkThisPage"
309
command="Browser:AddBookmarkAs"
310
key="addBookmarkAsKb"/>
311
<menuitem id="menu_bookmarkAllTabs"
312
class="show-only-for-keyboard"
313
command="Browser:BookmarkAllTabs"
314
key="bookmarkAllTabsKb" data-l10n-id="menu-bookmarks-all-tabs"/>
315
<menuseparator id="bookmarksToolbarSeparator"/>
316
<menu id="bookmarksToolbarFolderMenu"
317
class="menu-iconic bookmark-item"
318
container="true" data-l10n-id="menu-bookmarks-toolbar">
319
<menupopup id="bookmarksToolbarFolderPopup"
320
#ifndef XP_MACOSX
321
placespopup="true"
322
is="places-popup"
323
#endif
324
context="placesContext"
325
onpopupshowing="if (!this.parentNode._placesView)
326
new PlacesMenu(event, `place:parent=${PlacesUtils.bookmarks.toolbarGuid}`);"/>
327
</menu>
328
<menu id="menu_unsortedBookmarks"
329
class="menu-iconic bookmark-item"
330
container="true" data-l10n-id="menu-bookmarks-other">
331
<menupopup id="otherBookmarksFolderPopup"
332
#ifndef XP_MACOSX
333
placespopup="true"
334
is="places-popup"
335
#endif
336
context="placesContext"
337
onpopupshowing="if (!this.parentNode._placesView)
338
new PlacesMenu(event, `place:parent=${PlacesUtils.bookmarks.unfiledGuid}`);"/>
339
</menu>
340
<menu id="menu_mobileBookmarks"
341
class="menu-iconic bookmark-item"
342
hidden="true"
343
container="true" data-l10n-id="menu-bookmarks-mobile">
344
<menupopup id="mobileBookmarksFolderPopup"
345
#ifndef XP_MACOSX
346
placespopup="true"
347
is="places-popup"
348
#endif
349
context="placesContext"
350
onpopupshowing="if (!this.parentNode._placesView)
351
new PlacesMenu(event, `place:parent=${PlacesUtils.bookmarks.mobileGuid}`);"/>
352
</menu>
353
<menuseparator id="bookmarksMenuItemsSeparator"/>
354
<!-- Bookmarks menu items -->
355
</menupopup>
356
</menu>
357
358
<menu id="tools-menu" data-l10n-id="menu-tools">
359
<menupopup id="menu_ToolsPopup">
360
<menuitem id="menu_openDownloads"
361
key="key_openDownloads"
362
command="Tools:Downloads" data-l10n-id="menu-tools-downloads"/>
363
<menuitem id="menu_openAddons"
364
key="key_openAddons"
365
command="Tools:Addons" data-l10n-id="menu-tools-addons"/>
366
367
<!-- only one of sync-setup, sync-enable, sync-unverifieditem, sync-syncnowitem or sync-reauthitem will be showing at once -->
368
<menuitem id="sync-setup"
369
class="sync-ui-item"
370
hidden="true"
371
oncommand="gSync.openPrefs('menubar')" data-l10n-id="menu-tools-fxa-sign-in"/>
372
<menuitem id="sync-enable"
373
class="sync-ui-item"
374
hidden="true"
375
oncommand="gSync.openPrefs('menubar')" data-l10n-id="menu-tools-turn-on-sync"/>
376
<menuitem id="sync-unverifieditem"
377
class="sync-ui-item"
378
hidden="true"
379
oncommand="gSync.openPrefs('menubar')" data-l10n-id="menu-tools-fxa-sign-in"/>
380
<menuitem id="sync-syncnowitem"
381
class="sync-ui-item"
382
hidden="true"
383
oncommand="gSync.doSync(event);" data-l10n-id="menu-tools-sync-now"/>
384
<menuitem id="sync-reauthitem"
385
class="sync-ui-item"
386
hidden="true"
387
oncommand="gSync.openSignInAgainPage('menubar');" data-l10n-id="menu-tools-fxa-re-auth"/>
388
<menuseparator id="devToolsSeparator"/>
389
<menu id="webDeveloperMenu" data-l10n-id="menu-tools-web-developer">
390
<menupopup id="menuWebDeveloperPopup">
391
<menuitem id="menu_pageSource"
392
key="key_viewSource"
393
command="View:PageSource" data-l10n-id="menu-tools-page-source"/>
394
</menupopup>
395
</menu>
396
<menuitem id="menu_pageInfo"
397
#ifndef XP_WIN
398
key="key_viewInfo"
399
#endif
400
command="View:PageInfo" data-l10n-id="menu-tools-page-info"/>
401
#ifndef XP_UNIX
402
<menuseparator id="prefSep"/>
403
<menuitem id="menu_preferences"
404
oncommand="openPreferences(undefined);" data-l10n-id="menu-preferences"/>
405
#endif
406
#ifdef MOZ_DEBUG
407
<menuitem id="menu_layout_debugger"
408
data-l10n-id="menu-tools-layout-debugger"
409
oncommand="toOpenWindowByType('mozapp:layoutdebug',
411
#endif
412
#ifdef XP_MACOSX
413
<!-- nsMenuBarX hides these and uses them to build the Application menu. -->
414
<!-- We need to leave those strings in DTD until bug 1568133 is fixed. -->
415
<menuitem id="menu_preferences" label="&preferencesCmdMac.label;" key="key_preferencesCmdMac" oncommand="openPreferences(undefined);"/>
416
<menuitem id="menu_mac_services" label="&servicesMenuMac.label;"/>
417
<menuitem id="menu_mac_hide_app" label="&hideThisAppCmdMac2.label;" key="key_hideThisAppCmdMac"/>
418
<menuitem id="menu_mac_hide_others" label="&hideOtherAppsCmdMac.label;" key="key_hideOtherAppsCmdMac"/>
419
<menuitem id="menu_mac_show_all" label="&showAllAppsCmdMac.label;"/>
420
<menuitem id="menu_mac_touch_bar" label="&touchBarCmdMac.label;"/>
421
#endif
422
</menupopup>
423
</menu>
424
#ifdef XP_MACOSX
425
<menu id="windowMenu"
426
onpopupshowing="macWindowMenuDidShow();"
427
onpopuphidden="macWindowMenuDidHide();"
428
data-l10n-id="menu-window-menu">
429
<menupopup id="windowPopup">
430
<menuitem command="minimizeWindow" key="key_minimizeWindow"/>
431
<menuitem command="zoomWindow"/>
432
<!-- decomment when "BringAllToFront" is implemented
433
<menuseparator/>
434
<menuitem disabled="true" data-l10n-id="menu-window-bring-all-to-front"/> -->
435
<menuseparator id="sep-window-list"/>
436
</menupopup>
437
</menu>
438
#endif
439
<menu id="helpMenu"
440
#ifdef XP_WIN
441
#else
442
#endif
443
data-l10n-id="menu-help">
444
<menupopup id="menu_HelpPopup" onpopupshowing="buildHelpMenu();">
445
<menuitem id="menu_openHelp"
446
oncommand="openHelpLink('firefox-help')"
447
onclick="checkForMiddleClick(this, event);"
448
data-l10n-id="menu-help-product"
449
#ifdef XP_MACOSX
450
key="key_openHelpMac"/>
451
#else
452
/>
453
#endif
454
<menuitem id="menu_openTour"
455
oncommand="openTourPage();" data-l10n-id="menu-help-show-tour"/>
456
<menuitem id="menu_keyboardShortcuts"
457
oncommand="openHelpLink('keyboard-shortcuts')"
458
onclick="checkForMiddleClick(this, event);" data-l10n-id="menu-help-keyboard-shortcuts"/>
459
<menuitem id="troubleShooting"
460
oncommand="openTroubleshootingPage()"
461
onclick="checkForMiddleClick(this, event);" data-l10n-id="menu-help-troubleshooting-info"/>
462
<menuitem id="feedbackPage"
463
oncommand="openFeedbackPage()"
464
onclick="checkForMiddleClick(this, event);" data-l10n-id="menu-help-feedback-page"/>
465
<menuitem id="helpSafeMode"
466
oncommand="safeModeRestart();" data-l10n-id="menu-help-safe-mode-without-addons"/>
467
<menuitem id="menu_HelpPopup_reportPhishingtoolmenu"
468
disabled="true"
469
oncommand="openUILink(gSafeBrowsing.getReportURL('Phish'), event, {triggeringPrincipal: Services.scriptSecurityManager.createNullPrincipal({})});"
470
onclick="checkForMiddleClick(this, event);"
471
hidden="true" data-l10n-id="menu-help-report-deceptive-site"/>
472
<menuitem id="menu_HelpPopup_reportPhishingErrortoolmenu"
473
disabled="true"
474
oncommand="ReportFalseDeceptiveSite();"
475
onclick="checkForMiddleClick(this, event);"
476
data-l10n-id="menu-help-not-deceptive"
477
hidden="true"/>
478
<menuseparator id="helpPolicySeparator"
479
hidden="true"/>
480
<menuitem id="helpPolicySupport"
481
hidden="true"
482
oncommand="openUILinkIn(Services.policies.getSupportMenu().URL.href, 'tab', {triggeringPrincipal: Services.scriptSecurityManager.createNullPrincipal({})});"
483
onclick="checkForMiddleClick(this, event);"/>
484
<menuseparator id="aboutSeparator"/>
485
<!-- We need to leave those strings in DTD until bug 1568133 is fixed. -->
486
<menuitem id="aboutName"
487
accesskey="&aboutProduct2.accesskey;"
488
label="&aboutProduct2.label;"
489
oncommand="openAboutDialog();"/>
490
</menupopup>
491
</menu>
492
</menubar>