/[packages]/cauldron/firefox/releases/0:17.0.5/2.mga3/SOURCES/firefox-kde.patch
ViewVC logotype

Contents of /cauldron/firefox/releases/0:17.0.5/2.mga3/SOURCES/firefox-kde.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 408959 - (show annotations) (download)
Sun Apr 7 19:43:50 2013 UTC (11 years ago) by schedbot
File size: 83574 byte(s)
%repsys markrelease
version: 0:17.0.5
release: 2.mga3
revision: 408952

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

  ViewVC Help
Powered by ViewVC 1.1.30