/[packages]/cauldron/firefox/current/SOURCES/firefox-kde.patch
ViewVC logotype

Contents of /cauldron/firefox/current/SOURCES/firefox-kde.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 724612 - (show annotations) (download)
Thu Sep 25 14:22:06 2014 UTC (9 years, 6 months ago) by doktor5000
File size: 80775 byte(s)
- update to 31.1.1esr
- updated, rediffed and reenabled KDE integration patches
  o updated current upstream location for subsequent updates
- temporarily enabled clobber to enable build (SILENT)
  o filed https://bugzilla.mozilla.org/show_bug.cgi?id=1072893 (SILENT)
- fixed URL to reenable automatic download (SILENT)
1 diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul
2 new file mode 100644
3 --- /dev/null
4 +++ b/browser/base/content/browser-kde.xul
5 @@ -0,0 +1,1197 @@
6 +#filter substitution
7 +<?xml version="1.0"?>
8 +# -*- Mode: HTML -*-
9 +#
10 +# This Source Code Form is subject to the terms of the Mozilla Public
11 +# License, v. 2.0. If a copy of the MPL was not distributed with this
12 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
13 +
14 +<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
15 +<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
16 +<?xml-stylesheet href="chrome://browser/skin/devtools/common.css" type="text/css"?>
17 +<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUIOverlay.css" type="text/css"?>
18 +<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
19 +<?xml-stylesheet href="chrome://browser/skin/browser-lightweightTheme.css" type="text/css"?>
20 +
21 +<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
22 +<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
23 +<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
24 +
25 +# All DTD information is stored in a separate file so that it can be shared by
26 +# hiddenWindow.xul.
27 +#include browser-doctype.inc
28 +
29 +<window id="main-window"
30 + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
31 + xmlns:svg="http://www.w3.org/2000/svg"
32 + xmlns:html="http://www.w3.org/1999/xhtml"
33 + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
34 + onload="gBrowserInit.onLoad()" onunload="gBrowserInit.onUnload()" onclose="return WindowIsClosing();"
35 + title="&mainWindow.title;"
36 + title_normal="&mainWindow.title;"
37 +#ifdef XP_MACOSX
38 + title_privatebrowsing="&mainWindow.title;&mainWindow.titlemodifiermenuseparator;&mainWindow.titlePrivateBrowsingSuffix;"
39 + titledefault="&mainWindow.title;"
40 + titlemodifier=""
41 + titlemodifier_normal=""
42 + titlemodifier_privatebrowsing="&mainWindow.titlePrivateBrowsingSuffix;"
43 +#else
44 + title_privatebrowsing="&mainWindow.titlemodifier; &mainWindow.titlePrivateBrowsingSuffix;"
45 + titlemodifier="&mainWindow.titlemodifier;"
46 + titlemodifier_normal="&mainWindow.titlemodifier;"
47 + titlemodifier_privatebrowsing="&mainWindow.titlemodifier; &mainWindow.titlePrivateBrowsingSuffix;"
48 +#endif
49 +#ifdef CAN_DRAW_IN_TITLEBAR
50 +#ifdef XP_WIN
51 + chromemargin="0,2,2,2"
52 +#else
53 + chromemargin="0,-1,-1,-1"
54 +#endif
55 + tabsintitlebar="true"
56 +#endif
57 + titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
58 + lightweightthemes="true"
59 + lightweightthemesfooter="browser-bottombox"
60 + windowtype="navigator:browser"
61 + macanimationtype="document"
62 + screenX="4" screenY="4"
63 + fullscreenbutton="true"
64 + sizemode="normal"
65 + persist="screenX screenY width height sizemode">
66 +
67 +# All JS files which are not content (only) dependent that browser.xul
68 +# wishes to include *must* go into the global-scripts.inc file
69 +# so that they can be shared by macBrowserOverlay.xul.
70 +#include global-scripts.inc
71 +<script type="application/javascript" src="chrome://browser/content/nsContextMenu.js"/>
72 +
73 +<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
74 +
75 +<script type="application/javascript" src="chrome://browser/content/places/editBookmarkOverlay.js"/>
76 +
77 +# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the
78 +# browser-sets.inc file for sharing with hiddenWindow.xul.
79 +#define FULL_BROWSER_WINDOW
80 +#include browser-sets.inc
81 +#undef FULL_BROWSER_WINDOW
82 +
83 + <popupset id="mainPopupSet">
84 + <menupopup id="tabContextMenu"
85 + onpopupshowing="if (event.target == this) TabContextMenu.updateContextMenu(this);"
86 + onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;">
87 + <menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;"
88 + oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/>
89 + <menuseparator/>
90 + <menuitem id="context_pinTab" label="&pinTab.label;"
91 + accesskey="&pinTab.accesskey;"
92 + oncommand="gBrowser.pinTab(TabContextMenu.contextTab);"/>
93 + <menuitem id="context_unpinTab" label="&unpinTab.label;" hidden="true"
94 + accesskey="&unpinTab.accesskey;"
95 + oncommand="gBrowser.unpinTab(TabContextMenu.contextTab);"/>
96 + <menu id="context_tabViewMenu" label="&moveToGroup.label;"
97 + accesskey="&moveToGroup.accesskey;">
98 + <menupopup id="context_tabViewMenuPopup"
99 + onpopupshowing="if (event.target == this) TabView.moveToGroupPopupShowing(event);">
100 + <menuseparator id="context_tabViewNamedGroups" hidden="true"/>
101 + <menuitem id="context_tabViewNewGroup" label="&moveToNewGroup.label;"
102 + oncommand="TabView.moveTabTo(TabContextMenu.contextTab, null);"/>
103 + </menupopup>
104 + </menu>
105 + <menuitem id="context_openTabInWindow" label="&moveToNewWindow.label;"
106 + accesskey="&moveToNewWindow.accesskey;"
107 + tbattr="tabbrowser-multiple"
108 + oncommand="gBrowser.replaceTabWithWindow(TabContextMenu.contextTab);"/>
109 + <menuseparator/>
110 + <menuitem id="context_reloadAllTabs" label="&reloadAllTabs.label;" accesskey="&reloadAllTabs.accesskey;"
111 + tbattr="tabbrowser-multiple-visible"
112 + oncommand="gBrowser.reloadAllTabs();"/>
113 + <menuitem id="context_bookmarkAllTabs"
114 + label="&bookmarkAllTabs.label;"
115 + accesskey="&bookmarkAllTabs.accesskey;"
116 + command="Browser:BookmarkAllTabs"/>
117 + <menuitem id="context_closeTabsToTheEnd" label="&closeTabsToTheEnd.label;" accesskey="&closeTabsToTheEnd.accesskey;"
118 + oncommand="gBrowser.removeTabsToTheEndFrom(TabContextMenu.contextTab);"/>
119 + <menuitem id="context_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;"
120 + oncommand="gBrowser.removeAllTabsBut(TabContextMenu.contextTab);"/>
121 + <menuseparator/>
122 + <menuitem id="context_undoCloseTab"
123 + label="&undoCloseTab.label;"
124 + accesskey="&undoCloseTab.accesskey;"
125 + observes="History:UndoCloseTab"/>
126 + <menuitem id="context_closeTab" label="&closeTab.label;" accesskey="&closeTab.accesskey;"
127 + oncommand="gBrowser.removeTab(TabContextMenu.contextTab, { animate: true });"/>
128 + </menupopup>
129 +
130 + <!-- bug 415444/582485: event.stopPropagation is here for the cloned version
131 + of this menupopup -->
132 + <menupopup id="backForwardMenu"
133 + onpopupshowing="return FillHistoryMenu(event.target);"
134 + oncommand="gotoHistoryIndex(event); event.stopPropagation();"
135 + onclick="checkForMiddleClick(this, event);"/>
136 + <tooltip id="aHTMLTooltip" page="true"/>
137 + <tooltip id="remoteBrowserTooltip"/>
138 +
139 + <!-- for search and content formfill/pw manager -->
140 + <panel type="autocomplete" id="PopupAutoComplete" noautofocus="true" hidden="true"/>
141 +
142 + <!-- for url bar autocomplete -->
143 + <panel type="autocomplete-richlistbox" id="PopupAutoCompleteRichResult" noautofocus="true" hidden="true"/>
144 +
145 + <!-- for select dropdowns -->
146 + <menupopup id="ContentSelectDropdown" rolluponmousewheel="true" hidden="true"/>
147 +
148 + <!-- for invalid form error message -->
149 + <panel id="invalid-form-popup" type="arrow" orient="vertical" noautofocus="true" hidden="true" level="parent">
150 + <description/>
151 + </panel>
152 +
153 + <panel id="editBookmarkPanel"
154 + type="arrow"
155 + footertype="promobox"
156 + orient="vertical"
157 + ignorekeys="true"
158 + hidden="true"
159 + onpopupshown="StarUI.panelShown(event);"
160 + aria-labelledby="editBookmarkPanelTitle">
161 + <row id="editBookmarkPanelHeader" align="center" hidden="true">
162 + <vbox align="center">
163 + <image id="editBookmarkPanelStarIcon"/>
164 + </vbox>
165 + <vbox>
166 + <label id="editBookmarkPanelTitle"/>
167 + <description id="editBookmarkPanelDescription"/>
168 + <hbox>
169 + <button id="editBookmarkPanelRemoveButton"
170 + class="editBookmarkPanelHeaderButton"
171 + oncommand="StarUI.removeBookmarkButtonCommand();"
172 + accesskey="&editBookmark.removeBookmark.accessKey;"/>
173 + </hbox>
174 + </vbox>
175 + </row>
176 + <vbox id="editBookmarkPanelContent" flex="1" hidden="true"/>
177 + <hbox id="editBookmarkPanelBottomButtons" pack="end">
178 +#ifdef XP_UNIX
179 + <button id="editBookmarkPanelDoneButton"
180 + class="editBookmarkPanelBottomButton"
181 + label="&editBookmark.done.label;"
182 + default="true"
183 + oncommand="StarUI.panel.hidePopup();"/>
184 + <button id="editBookmarkPanelDeleteButton"
185 + class="editBookmarkPanelBottomButton"
186 + label="&editBookmark.cancel.label;"
187 + oncommand="StarUI.cancelButtonOnCommand();"/>
188 +#else
189 + <button id="editBookmarkPanelDeleteButton"
190 + class="editBookmarkPanelBottomButton"
191 + label="&editBookmark.cancel.label;"
192 + oncommand="StarUI.cancelButtonOnCommand();"/>
193 + <button id="editBookmarkPanelDoneButton"
194 + class="editBookmarkPanelBottomButton"
195 + label="&editBookmark.done.label;"
196 + default="true"
197 + oncommand="StarUI.panel.hidePopup();"/>
198 +#endif
199 + </hbox>
200 + </panel>
201 +
202 + <!-- UI tour experience -->
203 + <panel id="UITourTooltip"
204 + type="arrow"
205 + hidden="true"
206 + noautofocus="true"
207 + noautohide="true"
208 + align="start"
209 + orient="vertical"
210 + role="alert">
211 + <vbox>
212 + <hbox pack="end">
213 + <toolbarbutton id="UITourTooltipClose" class="close-icon"
214 + tooltiptext="&uiTour.infoPanel.close;"/>
215 + </hbox>
216 + <hbox id="UITourTooltipBody">
217 + <vbox id="UITourTooltipIconContainer">
218 + <image id="UITourTooltipIcon"/>
219 + </vbox>
220 + <vbox flex="1">
221 + <label id="UITourTooltipTitle" flex="1"/>
222 + <description id="UITourTooltipDescription" flex="1"/>
223 + </vbox>
224 + </hbox>
225 + <hbox id="UITourTooltipButtons" flex="1" align="center"/>
226 + </vbox>
227 + </panel>
228 + <!-- type="default" forces frames to be created so that the panel's size can be determined -->
229 + <panel id="UITourHighlightContainer"
230 + type="default"
231 + hidden="true"
232 + noautofocus="true"
233 + noautohide="true"
234 + flip="none"
235 + consumeoutsideclicks="false"
236 + mousethrough="always">
237 + <box id="UITourHighlight"></box>
238 + </panel>
239 +
240 + <panel id="social-share-panel"
241 + class="social-panel"
242 + type="arrow"
243 + orient="horizontal"
244 + onpopupshowing="SocialShare.onShowing()"
245 + onpopuphidden="SocialShare.onHidden()"
246 + hidden="true">
247 + <vbox class="social-share-toolbar">
248 + <vbox id="social-share-provider-buttons" flex="1"/>
249 + </vbox>
250 + </panel>
251 +
252 + <panel id="social-notification-panel"
253 + class="social-panel"
254 + type="arrow"
255 + hidden="true"
256 + noautofocus="true"/>
257 + <panel id="social-flyout-panel"
258 + class="social-panel"
259 + onpopupshown="SocialFlyout.onShown()"
260 + onpopuphidden="SocialFlyout.onHidden()"
261 + side="right"
262 + type="arrow"
263 + hidden="true"
264 + flip="slide"
265 + rolluponmousewheel="true"
266 + noautofocus="true"
267 + position="topcenter topright"/>
268 +
269 + <menupopup id="toolbar-context-menu"
270 + onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator'));">
271 + <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
272 + accesskey="&customizeMenu.moveToPanel.accesskey;"
273 + label="&customizeMenu.moveToPanel.label;"
274 + class="customize-context-moveToPanel"/>
275 + <menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)"
276 + accesskey="&customizeMenu.removeFromToolbar.accesskey;"
277 + label="&customizeMenu.removeFromToolbar.label;"
278 + class="customize-context-removeFromToolbar"/>
279 + <menuseparator/>
280 + <menuseparator id="viewToolbarsMenuSeparator"/>
281 + <!-- XXXgijs: we're using oncommand handler here to avoid the event being
282 + redirected to the command element, thus preventing
283 + listeners on the menupopup or further up the tree from
284 + seeing the command event pass by. The observes attribute is
285 + here so that the menuitem is still disabled and re-enabled
286 + correctly. -->
287 + <menuitem oncommand="BrowserCustomizeToolbar()"
288 + observes="cmd_CustomizeToolbars"
289 + class="viewCustomizeToolbar"
290 + label="&viewCustomizeToolbar.label;"
291 + accesskey="&viewCustomizeToolbar.accesskey;"/>
292 + </menupopup>
293 +
294 + <menupopup id="blockedPopupOptions"
295 + onpopupshowing="gPopupBlockerObserver.fillPopupList(event);"
296 + onpopuphiding="gPopupBlockerObserver.onPopupHiding(event);">
297 + <menuitem observes="blockedPopupAllowSite"/>
298 + <menuitem observes="blockedPopupEditSettings"/>
299 + <menuitem observes="blockedPopupDontShowMessage"/>
300 + <menuseparator observes="blockedPopupsSeparator"/>
301 + </menupopup>
302 +
303 + <menupopup id="autohide-context"
304 + onpopupshowing="FullScreen.getAutohide(this.firstChild);">
305 + <menuitem type="checkbox" label="&fullScreenAutohide.label;"
306 + accesskey="&fullScreenAutohide.accesskey;"
307 + oncommand="FullScreen.setAutohide();"/>
308 + <menuseparator/>
309 + <menuitem label="&fullScreenExit.label;"
310 + accesskey="&fullScreenExit.accesskey;"
311 + oncommand="BrowserFullScreen();"/>
312 + </menupopup>
313 +
314 + <menupopup id="contentAreaContextMenu" pagemenu="start"
315 + onpopupshowing="if (event.target != this)
316 + return true;
317 + gContextMenu = new nsContextMenu(this, event.shiftKey);
318 + if (gContextMenu.shouldDisplay)
319 + updateEditUIVisibility();
320 + return gContextMenu.shouldDisplay;"
321 + onpopuphiding="if (event.target != this)
322 + return;
323 + gContextMenu.hiding();
324 + gContextMenu = null;
325 + updateEditUIVisibility();">
326 +#include browser-context.inc
327 + </menupopup>
328 +
329 + <menupopup id="placesContext"/>
330 +
331 + <!-- Popup for site identity information -->
332 + <panel id="identity-popup"
333 + type="arrow"
334 + hidden="true"
335 + noautofocus="true"
336 + onpopupshown="if (event.target == this)
337 + gIdentityHandler.onPopupShown(event);"
338 + orient="vertical"
339 + level="top">
340 + <hbox id="identity-popup-container" align="top">
341 + <image id="identity-popup-icon"/>
342 + <vbox id="identity-popup-content-box">
343 + <label id="identity-popup-brandName"
344 + class="identity-popup-label"
345 + value="&brandFullName;"/>
346 + <label id="identity-popup-chromeLabel"
347 + class="identity-popup-label"/>
348 + <label id="identity-popup-connectedToLabel"
349 + class="identity-popup-label"
350 + value="&identity.connectedTo;"/>
351 + <label id="identity-popup-connectedToLabel2"
352 + class="identity-popup-label"
353 + value="&identity.unverifiedsite2;"/>
354 + <description id="identity-popup-content-host"
355 + class="identity-popup-description"/>
356 + <label id="identity-popup-runByLabel"
357 + class="identity-popup-label"
358 + value="&identity.runBy;"/>
359 + <description id="identity-popup-content-owner"
360 + class="identity-popup-description"/>
361 + <description id="identity-popup-content-supplemental"
362 + class="identity-popup-description"/>
363 + <description id="identity-popup-content-verifier"
364 + class="identity-popup-description"/>
365 + <hbox id="identity-popup-encryption" flex="1">
366 + <vbox>
367 + <image id="identity-popup-encryption-icon"/>
368 + </vbox>
369 + <description id="identity-popup-encryption-label" flex="1"
370 + class="identity-popup-description"/>
371 + </hbox>
372 + <vbox id="identity-popup-permissions">
373 + <separator class="thin"/>
374 + <label class="identity-popup-label header"
375 + value="&identity.permissions;"/>
376 + <vbox id="identity-popup-permission-list" class="indent"/>
377 + </vbox>
378 + </vbox>
379 + </hbox>
380 + <!-- Footer button to open security page info -->
381 + <hbox id="identity-popup-button-container" align="center">
382 + <button id="identity-popup-help-icon"
383 + oncommand="gIdentityHandler.handleHelpCommand(event);"
384 + tooltiptext="&identity.help.tooltip;"/>
385 + <spacer flex="1"/>
386 + <button id="identity-popup-more-info-button"
387 + label="&identity.moreInfoLinkText;"
388 + oncommand="gIdentityHandler.handleMoreInfoClick(event);"/>
389 + </hbox>
390 + </panel>
391 +
392 + <panel id="ctrlTab-panel" class="KUI-panel" hidden="true" norestorefocus="true" level="top">
393 + <hbox>
394 + <button class="ctrlTab-preview" flex="1"/>
395 + <button class="ctrlTab-preview" flex="1"/>
396 + <button class="ctrlTab-preview" flex="1"/>
397 + <button class="ctrlTab-preview" flex="1"/>
398 + <button class="ctrlTab-preview" flex="1"/>
399 + <button class="ctrlTab-preview" flex="1"/>
400 + </hbox>
401 + <hbox pack="center">
402 + <button id="ctrlTab-showAll" class="ctrlTab-preview" noicon="true"/>
403 + </hbox>
404 + </panel>
405 +
406 + <!-- Sync Panel -->
407 + <panel id="sync-start-panel" class="sync-panel" type="arrow" hidden="true"
408 + noautofocus="true" onclick="this.hidePopup();"
409 + flip="slide">
410 + <hbox class="sync-panel-outer">
411 + <image class="sync-panel-icon"/>
412 + <vbox class="sync-panel-inner">
413 + <description id="sync-start-panel-title"
414 + value="&syncStartPanel2.heading;"/>
415 + <description id="sync-start-panel-subtitle"
416 + value="&syncStartPanel2.subTitle;"/>
417 + </vbox>
418 + </hbox>
419 + </panel>
420 +
421 + <!-- Sync Error Panel -->
422 + <panel id="sync-error-panel" class="sync-panel" type="arrow" hidden="true"
423 + noautofocus="true" onclick="this.hidePopup();"
424 + flip="slide">
425 + <hbox class="sync-panel-outer">
426 + <image class="sync-panel-icon"/>
427 + <vbox class="sync-panel-inner">
428 + <description id="sync-error-panel-title"
429 + value="&syncErrorPanel.heading;"/>
430 + <description id="sync-error-panel-subtitle"
431 + value="&syncErrorPanel.subTitle;"/>
432 + <hbox class="sync-panel-button-box">
433 + <spacer flex="1"/>
434 + <button class="sync-panel-button"
435 + label="&syncErrorPanel.signInButton.label;"
436 + accesskey="&syncErrorPanel.signInButton.accesskey;"
437 + onclick="gFxAccounts.openSignInAgainPage();"/>
438 + </hbox>
439 + </vbox>
440 + </hbox>
441 + </panel>
442 +
443 + <!-- Bookmarks and history tooltip -->
444 + <tooltip id="bhTooltip"/>
445 +
446 + <tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/>
447 +
448 + <tooltip id="back-button-tooltip">
449 + <label class="tooltip-label" value="&backButton.tooltip;"/>
450 +#ifdef XP_MACOSX
451 + <label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
452 +#else
453 + <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
454 +#endif
455 + </tooltip>
456 +
457 + <tooltip id="forward-button-tooltip">
458 + <label class="tooltip-label" value="&forwardButton.tooltip;"/>
459 +#ifdef XP_MACOSX
460 + <label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
461 +#else
462 + <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
463 +#endif
464 + </tooltip>
465 +
466 +#include popup-notifications.inc
467 +
468 +#include ../../components/customizableui/content/panelUI.inc.xul
469 +
470 + <hbox id="downloads-animation-container" mousethrough="always">
471 + <vbox id="downloads-notification-anchor">
472 + <vbox id="downloads-indicator-notification"/>
473 + </vbox>
474 + </hbox>
475 +
476 + <hbox id="bookmarked-notification-container" mousethrough="always">
477 + <vbox id="bookmarked-notification-anchor">
478 + <vbox id="bookmarked-notification"/>
479 + </vbox>
480 + <vbox id="bookmarked-notification-dropmarker-anchor">
481 + <image id="bookmarked-notification-dropmarker-icon"/>
482 + </vbox>
483 + </hbox>
484 +
485 + <tooltip id="dynamic-shortcut-tooltip"
486 + onpopupshowing="UpdateDynamicShortcutTooltipText(this);"/>
487 + </popupset>
488 +
489 +#ifdef CAN_DRAW_IN_TITLEBAR
490 +<vbox id="titlebar">
491 + <hbox id="titlebar-content">
492 + <spacer id="titlebar-spacer" flex="1"/>
493 + <hbox id="titlebar-buttonbox-container">
494 +#ifdef XP_WIN
495 + <hbox id="private-browsing-indicator-titlebar">
496 + <hbox class="private-browsing-indicator"/>
497 + </hbox>
498 +#endif
499 + <hbox id="titlebar-buttonbox">
500 + <toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
501 + <toolbarbutton class="titlebar-button" id="titlebar-max" oncommand="onTitlebarMaxClick();"/>
502 + <toolbarbutton class="titlebar-button" id="titlebar-close" command="cmd_closeWindow"/>
503 + </hbox>
504 + </hbox>
505 +#ifdef XP_MACOSX
506 + <!-- OS X does not natively support RTL for its titlebar items, so we prevent this secondary
507 + buttonbox from reversing order in RTL by forcing an LTR direction. -->
508 + <hbox id="titlebar-secondary-buttonbox" dir="ltr">
509 + <hbox class="private-browsing-indicator"/>
510 + <hbox id="titlebar-fullscreen-button"/>
511 + </hbox>
512 +#endif
513 + </hbox>
514 +</vbox>
515 +#endif
516 +
517 +<deck flex="1" id="tab-view-deck">
518 +<vbox flex="1" id="browser-panel">
519 +
520 + <toolbox id="navigator-toolbox" mode="icons">
521 + <!-- Menu -->
522 + <toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
523 + defaultset="menubar-items"
524 + mode="icons" iconsize="small"
525 +#ifdef MENUBAR_CAN_AUTOHIDE
526 + toolbarname="&menubarCmd.label;"
527 + accesskey="&menubarCmd.accesskey;"
528 +#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)
529 + autohide="true"
530 +#endif
531 +#endif
532 + context="toolbar-context-menu">
533 + <toolbaritem id="menubar-items" align="center"
534 + cui-areatype="toolbar">
535 +# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by
536 +# hiddenWindow.xul.
537 +#include browser-menubar.inc
538 + </toolbaritem>
539 +
540 +#ifdef CAN_DRAW_IN_TITLEBAR
541 +#ifndef XP_MACOSX
542 + <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"
543 + id="titlebar-placeholder-on-menubar-for-caption-buttons" persist="width"
544 + skipintoolbarset="true"/>
545 +#endif
546 +#endif
547 + </toolbar>
548 +
549 + <toolbar id="TabsToolbar"
550 + class="toolbar-primary"
551 + fullscreentoolbar="true"
552 + customizable="true"
553 + mode="icons"
554 + iconsize="small"
555 + aria-label="&tabsToolbar.label;"
556 + context="toolbar-context-menu"
557 + defaultset="tabbrowser-tabs,new-tab-button,alltabs-button"
558 + collapsed="true">
559 +
560 +#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)
561 + <hbox id="private-browsing-indicator"
562 + skipintoolbarset="true"/>
563 +#endif
564 +
565 + <tabs id="tabbrowser-tabs"
566 + class="tabbrowser-tabs"
567 + tabbrowser="content"
568 + flex="1"
569 + setfocus="false"
570 + tooltip="tabbrowser-tab-tooltip"
571 + cui-areatype="toolbar"
572 + stopwatchid="FX_TAB_CLICK_MS">
573 + <tab class="tabbrowser-tab" selected="true" fadein="true"/>
574 + </tabs>
575 +
576 + <toolbarbutton id="new-tab-button"
577 + class="toolbarbutton-1 chromeclass-toolbar-additional"
578 + label="&tabCmd.label;"
579 + command="cmd_newNavigatorTab"
580 + onclick="checkForMiddleClick(this, event);"
581 + tooltiptext="&newTabButton.tooltip;"
582 + ondrop="newTabButtonObserver.onDrop(event)"
583 + ondragover="newTabButtonObserver.onDragOver(event)"
584 + ondragenter="newTabButtonObserver.onDragOver(event)"
585 + ondragexit="newTabButtonObserver.onDragExit(event)"
586 + cui-areatype="toolbar"
587 + removable="true"/>
588 +
589 + <toolbarbutton id="alltabs-button"
590 + class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button"
591 + type="menu"
592 + label="&listAllTabs.label;"
593 + tooltiptext="&listAllTabs.label;"
594 + removable="false">
595 + <menupopup id="alltabs-popup"
596 + position="after_end">
597 + <menuitem id="menu_tabview"
598 + class="menuitem-iconic"
599 + key="key_tabview"
600 + label="&viewTabGroups.label;"
601 + command="Browser:ToggleTabView"
602 + cui-areatype="toolbar"
603 + observes="tabviewGroupsNumber"/>
604 + <menuseparator id="alltabs-popup-separator"/>
605 + </menupopup>
606 + </toolbarbutton>
607 +
608 +#if !defined(MOZ_WIDGET_GTK) && !defined(MOZ_WIDGET_QT)
609 + <hbox class="private-browsing-indicator" skipintoolbarset="true"/>
610 +#endif
611 +#ifdef CAN_DRAW_IN_TITLEBAR
612 + <hbox class="titlebar-placeholder" type="caption-buttons"
613 + id="titlebar-placeholder-on-TabsToolbar-for-captions-buttons" persist="width"
614 +#ifndef XP_MACOSX
615 + ordinal="1000"
616 +#endif
617 + skipintoolbarset="true"/>
618 +
619 +#ifdef XP_MACOSX
620 + <hbox class="titlebar-placeholder" type="fullscreen-button"
621 + id="titlebar-placeholder-on-TabsToolbar-for-fullscreen-button" persist="width"
622 + skipintoolbarset="true"/>
623 +#endif
624 +#endif
625 + </toolbar>
626 +
627 + <!--
628 + CAVEAT EMPTOR
629 + Should you need to add items to the toolbar here, make sure to also add them
630 + to the default placements of buttons in CustomizableUI.jsm, so the
631 + customization code doesn't get confused.
632 + -->
633 + <toolbar id="nav-bar" class="toolbar-primary chromeclass-toolbar"
634 + aria-label="&navbarCmd.label;"
635 + fullscreentoolbar="true" mode="icons" customizable="true"
636 + iconsize="small"
637 + defaultset="urlbar-container,search-container,webrtc-status-button,bookmarks-menu-button,downloads-button,home-button,social-share-button,social-toolbar-item"
638 + customizationtarget="nav-bar-customization-target"
639 + overflowable="true"
640 + overflowbutton="nav-bar-overflow-button"
641 + overflowtarget="widget-overflow-list"
642 + overflowpanel="widget-overflow"
643 + context="toolbar-context-menu">
644 +
645 + <hbox id="nav-bar-customization-target" flex="1">
646 + <toolbaritem id="urlbar-container" flex="400" persist="width"
647 + title="&locationItem.title;" removable="false"
648 + cui-areatype="toolbar"
649 + class="chromeclass-location" overflows="false">
650 + <toolbarbutton id="back-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
651 + label="&backCmd.label;"
652 + command="Browser:BackOrBackDuplicate"
653 + cui-areatype="toolbar"
654 + onclick="checkForMiddleClick(this, event);"
655 + tooltip="back-button-tooltip"
656 + context="backForwardMenu"/>
657 + <hbox id="urlbar-wrapper" flex="1">
658 + <toolbarbutton id="forward-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
659 + label="&forwardCmd.label;"
660 + command="Browser:ForwardOrForwardDuplicate"
661 + cui-areatype="toolbar"
662 + onclick="checkForMiddleClick(this, event);"
663 + tooltip="forward-button-tooltip"
664 + context="backForwardMenu"/>
665 + <textbox id="urlbar" flex="1"
666 + placeholder="&urlbar.placeholder2;"
667 + type="autocomplete"
668 + autocompletesearch="urlinline history"
669 + autocompletesearchparam="enable-actions"
670 + autocompletepopup="PopupAutoCompleteRichResult"
671 + completeselectedindex="true"
672 + tabscrolling="true"
673 + showcommentcolumn="true"
674 + showimagecolumn="true"
675 + enablehistory="true"
676 + maxrows="6"
677 + newlines="stripsurroundingwhitespace"
678 + oninput="gBrowser.userTypedValue = this.value;"
679 + ontextentered="this.handleCommand(param);"
680 + ontextreverted="return this.handleRevert();"
681 + pageproxystate="invalid"
682 + onfocus="document.getElementById('identity-box').style.MozUserFocus= 'normal'"
683 + onblur="setTimeout(function() document.getElementById('identity-box').style.MozUserFocus = '', 0);">
684 + <box id="notification-popup-box" hidden="true" align="center">
685 + <image id="default-notification-icon" class="notification-anchor-icon" role="button"/>
686 + <image id="identity-notification-icon" class="notification-anchor-icon" role="button"/>
687 + <image id="geo-notification-icon" class="notification-anchor-icon" role="button"/>
688 + <image id="addons-notification-icon" class="notification-anchor-icon" role="button"/>
689 + <image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"/>
690 + <image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
691 + <image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
692 + <image id="plugins-notification-icon" class="notification-anchor-icon" role="button"/>
693 + <image id="web-notifications-notification-icon" class="notification-anchor-icon" role="button"/>
694 + <image id="plugin-install-notification-icon" class="notification-anchor-icon" role="button"/>
695 + <image id="mixed-content-blocked-notification-icon" class="notification-anchor-icon" role="button"/>
696 + <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon" role="button"/>
697 + <image id="webRTC-sharingDevices-notification-icon" class="notification-anchor-icon" role="button"/>
698 + <image id="webRTC-shareMicrophone-notification-icon" class="notification-anchor-icon" role="button"/>
699 + <image id="webRTC-sharingMicrophone-notification-icon" class="notification-anchor-icon" role="button"/>
700 + <image id="pointerLock-notification-icon" class="notification-anchor-icon" role="button"/>
701 + <image id="servicesInstall-notification-icon" class="notification-anchor-icon" role="button"/>
702 + <image id="translate-notification-icon" class="notification-anchor-icon" role="button"/>
703 + <image id="translated-notification-icon" class="notification-anchor-icon" role="button"/>
704 + </box>
705 + <!-- Use onclick instead of normal popup= syntax since the popup
706 + code fires onmousedown, and hence eats our favicon drag events.
707 + We only add the identity-box button to the tab order when the location bar
708 + has focus, otherwise pressing F6 focuses it instead of the location bar -->
709 + <box id="identity-box" role="button"
710 + align="center"
711 + onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
712 + onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);"
713 + ondragstart="gIdentityHandler.onDragStart(event);">
714 + <image id="page-proxy-favicon"
715 + onclick="PageProxyClickHandler(event);"
716 + pageproxystate="invalid"/>
717 + <hbox id="identity-icon-labels">
718 + <label id="identity-icon-label" class="plain" flex="1"/>
719 + <label id="identity-icon-country-label" class="plain"/>
720 + </hbox>
721 + </box>
722 + <box id="urlbar-display-box" align="center">
723 + <label id="urlbar-display" value="&urlbar.switchToTab.label;"/>
724 + </box>
725 + <hbox id="urlbar-icons">
726 + <image id="page-report-button"
727 + class="urlbar-icon"
728 + hidden="true"
729 + tooltiptext="&pageReportIcon.tooltip;"
730 + onclick="gPopupBlockerObserver.onReportButtonClick(event);"/>
731 + </hbox>
732 + <toolbarbutton id="urlbar-go-button"
733 + class="chromeclass-toolbar-additional"
734 + onclick="gURLBar.handleCommand(event);"
735 + tooltiptext="&goEndCap.tooltip;"/>
736 + <toolbarbutton id="urlbar-reload-button"
737 + class="chromeclass-toolbar-additional"
738 + command="Browser:ReloadOrDuplicate"
739 + onclick="checkForMiddleClick(this, event);"
740 + tooltiptext="&reloadButton.tooltip;"/>
741 + <toolbarbutton id="urlbar-stop-button"
742 + class="chromeclass-toolbar-additional"
743 + command="Browser:Stop"
744 + tooltiptext="&stopButton.tooltip;"/>
745 + </textbox>
746 + </hbox>
747 + </toolbaritem>
748 +
749 + <toolbaritem id="search-container" title="&searchItem.title;"
750 + align="center" class="chromeclass-toolbar-additional panel-wide-item"
751 + cui-areatype="toolbar"
752 + flex="100" persist="width" removable="true">
753 + <searchbar id="searchbar" flex="1"/>
754 + </toolbaritem>
755 +
756 + <toolbarbutton id="webrtc-status-button"
757 + class="toolbarbutton-1 chromeclass-toolbar-additional"
758 + type="menu"
759 + hidden="true"
760 + orient="horizontal"
761 + label="&webrtcIndicatorButton.label;"
762 + tooltiptext="&webrtcIndicatorButton.tooltip;"
763 + cui-areatype="toolbar"
764 + overflows="false">
765 + <menupopup onpopupshowing="WebrtcIndicator.fillPopup(this);"
766 + onpopuphiding="WebrtcIndicator.clearPopup(this);"
767 + oncommand="WebrtcIndicator.menuCommand(event.target);"/>
768 + </toolbarbutton>
769 +
770 + <toolbarbutton id="bookmarks-menu-button"
771 + class="toolbarbutton-1 chromeclass-toolbar-additional"
772 + persist="class"
773 + removable="true"
774 + type="menu-button"
775 + label="&bookmarksMenuButton.label;"
776 + tooltip="dynamic-shortcut-tooltip"
777 + anchor="dropmarker"
778 + ondragenter="PlacesMenuDNDHandler.onDragEnter(event);"
779 + ondragover="PlacesMenuDNDHandler.onDragOver(event);"
780 + ondragleave="PlacesMenuDNDHandler.onDragLeave(event);"
781 + ondrop="PlacesMenuDNDHandler.onDrop(event);"
782 + cui-areatype="toolbar"
783 + oncommand="BookmarkingUI.onCommand(event);">
784 + <menupopup id="BMB_bookmarksPopup"
785 + class="cui-widget-panel cui-widget-panelview cui-widget-panelWithFooter PanelUI-subView"
786 + placespopup="true"
787 + context="placesContext"
788 + openInTabs="children"
789 + oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);"
790 + onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
791 + onpopupshowing="BookmarkingUI.onPopupShowing(event);
792 + BookmarkingUI.attachPlacesView(event, this);"
793 + tooltip="bhTooltip" popupsinherittooltip="true">
794 + <menuitem id="BMB_viewBookmarksSidebar"
795 + class="subviewbutton"
796 + label="&viewBookmarksSidebar2.label;"
797 + type="checkbox"
798 + oncommand="toggleSidebar('viewBookmarksSidebar');">
799 + <observes element="viewBookmarksSidebar" attribute="checked"/>
800 + </menuitem>
801 + <!-- NB: temporary solution for bug 985024, this should go away soon. -->
802 + <menuitem id="BMB_bookmarksShowAllTop"
803 + class="menuitem-iconic subviewbutton"
804 + label="&showAllBookmarks2.label;"
805 + command="Browser:ShowAllBookmarks"
806 + key="manBookmarkKb"/>
807 + <menuseparator/>
808 + <menuitem id="BMB_subscribeToPageMenuitem"
809 +#ifndef XP_MACOSX
810 + class="menuitem-iconic subviewbutton"
811 +#else
812 + class="subviewbutton"
813 +#endif
814 + label="&subscribeToPageMenuitem.label;"
815 + oncommand="return FeedHandler.subscribeToFeed(null, event);"
816 + onclick="checkForMiddleClick(this, event);"
817 + observes="singleFeedMenuitemState"/>
818 + <menu id="BMB_subscribeToPageMenupopup"
819 +#ifndef XP_MACOSX
820 + class="menu-iconic subviewbutton"
821 +#else
822 + class="subviewbutton"
823 +#endif
824 + label="&subscribeToPageMenupopup.label;"
825 + observes="multipleFeedsMenuState">
826 + <menupopup id="BMB_subscribeToPageSubmenuMenupopup"
827 + onpopupshowing="return FeedHandler.buildFeedList(event.target);"
828 + oncommand="return FeedHandler.subscribeToFeed(null, event);"
829 + onclick="checkForMiddleClick(this, event);"/>
830 + </menu>
831 + <menuseparator/>
832 + <menu id="BMB_bookmarksToolbar"
833 + class="menu-iconic bookmark-item subviewbutton"
834 + label="&personalbarCmd.label;"
835 + container="true">
836 + <menupopup id="BMB_bookmarksToolbarPopup"
837 + placespopup="true"
838 + context="placesContext"
839 + onpopupshowing="if (!this.parentNode._placesView)
840 + new PlacesMenu(event, 'place:folder=TOOLBAR',
841 + PlacesUIUtils.getViewForNode(this.parentNode.parentNode).options);">
842 + <menuitem id="BMB_viewBookmarksToolbar"
843 + placesanonid="view-toolbar"
844 + toolbarId="PersonalToolbar"
845 + type="checkbox"
846 + oncommand="onViewToolbarCommand(event)"
847 + label="&viewBookmarksToolbar.label;"/>
848 + <menuseparator/>
849 + <!-- Bookmarks toolbar items -->
850 + </menupopup>
851 + </menu>
852 + <menu id="BMB_unsortedBookmarks"
853 + class="menu-iconic bookmark-item subviewbutton"
854 + label="&bookmarksMenuButton.unsorted.label;"
855 + container="true">
856 + <menupopup id="BMB_unsortedBookmarksPopup"
857 + placespopup="true"
858 + context="placesContext"
859 + onpopupshowing="if (!this.parentNode._placesView)
860 + new PlacesMenu(event, 'place:folder=UNFILED_BOOKMARKS',
861 + PlacesUIUtils.getViewForNode(this.parentNode.parentNode).options);"/>
862 + </menu>
863 + <menuseparator/>
864 + <!-- Bookmarks menu items will go here -->
865 + <menuitem id="BMB_bookmarksShowAll"
866 + class="subviewbutton panel-subview-footer"
867 + label="&showAllBookmarks2.label;"
868 + command="Browser:ShowAllBookmarks"
869 + key="manBookmarkKb"/>
870 + </menupopup>
871 + </toolbarbutton>
872 +
873 + <!-- This is a placeholder for the Downloads Indicator. It is visible
874 + during the customization of the toolbar, in the palette, and before
875 + the Downloads Indicator overlay is loaded. -->
876 + <toolbarbutton id="downloads-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
877 + oncommand="DownloadsIndicatorView.onCommand(event);"
878 + ondrop="DownloadsIndicatorView.onDrop(event);"
879 + ondragover="DownloadsIndicatorView.onDragOver(event);"
880 + ondragenter="DownloadsIndicatorView.onDragOver(event);"
881 + label="&downloads.label;"
882 + removable="true"
883 + cui-areatype="toolbar"
884 + tooltiptext="&downloads.tooltip;"/>
885 +
886 + <toolbarbutton id="home-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
887 + persist="class" removable="true"
888 + label="&homeButton.label;"
889 + ondragover="homeButtonObserver.onDragOver(event)"
890 + ondragenter="homeButtonObserver.onDragOver(event)"
891 + ondrop="homeButtonObserver.onDrop(event)"
892 + ondragexit="homeButtonObserver.onDragExit(event)"
893 + onclick="BrowserGoHome(event);"
894 + cui-areatype="toolbar"
895 + aboutHomeOverrideTooltip="&abouthome.pageTitle;"/>
896 +
897 +
898 + <toolbarbutton id="social-share-button"
899 + class="toolbarbutton-1 chromeclass-toolbar-additional"
900 + hidden="true"
901 + overflows="false"
902 + label="&sharePageCmd.label;"
903 + tooltiptext="&sharePageCmd.label;"
904 + cui-areatype="toolbar"
905 + command="Social:SharePage"/>
906 + </hbox>
907 +
908 + <toolbarbutton id="nav-bar-overflow-button"
909 + class="toolbarbutton-1 chromeclass-toolbar-additional overflow-button"
910 + cui-areatype="toolbar"
911 + skipintoolbarset="true"
912 + tooltiptext="&navbarOverflow.label;"/>
913 +
914 + <toolbaritem id="PanelUI-button"
915 + class="chromeclass-toolbar-additional"
916 + cui-areatype="toolbar"
917 + removable="false">
918 + <toolbarbutton id="PanelUI-menu-button"
919 + class="toolbarbutton-1"
920 + cui-areatype="toolbar"
921 + label="&brandShortName;"
922 + tooltiptext="&appmenu.tooltip;"/>
923 + </toolbaritem>
924 +
925 + <hbox id="window-controls" hidden="true" pack="end" skipintoolbarset="true"
926 + ordinal="1000">
927 + <toolbarbutton id="minimize-button"
928 + tooltiptext="&fullScreenMinimize.tooltip;"
929 + oncommand="window.minimize();"/>
930 +
931 + <toolbarbutton id="restore-button"
932 +#ifdef XP_MACOSX
933 +# Prior to 10.7 there wasn't a native fullscreen button so we use #restore-button
934 +# to exit fullscreen and want it to behave like other toolbar buttons.
935 + class="toolbarbutton-1"
936 + cui-areatype="toolbar"
937 +#endif
938 + tooltiptext="&fullScreenRestore.tooltip;"
939 + oncommand="BrowserFullScreen();"/>
940 +
941 + <toolbarbutton id="close-button"
942 + tooltiptext="&fullScreenClose.tooltip;"
943 + oncommand="BrowserTryToCloseWindow();"/>
944 + </hbox>
945 + </toolbar>
946 +
947 + <toolbarset id="customToolbars" context="toolbar-context-menu"/>
948 +
949 + <toolbar id="PersonalToolbar"
950 + mode="icons" iconsize="small"
951 + class="chromeclass-directories"
952 + context="toolbar-context-menu"
953 + defaultset="personal-bookmarks"
954 + toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;"
955 + collapsed="true"
956 + customizable="true">
957 + <toolbaritem id="personal-bookmarks"
958 + title="&bookmarksToolbarItem.label;"
959 + cui-areatype="toolbar"
960 + removable="true">
961 + <toolbarbutton id="bookmarks-toolbar-placeholder"
962 + class="toolbarbutton-1"
963 + mousethrough="never"
964 + label="&bookmarksToolbarItem.label;"
965 + oncommand="PlacesToolbarHelper.onPlaceholderCommand();"/>
966 + <hbox flex="1"
967 + id="PlacesToolbar"
968 + context="placesContext"
969 + onclick="BookmarksEventHandler.onClick(event, this._placesView);"
970 + oncommand="BookmarksEventHandler.onCommand(event, this._placesView);"
971 + tooltip="bhTooltip"
972 + popupsinherittooltip="true">
973 + <hbox flex="1">
974 + <hbox id="PlacesToolbarDropIndicatorHolder" align="center" collapsed="true">
975 + <image id="PlacesToolbarDropIndicator"
976 + mousethrough="always"
977 + collapsed="true"/>
978 + </hbox>
979 + <scrollbox orient="horizontal"
980 + id="PlacesToolbarItems"
981 + flex="1"/>
982 + <toolbarbutton type="menu"
983 + id="PlacesChevron"
984 + class="chevron"
985 + mousethrough="never"
986 + collapsed="true"
987 + tooltiptext="&bookmarksToolbarChevron.tooltip;"
988 + onpopupshowing="document.getElementById('PlacesToolbar')
989 + ._placesView._onChevronPopupShowing(event);">
990 + <menupopup id="PlacesChevronPopup"
991 + placespopup="true"
992 + tooltip="bhTooltip" popupsinherittooltip="true"
993 + context="placesContext"/>
994 + </toolbarbutton>
995 + </hbox>
996 + </hbox>
997 + </toolbaritem>
998 + </toolbar>
999 +
1000 + <!-- This is a shim which will go away ASAP. See bug 749804 for details -->
1001 + <toolbar id="addon-bar" toolbar-delegate="nav-bar" mode="icons" iconsize="small"
1002 + customizable="true">
1003 + <hbox id="addonbar-closebutton"/>
1004 + <statusbar id="status-bar"/>
1005 + </toolbar>
1006 +
1007 + <toolbarpalette id="BrowserToolbarPalette">
1008 +
1009 +# Update primaryToolbarButtons in browser/themes/shared/browser.inc when adding
1010 +# or removing default items with the toolbarbutton-1 class.
1011 +
1012 + <toolbarbutton id="print-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
1013 +#ifdef XP_MACOSX
1014 + command="cmd_print" tooltip="dynamic-shortcut-tooltip"
1015 +#else
1016 + command="cmd_printPreview" tooltiptext="&printButton.tooltip;"
1017 +#endif
1018 + label="&printButton.label;"/>
1019 +
1020 +
1021 + <toolbarbutton id="new-window-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
1022 + label="&newNavigatorCmd.label;"
1023 + command="key_newNavigator"
1024 + tooltip="dynamic-shortcut-tooltip"
1025 + ondrop="newWindowButtonObserver.onDrop(event)"
1026 + ondragover="newWindowButtonObserver.onDragOver(event)"
1027 + ondragenter="newWindowButtonObserver.onDragOver(event)"
1028 + ondragexit="newWindowButtonObserver.onDragExit(event)"/>
1029 +
1030 + <toolbarbutton id="fullscreen-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
1031 + observes="View:FullScreen"
1032 + type="checkbox"
1033 + label="&fullScreenCmd.label;"
1034 + tooltip="dynamic-shortcut-tooltip"/>
1035 +
1036 +#ifdef MOZ_SERVICES_SYNC
1037 + <toolbarbutton id="sync-button"
1038 + class="toolbarbutton-1 chromeclass-toolbar-additional"
1039 + label="&syncToolbarButton.label;"
1040 + oncommand="gSyncUI.handleToolbarButton()"/>
1041 +#endif
1042 +
1043 + <toolbarbutton id="tabview-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
1044 + label="&tabGroupsButton.label;"
1045 + command="Browser:ToggleTabView"
1046 + tooltip="dynamic-shortcut-tooltip"
1047 + observes="tabviewGroupsNumber"/>
1048 + </toolbarpalette>
1049 + </toolbox>
1050 +
1051 + <hbox id="fullscr-toggler" collapsed="true"/>
1052 +
1053 + <deck id="content-deck" flex="1">
1054 + <hbox flex="1" id="browser">
1055 + <vbox id="browser-border-start" hidden="true" layer="true"/>
1056 + <vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
1057 + <sidebarheader id="sidebar-header" align="center">
1058 + <label id="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
1059 + <image id="sidebar-throbber"/>
1060 + <toolbarbutton class="close-icon tabbable" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="toggleSidebar();"/>
1061 + </sidebarheader>
1062 + <browser id="sidebar" flex="1" autoscroll="false" disablehistory="true"
1063 + style="min-width: 14em; width: 18em; max-width: 36em;"/>
1064 + </vbox>
1065 +
1066 + <splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/>
1067 + <vbox id="appcontent" flex="1">
1068 + <tabbrowser id="content"
1069 + flex="1" contenttooltip="aHTMLTooltip"
1070 + tabcontainer="tabbrowser-tabs"
1071 + contentcontextmenu="contentAreaContextMenu"
1072 + autocompletepopup="PopupAutoComplete"
1073 + selectpopup="ContentSelectDropdown"
1074 + onclick="contentAreaClick(event, false);"/>
1075 + <chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/>
1076 + </vbox>
1077 + <splitter id="social-sidebar-splitter"
1078 + class="chromeclass-extrachrome sidebar-splitter"
1079 + observes="socialSidebarBroadcaster"/>
1080 + <vbox id="social-sidebar-box"
1081 + class="chromeclass-extrachrome"
1082 + observes="socialSidebarBroadcaster"
1083 + persist="width">
1084 +
1085 + <sidebarheader id="social-sidebar-header" class="sidebar-header" align="center">
1086 + <image id="social-sidebar-favico"/>
1087 + <label id="social-sidebar-title" class="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
1088 + <toolbarbutton id="social-sidebar-button"
1089 + class="toolbarbutton-1"
1090 + type="menu">
1091 + <menupopup id="social-statusarea-popup" position="after_end">
1092 + <menuitem class="social-toggle-sidebar-menuitem"
1093 + type="checkbox"
1094 + autocheck="false"
1095 + command="Social:ToggleSidebar"
1096 + label="&social.toggleSidebar.label;"
1097 + accesskey="&social.toggleSidebar.accesskey;"/>
1098 + <menuitem class="social-toggle-notifications-menuitem"
1099 + type="checkbox"
1100 + autocheck="false"
1101 + command="Social:ToggleNotifications"
1102 + label="&social.toggleNotifications.label;"
1103 + accesskey="&social.toggleNotifications.accesskey;"/>
1104 + <menuseparator/>
1105 + <menuseparator class="social-provider-menu" hidden="true"/>
1106 + <menuitem class="social-addons-menuitem" command="Social:Addons"
1107 + label="&social.addons.label;"/>
1108 + <menuitem label="&social.learnMore.label;"
1109 + accesskey="&social.learnMore.accesskey;"
1110 + oncommand="SocialUI.showLearnMore();"/>
1111 + </menupopup>
1112 + </toolbarbutton>
1113 + </sidebarheader>
1114 +
1115 + <browser id="social-sidebar-browser"
1116 + type="content"
1117 + context="contentAreaContextMenu"
1118 + disableglobalhistory="true"
1119 + tooltip="aHTMLTooltip"
1120 + popupnotificationanchor="social-sidebar-favico"
1121 + flex="1"
1122 + style="min-width: 14em; width: 18em; max-width: 36em;"/>
1123 + </vbox>
1124 + <vbox id="browser-border-end" hidden="true" layer="true"/>
1125 + </hbox>
1126 +#include ../../components/customizableui/content/customizeMode.inc.xul
1127 + </deck>
1128 +
1129 + <hbox id="full-screen-warning-container" hidden="true" fadeout="true">
1130 + <hbox style="width: 100%;" pack="center"> <!-- Inner hbox needed due to bug 579776. -->
1131 + <vbox id="full-screen-warning-message" align="center">
1132 + <description id="full-screen-domain-text"/>
1133 + <description class="full-screen-description" value="&fullscreenExitHint2.value;"/>
1134 + <vbox id="full-screen-approval-pane" align="center">
1135 + <hbox>
1136 +#ifndef XP_UNIX
1137 + <button label="&fullscreenExitButton.label;"
1138 + oncommand="FullScreen.setFullscreenAllowed(false);"
1139 + class="full-screen-approval-button"/>
1140 + <button label="&fullscreenAllowButton.label;"
1141 + oncommand="FullScreen.setFullscreenAllowed(true);"
1142 + class="full-screen-approval-button"/>
1143 +#else
1144 + <button label="&fullscreenAllowButton.label;"
1145 + oncommand="FullScreen.setFullscreenAllowed(true);"
1146 + class="full-screen-approval-button"/>
1147 + <button label="&fullscreenExitButton.label;"
1148 + oncommand="FullScreen.setFullscreenAllowed(false);"
1149 + class="full-screen-approval-button"/>
1150 +#endif
1151 + </hbox>
1152 + <checkbox id="full-screen-remember-decision"/>
1153 + </vbox>
1154 + </vbox>
1155 + </hbox>
1156 + </hbox>
1157 +
1158 + <vbox id="browser-bottombox" layer="true">
1159 + <notificationbox id="global-notificationbox"/>
1160 + <toolbar id="developer-toolbar"
1161 + hidden="true">
1162 +#ifdef XP_MACOSX
1163 + <toolbarbutton id="developer-toolbar-closebutton"
1164 + class="devtools-closebutton"
1165 + oncommand="DeveloperToolbar.hide();"
1166 + tooltiptext="&devToolbarCloseButton.tooltiptext;"/>
1167 +#endif
1168 + <stack class="gclitoolbar-stack-node" flex="1">
1169 + <textbox class="gclitoolbar-input-node" rows="1"/>
1170 + <hbox class="gclitoolbar-complete-node"/>
1171 + </stack>
1172 + <toolbarbutton id="developer-toolbar-toolbox-button"
1173 + class="developer-toolbar-button"
1174 + observes="devtoolsMenuBroadcaster_DevToolbox"
1175 + tooltiptext="&devToolbarToolsButton.tooltip;"/>
1176 +#ifndef XP_MACOSX
1177 + <toolbarbutton id="developer-toolbar-closebutton"
1178 + class="devtools-closebutton"
1179 + oncommand="DeveloperToolbar.hide();"
1180 + tooltiptext="&devToolbarCloseButton.tooltiptext;"/>
1181 +#endif
1182 + </toolbar>
1183 + </vbox>
1184 +
1185 + <svg:svg height="0">
1186 +#include tab-shape.inc.svg
1187 + <svg:clipPath id="urlbar-back-button-clip-path" clipPathUnits="userSpaceOnUse">
1188 +#ifndef XP_MACOSX
1189 + <svg:path d="m 1,-5 l 0,7.8 c 2.5,3.2 4,6.2 4,10.2 c 0,4 -1.5,7 -4,10 l 0,22l10000,0 l 0,-50 l -10000,0 z"/>
1190 +#else
1191 + <svg:path d="M -11,-5 a 16 16 0 0 1 0,34 l 10000,0 l 0,-34 l -10000,0 z"/>
1192 +#endif
1193 + </svg:clipPath>
1194 + </svg:svg>
1195 +
1196 +</vbox>
1197 +# <iframe id="tab-view"> is dynamically appended as the 2nd child of #tab-view-deck.
1198 +# Introducing the iframe dynamically, as needed, was found to be better than
1199 +# starting with an empty iframe here in browser.xul from a Ts standpoint.
1200 +</deck>
1201 +
1202 +</window>
1203 diff --git a/browser/base/jar.mn b/browser/base/jar.mn
1204 --- a/browser/base/jar.mn
1205 +++ b/browser/base/jar.mn
1206 @@ -65,16 +65,18 @@ browser.jar:
1207 content/browser/aboutRobots-icon.png (content/aboutRobots-icon.png)
1208 content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png)
1209 content/browser/aboutSocialError.xhtml (content/aboutSocialError.xhtml)
1210 content/browser/aboutTabCrashed.js (content/aboutTabCrashed.js)
1211 content/browser/aboutTabCrashed.xhtml (content/aboutTabCrashed.xhtml)
1212 * content/browser/browser.css (content/browser.css)
1213 * content/browser/browser.js (content/browser.js)
1214 * content/browser/browser.xul (content/browser.xul)
1215 +* content/browser/browser-kde.xul (content/browser-kde.xul)
1216 +% override chrome://browser/content/browser.xul chrome://browser/content/browser-kde.xul desktop=kde
1217 * content/browser/browser-tabPreviews.xml (content/browser-tabPreviews.xml)
1218 * content/browser/chatWindow.xul (content/chatWindow.xul)
1219 content/browser/content.js (content/content.js)
1220 content/browser/fonts/ClearSans-Regular.woff (content/fonts/ClearSans-Regular.woff)
1221 content/browser/fonts/FiraSans-Regular.woff (content/fonts/FiraSans-Regular.woff)
1222 content/browser/fonts/FiraSans-Light.woff (content/fonts/FiraSans-Light.woff)
1223 content/browser/newtab/newTab.xul (content/newtab/newTab.xul)
1224 * content/browser/newtab/newTab.js (content/newtab/newTab.js)
1225 diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp
1226 --- a/browser/components/build/nsModule.cpp
1227 +++ b/browser/components/build/nsModule.cpp
1228 @@ -8,17 +8,17 @@
1229 #include "nsBrowserCompsCID.h"
1230 #include "DirectoryProvider.h"
1231
1232 #if defined(XP_WIN)
1233 #include "nsWindowsShellService.h"
1234 #elif defined(XP_MACOSX)
1235 #include "nsMacShellService.h"
1236 #elif defined(MOZ_WIDGET_GTK)
1237 -#include "nsGNOMEShellService.h"
1238 +#include "nsUnixShellService.h"
1239 #endif
1240
1241 #if defined(XP_WIN)
1242 #include "nsIEHistoryEnumerator.h"
1243 #endif
1244
1245 #include "rdf.h"
1246 #include "nsFeedSniffer.h"
1247 @@ -31,18 +31,16 @@ using namespace mozilla::browser;
1248
1249 /////////////////////////////////////////////////////////////////////////////
1250
1251 NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
1252 #if defined(XP_WIN)
1253 NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService)
1254 #elif defined(XP_MACOSX)
1255 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
1256 -#elif defined(MOZ_WIDGET_GTK)
1257 -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
1258 #endif
1259
1260 #if defined(XP_WIN)
1261 NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator)
1262 #endif
1263
1264 NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
1265
1266 @@ -60,17 +58,17 @@ NS_DEFINE_NAMED_CID(NS_WINIEHISTORYENUME
1267 NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
1268 #endif
1269
1270 static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
1271 { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor },
1272 #if defined(XP_WIN)
1273 { &kNS_SHELLSERVICE_CID, false, nullptr, nsWindowsShellServiceConstructor },
1274 #elif defined(MOZ_WIDGET_GTK)
1275 - { &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor },
1276 + { &kNS_SHELLSERVICE_CID, false, nullptr, nsUnixShellServiceConstructor },
1277 #endif
1278 { &kNS_FEEDSNIFFER_CID, false, nullptr, nsFeedSnifferConstructor },
1279 { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create },
1280 #if defined(XP_WIN)
1281 { &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor },
1282 #elif defined(XP_MACOSX)
1283 { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
1284 #endif
1285 diff --git a/browser/components/preferences/advanced.js b/browser/components/preferences/advanced.js
1286 --- a/browser/components/preferences/advanced.js
1287 +++ b/browser/components/preferences/advanced.js
1288 @@ -25,16 +25,22 @@ var gAdvancedPane = {
1289 if (extraArgs && extraArgs["advancedTab"]){
1290 advancedPrefs.selectedTab = document.getElementById(extraArgs["advancedTab"]);
1291 } else {
1292 var preference = document.getElementById("browser.preferences.advanced.selectedTabIndex");
1293 if (preference.value !== null)
1294 advancedPrefs.selectedIndex = preference.value;
1295 }
1296
1297 + var env = Components.classes["@mozilla.org/process/environment;1"]
1298 + .getService(Components.interfaces.nsIEnvironment);
1299 + var kde_session = 0;
1300 + if (env.get('KDE_FULL_SESSION') == "true")
1301 + kde_session = 1;
1302 +
1303 #ifdef HAVE_SHELL_SERVICE
1304 this.updateSetDefaultBrowser();
1305 #ifdef XP_WIN
1306 // In Windows 8 we launch the control panel since it's the only
1307 // way to get all file type association prefs. So we don't know
1308 // when the user will select the default. We refresh here periodically
1309 // in case the default changes. On other Windows OS's defaults can also
1310 // be set while the prefs are open.
1311 @@ -884,14 +890,25 @@ var gAdvancedPane = {
1312 * Set browser as the operating system default browser.
1313 */
1314 setDefaultBrowser: function()
1315 {
1316 let shellSvc = getShellService();
1317 if (!shellSvc)
1318 return;
1319 shellSvc.setDefaultBrowser(true, false);
1320 + if (kde_session == 1) {
1321 + var shellObj = Components.classes["@mozilla.org/file/local;1"]
1322 + .createInstance(Components.interfaces.nsILocalFile);
1323 + shellObj.initWithPath("/usr/bin/kwriteconfig");
1324 + var process = Components.classes["@mozilla.org/process/util;1"]
1325 + .createInstance(Components.interfaces.nsIProcess);
1326 + process.init(shellObj);
1327 + var args = ["--file", "kdeglobals", "--group", "General", "--key",
1328 + "BrowserApplication", "firefox"];
1329 + process.run(false, args, args.length);
1330 + }
1331 let selectedIndex =
1332 shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
1333 document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
1334 }
1335 #endif
1336 };
1337 diff --git a/browser/components/shell/src/Makefile.in b/browser/components/shell/src/Makefile.in
1338 --- a/browser/components/shell/src/Makefile.in
1339 +++ b/browser/components/shell/src/Makefile.in
1340 @@ -2,10 +2,12 @@
1341 # This Source Code Form is subject to the terms of the Mozilla Public
1342 # License, v. 2.0. If a copy of the MPL was not distributed with this
1343 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
1344
1345 include $(topsrcdir)/config/rules.mk
1346
1347 CXXFLAGS += $(TK_CFLAGS)
1348
1349 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
1350 +
1351 clobber::
1352 rm -f $(DIST)/lib/$(LIBRARY_NAME).lib
1353 diff --git a/browser/components/shell/src/moz.build b/browser/components/shell/src/moz.build
1354 --- a/browser/components/shell/src/moz.build
1355 +++ b/browser/components/shell/src/moz.build
1356 @@ -10,16 +10,18 @@ if CONFIG['OS_ARCH'] == 'WINNT':
1357 ]
1358 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
1359 SOURCES += [
1360 'nsMacShellService.cpp',
1361 ]
1362 elif CONFIG['MOZ_WIDGET_GTK']:
1363 SOURCES += [
1364 'nsGNOMEShellService.cpp',
1365 + 'nsKDEShellService.cpp',
1366 + 'nsUnixShellService.cpp',
1367 ]
1368
1369 if SOURCES:
1370 FINAL_LIBRARY = 'browsercomps'
1371
1372 EXTRA_COMPONENTS += [
1373 'nsSetDefaultBrowser.js',
1374 'nsSetDefaultBrowser.manifest',
1375 diff --git a/browser/components/shell/src/nsKDEShellService.cpp b/browser/components/shell/src/nsKDEShellService.cpp
1376 new file mode 100644
1377 --- /dev/null
1378 +++ b/browser/components/shell/src/nsKDEShellService.cpp
1379 @@ -0,0 +1,238 @@
1380 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
1381 +/* This Source Code Form is subject to the terms of the Mozilla Public
1382 + * License, v. 2.0. If a copy of the MPL was not distributed with this
1383 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
1384 +
1385 +#include "mozilla/ArrayUtils.h"
1386 +
1387 +#include "nsCOMPtr.h"
1388 +#include "nsKDEShellService.h"
1389 +#include "nsShellService.h"
1390 +#include "nsKDEUtils.h"
1391 +#include "nsIPrefService.h"
1392 +#include "nsIProcess.h"
1393 +#include "nsIFile.h"
1394 +#include "nsServiceManagerUtils.h"
1395 +#include "nsComponentManagerUtils.h"
1396 +#include "nsIMutableArray.h"
1397 +#include "nsISupportsPrimitives.h"
1398 +#include "nsArrayUtils.h"
1399 +
1400 +using namespace mozilla;
1401 +
1402 +nsresult
1403 +nsKDEShellService::Init()
1404 +{
1405 + if( !nsKDEUtils::kdeSupport())
1406 + return NS_ERROR_NOT_AVAILABLE;
1407 + return NS_OK;
1408 +}
1409 +
1410 +NS_IMPL_ISUPPORTS(nsKDEShellService, nsIShellService)
1411 +
1412 +NS_IMETHODIMP
1413 +nsKDEShellService::IsDefaultBrowser(bool aStartupCheck,
1414 + bool aForAllTypes,
1415 + bool* aIsDefaultBrowser)
1416 +{
1417 + *aIsDefaultBrowser = false;
1418 + if (aStartupCheck)
1419 + mCheckedThisSession = true;
1420 +
1421 + nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
1422 + if (!command)
1423 + return NS_ERROR_FAILURE;
1424 +
1425 + nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
1426 + if (!str)
1427 + return NS_ERROR_FAILURE;
1428 +
1429 + str->SetData( NS_LITERAL_CSTRING( "ISDEFAULTBROWSER" ));
1430 + command->AppendElement( str, false );
1431 +
1432 + if( nsKDEUtils::command( command ))
1433 + *aIsDefaultBrowser = true;
1434 + return NS_OK;
1435 +}
1436 +
1437 +NS_IMETHODIMP
1438 +nsKDEShellService::SetDefaultBrowser(bool aClaimAllTypes,
1439 + bool aForAllUsers)
1440 +{
1441 + nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
1442 + if (!command)
1443 + return NS_ERROR_FAILURE;
1444 +
1445 + nsCOMPtr<nsISupportsCString> cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
1446 + nsCOMPtr<nsISupportsCString> paramstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
1447 + if (!cmdstr || !paramstr)
1448 + return NS_ERROR_FAILURE;
1449 +
1450 + cmdstr->SetData( NS_LITERAL_CSTRING( "SETDEFAULTBROWSER" ));
1451 + command->AppendElement( cmdstr, false );
1452 +
1453 + paramstr->SetData( aClaimAllTypes ? NS_LITERAL_CSTRING( "ALLTYPES" ) : NS_LITERAL_CSTRING( "NORMAL" ));
1454 + command->AppendElement( paramstr, false );
1455 +
1456 + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
1457 +}
1458 +
1459 +NS_IMETHODIMP
1460 +nsKDEShellService::GetShouldCheckDefaultBrowser(bool* aResult)
1461 +{
1462 + // If we've already checked, the browser has been started and this is a
1463 + // new window open, and we don't want to check again.
1464 + if (mCheckedThisSession) {
1465 + *aResult = false;
1466 + return NS_OK;
1467 + }
1468 +
1469 + nsCOMPtr<nsIPrefBranch> prefs;
1470 + nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
1471 + if (pserve)
1472 + pserve->GetBranch("", getter_AddRefs(prefs));
1473 +
1474 + if (prefs)
1475 + prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult);
1476 +
1477 + return NS_OK;
1478 +}
1479 +
1480 +NS_IMETHODIMP
1481 +nsKDEShellService::SetShouldCheckDefaultBrowser(bool aShouldCheck)
1482 +{
1483 + nsCOMPtr<nsIPrefBranch> prefs;
1484 + nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
1485 + if (pserve)
1486 + pserve->GetBranch("", getter_AddRefs(prefs));
1487 +
1488 + if (prefs)
1489 + prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck);
1490 +
1491 + return NS_OK;
1492 +}
1493 +
1494 +NS_IMETHODIMP
1495 +nsKDEShellService::GetCanSetDesktopBackground(bool* aResult)
1496 +{
1497 + *aResult = true;
1498 + return NS_OK;
1499 +}
1500 +
1501 +NS_IMETHODIMP
1502 +nsKDEShellService::SetDesktopBackground(nsIDOMElement* aElement,
1503 + PRInt32 aPosition)
1504 +{
1505 + return NS_ERROR_NOT_IMPLEMENTED;
1506 +}
1507 +
1508 +NS_IMETHODIMP
1509 +nsKDEShellService::GetDesktopBackgroundColor(PRUint32 *aColor)
1510 +{
1511 + return NS_ERROR_NOT_IMPLEMENTED;
1512 +}
1513 +
1514 +NS_IMETHODIMP
1515 +nsKDEShellService::SetDesktopBackgroundColor(PRUint32 aColor)
1516 +{
1517 + return NS_ERROR_NOT_IMPLEMENTED;
1518 +}
1519 +
1520 +NS_IMETHODIMP
1521 +nsKDEShellService::OpenApplication(PRInt32 aApplication)
1522 +{
1523 + nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
1524 + if (!command)
1525 + return NS_ERROR_FAILURE;
1526 +
1527 + nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
1528 + if (!str)
1529 + return NS_ERROR_FAILURE;
1530 +
1531 + if( aApplication == APPLICATION_MAIL )
1532 + str->SetData( NS_LITERAL_CSTRING( "OPENMAIL" ));
1533 + else if( aApplication == APPLICATION_NEWS )
1534 + str->SetData( NS_LITERAL_CSTRING( "OPENNEWS" ));
1535 + else
1536 + return NS_ERROR_NOT_IMPLEMENTED;
1537 +
1538 + command->AppendElement( str, false );
1539 + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
1540 +}
1541 +
1542 +NS_IMETHODIMP
1543 +nsKDEShellService::OpenApplicationWithURI(nsIFile* aApplication, const nsACString& aURI)
1544 +{
1545 + nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
1546 + if (!command)
1547 + return NS_ERROR_FAILURE;
1548 +
1549 + nsCOMPtr<nsISupportsCString> cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
1550 + nsCOMPtr<nsISupportsCString> appstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
1551 + nsCOMPtr<nsISupportsCString> uristr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
1552 + if (!cmdstr || !appstr || !uristr)
1553 + return NS_ERROR_FAILURE;
1554 +
1555 + cmdstr->SetData( NS_LITERAL_CSTRING( "RUN" ));
1556 + command->AppendElement( cmdstr, false );
1557 + nsAutoCString app;
1558 + nsresult rv = aApplication->GetNativePath( app );
1559 + NS_ENSURE_SUCCESS( rv, rv );
1560 + appstr->SetData( app );
1561 + command->AppendElement( appstr, false );
1562 + uristr->SetData( aURI );
1563 + command->AppendElement( uristr, false );
1564 + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
1565 +}
1566 +
1567 +NS_IMETHODIMP
1568 +nsKDEShellService::GetDefaultFeedReader(nsIFile** _retval)
1569 +{
1570 + *_retval = nullptr;
1571 +
1572 + nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
1573 + if( !command )
1574 + return NS_ERROR_FAILURE;
1575 +
1576 + nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
1577 + if( !str )
1578 + return NS_ERROR_FAILURE;
1579 +
1580 + str->SetData( NS_LITERAL_CSTRING( "GETDEFAULTFEEDREADER" ));
1581 + command->AppendElement( str, false );
1582 +
1583 + nsCOMPtr<nsIArray> output;
1584 + if( !nsKDEUtils::command( command, getter_AddRefs( output ) ) )
1585 + return NS_ERROR_FAILURE;
1586 +
1587 + PRUint32 length;
1588 + output->GetLength( &length );
1589 + if( length != 1 )
1590 + return NS_ERROR_FAILURE;
1591 +
1592 + nsCOMPtr<nsISupportsCString> resstr = do_QueryElementAt( output, 0 );
1593 + if( !resstr )
1594 + return NS_ERROR_FAILURE;
1595 +
1596 + nsAutoCString path;
1597 + resstr->GetData( path );
1598 + if (path.IsEmpty())
1599 + return NS_ERROR_FAILURE;
1600 +
1601 + nsresult rv;
1602 + nsCOMPtr<nsIFile> defaultReader =
1603 + do_CreateInstance("@mozilla.org/file/local;1", &rv);
1604 + NS_ENSURE_SUCCESS(rv, rv);
1605 +
1606 + rv = defaultReader->InitWithNativePath(path);
1607 + NS_ENSURE_SUCCESS(rv, rv);
1608 +
1609 + bool exists;
1610 + rv = defaultReader->Exists(&exists);
1611 + NS_ENSURE_SUCCESS(rv, rv);
1612 + if (!exists)
1613 + return NS_ERROR_FAILURE;
1614 +
1615 + NS_ADDREF(*_retval = defaultReader);
1616 + return NS_OK;
1617 +}
1618 diff --git a/browser/components/shell/src/nsKDEShellService.h b/browser/components/shell/src/nsKDEShellService.h
1619 new file mode 100644
1620 --- /dev/null
1621 +++ b/browser/components/shell/src/nsKDEShellService.h
1622 @@ -0,0 +1,60 @@
1623 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
1624 +/* ***** BEGIN LICENSE BLOCK *****
1625 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1626 + *
1627 + * The contents of this file are subject to the Mozilla Public License Version
1628 + * 1.1 (the "License"); you may not use this file except in compliance with
1629 + * the License. You may obtain a copy of the License at
1630 + * http://www.mozilla.org/MPL/
1631 + *
1632 + * Software distributed under the License is distributed on an "AS IS" basis,
1633 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1634 + * for the specific language governing rights and limitations under the
1635 + * License.
1636 + *
1637 + * The Original Code is Shell Service.
1638 + *
1639 + * The Initial Developer of the Original Code is mozilla.org.
1640 + * Portions created by the Initial Developer are Copyright (C) 2004
1641 + * the Initial Developer. All Rights Reserved.
1642 + *
1643 + * Contributor(s):
1644 + *
1645 + * Alternatively, the contents of this file may be used under the terms of
1646 + * either the GNU General Public License Version 2 or later (the "GPL"), or
1647 + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1648 + * in which case the provisions of the GPL or the LGPL are applicable instead
1649 + * of those above. If you wish to allow use of your version of this file only
1650 + * under the terms of either the GPL or the LGPL, and not to allow others to
1651 + * use your version of this file under the terms of the MPL, indicate your
1652 + * decision by deleting the provisions above and replace them with the notice
1653 + * and other provisions required by the GPL or the LGPL. If you do not delete
1654 + * the provisions above, a recipient may use your version of this file under
1655 + * the terms of any one of the MPL, the GPL or the LGPL.
1656 + *
1657 + * ***** END LICENSE BLOCK ***** */
1658 +
1659 +#ifndef nskdeshellservice_h____
1660 +#define nskdeshellservice_h____
1661 +
1662 +#include "nsIShellService.h"
1663 +#include "nsStringAPI.h"
1664 +#include "mozilla/Attributes.h"
1665 +
1666 +class nsKDEShellService MOZ_FINAL : public nsIShellService
1667 +{
1668 +public:
1669 + nsKDEShellService() : mCheckedThisSession(false) { }
1670 +
1671 + NS_DECL_ISUPPORTS
1672 + NS_DECL_NSISHELLSERVICE
1673 +
1674 + nsresult Init() NS_HIDDEN;
1675 +
1676 +private:
1677 + ~nsKDEShellService() {}
1678 +
1679 + bool mCheckedThisSession;
1680 +};
1681 +
1682 +#endif // nskdeshellservice_h____
1683 diff --git a/browser/components/shell/src/nsUnixShellService.cpp b/browser/components/shell/src/nsUnixShellService.cpp
1684 new file mode 100644
1685 --- /dev/null
1686 +++ b/browser/components/shell/src/nsUnixShellService.cpp
1687 @@ -0,0 +1,52 @@
1688 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
1689 +/* ***** BEGIN LICENSE BLOCK *****
1690 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1691 + *
1692 + * The contents of this file are subject to the Mozilla Public License Version
1693 + * 1.1 (the "License"); you may not use this file except in compliance with
1694 + * the License. You may obtain a copy of the License at
1695 + * http://www.mozilla.org/MPL/
1696 + *
1697 + * Software distributed under the License is distributed on an "AS IS" basis,
1698 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1699 + * for the specific language governing rights and limitations under the
1700 + * License.
1701 + *
1702 + * The Original Code is Shell Service.
1703 + *
1704 + * The Initial Developer of the Original Code is mozilla.org.
1705 + * Portions created by the Initial Developer are Copyright (C) 2004
1706 + * the Initial Developer. All Rights Reserved.
1707 + *
1708 + * Contributor(s):
1709 + *
1710 + * Alternatively, the contents of this file may be used under the terms of
1711 + * either the GNU General Public License Version 2 or later (the "GPL"), or
1712 + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1713 + * in which case the provisions of the GPL or the LGPL are applicable instead
1714 + * of those above. If you wish to allow use of your version of this file only
1715 + * under the terms of either the GPL or the LGPL, and not to allow others to
1716 + * use your version of this file under the terms of the MPL, indicate your
1717 + * decision by deleting the provisions above and replace them with the notice
1718 + * and other provisions required by the GPL or the LGPL. If you do not delete
1719 + * the provisions above, a recipient may use your version of this file under
1720 + * the terms of any one of the MPL, the GPL or the LGPL.
1721 + *
1722 + * ***** END LICENSE BLOCK ***** */
1723 +
1724 +#include "nsUnixShellService.h"
1725 +#include "nsGNOMEShellService.h"
1726 +#include "nsKDEShellService.h"
1727 +#include "nsKDEUtils.h"
1728 +#include "mozilla/ModuleUtils.h"
1729 +
1730 +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
1731 +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsKDEShellService, Init)
1732 +
1733 +NS_METHOD
1734 +nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult)
1735 +{
1736 + if( nsKDEUtils::kdeSupport())
1737 + return nsKDEShellServiceConstructor( aOuter, aIID, aResult );
1738 + return nsGNOMEShellServiceConstructor( aOuter, aIID, aResult );
1739 +}
1740 diff --git a/browser/components/shell/src/nsUnixShellService.h b/browser/components/shell/src/nsUnixShellService.h
1741 new file mode 100644
1742 --- /dev/null
1743 +++ b/browser/components/shell/src/nsUnixShellService.h
1744 @@ -0,0 +1,45 @@
1745 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
1746 +/* ***** BEGIN LICENSE BLOCK *****
1747 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1748 + *
1749 + * The contents of this file are subject to the Mozilla Public License Version
1750 + * 1.1 (the "License"); you may not use this file except in compliance with
1751 + * the License. You may obtain a copy of the License at
1752 + * http://www.mozilla.org/MPL/
1753 + *
1754 + * Software distributed under the License is distributed on an "AS IS" basis,
1755 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1756 + * for the specific language governing rights and limitations under the
1757 + * License.
1758 + *
1759 + * The Original Code is Shell Service.
1760 + *
1761 + * The Initial Developer of the Original Code is mozilla.org.
1762 + * Portions created by the Initial Developer are Copyright (C) 2004
1763 + * the Initial Developer. All Rights Reserved.
1764 + *
1765 + * Contributor(s):
1766 + *
1767 + * Alternatively, the contents of this file may be used under the terms of
1768 + * either the GNU General Public License Version 2 or later (the "GPL"), or
1769 + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1770 + * in which case the provisions of the GPL or the LGPL are applicable instead
1771 + * of those above. If you wish to allow use of your version of this file only
1772 + * under the terms of either the GPL or the LGPL, and not to allow others to
1773 + * use your version of this file under the terms of the MPL, indicate your
1774 + * decision by deleting the provisions above and replace them with the notice
1775 + * and other provisions required by the GPL or the LGPL. If you do not delete
1776 + * the provisions above, a recipient may use your version of this file under
1777 + * the terms of any one of the MPL, the GPL or the LGPL.
1778 + *
1779 + * ***** END LICENSE BLOCK ***** */
1780 +
1781 +#ifndef nsunixshellservice_h____
1782 +#define nsunixshellservice_h____
1783 +
1784 +#include "nsIShellService.h"
1785 +
1786 +NS_METHOD
1787 +nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult);
1788 +
1789 +#endif // nsunixshellservice_h____
1790 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
1791 --- a/browser/installer/package-manifest.in
1792 +++ b/browser/installer/package-manifest.in
1793 @@ -643,19 +643,21 @@
1794 @BINPATH@/defaults/autoconfig/prefcalls.js
1795 @BINPATH@/browser/defaults/profile/prefs.js
1796
1797 #ifndef LIBXUL_SDK
1798 ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
1799 ; Technically this is an app pref file, but we are keeping it in the original
1800 ; gre location for now.
1801 @BINPATH@/defaults/pref/channel-prefs.js
1802 +@BINPATH@/defaults/pref/kde.js
1803 #else
1804 ; For Fx-on-xr, channel-prefs lives with the app preferences. (Bug 762588)
1805 @BINPATH@/@PREF_DIR@/channel-prefs.js
1806 +@BINPATH@/@PREF_DIR@/kde.js
1807 #endif
1808
1809 ; Services (gre) prefs
1810 #ifdef MOZ_SERVICES_NOTIFICATIONS
1811 @BINPATH@/defaults/pref/services-notifications.js
1812 #endif
1813 #ifdef MOZ_SERVICES_SYNC
1814 @BINPATH@/defaults/pref/services-sync.js

  ViewVC Help
Powered by ViewVC 1.1.30