1 |
# HG changeset patch |
2 |
# Parent 1c4e33861cfcffe5a189802cf97957b0701260db |
3 |
|
4 |
diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul |
5 |
new file mode 100644 |
6 |
--- /dev/null |
7 |
+++ b/browser/base/content/browser-kde.xul |
8 |
@@ -0,0 +1,1134 @@ |
9 |
+#filter substitution |
10 |
+<?xml version="1.0"?> |
11 |
+# -*- Mode: HTML -*- |
12 |
+# |
13 |
+# This Source Code Form is subject to the terms of the Mozilla Public |
14 |
+# License, v. 2.0. If a copy of the MPL was not distributed with this |
15 |
+# file, You can obtain one at http://mozilla.org/MPL/2.0/. |
16 |
+ |
17 |
+<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?> |
18 |
+<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?> |
19 |
+<?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?> |
20 |
+<?xml-stylesheet href="chrome://devtools/skin/devtools-browser.css" type="text/css"?> |
21 |
+<?xml-stylesheet href="chrome://browser/skin/controlcenter/panel.css" type="text/css"?> |
22 |
+<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUI.css" type="text/css"?> |
23 |
+<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?> |
24 |
+<?xml-stylesheet href="chrome://browser/skin/browser-lightweightTheme.css" type="text/css"?> |
25 |
+ |
26 |
+<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?> |
27 |
+<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?> |
28 |
+<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?> |
29 |
+ |
30 |
+# All DTD information is stored in a separate file so that it can be shared by |
31 |
+# hiddenWindow.xul. |
32 |
+#include browser-doctype.inc |
33 |
+ |
34 |
+<window id="main-window" |
35 |
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
36 |
+ xmlns:svg="http://www.w3.org/2000/svg" |
37 |
+ xmlns:html="http://www.w3.org/1999/xhtml" |
38 |
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
39 |
+ onload="gBrowserInit.onLoad()" onunload="gBrowserInit.onUnload()" onclose="return WindowIsClosing();" |
40 |
+ title="&mainWindow.title;" |
41 |
+ title_normal="&mainWindow.title;" |
42 |
+#ifdef XP_MACOSX |
43 |
+ title_privatebrowsing="&mainWindow.title;&mainWindow.titlemodifiermenuseparator;&mainWindow.titlePrivateBrowsingSuffix;" |
44 |
+ titledefault="&mainWindow.title;" |
45 |
+ titlemodifier="" |
46 |
+ titlemodifier_normal="" |
47 |
+ titlemodifier_privatebrowsing="&mainWindow.titlePrivateBrowsingSuffix;" |
48 |
+#else |
49 |
+ title_privatebrowsing="&mainWindow.titlemodifier; &mainWindow.titlePrivateBrowsingSuffix;" |
50 |
+ titlemodifier="&mainWindow.titlemodifier;" |
51 |
+ titlemodifier_normal="&mainWindow.titlemodifier;" |
52 |
+ titlemodifier_privatebrowsing="&mainWindow.titlemodifier; &mainWindow.titlePrivateBrowsingSuffix;" |
53 |
+#endif |
54 |
+#ifdef CAN_DRAW_IN_TITLEBAR |
55 |
+#ifdef XP_WIN |
56 |
+ chromemargin="0,2,2,2" |
57 |
+#else |
58 |
+ chromemargin="0,-1,-1,-1" |
59 |
+#endif |
60 |
+ tabsintitlebar="true" |
61 |
+#endif |
62 |
+ titlemenuseparator="&mainWindow.titlemodifiermenuseparator;" |
63 |
+ lightweightthemes="true" |
64 |
+ lightweightthemesfooter="browser-bottombox" |
65 |
+ windowtype="navigator:browser" |
66 |
+ macanimationtype="document" |
67 |
+ screenX="4" screenY="4" |
68 |
+ fullscreenbutton="true" |
69 |
+ sizemode="normal" |
70 |
+ retargetdocumentfocus="urlbar" |
71 |
+ persist="screenX screenY width height sizemode"> |
72 |
+ |
73 |
+# All JS files which are not content (only) dependent that browser.xul |
74 |
+# wishes to include *must* go into the global-scripts.inc file |
75 |
+# so that they can be shared by macBrowserOverlay.xul. |
76 |
+#include global-scripts.inc |
77 |
+<script type="application/javascript" src="chrome://browser/content/nsContextMenu.js"/> |
78 |
+ |
79 |
+<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/> |
80 |
+ |
81 |
+<script type="application/javascript" src="chrome://browser/content/downloads/downloads.js"/> |
82 |
+<script type="application/javascript" src="chrome://browser/content/downloads/indicator.js"/> |
83 |
+<script type="application/javascript" src="chrome://browser/content/places/editBookmarkOverlay.js"/> |
84 |
+ |
85 |
+# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the |
86 |
+# browser-sets.inc file for sharing with hiddenWindow.xul. |
87 |
+#define FULL_BROWSER_WINDOW |
88 |
+#include browser-sets.inc |
89 |
+#undef FULL_BROWSER_WINDOW |
90 |
+ |
91 |
+ <popupset id="mainPopupSet"> |
92 |
+ <menupopup id="tabContextMenu" |
93 |
+ onpopupshowing="if (event.target == this) TabContextMenu.updateContextMenu(this);" |
94 |
+ onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;"> |
95 |
+ <menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;" |
96 |
+ oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/> |
97 |
+ <menuitem id="context_toggleMuteTab" oncommand="TabContextMenu.contextTab.toggleMuteAudio();"/> |
98 |
+ <menuseparator/> |
99 |
+ <menuitem id="context_pinTab" label="&pinTab.label;" |
100 |
+ accesskey="&pinTab.accesskey;" |
101 |
+ oncommand="gBrowser.pinTab(TabContextMenu.contextTab);"/> |
102 |
+ <menuitem id="context_unpinTab" label="&unpinTab.label;" hidden="true" |
103 |
+ accesskey="&unpinTab.accesskey;" |
104 |
+ oncommand="gBrowser.unpinTab(TabContextMenu.contextTab);"/> |
105 |
+ <menuitem id="context_openTabInWindow" label="&moveToNewWindow.label;" |
106 |
+ accesskey="&moveToNewWindow.accesskey;" |
107 |
+ tbattr="tabbrowser-multiple" |
108 |
+ oncommand="gBrowser.replaceTabWithWindow(TabContextMenu.contextTab);"/> |
109 |
+#ifdef E10S_TESTING_ONLY |
110 |
+ <menuitem id="context_openNonRemoteWindow" label="Open in new non-e10s window" |
111 |
+ tbattr="tabbrowser-remote" |
112 |
+ hidden="true" |
113 |
+ oncommand="gBrowser.openNonRemoteWindow(TabContextMenu.contextTab);"/> |
114 |
+#endif |
115 |
+ <menuseparator id="context_sendTabToDevice_separator" hidden="true"/> |
116 |
+ <menu id="context_sendTabToDevice" label="&sendTabToDevice.label;" |
117 |
+ accesskey="&sendTabToDevice.accesskey;" hidden="true"> |
118 |
+ <menupopup id="context_sendTabToDevicePopupMenu" |
119 |
+ onpopupshowing="gFxAccounts.populateSendTabToDevicesMenu(event.target, TabContextMenu.contextTab.linkedBrowser.currentURI.spec, TabContextMenu.contextTab.linkedBrowser.contentTitle);"/> |
120 |
+ </menu> |
121 |
+ <menuseparator/> |
122 |
+ <menuitem id="context_reloadAllTabs" label="&reloadAllTabs.label;" accesskey="&reloadAllTabs.accesskey;" |
123 |
+ tbattr="tabbrowser-multiple-visible" |
124 |
+ oncommand="gBrowser.reloadAllTabs();"/> |
125 |
+ <menuitem id="context_bookmarkAllTabs" |
126 |
+ label="&bookmarkAllTabs.label;" |
127 |
+ accesskey="&bookmarkAllTabs.accesskey;" |
128 |
+ command="Browser:BookmarkAllTabs"/> |
129 |
+ <menuitem id="context_closeTabsToTheEnd" label="&closeTabsToTheEnd.label;" accesskey="&closeTabsToTheEnd.accesskey;" |
130 |
+ oncommand="gBrowser.removeTabsToTheEndFrom(TabContextMenu.contextTab, {animate: true});"/> |
131 |
+ <menuitem id="context_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;" |
132 |
+ oncommand="gBrowser.removeAllTabsBut(TabContextMenu.contextTab);"/> |
133 |
+ <menuseparator/> |
134 |
+ <menuitem id="context_undoCloseTab" |
135 |
+ label="&undoCloseTab.label;" |
136 |
+ accesskey="&undoCloseTab.accesskey;" |
137 |
+ observes="History:UndoCloseTab"/> |
138 |
+ <menuitem id="context_closeTab" label="&closeTab.label;" accesskey="&closeTab.accesskey;" |
139 |
+ oncommand="gBrowser.removeTab(TabContextMenu.contextTab, { animate: true });"/> |
140 |
+ </menupopup> |
141 |
+ |
142 |
+ <!-- bug 415444/582485: event.stopPropagation is here for the cloned version |
143 |
+ of this menupopup --> |
144 |
+ <menupopup id="backForwardMenu" |
145 |
+ onpopupshowing="return FillHistoryMenu(event.target);" |
146 |
+ oncommand="gotoHistoryIndex(event); event.stopPropagation();" |
147 |
+ onclick="checkForMiddleClick(this, event);"/> |
148 |
+ <tooltip id="aHTMLTooltip" page="true"/> |
149 |
+ <tooltip id="remoteBrowserTooltip"/> |
150 |
+ |
151 |
+ <!-- for search and content formfill/pw manager --> |
152 |
+ |
153 |
+ <panel type="autocomplete-richlistbox" |
154 |
+ id="PopupAutoComplete" |
155 |
+ noautofocus="true" |
156 |
+ hidden="true" |
157 |
+ overflowpadding="4" |
158 |
+ norolluponanchor="true" /> |
159 |
+ |
160 |
+ <!-- for search with one-off buttons --> |
161 |
+ <panel type="autocomplete" id="PopupSearchAutoComplete" noautofocus="true" hidden="true"/> |
162 |
+ |
163 |
+ <!-- for url bar autocomplete --> |
164 |
+ <panel type="autocomplete-richlistbox" |
165 |
+ id="PopupAutoCompleteRichResult" |
166 |
+ noautofocus="true" |
167 |
+ hidden="true" |
168 |
+ flip="none" |
169 |
+ level="parent" |
170 |
+ overflowpadding="30" /> |
171 |
+ |
172 |
+ <panel id="DateTimePickerPanel" |
173 |
+ type="arrow" |
174 |
+ hidden="true" |
175 |
+ orient="vertical" |
176 |
+ noautofocus="true" |
177 |
+ consumeoutsideclicks="false" |
178 |
+ level="parent"> |
179 |
+ <iframe id="dateTimePopupFrame"/> |
180 |
+ </panel> |
181 |
+ |
182 |
+ <!-- for select dropdowns. The menupopup is what shows the list of options, |
183 |
+ and the popuponly menulist makes things like the menuactive attributes |
184 |
+ work correctly on the menupopup. ContentSelectDropdown expects the |
185 |
+ popuponly menulist to be its immediate parent. --> |
186 |
+ <menulist popuponly="true" id="ContentSelectDropdown" hidden="true"> |
187 |
+ <menupopup rolluponmousewheel="true" |
188 |
+ activateontab="true" position="after_start" |
189 |
+#ifdef XP_WIN |
190 |
+ consumeoutsideclicks="false" ignorekeys="shortcuts" |
191 |
+#endif |
192 |
+ /> |
193 |
+ </menulist> |
194 |
+ |
195 |
+ <!-- for invalid form error message --> |
196 |
+ <panel id="invalid-form-popup" type="arrow" orient="vertical" noautofocus="true" hidden="true" level="parent"> |
197 |
+ <description/> |
198 |
+ </panel> |
199 |
+ |
200 |
+ <panel id="editBookmarkPanel" |
201 |
+ type="arrow" |
202 |
+ orient="vertical" |
203 |
+ ignorekeys="true" |
204 |
+ hidden="true" |
205 |
+ tabspecific="true" |
206 |
+ onpopupshown="StarUI.panelShown(event);" |
207 |
+ aria-labelledby="editBookmarkPanelTitle"> |
208 |
+ <row id="editBookmarkPanelHeader" align="center" hidden="true"> |
209 |
+ <vbox align="center"> |
210 |
+ <image id="editBookmarkPanelStarIcon"/> |
211 |
+ </vbox> |
212 |
+ <vbox> |
213 |
+ <label id="editBookmarkPanelTitle"/> |
214 |
+ <description id="editBookmarkPanelDescription"/> |
215 |
+ </vbox> |
216 |
+ </row> |
217 |
+ <vbox id="editBookmarkPanelContent" flex="1" hidden="true"/> |
218 |
+ <hbox id="editBookmarkPanelBottomButtons" pack="end"> |
219 |
+#ifdef XP_UNIX |
220 |
+ <button id="editBookmarkPanelDoneButton" |
221 |
+ class="editBookmarkPanelBottomButton" |
222 |
+ label="&editBookmark.done.label;" |
223 |
+ default="true" |
224 |
+ oncommand="StarUI.panel.hidePopup();"/> |
225 |
+ <button id="editBookmarkPanelRemoveButton" |
226 |
+ class="editBookmarkPanelBottomButton" |
227 |
+ oncommand="StarUI.removeBookmarkButtonCommand();" |
228 |
+ accesskey="&editBookmark.removeBookmark.accessKey;"/> |
229 |
+#else |
230 |
+ <button id="editBookmarkPanelRemoveButton" |
231 |
+ class="editBookmarkPanelBottomButton" |
232 |
+ oncommand="StarUI.removeBookmarkButtonCommand();" |
233 |
+ accesskey="&editBookmark.removeBookmark.accessKey;"/> |
234 |
+ <button id="editBookmarkPanelDoneButton" |
235 |
+ class="editBookmarkPanelBottomButton" |
236 |
+ label="&editBookmark.done.label;" |
237 |
+ default="true" |
238 |
+ oncommand="StarUI.panel.hidePopup();"/> |
239 |
+#endif |
240 |
+ </hbox> |
241 |
+ </panel> |
242 |
+ |
243 |
+ <!-- UI tour experience --> |
244 |
+ <panel id="UITourTooltip" |
245 |
+ type="arrow" |
246 |
+ hidden="true" |
247 |
+ noautofocus="true" |
248 |
+ noautohide="true" |
249 |
+ align="start" |
250 |
+ orient="vertical" |
251 |
+ role="alert"> |
252 |
+ <vbox> |
253 |
+ <hbox id="UITourTooltipBody"> |
254 |
+ <image id="UITourTooltipIcon"/> |
255 |
+ <vbox flex="1"> |
256 |
+ <hbox id="UITourTooltipTitleContainer"> |
257 |
+ <label id="UITourTooltipTitle" flex="1"/> |
258 |
+ <toolbarbutton id="UITourTooltipClose" class="close-icon" |
259 |
+ tooltiptext="&uiTour.infoPanel.close;"/> |
260 |
+ </hbox> |
261 |
+ <description id="UITourTooltipDescription" flex="1"/> |
262 |
+ </vbox> |
263 |
+ </hbox> |
264 |
+ <hbox id="UITourTooltipButtons" flex="1" align="center"/> |
265 |
+ </vbox> |
266 |
+ </panel> |
267 |
+ <!-- type="default" forces frames to be created so that the panel's size can be determined --> |
268 |
+ <panel id="UITourHighlightContainer" |
269 |
+ type="default" |
270 |
+ hidden="true" |
271 |
+ noautofocus="true" |
272 |
+ noautohide="true" |
273 |
+ flip="none" |
274 |
+ consumeoutsideclicks="false" |
275 |
+ mousethrough="always"> |
276 |
+ <box id="UITourHighlight"></box> |
277 |
+ </panel> |
278 |
+ |
279 |
+ <panel id="social-share-panel" |
280 |
+ class="social-panel" |
281 |
+ type="arrow" |
282 |
+ orient="vertical" |
283 |
+ onpopupshowing="SocialShare.onShowing()" |
284 |
+ onpopuphidden="SocialShare.onHidden()" |
285 |
+ hidden="true"> |
286 |
+ <hbox class="social-share-toolbar"> |
287 |
+ <toolbarbutton id="manage-share-providers" class="share-provider-button" |
288 |
+ tooltiptext="&social.addons.label;" |
289 |
+ oncommand="BrowserOpenAddonsMgr('addons://list/service'); |
290 |
+ this.parentNode.parentNode.hidePopup();"/> |
291 |
+ <arrowscrollbox id="social-share-provider-buttons" orient="horizontal" flex="1" pack="end"> |
292 |
+ <toolbarbutton id="add-share-provider" class="share-provider-button" type="radio" |
293 |
+ group="share-providers" tooltiptext="&findShareServices.label;" |
294 |
+ oncommand="SocialShare.showDirectory()"/> |
295 |
+ </arrowscrollbox> |
296 |
+ </hbox> |
297 |
+ <hbox id="share-container" flex="1"/> |
298 |
+ </panel> |
299 |
+ |
300 |
+ <menupopup id="toolbar-context-menu" |
301 |
+ onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator'));"> |
302 |
+ <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)" |
303 |
+ accesskey="&customizeMenu.moveToPanel.accesskey;" |
304 |
+ label="&customizeMenu.moveToPanel.label;" |
305 |
+ contexttype="toolbaritem" |
306 |
+ class="customize-context-moveToPanel"/> |
307 |
+ <menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)" |
308 |
+ accesskey="&customizeMenu.removeFromToolbar.accesskey;" |
309 |
+ label="&customizeMenu.removeFromToolbar.label;" |
310 |
+ contexttype="toolbaritem" |
311 |
+ class="customize-context-removeFromToolbar"/> |
312 |
+ <menuitem id="toolbar-context-reloadAllTabs" |
313 |
+ class="toolbaritem-tabsmenu" |
314 |
+ contexttype="tabbar" |
315 |
+ oncommand="gBrowser.reloadAllTabs();" |
316 |
+ label="&toolbarContextMenu.reloadAllTabs.label;" |
317 |
+ accesskey="&toolbarContextMenu.reloadAllTabs.accesskey;"/> |
318 |
+ <menuitem id="toolbar-context-bookmarkAllTabs" |
319 |
+ class="toolbaritem-tabsmenu" |
320 |
+ contexttype="tabbar" |
321 |
+ command="Browser:BookmarkAllTabs" |
322 |
+ label="&toolbarContextMenu.bookmarkAllTabs.label;" |
323 |
+ accesskey="&toolbarContextMenu.bookmarkAllTabs.accesskey;"/> |
324 |
+ <menuitem id="toolbar-context-undoCloseTab" |
325 |
+ class="toolbaritem-tabsmenu" |
326 |
+ contexttype="tabbar" |
327 |
+ label="&toolbarContextMenu.undoCloseTab.label;" |
328 |
+ accesskey="&toolbarContextMenu.undoCloseTab.accesskey;" |
329 |
+ observes="History:UndoCloseTab"/> |
330 |
+ <menuseparator/> |
331 |
+ <menuseparator id="viewToolbarsMenuSeparator"/> |
332 |
+ <!-- XXXgijs: we're using oncommand handler here to avoid the event being |
333 |
+ redirected to the command element, thus preventing |
334 |
+ listeners on the menupopup or further up the tree from |
335 |
+ seeing the command event pass by. The observes attribute is |
336 |
+ here so that the menuitem is still disabled and re-enabled |
337 |
+ correctly. --> |
338 |
+ <menuitem oncommand="BrowserCustomizeToolbar()" |
339 |
+ observes="cmd_CustomizeToolbars" |
340 |
+ class="viewCustomizeToolbar" |
341 |
+ label="&viewCustomizeToolbar.label;" |
342 |
+ accesskey="&viewCustomizeToolbar.accesskey;"/> |
343 |
+ </menupopup> |
344 |
+ |
345 |
+ <menupopup id="blockedPopupOptions" |
346 |
+ onpopupshowing="gPopupBlockerObserver.fillPopupList(event);" |
347 |
+ onpopuphiding="gPopupBlockerObserver.onPopupHiding(event);"> |
348 |
+ <menuitem observes="blockedPopupAllowSite"/> |
349 |
+ <menuitem observes="blockedPopupEditSettings"/> |
350 |
+ <menuitem observes="blockedPopupDontShowMessage"/> |
351 |
+ <menuseparator observes="blockedPopupsSeparator"/> |
352 |
+ </menupopup> |
353 |
+ |
354 |
+ <menupopup id="autohide-context" |
355 |
+ onpopupshowing="FullScreen.getAutohide(this.firstChild);"> |
356 |
+ <menuitem type="checkbox" label="&fullScreenAutohide.label;" |
357 |
+ accesskey="&fullScreenAutohide.accesskey;" |
358 |
+ oncommand="FullScreen.setAutohide();"/> |
359 |
+ <menuseparator/> |
360 |
+ <menuitem label="&fullScreenExit.label;" |
361 |
+ accesskey="&fullScreenExit.accesskey;" |
362 |
+ oncommand="BrowserFullScreen();"/> |
363 |
+ </menupopup> |
364 |
+ |
365 |
+ <menupopup id="contentAreaContextMenu" pagemenu="#page-menu-separator" |
366 |
+ onpopupshowing="if (event.target != this) |
367 |
+ return true; |
368 |
+ gContextMenu = new nsContextMenu(this, event.shiftKey); |
369 |
+ if (gContextMenu.shouldDisplay) |
370 |
+ updateEditUIVisibility(); |
371 |
+ return gContextMenu.shouldDisplay;" |
372 |
+ onpopuphiding="if (event.target != this) |
373 |
+ return; |
374 |
+ gContextMenu.hiding(); |
375 |
+ gContextMenu = null; |
376 |
+ updateEditUIVisibility();"> |
377 |
+#include browser-context.inc |
378 |
+ </menupopup> |
379 |
+ |
380 |
+ <menupopup id="placesContext"> |
381 |
+ <menuseparator id="placesContext_recentlyBookmarkedSeparator" |
382 |
+ ignoreitem="true" |
383 |
+ hidden="true"/> |
384 |
+ <menuitem id="placesContext_hideRecentlyBookmarked" |
385 |
+ label="&hideRecentlyBookmarked.label;" |
386 |
+ accesskey="&hideRecentlyBookmarked.accesskey;" |
387 |
+ oncommand="BookmarkingUI.hideRecentlyBookmarked();" |
388 |
+ closemenu="single" |
389 |
+ ignoreitem="true" |
390 |
+ hidden="true"/> |
391 |
+ <menuitem id="placesContext_showRecentlyBookmarked" |
392 |
+ label="&showRecentlyBookmarked.label;" |
393 |
+ accesskey="&showRecentlyBookmarked.accesskey;" |
394 |
+ oncommand="BookmarkingUI.showRecentlyBookmarked();" |
395 |
+ closemenu="single" |
396 |
+ ignoreitem="true" |
397 |
+ hidden="true"/> |
398 |
+ </menupopup> |
399 |
+ |
400 |
+ <panel id="ctrlTab-panel" hidden="true" norestorefocus="true" level="top"> |
401 |
+ <hbox> |
402 |
+ <button class="ctrlTab-preview" flex="1"/> |
403 |
+ <button class="ctrlTab-preview" flex="1"/> |
404 |
+ <button class="ctrlTab-preview" flex="1"/> |
405 |
+ <button class="ctrlTab-preview" flex="1"/> |
406 |
+ <button class="ctrlTab-preview" flex="1"/> |
407 |
+ <button class="ctrlTab-preview" flex="1"/> |
408 |
+ </hbox> |
409 |
+ <hbox pack="center"> |
410 |
+ <button id="ctrlTab-showAll" class="ctrlTab-preview" noicon="true"/> |
411 |
+ </hbox> |
412 |
+ </panel> |
413 |
+ |
414 |
+ <!-- Bookmarks and history tooltip --> |
415 |
+ <tooltip id="bhTooltip"/> |
416 |
+ |
417 |
+ <tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/> |
418 |
+ |
419 |
+ <tooltip id="back-button-tooltip"> |
420 |
+ <label class="tooltip-label" value="&backButton.tooltip;"/> |
421 |
+#ifdef XP_MACOSX |
422 |
+ <label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/> |
423 |
+#else |
424 |
+ <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/> |
425 |
+#endif |
426 |
+ </tooltip> |
427 |
+ |
428 |
+ <tooltip id="forward-button-tooltip"> |
429 |
+ <label class="tooltip-label" value="&forwardButton.tooltip;"/> |
430 |
+#ifdef XP_MACOSX |
431 |
+ <label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/> |
432 |
+#else |
433 |
+ <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/> |
434 |
+#endif |
435 |
+ </tooltip> |
436 |
+ |
437 |
+ <tooltip id="share-button-tooltip" onpopupshowing="SocialShare.createTooltip(event);"> |
438 |
+ <label class="tooltip-label"/> |
439 |
+ <label class="tooltip-label"/> |
440 |
+ </tooltip> |
441 |
+ |
442 |
+#include popup-notifications.inc |
443 |
+ |
444 |
+#include ../../components/customizableui/content/panelUI.inc.xul |
445 |
+#include ../../components/controlcenter/content/panel.inc.xul |
446 |
+ |
447 |
+ <hbox id="downloads-animation-container" mousethrough="always"> |
448 |
+ <vbox id="downloads-notification-anchor"> |
449 |
+ <vbox id="downloads-indicator-notification"/> |
450 |
+ </vbox> |
451 |
+ </hbox> |
452 |
+ |
453 |
+ <hbox id="bookmarked-notification-container" mousethrough="always"> |
454 |
+ <vbox id="bookmarked-notification-anchor"> |
455 |
+ <vbox id="bookmarked-notification"/> |
456 |
+ </vbox> |
457 |
+ <vbox id="bookmarked-notification-dropmarker-anchor"> |
458 |
+ <image id="bookmarked-notification-dropmarker-icon"/> |
459 |
+ </vbox> |
460 |
+ </hbox> |
461 |
+ |
462 |
+ <tooltip id="dynamic-shortcut-tooltip" |
463 |
+ onpopupshowing="UpdateDynamicShortcutTooltipText(this);"/> |
464 |
+ |
465 |
+ <menupopup id="SyncedTabsSidebarContext"> |
466 |
+ <menuitem label="&syncedTabs.context.open.label;" |
467 |
+ accesskey="&syncedTabs.context.open.accesskey;" |
468 |
+ id="syncedTabsOpenSelected" where="current"/> |
469 |
+ <menuitem label="&syncedTabs.context.openInNewTab.label;" |
470 |
+ accesskey="&syncedTabs.context.openInNewTab.accesskey;" |
471 |
+ id="syncedTabsOpenSelectedInTab" where="tab"/> |
472 |
+ <menuitem label="&syncedTabs.context.openInNewWindow.label;" |
473 |
+ accesskey="&syncedTabs.context.openInNewWindow.accesskey;" |
474 |
+ id="syncedTabsOpenSelectedInWindow" where="window"/> |
475 |
+ <menuitem label="&syncedTabs.context.openInNewPrivateWindow.label;" |
476 |
+ accesskey="&syncedTabs.context.openInNewPrivateWindow.accesskey;" |
477 |
+ id="syncedTabsOpenSelectedInPrivateWindow" where="window" private="true"/> |
478 |
+ <menuseparator/> |
479 |
+ <menuitem label="&syncedTabs.context.bookmarkSingleTab.label;" |
480 |
+ accesskey="&syncedTabs.context.bookmarkSingleTab.accesskey;" |
481 |
+ id="syncedTabsBookmarkSelected"/> |
482 |
+ <menuitem label="&syncedTabs.context.copy.label;" |
483 |
+ accesskey="&syncedTabs.context.copy.accesskey;" |
484 |
+ id="syncedTabsCopySelected"/> |
485 |
+ <menuseparator/> |
486 |
+ <menuitem label="&syncSyncNowItem.label;" |
487 |
+ accesskey="&syncSyncNowItem.accesskey;" |
488 |
+ id="syncedTabsRefresh"/> |
489 |
+ </menupopup> |
490 |
+ <menupopup id="SyncedTabsSidebarTabsFilterContext" |
491 |
+ class="textbox-contextmenu"> |
492 |
+ <menuitem label="&undoCmd.label;" |
493 |
+ accesskey="&undoCmd.accesskey;" |
494 |
+ cmd="cmd_undo"/> |
495 |
+ <menuseparator/> |
496 |
+ <menuitem label="&cutCmd.label;" |
497 |
+ accesskey="&cutCmd.accesskey;" |
498 |
+ cmd="cmd_cut"/> |
499 |
+ <menuitem label="©Cmd.label;" |
500 |
+ accesskey="©Cmd.accesskey;" |
501 |
+ cmd="cmd_copy"/> |
502 |
+ <menuitem label="&pasteCmd.label;" |
503 |
+ accesskey="&pasteCmd.accesskey;" |
504 |
+ cmd="cmd_paste"/> |
505 |
+ <menuitem label="&deleteCmd.label;" |
506 |
+ accesskey="&deleteCmd.accesskey;" |
507 |
+ cmd="cmd_delete"/> |
508 |
+ <menuseparator/> |
509 |
+ <menuitem label="&selectAllCmd.label;" |
510 |
+ accesskey="&selectAllCmd.accesskey;" |
511 |
+ cmd="cmd_selectAll"/> |
512 |
+ <menuseparator/> |
513 |
+ <menuitem label="&syncSyncNowItem.label;" |
514 |
+ accesskey="&syncSyncNowItem.accesskey;" |
515 |
+ id="syncedTabsRefreshFilter"/> |
516 |
+ </menupopup> |
517 |
+ </popupset> |
518 |
+ |
519 |
+#ifdef CAN_DRAW_IN_TITLEBAR |
520 |
+<vbox id="titlebar"> |
521 |
+ <hbox id="titlebar-content"> |
522 |
+ <spacer id="titlebar-spacer" flex="1"/> |
523 |
+ <hbox id="titlebar-buttonbox-container"> |
524 |
+#ifdef XP_WIN |
525 |
+ <hbox id="private-browsing-indicator-titlebar"> |
526 |
+ <hbox class="private-browsing-indicator"/> |
527 |
+ </hbox> |
528 |
+#endif |
529 |
+ <hbox id="titlebar-buttonbox"> |
530 |
+ <toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/> |
531 |
+ <toolbarbutton class="titlebar-button" id="titlebar-max" oncommand="onTitlebarMaxClick();"/> |
532 |
+ <toolbarbutton class="titlebar-button" id="titlebar-close" command="cmd_closeWindow"/> |
533 |
+ </hbox> |
534 |
+ </hbox> |
535 |
+#ifdef XP_MACOSX |
536 |
+ <!-- OS X does not natively support RTL for its titlebar items, so we prevent this secondary |
537 |
+ buttonbox from reversing order in RTL by forcing an LTR direction. --> |
538 |
+ <hbox id="titlebar-secondary-buttonbox" dir="ltr"> |
539 |
+ <hbox class="private-browsing-indicator"/> |
540 |
+ <hbox id="titlebar-fullscreen-button"/> |
541 |
+ </hbox> |
542 |
+#endif |
543 |
+ </hbox> |
544 |
+</vbox> |
545 |
+#endif |
546 |
+ |
547 |
+<deck flex="1" id="tab-view-deck"> |
548 |
+<vbox flex="1" id="browser-panel"> |
549 |
+ |
550 |
+ <toolbox id="navigator-toolbox" mode="icons"> |
551 |
+ <!-- Menu --> |
552 |
+ <toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true" |
553 |
+ mode="icons" iconsize="small" |
554 |
+#ifdef MENUBAR_CAN_AUTOHIDE |
555 |
+ toolbarname="&menubarCmd.label;" |
556 |
+ accesskey="&menubarCmd.accesskey;" |
557 |
+#if defined(MOZ_WIDGET_GTK) |
558 |
+ autohide="true" |
559 |
+#endif |
560 |
+#endif |
561 |
+ context="toolbar-context-menu"> |
562 |
+ <toolbaritem id="menubar-items" align="center"> |
563 |
+# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by |
564 |
+# hiddenWindow.xul. |
565 |
+#include browser-menubar.inc |
566 |
+ </toolbaritem> |
567 |
+ |
568 |
+#ifdef CAN_DRAW_IN_TITLEBAR |
569 |
+#ifndef XP_MACOSX |
570 |
+ <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000" |
571 |
+ id="titlebar-placeholder-on-menubar-for-caption-buttons" persist="width" |
572 |
+ skipintoolbarset="true"/> |
573 |
+#endif |
574 |
+#endif |
575 |
+ </toolbar> |
576 |
+ |
577 |
+ <toolbar id="TabsToolbar" |
578 |
+ fullscreentoolbar="true" |
579 |
+ customizable="true" |
580 |
+ mode="icons" |
581 |
+ iconsize="small" |
582 |
+ aria-label="&tabsToolbar.label;" |
583 |
+ context="toolbar-context-menu" |
584 |
+ collapsed="true"> |
585 |
+ |
586 |
+#if defined(MOZ_WIDGET_GTK) |
587 |
+ <hbox id="private-browsing-indicator" |
588 |
+ skipintoolbarset="true"/> |
589 |
+#endif |
590 |
+ |
591 |
+ <tabs id="tabbrowser-tabs" |
592 |
+ class="tabbrowser-tabs" |
593 |
+ tabbrowser="content" |
594 |
+ flex="1" |
595 |
+ setfocus="false" |
596 |
+ tooltip="tabbrowser-tab-tooltip" |
597 |
+ stopwatchid="FX_TAB_CLICK_MS"> |
598 |
+ <tab class="tabbrowser-tab" selected="true" visuallyselected="true" fadein="true"/> |
599 |
+ </tabs> |
600 |
+ |
601 |
+ <toolbarbutton id="new-tab-button" |
602 |
+ class="toolbarbutton-1 chromeclass-toolbar-additional" |
603 |
+ label="&tabCmd.label;" |
604 |
+ command="cmd_newNavigatorTab" |
605 |
+ onclick="checkForMiddleClick(this, event);" |
606 |
+ tooltip="dynamic-shortcut-tooltip" |
607 |
+ ondrop="newTabButtonObserver.onDrop(event)" |
608 |
+ ondragover="newTabButtonObserver.onDragOver(event)" |
609 |
+ ondragenter="newTabButtonObserver.onDragOver(event)" |
610 |
+ ondragexit="newTabButtonObserver.onDragExit(event)" |
611 |
+ cui-areatype="toolbar" |
612 |
+ removable="true"/> |
613 |
+ |
614 |
+ <toolbarbutton id="alltabs-button" |
615 |
+ class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button" |
616 |
+ type="menu" |
617 |
+ label="&listAllTabs.label;" |
618 |
+ tooltiptext="&listAllTabs.label;" |
619 |
+ removable="false"> |
620 |
+ <menupopup id="alltabs-popup" |
621 |
+ position="after_end"> |
622 |
+ <menuitem id="alltabs_undoCloseTab" |
623 |
+ class="menuitem-iconic" |
624 |
+ key="key_undoCloseTab" |
625 |
+ label="&undoCloseTab.label;" |
626 |
+ observes="History:UndoCloseTab"/> |
627 |
+ <menuseparator id="alltabs-popup-separator-1"/> |
628 |
+ <menu id="alltabs_containersTab" |
629 |
+ label="&newUserContext.label;"> |
630 |
+ <menupopup id="alltabs_containersMenuTab" /> |
631 |
+ </menu> |
632 |
+ <menuseparator id="alltabs-popup-separator-2"/> |
633 |
+ </menupopup> |
634 |
+ </toolbarbutton> |
635 |
+ |
636 |
+#if !defined(MOZ_WIDGET_GTK) |
637 |
+ <hbox class="private-browsing-indicator" skipintoolbarset="true"/> |
638 |
+#endif |
639 |
+#ifdef CAN_DRAW_IN_TITLEBAR |
640 |
+ <hbox class="titlebar-placeholder" type="caption-buttons" |
641 |
+ id="titlebar-placeholder-on-TabsToolbar-for-captions-buttons" persist="width" |
642 |
+#ifndef XP_MACOSX |
643 |
+ ordinal="1000" |
644 |
+#endif |
645 |
+ skipintoolbarset="true"/> |
646 |
+ |
647 |
+#ifdef XP_MACOSX |
648 |
+ <hbox class="titlebar-placeholder" type="fullscreen-button" |
649 |
+ id="titlebar-placeholder-on-TabsToolbar-for-fullscreen-button" persist="width" |
650 |
+ skipintoolbarset="true"/> |
651 |
+#endif |
652 |
+#endif |
653 |
+ </toolbar> |
654 |
+ |
655 |
+ <toolbar id="nav-bar" |
656 |
+ aria-label="&navbarCmd.label;" |
657 |
+ fullscreentoolbar="true" mode="icons" customizable="true" |
658 |
+ iconsize="small" |
659 |
+ customizationtarget="nav-bar-customization-target" |
660 |
+ overflowable="true" |
661 |
+ overflowbutton="nav-bar-overflow-button" |
662 |
+ overflowtarget="widget-overflow-list" |
663 |
+ overflowpanel="widget-overflow" |
664 |
+ context="toolbar-context-menu"> |
665 |
+ |
666 |
+ <hbox id="nav-bar-customization-target" flex="1"> |
667 |
+ <toolbaritem id="urlbar-container" flex="400" persist="width" |
668 |
+ removable="false" |
669 |
+ class="chromeclass-location" overflows="false"> |
670 |
+ <toolbarbutton id="back-button" class="toolbarbutton-1 chromeclass-toolbar-additional" |
671 |
+ label="&backCmd.label;" |
672 |
+ command="Browser:BackOrBackDuplicate" |
673 |
+ onclick="checkForMiddleClick(this, event);" |
674 |
+ tooltip="back-button-tooltip" |
675 |
+ context="backForwardMenu"/> |
676 |
+ <hbox id="urlbar-wrapper" flex="1"> |
677 |
+ <toolbarbutton id="forward-button" class="toolbarbutton-1 chromeclass-toolbar-additional" |
678 |
+ label="&forwardCmd.label;" |
679 |
+ command="Browser:ForwardOrForwardDuplicate" |
680 |
+ onclick="checkForMiddleClick(this, event);" |
681 |
+ tooltip="forward-button-tooltip" |
682 |
+ context="backForwardMenu"/> |
683 |
+ <textbox id="urlbar" flex="1" |
684 |
+ placeholder="&urlbar.placeholder2;" |
685 |
+ type="autocomplete" |
686 |
+ autocompletesearch="unifiedcomplete" |
687 |
+ autocompletesearchparam="enable-actions" |
688 |
+ autocompletepopup="PopupAutoCompleteRichResult" |
689 |
+ completeselectedindex="true" |
690 |
+ shrinkdelay="250" |
691 |
+ tabscrolling="true" |
692 |
+ showcommentcolumn="true" |
693 |
+ showimagecolumn="true" |
694 |
+ enablehistory="true" |
695 |
+ maxrows="10" |
696 |
+ newlines="stripsurroundingwhitespace" |
697 |
+ ontextentered="this.handleCommand(param);" |
698 |
+ ontextreverted="return this.handleRevert();" |
699 |
+ pageproxystate="invalid"> |
700 |
+ <!-- Use onclick instead of normal popup= syntax since the popup |
701 |
+ code fires onmousedown, and hence eats our favicon drag events. --> |
702 |
+ <box id="identity-box" role="button" |
703 |
+ align="center" |
704 |
+ aria-label="&urlbar.viewSiteInfo.label;" |
705 |
+ onclick="gIdentityHandler.handleIdentityButtonEvent(event);" |
706 |
+ onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);" |
707 |
+ ondragstart="gIdentityHandler.onDragStart(event);"> |
708 |
+ <image id="identity-icon" |
709 |
+ consumeanchor="identity-box" |
710 |
+ onclick="PageProxyClickHandler(event);"/> |
711 |
+ <image id="sharing-icon" mousethrough="always"/> |
712 |
+ <box id="blocked-permissions-container" align="center"> |
713 |
+ <image data-permission-id="geo" class="blocked-permission-icon geo-icon" role="button" |
714 |
+ tooltiptext="&urlbar.geolocationBlocked.tooltip;"/> |
715 |
+ <image data-permission-id="desktop-notification" class="blocked-permission-icon desktop-notification-icon" role="button" |
716 |
+ tooltiptext="&urlbar.webNotificationsBlocked.tooltip;"/> |
717 |
+ <image data-permission-id="camera" class="blocked-permission-icon camera-icon" role="button" |
718 |
+ tooltiptext="&urlbar.cameraBlocked.tooltip;"/> |
719 |
+ <image data-permission-id="indexedDB" class="blocked-permission-icon indexedDB-icon" role="button" |
720 |
+ tooltiptext="&urlbar.indexedDBBlocked.tooltip;"/> |
721 |
+ <image data-permission-id="microphone" class="blocked-permission-icon microphone-icon" role="button" |
722 |
+ tooltiptext="&urlbar.microphoneBlocked.tooltip;"/> |
723 |
+ <image data-permission-id="screen" class="blocked-permission-icon screen-icon" role="button" |
724 |
+ tooltiptext="&urlbar.screenBlocked.tooltip;"/> |
725 |
+ </box> |
726 |
+ <box id="notification-popup-box" |
727 |
+ hidden="true" |
728 |
+ onmouseover="document.getElementById('identity-icon').classList.add('no-hover');" |
729 |
+ onmouseout="document.getElementById('identity-icon').classList.remove('no-hover');" |
730 |
+ align="center"> |
731 |
+ <image id="default-notification-icon" class="notification-anchor-icon" role="button" |
732 |
+ tooltiptext="&urlbar.defaultNotificationAnchor.tooltip;"/> |
733 |
+ <image id="geo-notification-icon" class="notification-anchor-icon geo-icon" role="button" |
734 |
+ tooltiptext="&urlbar.geolocationNotificationAnchor.tooltip;"/> |
735 |
+ <image id="addons-notification-icon" class="notification-anchor-icon install-icon" role="button" |
736 |
+ tooltiptext="&urlbar.addonsNotificationAnchor.tooltip;"/> |
737 |
+ <image id="indexedDB-notification-icon" class="notification-anchor-icon indexedDB-icon" role="button" |
738 |
+ tooltiptext="&urlbar.indexedDBNotificationAnchor.tooltip;"/> |
739 |
+ <image id="password-notification-icon" class="notification-anchor-icon login-icon" role="button" |
740 |
+ tooltiptext="&urlbar.passwordNotificationAnchor.tooltip;"/> |
741 |
+ <image id="plugins-notification-icon" class="notification-anchor-icon plugin-icon" role="button" |
742 |
+ tooltiptext="&urlbar.pluginsNotificationAnchor.tooltip;"/> |
743 |
+ <image id="web-notifications-notification-icon" class="notification-anchor-icon desktop-notification-icon" role="button" |
744 |
+ tooltiptext="&urlbar.webNotificationAnchor.tooltip;"/> |
745 |
+ <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon camera-icon" role="button" |
746 |
+ tooltiptext="&urlbar.webRTCShareDevicesNotificationAnchor.tooltip;"/> |
747 |
+ <image id="webRTC-shareMicrophone-notification-icon" class="notification-anchor-icon microphone-icon" role="button" |
748 |
+ tooltiptext="&urlbar.webRTCShareMicrophoneNotificationAnchor.tooltip;"/> |
749 |
+ <image id="webRTC-shareScreen-notification-icon" class="notification-anchor-icon screen-icon" role="button" |
750 |
+ tooltiptext="&urlbar.webRTCShareScreenNotificationAnchor.tooltip;"/> |
751 |
+ <image id="servicesInstall-notification-icon" class="notification-anchor-icon service-icon" role="button" |
752 |
+ tooltiptext="&urlbar.servicesNotificationAnchor.tooltip;"/> |
753 |
+ <image id="translate-notification-icon" class="notification-anchor-icon translation-icon" role="button" |
754 |
+ tooltiptext="&urlbar.translateNotificationAnchor.tooltip;"/> |
755 |
+ <image id="translated-notification-icon" class="notification-anchor-icon translation-icon in-use" role="button" |
756 |
+ tooltiptext="&urlbar.translatedNotificationAnchor.tooltip;"/> |
757 |
+ <image id="eme-notification-icon" class="notification-anchor-icon drm-icon" role="button" |
758 |
+ tooltiptext="&urlbar.emeNotificationAnchor.tooltip;"/> |
759 |
+ </box> |
760 |
+ <image id="tracking-protection-icon"/> |
761 |
+ <image id="connection-icon"/> |
762 |
+ <hbox id="identity-icon-labels"> |
763 |
+ <label id="identity-icon-label" class="plain" flex="1"/> |
764 |
+ <label id="identity-icon-country-label" class="plain"/> |
765 |
+ </hbox> |
766 |
+ </box> |
767 |
+ <box id="urlbar-display-box" align="center"> |
768 |
+ <label id="switchtab" class="urlbar-display urlbar-display-switchtab" value="&urlbar.switchToTab.label;"/> |
769 |
+ <label id="extension" class="urlbar-display urlbar-display-extension" value="&urlbar.extension.label;"/> |
770 |
+ </box> |
771 |
+ <hbox id="urlbar-icons"> |
772 |
+ <image id="page-report-button" |
773 |
+ class="urlbar-icon" |
774 |
+ hidden="true" |
775 |
+ tooltiptext="&pageReportIcon.tooltip;" |
776 |
+ onmousedown="gPopupBlockerObserver.onReportButtonMousedown(event);"/> |
777 |
+ <image id="reader-mode-button" |
778 |
+ class="urlbar-icon" |
779 |
+ hidden="true" |
780 |
+ onclick="ReaderParent.buttonClick(event);"/> |
781 |
+ <toolbarbutton id="urlbar-zoom-button" |
782 |
+ onclick="FullZoom.reset();" |
783 |
+ tooltiptext="&urlbar.zoomReset.tooltip;" |
784 |
+ hidden="true"/> |
785 |
+ </hbox> |
786 |
+ <hbox id="userContext-icons" hidden="true"> |
787 |
+ <label id="userContext-label"/> |
788 |
+ <image id="userContext-indicator"/> |
789 |
+ </hbox> |
790 |
+ <toolbarbutton id="urlbar-go-button" |
791 |
+ class="chromeclass-toolbar-additional" |
792 |
+ onclick="gURLBar.handleCommand(event);" |
793 |
+ tooltiptext="&goEndCap.tooltip;"/> |
794 |
+ <toolbarbutton id="urlbar-reload-button" |
795 |
+ class="chromeclass-toolbar-additional" |
796 |
+ command="Browser:ReloadOrDuplicate" |
797 |
+ onclick="checkForMiddleClick(this, event);" |
798 |
+ tooltiptext="&reloadButton.tooltip;"/> |
799 |
+ <toolbarbutton id="urlbar-stop-button" |
800 |
+ class="chromeclass-toolbar-additional" |
801 |
+ command="Browser:Stop" |
802 |
+ tooltiptext="&stopButton.tooltip;"/> |
803 |
+ </textbox> |
804 |
+ </hbox> |
805 |
+ </toolbaritem> |
806 |
+ |
807 |
+ <toolbaritem id="search-container" title="&searchItem.title;" |
808 |
+ align="center" class="chromeclass-toolbar-additional panel-wide-item" |
809 |
+ cui-areatype="toolbar" |
810 |
+ flex="100" persist="width" removable="true"> |
811 |
+ <searchbar id="searchbar" flex="1"/> |
812 |
+ </toolbaritem> |
813 |
+ |
814 |
+ <toolbarbutton id="bookmarks-menu-button" |
815 |
+ class="toolbarbutton-1 chromeclass-toolbar-additional" |
816 |
+ removable="true" |
817 |
+ type="menu-button" |
818 |
+ label="&bookmarksMenuButton.label;" |
819 |
+ tooltip="dynamic-shortcut-tooltip" |
820 |
+ anchor="dropmarker" |
821 |
+ ondragenter="PlacesMenuDNDHandler.onDragEnter(event);" |
822 |
+ ondragover="PlacesMenuDNDHandler.onDragOver(event);" |
823 |
+ ondragleave="PlacesMenuDNDHandler.onDragLeave(event);" |
824 |
+ ondrop="PlacesMenuDNDHandler.onDrop(event);" |
825 |
+ cui-areatype="toolbar" |
826 |
+ oncommand="BookmarkingUI.onCommand(event);"> |
827 |
+ <observes element="bookmarkThisPageBroadcaster" attribute="starred"/> |
828 |
+ <observes element="bookmarkThisPageBroadcaster" attribute="buttontooltiptext"/> |
829 |
+ <menupopup id="BMB_bookmarksPopup" |
830 |
+ class="cui-widget-panel cui-widget-panelview cui-widget-panelWithFooter PanelUI-subView" |
831 |
+ placespopup="true" |
832 |
+ context="placesContext" |
833 |
+ openInTabs="children" |
834 |
+ oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);" |
835 |
+ onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);" |
836 |
+ onpopupshowing="BookmarkingUI.onPopupShowing(event); |
837 |
+ BookmarkingUI.attachPlacesView(event, this);" |
838 |
+ tooltip="bhTooltip" popupsinherittooltip="true"> |
839 |
+ <menuitem id="BMB_viewBookmarksSidebar" |
840 |
+ class="subviewbutton" |
841 |
+ label="&viewBookmarksSidebar2.label;" |
842 |
+ type="checkbox" |
843 |
+ oncommand="SidebarUI.toggle('viewBookmarksSidebar');"> |
844 |
+ <observes element="viewBookmarksSidebar" attribute="checked"/> |
845 |
+ </menuitem> |
846 |
+ <!-- NB: temporary solution for bug 985024, this should go away soon. --> |
847 |
+ <menuitem id="BMB_bookmarksShowAllTop" |
848 |
+ class="menuitem-iconic subviewbutton" |
849 |
+ label="&showAllBookmarks2.label;" |
850 |
+ command="Browser:ShowAllBookmarks" |
851 |
+ key="manBookmarkKb"/> |
852 |
+ <menuseparator/> |
853 |
+ <menuitem label="&recentBookmarks.label;" |
854 |
+ id="BMB_recentBookmarks" |
855 |
+ disabled="true" |
856 |
+ class="menuitem-iconic subviewbutton"/> |
857 |
+ <menuseparator/> |
858 |
+ <menu id="BMB_bookmarksToolbar" |
859 |
+ class="menu-iconic bookmark-item subviewbutton" |
860 |
+ label="&personalbarCmd.label;" |
861 |
+ container="true"> |
862 |
+ <menupopup id="BMB_bookmarksToolbarPopup" |
863 |
+ placespopup="true" |
864 |
+ context="placesContext" |
865 |
+ onpopupshowing="if (!this.parentNode._placesView) |
866 |
+ new PlacesMenu(event, 'place:folder=TOOLBAR', |
867 |
+ PlacesUIUtils.getViewForNode(this.parentNode.parentNode).options);"> |
868 |
+ <menuitem id="BMB_viewBookmarksToolbar" |
869 |
+ placesanonid="view-toolbar" |
870 |
+ toolbarId="PersonalToolbar" |
871 |
+ type="checkbox" |
872 |
+ oncommand="onViewToolbarCommand(event)" |
873 |
+ label="&viewBookmarksToolbar.label;"/> |
874 |
+ <menuseparator/> |
875 |
+ <!-- Bookmarks toolbar items --> |
876 |
+ </menupopup> |
877 |
+ </menu> |
878 |
+ <menu id="BMB_unsortedBookmarks" |
879 |
+ class="menu-iconic bookmark-item subviewbutton" |
880 |
+ label="&bookmarksMenuButton.other.label;" |
881 |
+ container="true"> |
882 |
+ <menupopup id="BMB_unsortedBookmarksPopup" |
883 |
+ placespopup="true" |
884 |
+ context="placesContext" |
885 |
+ onpopupshowing="if (!this.parentNode._placesView) |
886 |
+ new PlacesMenu(event, 'place:folder=UNFILED_BOOKMARKS', |
887 |
+ PlacesUIUtils.getViewForNode(this.parentNode.parentNode).options);"/> |
888 |
+ </menu> |
889 |
+ <menuseparator/> |
890 |
+ <!-- Bookmarks menu items will go here --> |
891 |
+ <menuitem id="BMB_bookmarksShowAll" |
892 |
+ class="subviewbutton panel-subview-footer" |
893 |
+ label="&showAllBookmarks2.label;" |
894 |
+ command="Browser:ShowAllBookmarks" |
895 |
+ key="manBookmarkKb"/> |
896 |
+ </menupopup> |
897 |
+ </toolbarbutton> |
898 |
+ |
899 |
+ <!-- This is a placeholder for the Downloads Indicator. It is visible |
900 |
+ during the customization of the toolbar, in the palette, and before |
901 |
+ the Downloads Indicator overlay is loaded. --> |
902 |
+ <toolbarbutton id="downloads-button" |
903 |
+ class="toolbarbutton-1 chromeclass-toolbar-additional badged-button" |
904 |
+ key="key_openDownloads" |
905 |
+ oncommand="DownloadsIndicatorView.onCommand(event);" |
906 |
+ ondrop="DownloadsIndicatorView.onDrop(event);" |
907 |
+ ondragover="DownloadsIndicatorView.onDragOver(event);" |
908 |
+ ondragenter="DownloadsIndicatorView.onDragOver(event);" |
909 |
+ label="&downloads.label;" |
910 |
+ removable="true" |
911 |
+ cui-areatype="toolbar" |
912 |
+ tooltip="dynamic-shortcut-tooltip"/> |
913 |
+ |
914 |
+ <toolbarbutton id="home-button" class="toolbarbutton-1 chromeclass-toolbar-additional" |
915 |
+ removable="true" |
916 |
+ label="&homeButton.label;" |
917 |
+ ondragover="homeButtonObserver.onDragOver(event)" |
918 |
+ ondragenter="homeButtonObserver.onDragOver(event)" |
919 |
+ ondrop="homeButtonObserver.onDrop(event)" |
920 |
+ ondragexit="homeButtonObserver.onDragExit(event)" |
921 |
+ key="goHome" |
922 |
+ onclick="BrowserGoHome(event);" |
923 |
+ cui-areatype="toolbar" |
924 |
+ aboutHomeOverrideTooltip="&abouthome.pageTitle;"/> |
925 |
+ </hbox> |
926 |
+ |
927 |
+ <toolbarbutton id="nav-bar-overflow-button" |
928 |
+ class="toolbarbutton-1 chromeclass-toolbar-additional overflow-button" |
929 |
+ skipintoolbarset="true" |
930 |
+ tooltiptext="&navbarOverflow.label;"/> |
931 |
+ |
932 |
+ <toolbaritem id="PanelUI-button" |
933 |
+ class="chromeclass-toolbar-additional" |
934 |
+ removable="false"> |
935 |
+ <toolbarbutton id="PanelUI-menu-button" |
936 |
+ class="toolbarbutton-1 badged-button" |
937 |
+ consumeanchor="PanelUI-button" |
938 |
+ label="&brandShortName;" |
939 |
+ tooltiptext="&appmenu.tooltip;"/> |
940 |
+ </toolbaritem> |
941 |
+ |
942 |
+ <hbox id="window-controls" hidden="true" pack="end" skipintoolbarset="true" |
943 |
+ ordinal="1000"> |
944 |
+ <toolbarbutton id="minimize-button" |
945 |
+ tooltiptext="&fullScreenMinimize.tooltip;" |
946 |
+ oncommand="window.minimize();"/> |
947 |
+ |
948 |
+ <toolbarbutton id="restore-button" |
949 |
+#ifdef XP_MACOSX |
950 |
+# Prior to 10.7 there wasn't a native fullscreen button so we use #restore-button |
951 |
+# to exit fullscreen and want it to behave like other toolbar buttons. |
952 |
+ class="toolbarbutton-1" |
953 |
+#endif |
954 |
+ tooltiptext="&fullScreenRestore.tooltip;" |
955 |
+ oncommand="BrowserFullScreen();"/> |
956 |
+ |
957 |
+ <toolbarbutton id="close-button" |
958 |
+ tooltiptext="&fullScreenClose.tooltip;" |
959 |
+ oncommand="BrowserTryToCloseWindow();"/> |
960 |
+ </hbox> |
961 |
+ </toolbar> |
962 |
+ |
963 |
+ <toolbarset id="customToolbars" context="toolbar-context-menu"/> |
964 |
+ |
965 |
+ <toolbar id="PersonalToolbar" |
966 |
+ mode="icons" iconsize="small" |
967 |
+ class="chromeclass-directories" |
968 |
+ context="toolbar-context-menu" |
969 |
+ toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;" |
970 |
+ collapsed="true" |
971 |
+ customizable="true"> |
972 |
+ <toolbaritem id="personal-bookmarks" |
973 |
+ title="&bookmarksToolbarItem.label;" |
974 |
+ cui-areatype="toolbar" |
975 |
+ removable="true"> |
976 |
+ <toolbarbutton id="bookmarks-toolbar-placeholder" |
977 |
+ class="toolbarbutton-1" |
978 |
+ mousethrough="never" |
979 |
+ label="&bookmarksToolbarItem.label;" |
980 |
+ oncommand="PlacesToolbarHelper.onPlaceholderCommand();"/> |
981 |
+ <hbox flex="1" |
982 |
+ id="PlacesToolbar" |
983 |
+ context="placesContext" |
984 |
+ onclick="BookmarksEventHandler.onClick(event, this._placesView);" |
985 |
+ oncommand="BookmarksEventHandler.onCommand(event, this._placesView);" |
986 |
+ tooltip="bhTooltip" |
987 |
+ popupsinherittooltip="true"> |
988 |
+ <hbox flex="1"> |
989 |
+ <hbox id="PlacesToolbarDropIndicatorHolder" align="center" collapsed="true"> |
990 |
+ <image id="PlacesToolbarDropIndicator" |
991 |
+ mousethrough="always" |
992 |
+ collapsed="true"/> |
993 |
+ </hbox> |
994 |
+ <scrollbox orient="horizontal" |
995 |
+ id="PlacesToolbarItems" |
996 |
+ flex="1"/> |
997 |
+ <toolbarbutton type="menu" |
998 |
+ id="PlacesChevron" |
999 |
+ class="chevron" |
1000 |
+ mousethrough="never" |
1001 |
+ collapsed="true" |
1002 |
+ tooltiptext="&bookmarksToolbarChevron.tooltip;" |
1003 |
+ onpopupshowing="document.getElementById('PlacesToolbar') |
1004 |
+ ._placesView._onChevronPopupShowing(event);"> |
1005 |
+ <menupopup id="PlacesChevronPopup" |
1006 |
+ placespopup="true" |
1007 |
+ tooltip="bhTooltip" popupsinherittooltip="true" |
1008 |
+ context="placesContext"/> |
1009 |
+ </toolbarbutton> |
1010 |
+ </hbox> |
1011 |
+ </hbox> |
1012 |
+ </toolbaritem> |
1013 |
+ </toolbar> |
1014 |
+ |
1015 |
+ <!-- This is a shim which will go away ASAP. See bug 749804 for details --> |
1016 |
+ <toolbar id="addon-bar" toolbar-delegate="nav-bar" mode="icons" iconsize="small" |
1017 |
+ customizable="true"> |
1018 |
+ <hbox id="addonbar-closebutton"/> |
1019 |
+ <statusbar id="status-bar"/> |
1020 |
+ </toolbar> |
1021 |
+ |
1022 |
+ <toolbarpalette id="BrowserToolbarPalette"> |
1023 |
+ |
1024 |
+# Update primaryToolbarButtons in browser/themes/shared/browser.inc when adding |
1025 |
+# or removing default items with the toolbarbutton-1 class. |
1026 |
+ |
1027 |
+ <toolbarbutton id="print-button" class="toolbarbutton-1 chromeclass-toolbar-additional" |
1028 |
+#ifdef XP_MACOSX |
1029 |
+ command="cmd_print" |
1030 |
+ tooltip="dynamic-shortcut-tooltip" |
1031 |
+#else |
1032 |
+ command="cmd_printPreview" |
1033 |
+ tooltiptext="&printButton.tooltip;" |
1034 |
+#endif |
1035 |
+ label="&printButton.label;"/> |
1036 |
+ |
1037 |
+ |
1038 |
+ <toolbarbutton id="new-window-button" class="toolbarbutton-1 chromeclass-toolbar-additional" |
1039 |
+ label="&newNavigatorCmd.label;" |
1040 |
+ command="key_newNavigator" |
1041 |
+ tooltip="dynamic-shortcut-tooltip" |
1042 |
+ ondrop="newWindowButtonObserver.onDrop(event)" |
1043 |
+ ondragover="newWindowButtonObserver.onDragOver(event)" |
1044 |
+ ondragenter="newWindowButtonObserver.onDragOver(event)" |
1045 |
+ ondragexit="newWindowButtonObserver.onDragExit(event)"/> |
1046 |
+ |
1047 |
+ <toolbarbutton id="fullscreen-button" class="toolbarbutton-1 chromeclass-toolbar-additional" |
1048 |
+ observes="View:FullScreen" |
1049 |
+ type="checkbox" |
1050 |
+ label="&fullScreenCmd.label;" |
1051 |
+ tooltip="dynamic-shortcut-tooltip"/> |
1052 |
+ </toolbarpalette> |
1053 |
+ </toolbox> |
1054 |
+ |
1055 |
+ <hbox id="fullscr-toggler" hidden="true"/> |
1056 |
+ |
1057 |
+ <deck id="content-deck" flex="1"> |
1058 |
+ <hbox flex="1" id="browser"> |
1059 |
+ <vbox id="browser-border-start" hidden="true" layer="true"/> |
1060 |
+ <vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome"> |
1061 |
+ <sidebarheader id="sidebar-header" align="center"> |
1062 |
+ <label id="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/> |
1063 |
+ <image id="sidebar-throbber"/> |
1064 |
+ <toolbarbutton class="close-icon tabbable" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="SidebarUI.hide();"/> |
1065 |
+ </sidebarheader> |
1066 |
+ <browser id="sidebar" flex="1" autoscroll="false" disablehistory="true" disablefullscreen="true" |
1067 |
+ style="min-width: 14em; width: 18em; max-width: 36em;" tooltip="aHTMLTooltip"/> |
1068 |
+ </vbox> |
1069 |
+ |
1070 |
+ <splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/> |
1071 |
+ <vbox id="appcontent" flex="1"> |
1072 |
+ <notificationbox id="high-priority-global-notificationbox" notificationside="top"/> |
1073 |
+ <tabbrowser id="content" |
1074 |
+ flex="1" contenttooltip="aHTMLTooltip" |
1075 |
+ tabcontainer="tabbrowser-tabs" |
1076 |
+ contentcontextmenu="contentAreaContextMenu" |
1077 |
+ autocompletepopup="PopupAutoComplete" |
1078 |
+ selectmenulist="ContentSelectDropdown" |
1079 |
+ datetimepicker="DateTimePickerPanel"/> |
1080 |
+ </vbox> |
1081 |
+ <vbox id="browser-border-end" hidden="true" layer="true"/> |
1082 |
+ </hbox> |
1083 |
+#include ../../components/customizableui/content/customizeMode.inc.xul |
1084 |
+ </deck> |
1085 |
+ |
1086 |
+ <html:div id="fullscreen-warning" class="pointerlockfswarning" hidden="true"> |
1087 |
+ <html:div class="pointerlockfswarning-domain-text"> |
1088 |
+ &fullscreenWarning.beforeDomain.label; |
1089 |
+ <html:span class="pointerlockfswarning-domain"/> |
1090 |
+ &fullscreenWarning.afterDomain.label; |
1091 |
+ </html:div> |
1092 |
+ <html:div class="pointerlockfswarning-generic-text"> |
1093 |
+ &fullscreenWarning.generic.label; |
1094 |
+ </html:div> |
1095 |
+ <html:button id="fullscreen-exit-button" |
1096 |
+ onclick="FullScreen.exitDomFullScreen();"> |
1097 |
+#ifdef XP_MACOSX |
1098 |
+ &exitDOMFullscreenMac.button; |
1099 |
+#else |
1100 |
+ &exitDOMFullscreen.button; |
1101 |
+#endif |
1102 |
+ </html:button> |
1103 |
+ </html:div> |
1104 |
+ |
1105 |
+ <html:div id="pointerlock-warning" class="pointerlockfswarning" hidden="true"> |
1106 |
+ <html:div class="pointerlockfswarning-domain-text"> |
1107 |
+ &pointerlockWarning.beforeDomain.label; |
1108 |
+ <html:span class="pointerlockfswarning-domain"/> |
1109 |
+ &pointerlockWarning.afterDomain.label; |
1110 |
+ </html:div> |
1111 |
+ <html:div class="pointerlockfswarning-generic-text"> |
1112 |
+ &pointerlockWarning.generic.label; |
1113 |
+ </html:div> |
1114 |
+ </html:div> |
1115 |
+ |
1116 |
+ <vbox id="browser-bottombox" layer="true"> |
1117 |
+ <notificationbox id="global-notificationbox" notificationside="bottom"/> |
1118 |
+ </vbox> |
1119 |
+ |
1120 |
+ <svg:svg height="0"> |
1121 |
+#include tab-shape.inc.svg |
1122 |
+ <svg:clipPath id="urlbar-back-button-clip-path"> |
1123 |
+#ifndef XP_MACOSX |
1124 |
+ <svg:path d="M -9,-4 l 0,1 a 15 15 0 0,1 0,30 l 0,1 l 10000,0 l 0,-32 l -10000,0 z" /> |
1125 |
+#else |
1126 |
+ <svg:path d="M -11,-5 a 16 16 0 0 1 0,34 l 10000,0 l 0,-34 l -10000,0 z"/> |
1127 |
+#endif |
1128 |
+ </svg:clipPath> |
1129 |
+#ifdef XP_WIN |
1130 |
+ <svg:clipPath id="urlbar-back-button-clip-path-win10"> |
1131 |
+ <svg:path d="M -6,-2 l 0,1 a 15 15 0 0,1 0,30 l 0,1 l 10000,0 l 0,-32 l -10000,0 z" /> |
1132 |
+ </svg:clipPath> |
1133 |
+#endif |
1134 |
+ </svg:svg> |
1135 |
+ |
1136 |
+</vbox> |
1137 |
+# <iframe id="tab-view"> is dynamically appended as the 2nd child of #tab-view-deck. |
1138 |
+# Introducing the iframe dynamically, as needed, was found to be better than |
1139 |
+# starting with an empty iframe here in browser.xul from a Ts standpoint. |
1140 |
+</deck> |
1141 |
+ |
1142 |
+</window> |
1143 |
diff --git a/browser/base/jar.mn b/browser/base/jar.mn |
1144 |
--- a/browser/base/jar.mn |
1145 |
+++ b/browser/base/jar.mn |
1146 |
@@ -66,16 +66,18 @@ browser.jar: |
1147 |
content/browser/aboutSocialError.xhtml (content/aboutSocialError.xhtml) |
1148 |
content/browser/aboutProviderDirectory.xhtml (content/aboutProviderDirectory.xhtml) |
1149 |
content/browser/aboutTabCrashed.css (content/aboutTabCrashed.css) |
1150 |
content/browser/aboutTabCrashed.js (content/aboutTabCrashed.js) |
1151 |
content/browser/aboutTabCrashed.xhtml (content/aboutTabCrashed.xhtml) |
1152 |
* content/browser/browser.css (content/browser.css) |
1153 |
content/browser/browser.js (content/browser.js) |
1154 |
* content/browser/browser.xul (content/browser.xul) |
1155 |
+* content/browser/browser-kde.xul (content/browser-kde.xul) |
1156 |
+% override chrome://browser/content/browser.xul chrome://browser/content/browser-kde.xul desktop=kde |
1157 |
content/browser/browser-addons.js (content/browser-addons.js) |
1158 |
content/browser/browser-captivePortal.js (content/browser-captivePortal.js) |
1159 |
content/browser/browser-ctrlTab.js (content/browser-ctrlTab.js) |
1160 |
content/browser/browser-customization.js (content/browser-customization.js) |
1161 |
content/browser/browser-data-submission-info-bar.js (content/browser-data-submission-info-bar.js) |
1162 |
content/browser/browser-devedition.js (content/browser-devedition.js) |
1163 |
content/browser/browser-feeds.js (content/browser-feeds.js) |
1164 |
content/browser/browser-fullScreenAndPointerLock.js (content/browser-fullScreenAndPointerLock.js) |
1165 |
diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp |
1166 |
--- a/browser/components/build/nsModule.cpp |
1167 |
+++ b/browser/components/build/nsModule.cpp |
1168 |
@@ -8,17 +8,17 @@ |
1169 |
#include "nsBrowserCompsCID.h" |
1170 |
#include "DirectoryProvider.h" |
1171 |
|
1172 |
#if defined(XP_WIN) |
1173 |
#include "nsWindowsShellService.h" |
1174 |
#elif defined(XP_MACOSX) |
1175 |
#include "nsMacShellService.h" |
1176 |
#elif defined(MOZ_WIDGET_GTK) |
1177 |
-#include "nsGNOMEShellService.h" |
1178 |
+#include "nsUnixShellService.h" |
1179 |
#endif |
1180 |
|
1181 |
#if defined(XP_WIN) |
1182 |
#include "nsIEHistoryEnumerator.h" |
1183 |
#endif |
1184 |
|
1185 |
#include "rdf.h" |
1186 |
#include "nsFeedSniffer.h" |
1187 |
@@ -31,18 +31,16 @@ using namespace mozilla::browser; |
1188 |
|
1189 |
///////////////////////////////////////////////////////////////////////////// |
1190 |
|
1191 |
NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider) |
1192 |
#if defined(XP_WIN) |
1193 |
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService) |
1194 |
#elif defined(XP_MACOSX) |
1195 |
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService) |
1196 |
-#elif defined(MOZ_WIDGET_GTK) |
1197 |
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init) |
1198 |
#endif |
1199 |
|
1200 |
#if defined(XP_WIN) |
1201 |
NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator) |
1202 |
#endif |
1203 |
|
1204 |
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer) |
1205 |
|
1206 |
@@ -60,17 +58,17 @@ NS_DEFINE_NAMED_CID(NS_WINIEHISTORYENUME |
1207 |
NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID); |
1208 |
#endif |
1209 |
|
1210 |
static const mozilla::Module::CIDEntry kBrowserCIDs[] = { |
1211 |
{ &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor }, |
1212 |
#if defined(XP_WIN) |
1213 |
{ &kNS_SHELLSERVICE_CID, false, nullptr, nsWindowsShellServiceConstructor }, |
1214 |
#elif defined(MOZ_WIDGET_GTK) |
1215 |
- { &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor }, |
1216 |
+ { &kNS_SHELLSERVICE_CID, false, nullptr, nsUnixShellServiceConstructor }, |
1217 |
#endif |
1218 |
{ &kNS_FEEDSNIFFER_CID, false, nullptr, nsFeedSnifferConstructor }, |
1219 |
{ &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create }, |
1220 |
#if defined(XP_WIN) |
1221 |
{ &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor }, |
1222 |
#elif defined(XP_MACOSX) |
1223 |
{ &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor }, |
1224 |
#endif |
1225 |
diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js |
1226 |
--- a/browser/components/preferences/in-content/main.js |
1227 |
+++ b/browser/components/preferences/in-content/main.js |
1228 |
@@ -33,16 +33,22 @@ var gMainPane = { |
1229 |
if (AppConstants.platform == "win") { |
1230 |
// In Windows 8 we launch the control panel since it's the only |
1231 |
// way to get all file type association prefs. So we don't know |
1232 |
// when the user will select the default. We refresh here periodically |
1233 |
// in case the default changes. On other Windows OS's defaults can also |
1234 |
// be set while the prefs are open. |
1235 |
window.setInterval(this.updateSetDefaultBrowser.bind(this), 1000); |
1236 |
} |
1237 |
+ |
1238 |
+ var env = Components.classes["@mozilla.org/process/environment;1"] |
1239 |
+ .getService(Components.interfaces.nsIEnvironment); |
1240 |
+ var kde_session = 0; |
1241 |
+ if (env.get('KDE_FULL_SESSION') == "true") |
1242 |
+ kde_session = 1; |
1243 |
} |
1244 |
|
1245 |
// set up the "use current page" label-changing listener |
1246 |
this._updateUseCurrentButton(); |
1247 |
window.addEventListener("focus", this._updateUseCurrentButton.bind(this), false); |
1248 |
|
1249 |
this.updateBrowserStartupLastSession(); |
1250 |
|
1251 |
@@ -704,16 +710,27 @@ var gMainPane = { |
1252 |
let alwaysCheckPref = document.getElementById("browser.shell.checkDefaultBrowser"); |
1253 |
alwaysCheckPref.value = true; |
1254 |
|
1255 |
let shellSvc = getShellService(); |
1256 |
if (!shellSvc) |
1257 |
return; |
1258 |
try { |
1259 |
shellSvc.setDefaultBrowser(true, false); |
1260 |
+ if (kde_session == 1) { |
1261 |
+ var shellObj = Components.classes["@mozilla.org/file/local;1"] |
1262 |
+ .createInstance(Components.interfaces.nsILocalFile); |
1263 |
+ shellObj.initWithPath("/usr/bin/kwriteconfig"); |
1264 |
+ var process = Components.classes["@mozilla.org/process/util;1"] |
1265 |
+ .createInstance(Components.interfaces.nsIProcess); |
1266 |
+ process.init(shellObj); |
1267 |
+ var args = ["--file", "kdeglobals", "--group", "General", "--key", |
1268 |
+ "BrowserApplication", "firefox"]; |
1269 |
+ process.run(false, args, args.length); |
1270 |
+ } |
1271 |
} catch (ex) { |
1272 |
Cu.reportError(ex); |
1273 |
return; |
1274 |
} |
1275 |
|
1276 |
let selectedIndex = shellSvc.isDefaultBrowser(false, true) ? 1 : 0; |
1277 |
document.getElementById("setDefaultPane").selectedIndex = selectedIndex; |
1278 |
} |
1279 |
diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build |
1280 |
--- a/browser/components/shell/moz.build |
1281 |
+++ b/browser/components/shell/moz.build |
1282 |
@@ -34,16 +34,18 @@ if CONFIG['OS_ARCH'] == 'WINNT': |
1283 |
] |
1284 |
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': |
1285 |
SOURCES += [ |
1286 |
'nsMacShellService.cpp', |
1287 |
] |
1288 |
elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: |
1289 |
SOURCES += [ |
1290 |
'nsGNOMEShellService.cpp', |
1291 |
+ 'nsKDEShellService.cpp', |
1292 |
+ 'nsUnixShellService.cpp', |
1293 |
] |
1294 |
|
1295 |
if SOURCES: |
1296 |
FINAL_LIBRARY = 'browsercomps' |
1297 |
|
1298 |
EXTRA_COMPONENTS += [ |
1299 |
'nsSetDefaultBrowser.js', |
1300 |
'nsSetDefaultBrowser.manifest', |
1301 |
diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp |
1302 |
new file mode 100644 |
1303 |
--- /dev/null |
1304 |
+++ b/browser/components/shell/nsKDEShellService.cpp |
1305 |
@@ -0,0 +1,203 @@ |
1306 |
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
1307 |
+/* This Source Code Form is subject to the terms of the Mozilla Public |
1308 |
+ * License, v. 2.0. If a copy of the MPL was not distributed with this |
1309 |
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
1310 |
+ |
1311 |
+#include "mozilla/ArrayUtils.h" |
1312 |
+ |
1313 |
+#include "nsCOMPtr.h" |
1314 |
+#include "nsKDEShellService.h" |
1315 |
+#include "nsShellService.h" |
1316 |
+#include "nsKDEUtils.h" |
1317 |
+#include "nsIPrefService.h" |
1318 |
+#include "nsIProcess.h" |
1319 |
+#include "nsIFile.h" |
1320 |
+#include "nsServiceManagerUtils.h" |
1321 |
+#include "nsComponentManagerUtils.h" |
1322 |
+#include "nsIMutableArray.h" |
1323 |
+#include "nsISupportsPrimitives.h" |
1324 |
+#include "nsArrayUtils.h" |
1325 |
+ |
1326 |
+using namespace mozilla; |
1327 |
+ |
1328 |
+nsresult |
1329 |
+nsKDEShellService::Init() |
1330 |
+{ |
1331 |
+ if( !nsKDEUtils::kdeSupport()) |
1332 |
+ return NS_ERROR_NOT_AVAILABLE; |
1333 |
+ return NS_OK; |
1334 |
+} |
1335 |
+ |
1336 |
+NS_IMPL_ISUPPORTS(nsKDEShellService, nsIGNOMEShellService, nsIShellService) |
1337 |
+ |
1338 |
+NS_IMETHODIMP |
1339 |
+nsKDEShellService::IsDefaultBrowser(bool aStartupCheck, |
1340 |
+ bool aForAllTypes, |
1341 |
+ bool* aIsDefaultBrowser) |
1342 |
+{ |
1343 |
+ *aIsDefaultBrowser = false; |
1344 |
+ if (aStartupCheck) |
1345 |
+ mCheckedThisSession = true; |
1346 |
+ |
1347 |
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID ); |
1348 |
+ if (!command) |
1349 |
+ return NS_ERROR_FAILURE; |
1350 |
+ |
1351 |
+ nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); |
1352 |
+ if (!str) |
1353 |
+ return NS_ERROR_FAILURE; |
1354 |
+ |
1355 |
+ str->SetData( NS_LITERAL_CSTRING( "ISDEFAULTBROWSER" )); |
1356 |
+ command->AppendElement( str, false ); |
1357 |
+ |
1358 |
+ if( nsKDEUtils::command( command )) |
1359 |
+ *aIsDefaultBrowser = true; |
1360 |
+ return NS_OK; |
1361 |
+} |
1362 |
+ |
1363 |
+NS_IMETHODIMP |
1364 |
+nsKDEShellService::SetDefaultBrowser(bool aClaimAllTypes, |
1365 |
+ bool aForAllUsers) |
1366 |
+{ |
1367 |
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID ); |
1368 |
+ if (!command) |
1369 |
+ return NS_ERROR_FAILURE; |
1370 |
+ |
1371 |
+ nsCOMPtr<nsISupportsCString> cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); |
1372 |
+ nsCOMPtr<nsISupportsCString> paramstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); |
1373 |
+ if (!cmdstr || !paramstr) |
1374 |
+ return NS_ERROR_FAILURE; |
1375 |
+ |
1376 |
+ cmdstr->SetData( NS_LITERAL_CSTRING( "SETDEFAULTBROWSER" )); |
1377 |
+ command->AppendElement( cmdstr, false ); |
1378 |
+ |
1379 |
+ paramstr->SetData( aClaimAllTypes ? NS_LITERAL_CSTRING( "ALLTYPES" ) : NS_LITERAL_CSTRING( "NORMAL" )); |
1380 |
+ command->AppendElement( paramstr, false ); |
1381 |
+ |
1382 |
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; |
1383 |
+} |
1384 |
+ |
1385 |
+NS_IMETHODIMP |
1386 |
+nsKDEShellService::GetCanSetDesktopBackground(bool* aResult) |
1387 |
+{ |
1388 |
+ *aResult = true; |
1389 |
+ return NS_OK; |
1390 |
+} |
1391 |
+ |
1392 |
+NS_IMETHODIMP |
1393 |
+nsKDEShellService::SetDesktopBackground(nsIDOMElement* aElement, |
1394 |
+ PRInt32 aPosition) |
1395 |
+{ |
1396 |
+ return NS_ERROR_NOT_IMPLEMENTED; |
1397 |
+} |
1398 |
+ |
1399 |
+NS_IMETHODIMP |
1400 |
+nsKDEShellService::GetDesktopBackgroundColor(PRUint32 *aColor) |
1401 |
+{ |
1402 |
+ return NS_ERROR_NOT_IMPLEMENTED; |
1403 |
+} |
1404 |
+ |
1405 |
+NS_IMETHODIMP |
1406 |
+nsKDEShellService::SetDesktopBackgroundColor(PRUint32 aColor) |
1407 |
+{ |
1408 |
+ return NS_ERROR_NOT_IMPLEMENTED; |
1409 |
+} |
1410 |
+ |
1411 |
+NS_IMETHODIMP |
1412 |
+nsKDEShellService::OpenApplication(PRInt32 aApplication) |
1413 |
+{ |
1414 |
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID ); |
1415 |
+ if (!command) |
1416 |
+ return NS_ERROR_FAILURE; |
1417 |
+ |
1418 |
+ nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); |
1419 |
+ if (!str) |
1420 |
+ return NS_ERROR_FAILURE; |
1421 |
+ |
1422 |
+ if( aApplication == APPLICATION_MAIL ) |
1423 |
+ str->SetData( NS_LITERAL_CSTRING( "OPENMAIL" )); |
1424 |
+ else if( aApplication == APPLICATION_NEWS ) |
1425 |
+ str->SetData( NS_LITERAL_CSTRING( "OPENNEWS" )); |
1426 |
+ else |
1427 |
+ return NS_ERROR_NOT_IMPLEMENTED; |
1428 |
+ |
1429 |
+ command->AppendElement( str, false ); |
1430 |
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; |
1431 |
+} |
1432 |
+ |
1433 |
+NS_IMETHODIMP |
1434 |
+nsKDEShellService::OpenApplicationWithURI(nsIFile* aApplication, const nsACString& aURI) |
1435 |
+{ |
1436 |
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID ); |
1437 |
+ if (!command) |
1438 |
+ return NS_ERROR_FAILURE; |
1439 |
+ |
1440 |
+ nsCOMPtr<nsISupportsCString> cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); |
1441 |
+ nsCOMPtr<nsISupportsCString> appstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); |
1442 |
+ nsCOMPtr<nsISupportsCString> uristr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); |
1443 |
+ if (!cmdstr || !appstr || !uristr) |
1444 |
+ return NS_ERROR_FAILURE; |
1445 |
+ |
1446 |
+ cmdstr->SetData( NS_LITERAL_CSTRING( "RUN" )); |
1447 |
+ command->AppendElement( cmdstr, false ); |
1448 |
+ nsAutoCString app; |
1449 |
+ nsresult rv = aApplication->GetNativePath( app ); |
1450 |
+ NS_ENSURE_SUCCESS( rv, rv ); |
1451 |
+ appstr->SetData( app ); |
1452 |
+ command->AppendElement( appstr, false ); |
1453 |
+ uristr->SetData( aURI ); |
1454 |
+ command->AppendElement( uristr, false ); |
1455 |
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; |
1456 |
+} |
1457 |
+ |
1458 |
+NS_IMETHODIMP |
1459 |
+nsKDEShellService::GetDefaultFeedReader(nsIFile** _retval) |
1460 |
+{ |
1461 |
+ *_retval = nullptr; |
1462 |
+ |
1463 |
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID ); |
1464 |
+ if( !command ) |
1465 |
+ return NS_ERROR_FAILURE; |
1466 |
+ |
1467 |
+ nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); |
1468 |
+ if( !str ) |
1469 |
+ return NS_ERROR_FAILURE; |
1470 |
+ |
1471 |
+ str->SetData( NS_LITERAL_CSTRING( "GETDEFAULTFEEDREADER" )); |
1472 |
+ command->AppendElement( str, false ); |
1473 |
+ |
1474 |
+ nsCOMPtr<nsIArray> output; |
1475 |
+ if( !nsKDEUtils::command( command, getter_AddRefs( output ) ) ) |
1476 |
+ return NS_ERROR_FAILURE; |
1477 |
+ |
1478 |
+ PRUint32 length; |
1479 |
+ output->GetLength( &length ); |
1480 |
+ if( length != 1 ) |
1481 |
+ return NS_ERROR_FAILURE; |
1482 |
+ |
1483 |
+ nsCOMPtr<nsISupportsCString> resstr = do_QueryElementAt( output, 0 ); |
1484 |
+ if( !resstr ) |
1485 |
+ return NS_ERROR_FAILURE; |
1486 |
+ |
1487 |
+ nsAutoCString path; |
1488 |
+ resstr->GetData( path ); |
1489 |
+ if (path.IsEmpty()) |
1490 |
+ return NS_ERROR_FAILURE; |
1491 |
+ |
1492 |
+ nsresult rv; |
1493 |
+ nsCOMPtr<nsIFile> defaultReader = |
1494 |
+ do_CreateInstance("@mozilla.org/file/local;1", &rv); |
1495 |
+ NS_ENSURE_SUCCESS(rv, rv); |
1496 |
+ |
1497 |
+ rv = defaultReader->InitWithNativePath(path); |
1498 |
+ NS_ENSURE_SUCCESS(rv, rv); |
1499 |
+ |
1500 |
+ bool exists; |
1501 |
+ rv = defaultReader->Exists(&exists); |
1502 |
+ NS_ENSURE_SUCCESS(rv, rv); |
1503 |
+ if (!exists) |
1504 |
+ return NS_ERROR_FAILURE; |
1505 |
+ |
1506 |
+ NS_ADDREF(*_retval = defaultReader); |
1507 |
+ return NS_OK; |
1508 |
+} |
1509 |
diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/shell/nsKDEShellService.h |
1510 |
new file mode 100644 |
1511 |
--- /dev/null |
1512 |
+++ b/browser/components/shell/nsKDEShellService.h |
1513 |
@@ -0,0 +1,30 @@ |
1514 |
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
1515 |
+/* This Source Code Form is subject to the terms of the Mozilla Public |
1516 |
+ * License, v. 2.0. If a copy of the MPL was not distributed with this |
1517 |
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
1518 |
+ |
1519 |
+#ifndef nskdeshellservice_h____ |
1520 |
+#define nskdeshellservice_h____ |
1521 |
+ |
1522 |
+#include "nsIGNOMEShellService.h" |
1523 |
+#include "nsString.h" |
1524 |
+#include "mozilla/Attributes.h" |
1525 |
+ |
1526 |
+class nsKDEShellService final : public nsIGNOMEShellService |
1527 |
+{ |
1528 |
+public: |
1529 |
+ nsKDEShellService() : mCheckedThisSession(false) { } |
1530 |
+ |
1531 |
+ NS_DECL_ISUPPORTS |
1532 |
+ NS_DECL_NSIGNOMESHELLSERVICE |
1533 |
+ NS_DECL_NSISHELLSERVICE |
1534 |
+ |
1535 |
+ nsresult Init(); |
1536 |
+ |
1537 |
+private: |
1538 |
+ ~nsKDEShellService() {} |
1539 |
+ |
1540 |
+ bool mCheckedThisSession; |
1541 |
+}; |
1542 |
+ |
1543 |
+#endif // nskdeshellservice_h____ |
1544 |
diff --git a/browser/components/shell/nsUnixShellService.cpp b/browser/components/shell/nsUnixShellService.cpp |
1545 |
new file mode 100644 |
1546 |
--- /dev/null |
1547 |
+++ b/browser/components/shell/nsUnixShellService.cpp |
1548 |
@@ -0,0 +1,22 @@ |
1549 |
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
1550 |
+/* This Source Code Form is subject to the terms of the Mozilla Public |
1551 |
+ * License, v. 2.0. If a copy of the MPL was not distributed with this |
1552 |
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
1553 |
+ |
1554 |
+ |
1555 |
+#include "nsUnixShellService.h" |
1556 |
+#include "nsGNOMEShellService.h" |
1557 |
+#include "nsKDEShellService.h" |
1558 |
+#include "nsKDEUtils.h" |
1559 |
+#include "mozilla/ModuleUtils.h" |
1560 |
+ |
1561 |
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init) |
1562 |
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsKDEShellService, Init) |
1563 |
+ |
1564 |
+NS_METHOD |
1565 |
+nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult) |
1566 |
+{ |
1567 |
+ if( nsKDEUtils::kdeSupport()) |
1568 |
+ return nsKDEShellServiceConstructor( aOuter, aIID, aResult ); |
1569 |
+ return nsGNOMEShellServiceConstructor( aOuter, aIID, aResult ); |
1570 |
+} |
1571 |
diff --git a/browser/components/shell/nsUnixShellService.h b/browser/components/shell/nsUnixShellService.h |
1572 |
new file mode 100644 |
1573 |
--- /dev/null |
1574 |
+++ b/browser/components/shell/nsUnixShellService.h |
1575 |
@@ -0,0 +1,15 @@ |
1576 |
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
1577 |
+/* This Source Code Form is subject to the terms of the Mozilla Public |
1578 |
+ * License, v. 2.0. If a copy of the MPL was not distributed with this |
1579 |
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
1580 |
+ |
1581 |
+ |
1582 |
+#ifndef nsunixshellservice_h____ |
1583 |
+#define nsunixshellservice_h____ |
1584 |
+ |
1585 |
+#include "nsIGNOMEShellService.h" |
1586 |
+ |
1587 |
+NS_METHOD |
1588 |
+nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult); |
1589 |
+ |
1590 |
+#endif // nsunixshellservice_h____ |
1591 |
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in |
1592 |
--- a/browser/installer/package-manifest.in |
1593 |
+++ b/browser/installer/package-manifest.in |
1594 |
@@ -652,16 +652,17 @@ |
1595 |
@RESPATH@/greprefs.js |
1596 |
@RESPATH@/defaults/autoconfig/prefcalls.js |
1597 |
@RESPATH@/browser/defaults/permissions |
1598 |
|
1599 |
; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325) |
1600 |
; Technically this is an app pref file, but we are keeping it in the original |
1601 |
; gre location for now. |
1602 |
@RESPATH@/defaults/pref/channel-prefs.js |
1603 |
+@BINPATH@/defaults/pref/kde.js |
1604 |
|
1605 |
; Services (gre) prefs |
1606 |
@RESPATH@/defaults/pref/services-sync.js |
1607 |
|
1608 |
; [Layout Engine Resources] |
1609 |
; Style Sheets, Graphics and other Resources used by the layout engine. |
1610 |
@RESPATH@/res/EditorOverride.css |
1611 |
@RESPATH@/res/contenteditable.css |