updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / firefox-kde-opensuse / firefox-kde.patch
blob335d39f31a9f6ca89281f8462cd17db03268af24
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,1054 @@
6 +#filter substitution
7 +<?xml version="1.0"?>
8 +# -*- Mode: HTML -*-
9 +#
10 +# ***** BEGIN LICENSE BLOCK *****
11 +# Version: MPL 1.1/GPL 2.0/LGPL 2.1
13 +# The contents of this file are subject to the Mozilla Public License Version
14 +# 1.1 (the "License"); you may not use this file except in compliance with
15 +# the License. You may obtain a copy of the License at
16 +# http://www.mozilla.org/MPL/
18 +# Software distributed under the License is distributed on an "AS IS" basis,
19 +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
20 +# for the specific language governing rights and limitations under the
21 +# License.
23 +# The Original Code is Mozilla Communicator client code, released
24 +# March 31, 1998.
26 +# The Initial Developer of the Original Code is
27 +# Netscape Communications Corporation.
28 +# Portions created by the Initial Developer are Copyright (C) 1998-2000
29 +# the Initial Developer. All Rights Reserved.
31 +# Contributor(s):
32 +# Blake Ross <blake@cs.stanford.edu>
33 +# David Hyatt <hyatt@mozilla.org>
34 +# Joe Hewitt <hewitt@netscape.com>
35 +# Pierre Chanial <chanial@noos.fr>
36 +# Dean Tessman <dean_tessman@hotmail.com>
37 +# Johnathan Nightingale <johnath@mozilla.com>
38 +# Dão Gottwald <dao@mozilla.com>
39 +# Ehsan Akhgari <ehsan.akhgari@gmail.com>
40 +# Robert Strong <robert.bugzilla@gmail.com>
41 +# Rob Campbell <rcampbell@mozilla.com>
42 +# Patrick Walton <pcwalton@mozilla.com>
43 +# David Dahl <ddahl@mozilla.com>
44 +# Frank Yan <fyan@mozilla.com>
46 +# Alternatively, the contents of this file may be used under the terms of
47 +# either the GNU General Public License Version 2 or later (the "GPL"), or
48 +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
49 +# in which case the provisions of the GPL or the LGPL are applicable instead
50 +# of those above. If you wish to allow use of your version of this file only
51 +# under the terms of either the GPL or the LGPL, and not to allow others to
52 +# use your version of this file under the terms of the MPL, indicate your
53 +# decision by deleting the provisions above and replace them with the notice
54 +# and other provisions required by the GPL or the LGPL. If you do not delete
55 +# the provisions above, a recipient may use your version of this file under
56 +# the terms of any one of the MPL, the GPL or the LGPL.
58 +# ***** END LICENSE BLOCK *****
60 +<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
61 +<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
62 +<?xml-stylesheet href="chrome://global/skin/webConsole.css" type="text/css"?>
63 +<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
65 +<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
66 +<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
67 +<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
69 +# All DTD information is stored in a separate file so that it can be shared by
70 +# hiddenWindow.xul.
71 +#include browser-doctype.inc
73 +<window id="main-window"
74 + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
75 + xmlns:svg="http://www.w3.org/2000/svg"
76 + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
77 + onload="BrowserStartup()" onunload="BrowserShutdown()" onclose="return WindowIsClosing();"
78 + title="&mainWindow.title;@PRE_RELEASE_SUFFIX@"
79 + title_normal="&mainWindow.title;@PRE_RELEASE_SUFFIX@"
80 +#ifdef XP_MACOSX
81 + title_privatebrowsing="&mainWindow.title;@PRE_RELEASE_SUFFIX@&mainWindow.titlemodifiermenuseparator;&mainWindow.titlePrivateBrowsingSuffix;"
82 + titledefault="&mainWindow.title;@PRE_RELEASE_SUFFIX@"
83 + titlemodifier=""
84 + titlemodifier_normal=""
85 + titlemodifier_privatebrowsing="&mainWindow.titlePrivateBrowsingSuffix;"
86 +#else
87 + title_privatebrowsing="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@ &mainWindow.titlePrivateBrowsingSuffix;"
88 + titlemodifier="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@"
89 + titlemodifier_normal="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@"
90 + titlemodifier_privatebrowsing="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@ &mainWindow.titlePrivateBrowsingSuffix;"
91 +#endif
92 + titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
93 + lightweightthemes="true"
94 + lightweightthemesfooter="browser-bottombox"
95 + windowtype="navigator:browser"
96 + screenX="4" screenY="4"
97 + browsingmode="normal"
98 + persist="screenX screenY width height sizemode">
100 +# All JS files which are not content (only) dependent that browser.xul
101 +# wishes to include *must* go into the global-scripts.inc file
102 +# so that they can be shared by macBrowserOverlay.xul.
103 +#include global-scripts.inc
104 +<script type="application/javascript" src="chrome://browser/content/nsContextMenu.js"/>
106 +#ifdef MOZ_SAFE_BROWSING
107 +<script type="application/javascript" src="chrome://browser/content/safebrowsing/sb-loader.js"/>
108 +#endif
109 +<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
111 +<script type="application/javascript" src="chrome://browser/content/places/editBookmarkOverlay.js"/>
113 +# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the
114 +# browser-sets.inc file for sharing with hiddenWindow.xul.
115 +#define FULL_BROWSER_WINDOW
116 +#include browser-sets.inc
117 +#undef FULL_BROWSER_WINDOW
119 + <popupset id="mainPopupSet">
120 + <menupopup id="tabContextMenu"
121 + onpopupshowing="if (event.target == this) TabContextMenu.updateContextMenu(this);"
122 + onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;">
123 + <menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;"
124 + oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/>
125 + <menuseparator/>
126 + <menuitem id="context_pinTab" label="&pinAppTab.label;"
127 + accesskey="&pinAppTab.accesskey;"
128 + oncommand="gBrowser.pinTab(TabContextMenu.contextTab);"/>
129 + <menuitem id="context_unpinTab" label="&unpinAppTab.label;" hidden="true"
130 + accesskey="&unpinAppTab.accesskey;"
131 + oncommand="gBrowser.unpinTab(TabContextMenu.contextTab);"/>
132 + <menu id="context_tabViewMenu" label="&moveToGroup.label;"
133 + accesskey="&moveToGroup.accesskey;">
134 + <menupopup id="context_tabViewMenuPopup"
135 + onpopupshowing="if (event.target == this) TabView.moveToGroupPopupShowing(event);">
136 + <menuseparator id="context_tabViewNamedGroups" hidden="true"/>
137 + <menuitem id="context_tabViewNewGroup" label="&moveToNewGroup.label;"
138 + oncommand="TabView.moveTabTo(TabContextMenu.contextTab, null);"/>
139 + </menupopup>
140 + </menu>
141 + <menuitem id="context_openTabInWindow" label="&moveToNewWindow.label;"
142 + accesskey="&moveToNewWindow.accesskey;"
143 + tbattr="tabbrowser-multiple"
144 + oncommand="gBrowser.replaceTabWithWindow(TabContextMenu.contextTab);"/>
145 + <menuseparator/>
146 + <menuitem id="context_reloadAllTabs" label="&reloadAllTabs.label;" accesskey="&reloadAllTabs.accesskey;"
147 + tbattr="tabbrowser-multiple-visible"
148 + oncommand="gBrowser.reloadAllTabs();"/>
149 + <menuitem id="context_bookmarkAllTabs"
150 + label="&bookmarkAllTabs.label;"
151 + accesskey="&bookmarkAllTabs.accesskey;"
152 + command="Browser:BookmarkAllTabs"/>
153 + <menuitem id="context_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;"
154 + oncommand="gBrowser.removeAllTabsBut(TabContextMenu.contextTab);"/>
155 + <menuseparator/>
156 + <menuitem id="context_undoCloseTab"
157 + label="&undoCloseTab.label;"
158 + accesskey="&undoCloseTab.accesskey;"
159 + observes="History:UndoCloseTab"/>
160 + <menuitem id="context_closeTab" label="&closeTab.label;" accesskey="&closeTab.accesskey;"
161 + oncommand="gBrowser.removeTab(TabContextMenu.contextTab, { animate: true });"/>
162 + </menupopup>
164 + <!-- bug 415444/582485: event.stopPropagation is here for the cloned version
165 + of this menupopup -->
166 + <menupopup id="backForwardMenu"
167 + onpopupshowing="return FillHistoryMenu(event.target);"
168 + oncommand="gotoHistoryIndex(event); event.stopPropagation();"
169 + onclick="checkForMiddleClick(this, event);"/>
170 + <tooltip id="aHTMLTooltip" onpopupshowing="return FillInHTMLTooltip(document.tooltipNode);"/>
172 + <!-- for search and content formfill/pw manager -->
173 + <panel type="autocomplete" id="PopupAutoComplete" noautofocus="true" hidden="true"/>
175 + <!-- for url bar autocomplete -->
176 + <panel type="autocomplete-richlistbox" id="PopupAutoCompleteRichResult" noautofocus="true" hidden="true"/>
178 + <!-- for invalid form error message -->
179 + <panel id="invalid-form-popup" type="arrow" orient="vertical" noautofocus="true" hidden="true" level="parent">
180 + <description/>
181 + </panel>
183 + <panel id="editBookmarkPanel"
184 + type="arrow"
185 + footertype="promobox"
186 + orient="vertical"
187 + ignorekeys="true"
188 + hidden="true"
189 + onpopupshown="StarUI.panelShown(event);"
190 + aria-labelledby="editBookmarkPanelTitle">
191 + <row id="editBookmarkPanelHeader" align="center" hidden="true">
192 + <vbox align="center">
193 + <image id="editBookmarkPanelStarIcon"/>
194 + </vbox>
195 + <vbox>
196 + <label id="editBookmarkPanelTitle"/>
197 + <description id="editBookmarkPanelDescription"/>
198 + <hbox>
199 + <button id="editBookmarkPanelRemoveButton"
200 + class="editBookmarkPanelHeaderButton"
201 + oncommand="StarUI.removeBookmarkButtonCommand();"
202 + accesskey="&editBookmark.removeBookmark.accessKey;"/>
203 + </hbox>
204 + </vbox>
205 + </row>
206 + <vbox id="editBookmarkPanelContent" flex="1" hidden="true"/>
207 + <hbox id="editBookmarkPanelBottomButtons" pack="end">
208 +#ifdef XP_UNIX
209 + <button id="editBookmarkPanelDoneButton"
210 + class="editBookmarkPanelBottomButton"
211 + label="&editBookmark.done.label;"
212 + default="true"
213 + oncommand="StarUI.panel.hidePopup();"/>
214 + <button id="editBookmarkPanelDeleteButton"
215 + class="editBookmarkPanelBottomButton"
216 + label="&editBookmark.cancel.label;"
217 + oncommand="StarUI.cancelButtonOnCommand();"/>
218 +#else
219 + <button id="editBookmarkPanelDeleteButton"
220 + class="editBookmarkPanelBottomButton"
221 + label="&editBookmark.cancel.label;"
222 + oncommand="StarUI.cancelButtonOnCommand();"/>
223 + <button id="editBookmarkPanelDoneButton"
224 + class="editBookmarkPanelBottomButton"
225 + label="&editBookmark.done.label;"
226 + default="true"
227 + oncommand="StarUI.panel.hidePopup();"/>
228 +#endif
229 + </hbox>
230 + </panel>
232 + <panel id="inspector-tree-panel"
233 + orient="vertical"
234 + hidden="true"
235 + ignorekeys="true"
236 + noautofocus="true"
237 + noautohide="true"
238 + titlebar="normal"
239 + close="true"
240 + label="&inspectPanelTitle.label;">
241 + <hbox id="tree-panel-resizer-box" align="end">
242 + <spacer flex="1" />
243 + <resizer dir="bottomend" />
244 + </hbox>
245 + </panel>
247 + <menupopup id="toolbar-context-menu"
248 + onpopupshowing="onViewToolbarsPopupShowing(event);">
249 + <menuseparator/>
250 + <menuitem command="cmd_ToggleTabsOnTop"
251 + type="checkbox"
252 + label="&viewTabsOnTop.label;"
253 + accesskey="&viewTabsOnTop.accesskey;"/>
254 + <menuseparator/>
255 + <menuitem command="cmd_CustomizeToolbars"
256 + label="&viewCustomizeToolbar.label;"
257 + accesskey="&viewCustomizeToolbar.accesskey;"/>
258 + </menupopup>
260 + <menupopup id="blockedPopupOptions"
261 + onpopupshowing="gPopupBlockerObserver.fillPopupList(event);"
262 + onpopuphiding="gPopupBlockerObserver.onPopupHiding(event);">
263 + <menuitem observes="blockedPopupAllowSite"/>
264 + <menuitem observes="blockedPopupEditSettings"/>
265 + <menuitem observes="blockedPopupDontShowMessage"/>
266 + <menuseparator observes="blockedPopupsSeparator"/>
267 + </menupopup>
269 + <menupopup id="autohide-context"
270 + onpopupshowing="FullScreen.getAutohide(this.firstChild);">
271 + <menuitem type="checkbox" label="&fullScreenAutohide.label;"
272 + accesskey="&fullScreenAutohide.accesskey;"
273 + oncommand="FullScreen.setAutohide();"/>
274 + <menuseparator/>
275 + <menuitem label="&fullScreenExit.label;"
276 + accesskey="&fullScreenExit.accesskey;"
277 + oncommand="BrowserFullScreen();"/>
278 + </menupopup>
280 + <menupopup id="contentAreaContextMenu" pagemenu="start"
281 + onpopupshowing="if (event.target != this)
282 + return true;
283 + gContextMenu = new nsContextMenu(this, gBrowser, event.shiftKey);
284 + if (gContextMenu.shouldDisplay)
285 + updateEditUIVisibility();
286 + return gContextMenu.shouldDisplay;"
287 + onpopuphiding="if (event.target == this) { gContextMenu = null; updateEditUIVisibility(); }">
288 +#include browser-context.inc
289 + </menupopup>
291 + <menupopup id="placesContext"/>
293 + <panel id="notification-popup"
294 + type="arrow"
295 + footertype="promobox"
296 + position="after_start"
297 + hidden="true"
298 + orient="vertical"
299 + role="alert"/>
301 + <!-- Popup for site identity information -->
302 + <panel id="identity-popup"
303 + type="arrow"
304 + hidden="true"
305 + noautofocus="true"
306 + onpopupshown="document.getElementById('identity-popup-more-info-button').focus();"
307 + level="top">
308 + <hbox id="identity-popup-container" align="top">
309 + <image id="identity-popup-icon"/>
310 + <vbox id="identity-popup-content-box">
311 + <label id="identity-popup-connectedToLabel"
312 + class="identity-popup-label"
313 + value="&identity.connectedTo;"/>
314 + <label id="identity-popup-connectedToLabel2"
315 + class="identity-popup-label"
316 + value="&identity.unverifiedsite2;"/>
317 + <description id="identity-popup-content-host"
318 + class="identity-popup-description"/>
319 + <label id="identity-popup-runByLabel"
320 + class="identity-popup-label"
321 + value="&identity.runBy;"/>
322 + <description id="identity-popup-content-owner"
323 + class="identity-popup-description"/>
324 + <description id="identity-popup-content-supplemental"
325 + class="identity-popup-description"/>
326 + <description id="identity-popup-content-verifier"
327 + class="identity-popup-description"/>
328 + <hbox id="identity-popup-encryption" flex="1">
329 + <vbox>
330 + <image id="identity-popup-encryption-icon"/>
331 + </vbox>
332 + <description id="identity-popup-encryption-label" flex="1"
333 + class="identity-popup-description"/>
334 + </hbox>
335 + <!-- Footer button to open security page info -->
336 + <hbox id="identity-popup-button-container" pack="end">
337 + <button id="identity-popup-more-info-button"
338 + label="&identity.moreInfoLinkText;"
339 + onblur="gIdentityHandler.hideIdentityPopup();"
340 + oncommand="gIdentityHandler.handleMoreInfoClick(event);"/>
341 + </hbox>
342 + </vbox>
343 + </hbox>
344 + </panel>
346 + <tooltip id="urlTooltip">
347 + <label crop="center" flex="1" class="tooltip-label"/>
348 + </tooltip>
350 + <panel id="ctrlTab-panel" class="KUI-panel" hidden="true" norestorefocus="true" level="top">
351 + <hbox>
352 + <button class="ctrlTab-preview" flex="1"/>
353 + <button class="ctrlTab-preview" flex="1"/>
354 + <button class="ctrlTab-preview" flex="1"/>
355 + <button class="ctrlTab-preview" flex="1"/>
356 + <button class="ctrlTab-preview" flex="1"/>
357 + <button class="ctrlTab-preview" flex="1"/>
358 + </hbox>
359 + <hbox pack="center">
360 + <button id="ctrlTab-showAll" class="ctrlTab-preview" noicon="true"/>
361 + </hbox>
362 + </panel>
364 + <panel id="allTabs-panel" hidden="true" norestorefocus="true" ignorekeys="true"
365 + onmouseover="allTabs._updateTabCloseButton(event);">
366 + <hbox id="allTabs-meta" align="center">
367 + <spacer flex="1"/>
368 + <textbox id="allTabs-filter"
369 + tooltiptext="&allTabs.filter.emptyText;"
370 + type="search"
371 + oncommand="allTabs.filter();"/>
372 + <spacer flex="1"/>
373 + <toolbarbutton class="KUI-panel-closebutton"
374 + oncommand="allTabs.close()"
375 + tooltiptext="&closeCmd.label;"/>
376 + </hbox>
377 + <stack id="allTabs-stack">
378 + <vbox id="allTabs-container"><hbox/></vbox>
379 + <toolbarbutton id="allTabs-tab-close-button"
380 + class="tabs-closebutton"
381 + oncommand="allTabs.closeTab(event);"
382 + tooltiptext="&closeCmd.label;"
383 + style="visibility:hidden"/>
384 + </stack>
385 + </panel>
387 + <!-- Bookmarks and history tooltip -->
388 + <tooltip id="bhTooltip"/>
390 + <panel id="customizeToolbarSheetPopup"
391 + noautohide="true">
392 + <iframe id="customizeToolbarSheetIFrame"
393 + style="&dialog.style;"
394 + hidden="true"/>
395 + </panel>
397 + <tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/>
399 + <tooltip id="back-button-tooltip">
400 + <label value="&backButton.tooltip;"/>
401 +#ifdef XP_MACOSX
402 + <label value="&backForwardButtonMenuMac.tooltip;"/>
403 +#else
404 + <label value="&backForwardButtonMenu.tooltip;"/>
405 +#endif
406 + </tooltip>
408 + <tooltip id="forward-button-tooltip">
409 + <label value="&forwardButton.tooltip;"/>
410 +#ifdef XP_MACOSX
411 + <label value="&backForwardButtonMenuMac.tooltip;"/>
412 +#else
413 + <label value="&backForwardButtonMenu.tooltip;"/>
414 +#endif
415 + </tooltip>
416 + </popupset>
418 +#ifdef CAN_DRAW_IN_TITLEBAR
419 +<vbox id="titlebar">
420 + <hbox id="titlebar-content">
421 + <hbox id="appmenu-button-container">
422 + <button id="appmenu-button"
423 + type="menu"
424 + label="&brandShortName;"
425 + style="-moz-user-focus: ignore;">
426 +#include browser-appmenu.inc
427 + </button>
428 + </hbox>
429 + <spacer id="titlebar-spacer" flex="1"/>
430 + <hbox id="titlebar-buttonbox-container" align="start">
431 + <hbox id="titlebar-buttonbox">
432 + <toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
433 + <toolbarbutton class="titlebar-button" id="titlebar-max" oncommand="onTitlebarMaxClick();"/>
434 + <toolbarbutton class="titlebar-button" id="titlebar-close" command="cmd_closeWindow"/>
435 + </hbox>
436 + </hbox>
437 + </hbox>
438 +</vbox>
439 +#endif
441 +<deck flex="1" id="tab-view-deck">
442 +<vbox flex="1" id="browser-panel">
444 + <toolbox id="navigator-toolbox"
445 + defaultmode="icons" mode="icons"
446 + iconsize="large"
447 + tabsontop="true"
448 + persist="tabsontop">
449 + <!-- Menu -->
450 + <toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
451 + defaultset="menubar-items"
452 + mode="icons" iconsize="small" defaulticonsize="small"
453 + lockiconsize="true"
454 +#ifdef MENUBAR_CAN_AUTOHIDE
455 + toolbarname="&menubarCmd.label;"
456 + accesskey="&menubarCmd.accesskey;"
457 +#endif
458 + context="toolbar-context-menu">
459 + <toolbaritem id="menubar-items" align="center">
460 +# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by
461 +# hiddenWindow.xul.
462 +#include browser-menubar.inc
463 + </toolbaritem>
465 +#ifdef CAN_DRAW_IN_TITLEBAR
466 + <hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/>
467 + <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/>
468 +#endif
469 + </toolbar>
471 + <toolbar id="nav-bar" class="toolbar-primary chromeclass-toolbar"
472 + toolbarname="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;"
473 + fullscreentoolbar="true" mode="icons" customizable="true"
474 + iconsize="large"
475 + defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,home-button,bookmarks-menu-button-container,fullscreenflex,window-controls"
476 + context="toolbar-context-menu">
478 + <toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
479 + context="backForwardMenu" removable="true"
480 + title="&backForwardItem.title;">
481 + <toolbarbutton id="back-button" class="toolbarbutton-1"
482 + label="&backCmd.label;"
483 + command="Browser:BackOrBackDuplicate"
484 + onclick="checkForMiddleClick(this, event);"
485 + tooltip="back-button-tooltip"/>
486 + <toolbarbutton id="forward-button" class="toolbarbutton-1"
487 + label="&forwardCmd.label;"
488 + command="Browser:ForwardOrForwardDuplicate"
489 + onclick="checkForMiddleClick(this, event);"
490 + tooltip="forward-button-tooltip"/>
491 + </toolbaritem>
493 + <toolbaritem id="urlbar-container" align="center" flex="400" persist="width" combined="true"
494 + title="&locationItem.title;" class="chromeclass-location" removable="true">
495 + <textbox id="urlbar" flex="1"
496 + placeholder="&urlbar.placeholder;"
497 + type="autocomplete"
498 + autocompletesearch="history"
499 + autocompletesearchparam="enable-actions"
500 + autocompletepopup="PopupAutoCompleteRichResult"
501 + completeselectedindex="true"
502 + tabscrolling="true"
503 + showcommentcolumn="true"
504 + showimagecolumn="true"
505 + enablehistory="true"
506 + maxrows="6"
507 + newlines="stripsurroundingwhitespace"
508 + oninput="gBrowser.userTypedValue = this.value;"
509 + ontextentered="this.handleCommand(param);"
510 + ontextreverted="return this.handleRevert();"
511 + pageproxystate="invalid"
512 + onsearchbegin="LocationBarHelpers._searchBegin();"
513 + onsearchcomplete="LocationBarHelpers._searchComplete();"
514 + onfocus="document.getElementById('identity-box').style.MozUserFocus= 'normal'"
515 + onblur="setTimeout(function() document.getElementById('identity-box').style.MozUserFocus = '', 0);">
516 + <box id="notification-popup-box" hidden="true" align="center">
517 + <image id="default-notification-icon" class="notification-anchor-icon" role="button"/>
518 + <image id="geo-notification-icon" class="notification-anchor-icon" role="button"/>
519 + <image id="addons-notification-icon" class="notification-anchor-icon" role="button"/>
520 + <image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"/>
521 + <image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
522 + </box>
523 + <!-- Use onclick instead of normal popup= syntax since the popup
524 + code fires onmousedown, and hence eats our favicon drag events.
525 + We only add the identity-box button to the tab order when the location bar
526 + has focus, otherwise pressing F6 focuses it instead of the location bar -->
527 + <box id="identity-box" role="button"
528 + onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
529 + onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);"
530 + ondragstart="gIdentityHandler.onDragStart(event);">
531 + <hbox id="identity-box-inner" align="center">
532 + <stack id="page-proxy-stack"
533 + onclick="PageProxyClickHandler(event);">
534 + <image id="urlbar-throbber" busy="false"/>
535 + <image id="page-proxy-favicon" validate="never"
536 + pageproxystate="invalid"
537 + onerror="this.removeAttribute('src');"/>
538 + </stack>
539 + <hbox id="identity-icon-labels">
540 + <label id="identity-icon-label" class="plain" flex="1"/>
541 + <label id="identity-icon-country-label" class="plain"/>
542 + </hbox>
543 + </hbox>
544 + </box>
545 + <box id="urlbar-display-box" align="center">
546 + <label id="urlbar-display" value="&urlbar.switchToTab.label;"/>
547 + </box>
548 + <hbox id="urlbar-icons">
549 + <image id="page-report-button"
550 + class="urlbar-icon"
551 + hidden="true"
552 + tooltiptext="&pageReportIcon.tooltip;"
553 + onclick="gPopupBlockerObserver.onReportButtonClick(event);"/>
555 + <image id="star-button"
556 + class="urlbar-icon"
557 + onclick="PlacesStarButton.onClick(event);"/>
558 + <image id="go-button"
559 + class="urlbar-icon"
560 + tooltiptext="&goEndCap.tooltip;"
561 + onclick="gURLBar.handleCommand(event);"/>
562 + </hbox>
563 + <toolbarbutton id="urlbar-go-button"
564 + class="chromeclass-toolbar-additional"
565 + onclick="gURLBar.handleCommand(event);"
566 + tooltiptext="&goEndCap.tooltip;"/>
567 + <toolbarbutton id="urlbar-reload-button"
568 + class="chromeclass-toolbar-additional"
569 + command="Browser:ReloadOrDuplicate"
570 + onclick="checkForMiddleClick(this, event);"
571 + tooltiptext="&reloadButton.tooltip;"/>
572 + <toolbarbutton id="urlbar-stop-button"
573 + class="chromeclass-toolbar-additional"
574 + command="Browser:Stop"
575 + tooltiptext="&stopButton.tooltip;"/>
576 + </textbox>
577 + </toolbaritem>
579 + <toolbarbutton id="reload-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
580 + label="&reloadCmd.label;" removable="true"
581 + command="Browser:ReloadOrDuplicate"
582 + onclick="checkForMiddleClick(this, event);"
583 + tooltiptext="&reloadButton.tooltip;"/>
585 + <toolbarbutton id="stop-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
586 + label="&stopCmd.label;" removable="true"
587 + command="Browser:Stop"
588 + tooltiptext="&stopButton.tooltip;"/>
590 + <toolbaritem id="search-container" title="&searchItem.title;"
591 + align="center" class="chromeclass-toolbar-additional"
592 + flex="100" persist="width" removable="true">
593 + <searchbar id="searchbar" flex="1"/>
594 + </toolbaritem>
596 + <toolbarbutton id="home-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
597 + persist="class" removable="true"
598 + label="&homeButton.label;"
599 + ondragover="homeButtonObserver.onDragOver(event)"
600 + ondragenter="homeButtonObserver.onDragOver(event)"
601 + ondrop="homeButtonObserver.onDrop(event)"
602 + ondragexit="homeButtonObserver.onDragExit(event)"
603 + onclick="BrowserGoHome(event);"
604 + aboutHomeOverrideTooltip="&abouthome.pageTitle;"/>
606 + <toolbaritem id="bookmarks-menu-button-container"
607 + class="chromeclass-toolbar-additional"
608 + removable="true"
609 + title="&bookmarksMenuButton.label;">
610 + <toolbarbutton id="bookmarks-menu-button"
611 + type="menu"
612 + class="toolbarbutton-1"
613 + label="&bookmarksMenuButton.label;"
614 + tooltiptext="&bookmarksMenuButton.tooltip;"
615 + ondragenter="PlacesMenuDNDHandler.onDragEnter(event);"
616 + ondragover="PlacesMenuDNDHandler.onDragOver(event);"
617 + ondragexit="PlacesMenuDNDHandler.onDragExit(event);"
618 + ondrop="PlacesMenuDNDHandler.onDrop(event);">
619 + <menupopup id="BMB_bookmarksPopup"
620 + placespopup="true"
621 + context="placesContext"
622 + openInTabs="children"
623 + oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);"
624 + onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
625 + onpopupshowing="BookmarksMenuButton.onPopupShowing(event);
626 + if (!this.parentNode._placesView)
627 + new PlacesMenu(event, 'place:folder=BOOKMARKS_MENU');"
628 + tooltip="bhTooltip" popupsinherittooltip="true">
629 + <menuitem id="BMB_viewBookmarksToolbar"
630 + placesanonid="view-toolbar"
631 + toolbarId="PersonalToolbar"
632 + type="checkbox"
633 + oncommand="onViewToolbarCommand(event)"
634 + label="&viewBookmarksToolbar.label;"/>
635 + <menuseparator/>
636 + <menuitem id="BMB_bookmarksShowAll"
637 + label="&showAllBookmarks2.label;"
638 + command="Browser:ShowAllBookmarks"
639 + key="manBookmarkKb"/>
640 + <menuseparator/>
641 + <menuitem id="BMB_bookmarkThisPage"
642 +#ifndef XP_MACOSX
643 + class="menuitem-iconic"
644 +#endif
645 + label="&bookmarkThisPageCmd.label;"
646 + command="Browser:AddBookmarkAs"
647 + key="addBookmarkAsKb"/>
648 + <menuitem id="BMB_subscribeToPageMenuitem"
649 +#ifndef XP_MACOSX
650 + class="menuitem-iconic"
651 +#endif
652 + label="&subscribeToPageMenuitem.label;"
653 + oncommand="return FeedHandler.subscribeToFeed(null, event);"
654 + onclick="checkForMiddleClick(this, event);"
655 + observes="singleFeedMenuitemState"/>
656 + <menu id="BMB_subscribeToPageMenupopup"
657 +#ifndef XP_MACOSX
658 + class="menu-iconic"
659 +#endif
660 + label="&subscribeToPageMenupopup.label;"
661 + observes="multipleFeedsMenuState">
662 + <menupopup id="BMB_subscribeToPageSubmenuMenupopup"
663 + onpopupshowing="return FeedHandler.buildFeedList(event.target);"
664 + oncommand="return FeedHandler.subscribeToFeed(null, event);"
665 + onclick="checkForMiddleClick(this, event);"/>
666 + </menu>
667 + <menuseparator/>
668 + <menu id="BMB_bookmarksToolbar"
669 + placesanonid="toolbar-autohide"
670 + class="menu-iconic bookmark-item"
671 + label="&personalbarCmd.label;"
672 + container="true">
673 + <menupopup id="BMB_bookmarksToolbarPopup"
674 + placespopup="true"
675 + context="placesContext"
676 + onpopupshowing="if (!this.parentNode._placesView)
677 + new PlacesMenu(event, 'place:folder=TOOLBAR');"/>
678 + </menu>
679 + <menuseparator/>
680 + <!-- Bookmarks menu items -->
681 + <menuseparator builder="end"
682 + class="hide-if-empty-places-result"/>
683 + <menuitem id="BMB_unsortedBookmarks"
684 + label="&bookmarksMenuButton.unsorted.label;"
685 + oncommand="PlacesCommandHook.showPlacesOrganizer('UnfiledBookmarks');"
686 + class="menuitem-iconic"/>
687 + </menupopup>
688 + </toolbarbutton>
689 + </toolbaritem>
691 + <hbox id="fullscreenflex" flex="1" hidden="true" fullscreencontrol="true"/>
692 + <hbox id="window-controls" hidden="true" fullscreencontrol="true">
693 + <toolbarbutton id="minimize-button"
694 + tooltiptext="&fullScreenMinimize.tooltip;"
695 + oncommand="window.minimize();"/>
697 + <toolbarbutton id="restore-button"
698 + tooltiptext="&fullScreenRestore.tooltip;"
699 + oncommand="BrowserFullScreen();"/>
701 + <toolbarbutton id="close-button"
702 + tooltiptext="&fullScreenClose.tooltip;"
703 + oncommand="BrowserTryToCloseWindow();"/>
704 + </hbox>
705 + </toolbar>
707 + <toolbarset id="customToolbars" context="toolbar-context-menu"/>
709 + <toolbar id="PersonalToolbar"
710 + mode="icons" iconsize="small" defaulticonsize="small"
711 + lockiconsize="true"
712 + class="chromeclass-directories"
713 + context="toolbar-context-menu"
714 + defaultset="personal-bookmarks"
715 + toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;"
716 + collapsed="true"
717 + customizable="true">
718 + <toolbaritem flex="1" id="personal-bookmarks" title="&bookmarksItem.title;"
719 + removable="true">
720 + <hbox flex="1"
721 + id="PlacesToolbar"
722 + context="placesContext"
723 + onclick="BookmarksEventHandler.onClick(event, this._placesView);"
724 + oncommand="BookmarksEventHandler.onCommand(event, this._placesView);"
725 + tooltip="bhTooltip"
726 + popupsinherittooltip="true">
727 + <toolbarbutton class="bookmark-item bookmarks-toolbar-customize"
728 + mousethrough="never"
729 + label="&bookmarksToolbarItem.label;"/>
730 + <hbox flex="1">
731 + <hbox align="center">
732 + <image id="PlacesToolbarDropIndicator"
733 + mousethrough="always"
734 + collapsed="true"/>
735 + </hbox>
736 + <scrollbox orient="horizontal"
737 + id="PlacesToolbarItems"
738 + flex="1"/>
739 + <toolbarbutton type="menu"
740 + id="PlacesChevron"
741 + class="chevron"
742 + mousethrough="never"
743 + collapsed="true"
744 + tooltiptext="&bookmarksToolbarChevron.tooltip;"
745 + onpopupshowing="document.getElementById('PlacesToolbar')
746 + ._placesView._onChevronPopupShowing(event);">
747 + <menupopup id="PlacesChevronPopup"
748 + placespopup="true"
749 + tooltip="bhTooltip" popupsinherittooltip="true"
750 + context="placesContext"/>
751 + </toolbarbutton>
752 + </hbox>
753 + </hbox>
754 + </toolbaritem>
755 + </toolbar>
757 +#ifdef MENUBAR_CAN_AUTOHIDE
758 +#ifndef CAN_DRAW_IN_TITLEBAR
759 +#define APPMENU_ON_TABBAR
760 +#endif
761 +#endif
764 + <toolbar id="TabsToolbar"
765 + class="toolbar-primary"
766 + fullscreentoolbar="true"
767 + customizable="true"
768 + mode="icons" lockmode="true"
769 + iconsize="small" defaulticonsize="small" lockiconsize="true"
770 + aria-label="&tabsToolbar.label;"
771 + context="toolbar-context-menu"
772 +#ifdef APPMENU_ON_TABBAR
773 + defaultset="appmenu-toolbar-button,tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton"
774 +#else
775 + defaultset="tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton"
776 +#endif
777 + collapsed="true">
779 +#ifdef APPMENU_ON_TABBAR
780 + <toolbarbutton id="appmenu-toolbar-button"
781 + class="chromeclass-toolbar-additional"
782 + type="menu"
783 + label="&brandShortName;"
784 + tooltiptext="&appMenuButton.tooltip;">
785 +#include browser-appmenu.inc
786 + </toolbarbutton>
787 +#endif
789 + <tabs id="tabbrowser-tabs"
790 + class="tabbrowser-tabs"
791 + tabbrowser="content"
792 + flex="1"
793 + setfocus="false"
794 + tooltip="tabbrowser-tab-tooltip">
795 + <tab class="tabbrowser-tab" selected="true" fadein="true"/>
796 + </tabs>
798 + <toolbarbutton id="new-tab-button"
799 + class="toolbarbutton-1 chromeclass-toolbar-additional"
800 + label="&tabCmd.label;"
801 + command="cmd_newNavigatorTab"
802 + onclick="checkForMiddleClick(this, event);"
803 + tooltiptext="&newTabButton.tooltip;"
804 + ondrop="newTabButtonObserver.onDrop(event)"
805 + ondragover="newTabButtonObserver.onDragOver(event)"
806 + ondragenter="newTabButtonObserver.onDragOver(event)"
807 + ondragexit="newTabButtonObserver.onDragExit(event)"
808 + removable="true"/>
810 + <toolbarbutton id="alltabs-button"
811 + class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button"
812 + type="menu"
813 + label="&listAllTabs.label;"
814 + tooltiptext="&listAllTabs.label;"
815 + removable="true">
816 + <menupopup id="alltabs-popup"
817 + position="after_end">
818 + <menuitem id="menu_tabview"
819 + class="menuitem-iconic"
820 + key="key_tabview"
821 + label="&viewTabGroups.label;"
822 + command="Browser:ToggleTabView"
823 + observes="tabviewGroupsNumber"/>
824 + <menuseparator id="alltabs-popup-separator"/>
825 + </menupopup>
826 + </toolbarbutton>
828 + <toolbarbutton id="tabs-closebutton"
829 + class="close-button tabs-closebutton"
830 + command="cmd_close"
831 + label="&closeTab.label;"
832 + tooltiptext="&closeTab.label;"/>
834 +#ifdef CAN_DRAW_IN_TITLEBAR
835 + <hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/>
836 + <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/>
837 +#endif
838 + </toolbar>
840 + <toolbarpalette id="BrowserToolbarPalette">
842 +# Update primaryToolbarButtons in browser/themes/browserShared.inc when adding
843 +# or removing default items with the toolbarbutton-1 class.
845 + <toolbarbutton id="print-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
846 + label="&printButton.label;" command="cmd_print"
847 + tooltiptext="&printButton.tooltip;"/>
849 + <toolbaritem id="navigator-throbber" title="&throbberItem.title;" align="center" pack="center"
850 + mousethrough="always">
851 + <image/>
852 + </toolbaritem>
854 + <toolbarbutton id="downloads-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
855 + observes="Tools:Downloads"
856 + ondrop="DownloadsButtonDNDObserver.onDrop(event)"
857 + ondragover="DownloadsButtonDNDObserver.onDragOver(event)"
858 + ondragenter="DownloadsButtonDNDObserver.onDragOver(event)"
859 + ondragexit="DownloadsButtonDNDObserver.onDragExit(event)"
860 + label="&downloads.label;"
861 + tooltiptext="&downloads.tooltip;"/>
863 + <toolbarbutton id="history-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
864 + observes="viewHistorySidebar" label="&historyButton.label;"
865 + tooltiptext="&historyButton.tooltip;"/>
867 + <toolbarbutton id="bookmarks-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
868 + observes="viewBookmarksSidebar"
869 + tooltiptext="&bookmarksButton.tooltip;"
870 + ondrop="bookmarksButtonObserver.onDrop(event)"
871 + ondragover="bookmarksButtonObserver.onDragOver(event)"
872 + ondragenter="bookmarksButtonObserver.onDragOver(event)"
873 + ondragexit="bookmarksButtonObserver.onDragExit(event)"/>
875 + <toolbarbutton id="new-window-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
876 + label="&newNavigatorCmd.label;"
877 + command="key_newNavigator"
878 + tooltiptext="&newWindowButton.tooltip;"
879 + ondrop="newWindowButtonObserver.onDrop(event)"
880 + ondragover="newWindowButtonObserver.onDragOver(event)"
881 + ondragenter="newWindowButtonObserver.onDragOver(event)"
882 + ondragexit="newWindowButtonObserver.onDragExit(event)"/>
884 + <toolbarbutton id="cut-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
885 + label="&cutCmd.label;"
886 + command="cmd_cut"
887 + tooltiptext="&cutButton.tooltip;"/>
889 + <toolbarbutton id="copy-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
890 + label="&copyCmd.label;"
891 + command="cmd_copy"
892 + tooltiptext="&copyButton.tooltip;"/>
894 + <toolbarbutton id="paste-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
895 + label="&pasteCmd.label;"
896 + command="cmd_paste"
897 + tooltiptext="&pasteButton.tooltip;"/>
899 + <toolbarbutton id="fullscreen-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
900 + observes="View:FullScreen"
901 + type="checkbox"
902 + label="&fullScreenCmd.label;"
903 + tooltiptext="&fullScreenButton.tooltip;"/>
905 + <toolbaritem id="zoom-controls" class="chromeclass-toolbar-additional"
906 + title="&zoomControls.label;">
907 + <toolbarbutton id="zoom-out-button" class="toolbarbutton-1"
908 + label="&fullZoomReduceCmd.label;"
909 + command="cmd_fullZoomReduce"
910 + tooltiptext="&zoomOutButton.tooltip;"/>
911 + <toolbarbutton id="zoom-in-button" class="toolbarbutton-1"
912 + label="&fullZoomEnlargeCmd.label;"
913 + command="cmd_fullZoomEnlarge"
914 + tooltiptext="&zoomInButton.tooltip;"/>
915 + </toolbaritem>
916 +#ifdef MOZ_SERVICES_SYNC
917 + <toolbarbutton id="sync-button"
918 + class="toolbarbutton-1 chromeclass-toolbar-additional"
919 + label="&syncToolbarButton.label;"
920 + oncommand="gSyncUI.handleToolbarButton()"/>
921 +#endif
922 + <toolbarbutton id="feed-button"
923 + type="menu"
924 + class="toolbarbutton-1 chromeclass-toolbar-additional"
925 + disabled="true"
926 + label="&feedButton.label;"
927 + tooltiptext="&feedButton.tooltip;"
928 + onclick="return FeedHandler.onFeedButtonClick(event);">
929 + <menupopup position="after_end"
930 + id="feed-menu"
931 + onpopupshowing="return FeedHandler.buildFeedList(this);"
932 + oncommand="return FeedHandler.subscribeToFeed(null, event);"
933 + onclick="checkForMiddleClick(this, event);"/>
934 + </toolbarbutton>
936 + <toolbarbutton id="tabview-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
937 + label="&tabGroupsButton.label;"
938 + command="Browser:ToggleTabView"
939 + tooltiptext="&tabGroupsButton.tooltip;"
940 + observes="tabviewGroupsNumber"/>
941 + </toolbarpalette>
942 + </toolbox>
944 + <hbox flex="1" id="browser">
945 + <vbox id="browser-border-start" hidden="true" layer="true"/>
946 + <vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
947 + <sidebarheader id="sidebar-header" align="center">
948 + <label id="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
949 + <image id="sidebar-throbber"/>
950 + <toolbarbutton class="tabs-closebutton" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="toggleSidebar();"/>
951 + </sidebarheader>
952 + <browser id="sidebar" flex="1" autoscroll="false" disablehistory="true"
953 + style="min-width: 14em; width: 18em; max-width: 36em;"/>
954 + </vbox>
956 + <splitter id="sidebar-splitter" class="chromeclass-extrachrome" hidden="true"/>
957 + <vbox id="appcontent" flex="1">
958 + <tabbrowser id="content" disablehistory="true"
959 + flex="1" contenttooltip="aHTMLTooltip"
960 + tabcontainer="tabbrowser-tabs"
961 + contentcontextmenu="contentAreaContextMenu"
962 + autocompletepopup="PopupAutoComplete"
963 + onclick="return contentAreaClick(event, false);"/>
964 + <statuspanel id="statusbar-display" inactive="true"/>
965 + </vbox>
966 + <vbox id="browser-border-end" hidden="true" layer="true"/>
967 + </hbox>
969 + <vbox id="browser-bottombox" layer="true">
970 + <toolbar id="inspector-toolbar"
971 + nowindowdrag="true"
972 + hidden="true">
973 + <toolbarbutton id="inspector-inspect-toolbutton"
974 + label="&inspectButton.label;"
975 + accesskey="&inspectButton.accesskey;"
976 + class="toolbarbutton-text"
977 + command="Inspector:Inspect"/>
978 + <toolbarseparator />
979 + <hbox id="inspector-tools">
980 + <!-- registered tools go here -->
981 + </hbox>
982 + </toolbar>
983 + <toolbar id="addon-bar"
984 + toolbarname="&addonBarCmd.label;" accesskey="&addonBarCmd.accesskey;"
985 + collapsed="true"
986 + class="toolbar-primary chromeclass-toolbar"
987 + context="toolbar-context-menu" toolboxid="navigator-toolbox"
988 + mode="icons" iconsize="small" defaulticonsize="small"
989 + lockiconsize="true"
990 + defaultset="addonbar-closebutton,spring,status-bar"
991 + customizable="true"
992 + key="key_toggleAddonBar">
993 + <toolbarbutton id="addonbar-closebutton"
994 + tooltiptext="&addonBarCloseButton.tooltip;"
995 + oncommand="setToolbarVisibility(this.parentNode, false);"/>
996 + <statusbar id="status-bar" ordinal="1000"/>
997 + </toolbar>
998 + </vbox>
1000 +#ifndef XP_UNIX
1001 + <svg:svg height="0">
1002 + <svg:mask id="winstripe-keyhole-forward-mask" maskContentUnits="objectBoundingBox">
1003 + <svg:rect x="0" y="0" width="1" height="1" fill="white"/>
1004 + <svg:circle cx="-0.46" cy="0.5" r="0.63"/>
1005 + </svg:mask>
1006 + <svg:mask id="winstripe-keyhole-forward-mask-hover" maskContentUnits="objectBoundingBox">
1007 + <svg:rect x="0" y="0" width="1" height="1" fill="white"/>
1008 + <svg:circle cx="-0.35" cy="0.5" r="0.58"/>
1009 + </svg:mask>
1010 + </svg:svg>
1011 +#endif
1012 +#ifdef XP_MACOSX
1013 + <svg:svg height="0">
1014 + <svg:mask id="pinstripe-keyhole-forward-mask" maskContentUnits="objectBoundingBox">
1015 + <svg:rect x="0" y="0" width="1" height="1" fill="white"/>
1016 + <svg:circle cx="-0.41" cy="0.5" r="0.65"/>
1017 + </svg:mask>
1018 + <svg:mask id="pinstripe-tab-ontop-left-curve-mask" maskContentUnits="userSpaceOnUse">
1019 + <svg:circle cx="9" cy="3" r="3" fill="white"/>
1020 + <svg:rect x="9" y="0" width="3" height="3" fill="white"/>
1021 + <svg:rect x="6" y="3" width="6" height="19" fill="white"/>
1022 + <svg:rect x="1" y="17" width="5" height="5" fill="white"/>
1023 + <svg:circle cx="1" cy="17" r="5"/>
1024 + <svg:rect x="0" y="22" width="12" height="1" fill="white"/>
1025 + </svg:mask>
1026 + <svg:mask id="pinstripe-tab-ontop-right-curve-mask" maskContentUnits="userSpaceOnUse">
1027 + <svg:circle cx="3" cy="3" r="3" fill="white"/>
1028 + <svg:rect x="0" y="0" width="3" height="3" fill="white"/>
1029 + <svg:rect x="0" y="3" width="6" height="19" fill="white"/>
1030 + <svg:rect x="6" y="17" width="5" height="5" fill="white"/>
1031 + <svg:circle cx="11" cy="17" r="5"/>
1032 + <svg:rect x="0" y="22" width="12" height="1" fill="white"/>
1033 + </svg:mask>
1034 + <svg:mask id="pinstripe-tab-onbottom-left-curve-mask" maskContentUnits="userSpaceOnUse">
1035 + <svg:circle cx="9" cy="20" r="3" fill="white"/>
1036 + <svg:rect x="9" y="20" width="3" height="3" fill="white"/>
1037 + <svg:rect x="6" y="1" width="6" height="19" fill="white"/>
1038 + <svg:rect x="1" y="1" width="5" height="5" fill="white"/>
1039 + <svg:circle cx="1" cy="6" r="5"/>
1040 + <svg:rect x="0" y="0" width="12" height="1" fill="white"/>
1041 + </svg:mask>
1042 + <svg:mask id="pinstripe-tab-onbottom-right-curve-mask" maskContentUnits="userSpaceOnUse">
1043 + <svg:circle cx="3" cy="20" r="3" fill="white"/>
1044 + <svg:rect x="0" y="20" width="3" height="3" fill="white"/>
1045 + <svg:rect x="0" y="1" width="6" height="19" fill="white"/>
1046 + <svg:rect x="6" y="1" width="5" height="5" fill="white"/>
1047 + <svg:circle cx="11" cy="6" r="5"/>
1048 + <svg:rect x="0" y="0" width="12" height="1" fill="white"/>
1049 + </svg:mask>
1050 + </svg:svg>
1051 +#endif
1053 +</vbox>
1054 +# <iframe id="tab-view"> is dynamically appended as the 2nd child of #tab-view-deck.
1055 +# Introducing the iframe dynamically, as needed, was found to be better than
1056 +# starting with an empty iframe here in browser.xul from a Ts standpoint.
1057 +</deck>
1059 +</window>
1060 diff --git a/browser/base/jar.mn b/browser/base/jar.mn
1061 --- a/browser/base/jar.mn
1062 +++ b/browser/base/jar.mn
1063 @@ -23,16 +23,18 @@ browser.jar:
1064 content/browser/aboutHome-restore-icon-small.png (content/aboutHome-restore-icon-small.png)
1065 content/browser/aboutHome-snippet1.png (content/aboutHome-snippet1.png)
1066 content/browser/aboutHome-snippet2.png (content/aboutHome-snippet2.png)
1067 content/browser/aboutRobots-icon.png (content/aboutRobots-icon.png)
1068 content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png)
1069 * content/browser/browser.css (content/browser.css)
1070 * content/browser/browser.js (content/browser.js)
1071 * content/browser/browser.xul (content/browser.xul)
1072 +* content/browser/browser-kde.xul (content/browser-kde.xul)
1073 +% override chrome://browser/content/browser.xul chrome://browser/content/browser-kde.xul desktop=kde
1074 * content/browser/browser-tabPreviews.xml (content/browser-tabPreviews.xml)
1075 * content/browser/content.js (content/content.js)
1076 * content/browser/fullscreen-video.xhtml (content/fullscreen-video.xhtml)
1077 * content/browser/pageinfo/pageInfo.xul (content/pageinfo/pageInfo.xul)
1078 * content/browser/pageinfo/pageInfo.js (content/pageinfo/pageInfo.js)
1079 * content/browser/pageinfo/pageInfo.css (content/pageinfo/pageInfo.css)
1080 * content/browser/pageinfo/pageInfo.xml (content/pageinfo/pageInfo.xml)
1081 * content/browser/pageinfo/feeds.js (content/pageinfo/feeds.js)
1082 diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp
1083 --- a/browser/components/build/nsModule.cpp
1084 +++ b/browser/components/build/nsModule.cpp
1085 @@ -41,17 +41,17 @@
1086 #include "nsBrowserCompsCID.h"
1087 #include "DirectoryProvider.h"
1089 #if defined(XP_WIN)
1090 #include "nsWindowsShellService.h"
1091 #elif defined(XP_MACOSX)
1092 #include "nsMacShellService.h"
1093 #elif defined(MOZ_WIDGET_GTK2)
1094 -#include "nsGNOMEShellService.h"
1095 +#include "nsUnixShellService.h"
1096 #endif
1098 #include "nsProfileMigrator.h"
1099 #if !defined(XP_OS2)
1100 #include "nsOperaProfileMigrator.h"
1101 #endif
1102 #if defined(XP_WIN) && !defined(__MINGW32__)
1103 #include "nsIEProfileMigrator.h"
1104 @@ -71,18 +71,16 @@ using namespace mozilla::browser;
1106 /////////////////////////////////////////////////////////////////////////////
1108 NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
1109 #if defined(XP_WIN)
1110 NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService)
1111 #elif defined(XP_MACOSX)
1112 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
1113 -#elif defined(MOZ_WIDGET_GTK2)
1114 -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
1115 #endif
1117 #if !defined(XP_OS2)
1118 NS_GENERIC_FACTORY_CONSTRUCTOR(nsOperaProfileMigrator)
1119 #endif
1120 NS_GENERIC_FACTORY_CONSTRUCTOR(nsProfileMigrator)
1121 #if defined(XP_WIN) && !defined(__MINGW32__)
1122 NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEProfileMigrator)
1123 @@ -114,17 +112,17 @@ NS_DEFINE_NAMED_CID(NS_OPERAPROFILEMIGRA
1124 #endif
1125 NS_DEFINE_NAMED_CID(NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID);
1127 static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
1128 { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, NULL, DirectoryProviderConstructor },
1129 #if defined(XP_WIN)
1130 { &kNS_SHELLSERVICE_CID, false, NULL, nsWindowsShellServiceConstructor },
1131 #elif defined(MOZ_WIDGET_GTK2)
1132 - { &kNS_SHELLSERVICE_CID, false, NULL, nsGNOMEShellServiceConstructor },
1133 + { &kNS_SHELLSERVICE_CID, false, NULL, nsUnixShellServiceConstructor },
1134 #endif
1135 { &kNS_FEEDSNIFFER_CID, false, NULL, nsFeedSnifferConstructor },
1136 { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, NULL, AboutRedirector::Create },
1137 { &kNS_FIREFOX_PROFILEMIGRATOR_CID, false, NULL, nsProfileMigratorConstructor },
1138 #if defined(XP_WIN) && !defined(__MINGW32__)
1139 { &kNS_WINIEPROFILEMIGRATOR_CID, false, NULL, nsIEProfileMigratorConstructor },
1140 #elif defined(XP_MACOSX)
1141 { &kNS_SHELLSERVICE_CID, false, NULL, nsMacShellServiceConstructor },
1142 diff --git a/browser/components/preferences/advanced.js b/browser/components/preferences/advanced.js
1143 --- a/browser/components/preferences/advanced.js
1144 +++ b/browser/components/preferences/advanced.js
1145 @@ -683,24 +683,42 @@ var gAdvancedPane = {
1146 var brandBundle = document.getElementById("bundleBrand");
1147 var shellBundle = document.getElementById("bundleShell");
1148 var brandShortName = brandBundle.getString("brandShortName");
1149 var promptTitle = shellBundle.getString("setDefaultBrowserTitle");
1150 var promptMessage;
1151 const IPS = Components.interfaces.nsIPromptService;
1152 var psvc = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
1153 .getService(IPS);
1155 + var env = Components.classes["@mozilla.org/process/environment;1"]
1156 + .getService(Components.interfaces.nsIEnvironment);
1157 + var kde_session = 0;
1158 + if (env.get('KDE_FULL_SESSION') == "true")
1159 + kde_session = 1;
1161 if (!shellSvc.isDefaultBrowser(false)) {
1162 promptMessage = shellBundle.getFormattedString("setDefaultBrowserMessage",
1163 [brandShortName]);
1164 var rv = psvc.confirmEx(window, promptTitle, promptMessage,
1165 IPS.STD_YES_NO_BUTTONS,
1166 null, null, null, null, { });
1167 - if (rv == 0)
1168 + if (rv == 0) {
1169 shellSvc.setDefaultBrowser(true, false);
1170 + if (kde_session == 1) {
1171 + var shellObj = Components.classes["@mozilla.org/file/local;1"]
1172 + .createInstance(Components.interfaces.nsILocalFile);
1173 + shellObj.initWithPath("/usr/bin/kwriteconfig");
1174 + var process = Components.classes["@mozilla.org/process/util;1"]
1175 + .createInstance(Components.interfaces.nsIProcess);
1176 + process.init(shellObj);
1177 + var args = ["--file", "kdeglobals", "--group", "General", "--key", "BrowserApplication", "MozillaFirefox"];
1178 + process.run(false, args, args.length);
1182 else {
1183 promptMessage = shellBundle.getFormattedString("alreadyDefaultBrowser",
1184 [brandShortName]);
1185 psvc.alert(window, promptTitle, promptMessage);
1188 #endif
1189 diff --git a/browser/components/shell/src/Makefile.in b/browser/components/shell/src/Makefile.in
1190 --- a/browser/components/shell/src/Makefile.in
1191 +++ b/browser/components/shell/src/Makefile.in
1192 @@ -52,17 +52,18 @@ endif
1194 ifeq ($(OS_ARCH),WINNT)
1195 CPPSRCS = nsWindowsShellService.cpp
1196 else
1197 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
1198 CPPSRCS = nsMacShellService.cpp
1199 else
1200 ifeq ($(MOZ_WIDGET_TOOLKIT), gtk2)
1201 -CPPSRCS = nsGNOMEShellService.cpp
1202 +CPPSRCS = nsUnixShellService.cpp nsGNOMEShellService.cpp nsKDEShellService.cpp
1203 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
1204 endif
1205 endif
1206 endif
1208 ifdef CPPSRCS
1209 LIBRARY_NAME = shellservice_s
1210 endif
1212 diff --git a/browser/components/shell/src/nsKDEShellService.cpp b/browser/components/shell/src/nsKDEShellService.cpp
1213 new file mode 100644
1214 --- /dev/null
1215 +++ b/browser/components/shell/src/nsKDEShellService.cpp
1216 @@ -0,0 +1,193 @@
1217 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
1218 +/* ***** BEGIN LICENSE BLOCK *****
1219 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1221 + * The contents of this file are subject to the Mozilla Public License Version
1222 + * 1.1 (the "License"); you may not use this file except in compliance with
1223 + * the License. You may obtain a copy of the License at
1224 + * http://www.mozilla.org/MPL/
1226 + * Software distributed under the License is distributed on an "AS IS" basis,
1227 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1228 + * for the specific language governing rights and limitations under the
1229 + * License.
1231 + * The Original Code is Shell Service.
1233 + * The Initial Developer of the Original Code is mozilla.org.
1234 + * Portions created by the Initial Developer are Copyright (C) 2004
1235 + * the Initial Developer. All Rights Reserved.
1237 + * Contributor(s):
1239 + * Alternatively, the contents of this file may be used under the terms of
1240 + * either the GNU General Public License Version 2 or later (the "GPL"), or
1241 + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1242 + * in which case the provisions of the GPL or the LGPL are applicable instead
1243 + * of those above. If you wish to allow use of your version of this file only
1244 + * under the terms of either the GPL or the LGPL, and not to allow others to
1245 + * use your version of this file under the terms of the MPL, indicate your
1246 + * decision by deleting the provisions above and replace them with the notice
1247 + * and other provisions required by the GPL or the LGPL. If you do not delete
1248 + * the provisions above, a recipient may use your version of this file under
1249 + * the terms of any one of the MPL, the GPL or the LGPL.
1251 + * ***** END LICENSE BLOCK ***** */
1253 +#include "nsKDEShellService.h"
1254 +#include "nsShellService.h"
1255 +#include "nsKDEUtils.h"
1256 +#include "nsCOMPtr.h"
1257 +#include "nsIPrefService.h"
1258 +#include "nsIProcess.h"
1259 +#include "nsILocalFile.h"
1260 +#include "nsServiceManagerUtils.h"
1261 +#include "nsComponentManagerUtils.h"
1263 +nsresult
1264 +nsKDEShellService::Init()
1266 + if( !nsKDEUtils::kdeSupport())
1267 + return NS_ERROR_NOT_AVAILABLE;
1268 + return NS_OK;
1271 +NS_IMPL_ISUPPORTS1(nsKDEShellService, nsIShellService)
1273 +NS_IMETHODIMP
1274 +nsKDEShellService::IsDefaultBrowser(PRBool aStartupCheck,
1275 + PRBool* aIsDefaultBrowser)
1277 + *aIsDefaultBrowser = PR_FALSE;
1278 + if (aStartupCheck)
1279 + mCheckedThisSession = PR_TRUE;
1280 + nsCStringArray command;
1281 + command.AppendCString( NS_LITERAL_CSTRING( "ISDEFAULTBROWSER" ));
1282 + if( nsKDEUtils::command( command ))
1283 + *aIsDefaultBrowser = PR_TRUE;
1284 + return NS_OK;
1287 +NS_IMETHODIMP
1288 +nsKDEShellService::SetDefaultBrowser(PRBool aClaimAllTypes,
1289 + PRBool aForAllUsers)
1291 + nsCStringArray command;
1292 + command.AppendCString( NS_LITERAL_CSTRING( "SETDEFAULTBROWSER" ));
1293 + command.AppendCString( aClaimAllTypes ? NS_LITERAL_CSTRING( "ALLTYPES" ) : NS_LITERAL_CSTRING( "NORMAL" ));
1294 + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
1297 +NS_IMETHODIMP
1298 +nsKDEShellService::GetShouldCheckDefaultBrowser(PRBool* aResult)
1300 + // If we've already checked, the browser has been started and this is a
1301 + // new window open, and we don't want to check again.
1302 + if (mCheckedThisSession) {
1303 + *aResult = PR_FALSE;
1304 + return NS_OK;
1307 + nsCOMPtr<nsIPrefBranch> prefs;
1308 + nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
1309 + if (pserve)
1310 + pserve->GetBranch("", getter_AddRefs(prefs));
1312 + if (prefs)
1313 + prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult);
1315 + return NS_OK;
1318 +NS_IMETHODIMP
1319 +nsKDEShellService::SetShouldCheckDefaultBrowser(PRBool aShouldCheck)
1321 + nsCOMPtr<nsIPrefBranch> prefs;
1322 + nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
1323 + if (pserve)
1324 + pserve->GetBranch("", getter_AddRefs(prefs));
1326 + if (prefs)
1327 + prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck);
1329 + return NS_OK;
1332 +NS_IMETHODIMP
1333 +nsKDEShellService::SetDesktopBackground(nsIDOMElement* aElement,
1334 + PRInt32 aPosition)
1336 + return NS_ERROR_NOT_IMPLEMENTED;
1339 +NS_IMETHODIMP
1340 +nsKDEShellService::GetDesktopBackgroundColor(PRUint32 *aColor)
1342 + return NS_ERROR_NOT_IMPLEMENTED;
1345 +NS_IMETHODIMP
1346 +nsKDEShellService::SetDesktopBackgroundColor(PRUint32 aColor)
1348 + return NS_ERROR_NOT_IMPLEMENTED;
1351 +NS_IMETHODIMP
1352 +nsKDEShellService::OpenApplication(PRInt32 aApplication)
1354 + nsCStringArray command;
1355 + if( aApplication == APPLICATION_MAIL )
1356 + command.AppendCString( NS_LITERAL_CSTRING( "OPENMAIL" ));
1357 + else if( aApplication == APPLICATION_NEWS )
1358 + command.AppendCString( NS_LITERAL_CSTRING( "OPENNEWS" ));
1359 + else
1360 + return NS_ERROR_NOT_IMPLEMENTED;
1361 + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
1364 +NS_IMETHODIMP
1365 +nsKDEShellService::OpenApplicationWithURI(nsILocalFile* aApplication, const nsACString& aURI)
1367 + nsCStringArray command;
1368 + command.AppendCString( NS_LITERAL_CSTRING( "RUN" ));
1369 + nsCString app;
1370 + nsresult rv = aApplication->GetNativePath( app );
1371 + NS_ENSURE_SUCCESS( rv, rv );
1372 + command.AppendCString( app );
1373 + command.AppendCString( aURI );
1374 + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
1377 +NS_IMETHODIMP
1378 +nsKDEShellService::GetDefaultFeedReader(nsILocalFile** _retval)
1380 + *_retval = nsnull;
1382 + nsCStringArray command;
1383 + command.AppendCString( NS_LITERAL_CSTRING( "GETDEFAULTFEEDREADER" ));
1384 + nsCStringArray output;
1385 + if( !nsKDEUtils::command( command, &output ) || output.Count() != 1 )
1386 + return NS_ERROR_FAILURE;
1388 + nsCString path;
1389 + path = *output[ 0 ];
1390 + if (path.IsEmpty())
1391 + return NS_ERROR_FAILURE;
1393 + nsresult rv;
1394 + nsCOMPtr<nsILocalFile> defaultReader =
1395 + do_CreateInstance("@mozilla.org/file/local;1", &rv);
1396 + NS_ENSURE_SUCCESS(rv, rv);
1398 + rv = defaultReader->InitWithNativePath(path);
1399 + NS_ENSURE_SUCCESS(rv, rv);
1401 + PRBool exists;
1402 + rv = defaultReader->Exists(&exists);
1403 + NS_ENSURE_SUCCESS(rv, rv);
1404 + if (!exists)
1405 + return NS_ERROR_FAILURE;
1407 + NS_ADDREF(*_retval = defaultReader);
1408 + return NS_OK;
1410 diff --git a/browser/components/shell/src/nsKDEShellService.h b/browser/components/shell/src/nsKDEShellService.h
1411 new file mode 100644
1412 --- /dev/null
1413 +++ b/browser/components/shell/src/nsKDEShellService.h
1414 @@ -0,0 +1,59 @@
1415 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
1416 +/* ***** BEGIN LICENSE BLOCK *****
1417 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1419 + * The contents of this file are subject to the Mozilla Public License Version
1420 + * 1.1 (the "License"); you may not use this file except in compliance with
1421 + * the License. You may obtain a copy of the License at
1422 + * http://www.mozilla.org/MPL/
1424 + * Software distributed under the License is distributed on an "AS IS" basis,
1425 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1426 + * for the specific language governing rights and limitations under the
1427 + * License.
1429 + * The Original Code is Shell Service.
1431 + * The Initial Developer of the Original Code is mozilla.org.
1432 + * Portions created by the Initial Developer are Copyright (C) 2004
1433 + * the Initial Developer. All Rights Reserved.
1435 + * Contributor(s):
1437 + * Alternatively, the contents of this file may be used under the terms of
1438 + * either the GNU General Public License Version 2 or later (the "GPL"), or
1439 + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1440 + * in which case the provisions of the GPL or the LGPL are applicable instead
1441 + * of those above. If you wish to allow use of your version of this file only
1442 + * under the terms of either the GPL or the LGPL, and not to allow others to
1443 + * use your version of this file under the terms of the MPL, indicate your
1444 + * decision by deleting the provisions above and replace them with the notice
1445 + * and other provisions required by the GPL or the LGPL. If you do not delete
1446 + * the provisions above, a recipient may use your version of this file under
1447 + * the terms of any one of the MPL, the GPL or the LGPL.
1449 + * ***** END LICENSE BLOCK ***** */
1451 +#ifndef nskdeshellservice_h____
1452 +#define nskdeshellservice_h____
1454 +#include "nsIShellService.h"
1455 +#include "nsStringAPI.h"
1457 +class nsKDEShellService : public nsIShellService
1459 +public:
1460 + nsKDEShellService() : mCheckedThisSession(PR_FALSE) { }
1462 + NS_DECL_ISUPPORTS
1463 + NS_DECL_NSISHELLSERVICE
1465 + nsresult Init() NS_HIDDEN;
1467 +private:
1468 + ~nsKDEShellService() {}
1470 + PRPackedBool mCheckedThisSession;
1473 +#endif // nskdeshellservice_h____
1474 diff --git a/browser/components/shell/src/nsUnixShellService.cpp b/browser/components/shell/src/nsUnixShellService.cpp
1475 new file mode 100644
1476 --- /dev/null
1477 +++ b/browser/components/shell/src/nsUnixShellService.cpp
1478 @@ -0,0 +1,52 @@
1479 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
1480 +/* ***** BEGIN LICENSE BLOCK *****
1481 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1483 + * The contents of this file are subject to the Mozilla Public License Version
1484 + * 1.1 (the "License"); you may not use this file except in compliance with
1485 + * the License. You may obtain a copy of the License at
1486 + * http://www.mozilla.org/MPL/
1488 + * Software distributed under the License is distributed on an "AS IS" basis,
1489 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1490 + * for the specific language governing rights and limitations under the
1491 + * License.
1493 + * The Original Code is Shell Service.
1495 + * The Initial Developer of the Original Code is mozilla.org.
1496 + * Portions created by the Initial Developer are Copyright (C) 2004
1497 + * the Initial Developer. All Rights Reserved.
1499 + * Contributor(s):
1501 + * Alternatively, the contents of this file may be used under the terms of
1502 + * either the GNU General Public License Version 2 or later (the "GPL"), or
1503 + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1504 + * in which case the provisions of the GPL or the LGPL are applicable instead
1505 + * of those above. If you wish to allow use of your version of this file only
1506 + * under the terms of either the GPL or the LGPL, and not to allow others to
1507 + * use your version of this file under the terms of the MPL, indicate your
1508 + * decision by deleting the provisions above and replace them with the notice
1509 + * and other provisions required by the GPL or the LGPL. If you do not delete
1510 + * the provisions above, a recipient may use your version of this file under
1511 + * the terms of any one of the MPL, the GPL or the LGPL.
1513 + * ***** END LICENSE BLOCK ***** */
1515 +#include "nsUnixShellService.h"
1516 +#include "nsGNOMEShellService.h"
1517 +#include "nsKDEShellService.h"
1518 +#include "nsKDEUtils.h"
1519 +#include "mozilla/ModuleUtils.h"
1521 +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
1522 +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsKDEShellService, Init)
1524 +NS_METHOD
1525 +nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult)
1527 + if( nsKDEUtils::kdeSupport())
1528 + return nsKDEShellServiceConstructor( aOuter, aIID, aResult );
1529 + return nsGNOMEShellServiceConstructor( aOuter, aIID, aResult );
1531 diff --git a/browser/components/shell/src/nsUnixShellService.h b/browser/components/shell/src/nsUnixShellService.h
1532 new file mode 100644
1533 --- /dev/null
1534 +++ b/browser/components/shell/src/nsUnixShellService.h
1535 @@ -0,0 +1,45 @@
1536 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
1537 +/* ***** BEGIN LICENSE BLOCK *****
1538 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1540 + * The contents of this file are subject to the Mozilla Public License Version
1541 + * 1.1 (the "License"); you may not use this file except in compliance with
1542 + * the License. You may obtain a copy of the License at
1543 + * http://www.mozilla.org/MPL/
1545 + * Software distributed under the License is distributed on an "AS IS" basis,
1546 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1547 + * for the specific language governing rights and limitations under the
1548 + * License.
1550 + * The Original Code is Shell Service.
1552 + * The Initial Developer of the Original Code is mozilla.org.
1553 + * Portions created by the Initial Developer are Copyright (C) 2004
1554 + * the Initial Developer. All Rights Reserved.
1556 + * Contributor(s):
1558 + * Alternatively, the contents of this file may be used under the terms of
1559 + * either the GNU General Public License Version 2 or later (the "GPL"), or
1560 + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1561 + * in which case the provisions of the GPL or the LGPL are applicable instead
1562 + * of those above. If you wish to allow use of your version of this file only
1563 + * under the terms of either the GPL or the LGPL, and not to allow others to
1564 + * use your version of this file under the terms of the MPL, indicate your
1565 + * decision by deleting the provisions above and replace them with the notice
1566 + * and other provisions required by the GPL or the LGPL. If you do not delete
1567 + * the provisions above, a recipient may use your version of this file under
1568 + * the terms of any one of the MPL, the GPL or the LGPL.
1570 + * ***** END LICENSE BLOCK ***** */
1572 +#ifndef nsunixshellservice_h____
1573 +#define nsunixshellservice_h____
1575 +#include "nsIShellService.h"
1577 +NS_METHOD
1578 +nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult);
1580 +#endif // nsunixshellservice_h____
1581 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
1582 --- a/browser/installer/package-manifest.in
1583 +++ b/browser/installer/package-manifest.in
1584 @@ -424,16 +424,17 @@
1585 #endif
1586 #endif
1588 ; [Default Preferences]
1589 ; All the pref files must be part of base to prevent migration bugs
1590 @BINPATH@/@PREF_DIR@/firefox.js
1591 @BINPATH@/@PREF_DIR@/firefox-branding.js
1592 @BINPATH@/@PREF_DIR@/channel-prefs.js
1593 +@BINPATH@/@PREF_DIR@/kde.js
1594 #ifdef MOZ_SERVICES_SYNC
1595 @BINPATH@/@PREF_DIR@/services-sync.js
1596 #endif
1597 @BINPATH@/greprefs.js
1598 @BINPATH@/defaults/autoconfig/platform.js
1599 @BINPATH@/defaults/autoconfig/prefcalls.js
1600 @BINPATH@/defaults/profile/prefs.js