Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 493722 | Differences between
and this patch

Collapse All | Expand All

(-)a/browser/base/content/browser-kde.xul (+1097 lines)
Line 0 Link Here
1
#filter substitution
2
<?xml version="1.0"?>
3
# -*- Mode: HTML -*-
4
#
5
# This Source Code Form is subject to the terms of the Mozilla Public
6
# License, v. 2.0. If a copy of the MPL was not distributed with this
7
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
10
<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
11
<?xml-stylesheet href="chrome://browser/skin/devtools/common.css" type="text/css"?>
12
<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
13
14
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
15
<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
16
<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
17
18
# All DTD information is stored in a separate file so that it can be shared by
19
# hiddenWindow.xul.
20
#include browser-doctype.inc
21
22
<window id="main-window"
23
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
24
        xmlns:svg="http://www.w3.org/2000/svg"
25
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
26
        onload="gBrowserInit.onLoad()" onunload="gBrowserInit.onUnload()" onclose="return WindowIsClosing();"
27
        title="&mainWindow.title;@PRE_RELEASE_SUFFIX@"
28
        title_normal="&mainWindow.title;@PRE_RELEASE_SUFFIX@"
29
#ifdef XP_MACOSX
30
        title_privatebrowsing="&mainWindow.title;@PRE_RELEASE_SUFFIX@&mainWindow.titlemodifiermenuseparator;&mainWindow.titlePrivateBrowsingSuffix;"
31
        titledefault="&mainWindow.title;@PRE_RELEASE_SUFFIX@"
32
        titlemodifier=""
33
        titlemodifier_normal=""
34
        titlemodifier_privatebrowsing="&mainWindow.titlePrivateBrowsingSuffix;"
35
#else
36
        title_privatebrowsing="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@ &mainWindow.titlePrivateBrowsingSuffix;"
37
        titlemodifier="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@"
38
        titlemodifier_normal="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@"
39
        titlemodifier_privatebrowsing="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@ &mainWindow.titlePrivateBrowsingSuffix;"
40
#endif
41
        titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
42
        lightweightthemes="true"
43
        lightweightthemesfooter="browser-bottombox"
44
        windowtype="navigator:browser"
45
        macanimationtype="document"
46
        screenX="4" screenY="4"
47
        fullscreenbutton="true"
48
        persist="screenX screenY width height sizemode">
49
50
# All JS files which are not content (only) dependent that browser.xul
51
# wishes to include *must* go into the global-scripts.inc file
52
# so that they can be shared by macBrowserOverlay.xul.
53
#include global-scripts.inc
54
<script type="application/javascript" src="chrome://browser/content/nsContextMenu.js"/>
55
56
<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
57
58
<script type="application/javascript" src="chrome://browser/content/places/editBookmarkOverlay.js"/>
59
60
# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the
61
# browser-sets.inc file for sharing with hiddenWindow.xul.
62
#define FULL_BROWSER_WINDOW
63
#include browser-sets.inc
64
#undef FULL_BROWSER_WINDOW
65
66
  <popupset id="mainPopupSet">
67
    <menupopup id="tabContextMenu"
68
               onpopupshowing="if (event.target == this) TabContextMenu.updateContextMenu(this);"
69
               onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;">
70
      <menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;"
71
                oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/>
72
      <menuseparator/>
73
      <menuitem id="context_pinTab" label="&pinTab.label;"
74
                accesskey="&pinTab.accesskey;"
75
                oncommand="gBrowser.pinTab(TabContextMenu.contextTab);"/>
76
      <menuitem id="context_unpinTab" label="&unpinTab.label;" hidden="true"
77
                accesskey="&unpinTab.accesskey;"
78
                oncommand="gBrowser.unpinTab(TabContextMenu.contextTab);"/>
79
      <menu id="context_tabViewMenu" label="&moveToGroup.label;"
80
            accesskey="&moveToGroup.accesskey;">
81
        <menupopup id="context_tabViewMenuPopup"
82
                   onpopupshowing="if (event.target == this) TabView.moveToGroupPopupShowing(event);">
83
          <menuseparator id="context_tabViewNamedGroups" hidden="true"/>
84
          <menuitem id="context_tabViewNewGroup" label="&moveToNewGroup.label;"
85
                    oncommand="TabView.moveTabTo(TabContextMenu.contextTab, null);"/>
86
        </menupopup>
87
      </menu>
88
      <menuitem id="context_openTabInWindow" label="&moveToNewWindow.label;"
89
                accesskey="&moveToNewWindow.accesskey;"
90
                tbattr="tabbrowser-multiple"
91
                oncommand="gBrowser.replaceTabWithWindow(TabContextMenu.contextTab);"/>
92
      <menuseparator/>
93
      <menuitem id="context_reloadAllTabs" label="&reloadAllTabs.label;" accesskey="&reloadAllTabs.accesskey;"
94
                tbattr="tabbrowser-multiple-visible"
95
                oncommand="gBrowser.reloadAllTabs();"/>
96
      <menuitem id="context_bookmarkAllTabs"
97
                label="&bookmarkAllTabs.label;"
98
                accesskey="&bookmarkAllTabs.accesskey;"
99
                command="Browser:BookmarkAllTabs"/>
100
      <menuitem id="context_closeTabsToTheEnd" label="&closeTabsToTheEnd.label;" accesskey="&closeTabsToTheEnd.accesskey;"
101
                oncommand="gBrowser.removeTabsToTheEndFrom(TabContextMenu.contextTab);"/>
102
      <menuitem id="context_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;"
103
                oncommand="gBrowser.removeAllTabsBut(TabContextMenu.contextTab);"/>
104
      <menuseparator/>
105
      <menuitem id="context_undoCloseTab"
106
                label="&undoCloseTab.label;"
107
                accesskey="&undoCloseTab.accesskey;"
108
                observes="History:UndoCloseTab"/>
109
      <menuitem id="context_closeTab" label="&closeTab.label;" accesskey="&closeTab.accesskey;"
110
                oncommand="gBrowser.removeTab(TabContextMenu.contextTab, { animate: true });"/>
111
    </menupopup>
112
113
    <!-- bug 415444/582485: event.stopPropagation is here for the cloned version
114
         of this menupopup -->
115
    <menupopup id="backForwardMenu"
116
               onpopupshowing="return FillHistoryMenu(event.target);"
117
               oncommand="gotoHistoryIndex(event); event.stopPropagation();"
118
               onclick="checkForMiddleClick(this, event);"/>
119
    <tooltip id="aHTMLTooltip" page="true"/>
120
121
    <!-- for search and content formfill/pw manager -->
122
    <panel type="autocomplete" id="PopupAutoComplete" noautofocus="true" hidden="true"/>
123
124
    <!-- for url bar autocomplete -->
125
    <panel type="autocomplete-richlistbox" id="PopupAutoCompleteRichResult" noautofocus="true" hidden="true"/>
126
127
    <!-- for invalid form error message -->
128
    <panel id="invalid-form-popup" type="arrow" orient="vertical" noautofocus="true" hidden="true" level="parent">
129
      <description/>
130
    </panel>
131
132
    <panel id="editBookmarkPanel"
133
           type="arrow"
134
           footertype="promobox"
135
           orient="vertical"
136
           ignorekeys="true"
137
           consumeoutsideclicks="true"
138
           hidden="true"
139
           onpopupshown="StarUI.panelShown(event);"
140
           aria-labelledby="editBookmarkPanelTitle">
141
      <row id="editBookmarkPanelHeader" align="center" hidden="true">
142
        <vbox align="center">
143
          <image id="editBookmarkPanelStarIcon"/>
144
        </vbox>
145
        <vbox>
146
          <label id="editBookmarkPanelTitle"/>
147
          <description id="editBookmarkPanelDescription"/>
148
          <hbox>
149
            <button id="editBookmarkPanelRemoveButton"
150
                    class="editBookmarkPanelHeaderButton"
151
                    oncommand="StarUI.removeBookmarkButtonCommand();"
152
                    accesskey="&editBookmark.removeBookmark.accessKey;"/>
153
          </hbox>
154
        </vbox>
155
      </row>
156
      <vbox id="editBookmarkPanelContent" flex="1" hidden="true"/>
157
      <hbox id="editBookmarkPanelBottomButtons" pack="end">
158
#ifdef XP_UNIX
159
        <button id="editBookmarkPanelDoneButton"
160
                class="editBookmarkPanelBottomButton"
161
                label="&editBookmark.done.label;"
162
                default="true"
163
                oncommand="StarUI.panel.hidePopup();"/>
164
        <button id="editBookmarkPanelDeleteButton"
165
                class="editBookmarkPanelBottomButton"
166
                label="&editBookmark.cancel.label;"
167
                oncommand="StarUI.cancelButtonOnCommand();"/>
168
#else
169
        <button id="editBookmarkPanelDeleteButton"
170
                class="editBookmarkPanelBottomButton"
171
                label="&editBookmark.cancel.label;"
172
                oncommand="StarUI.cancelButtonOnCommand();"/>
173
        <button id="editBookmarkPanelDoneButton"
174
                class="editBookmarkPanelBottomButton"
175
                label="&editBookmark.done.label;"
176
                default="true"
177
                oncommand="StarUI.panel.hidePopup();"/>
178
#endif
179
      </hbox>
180
    </panel>
181
182
    <panel id="socialActivatedNotification"
183
           type="arrow"
184
           hidden="true"
185
           consumeoutsideclicks="true"
186
           align="start"
187
           orient="horizontal"
188
           role="alert">
189
      <image id="social-activation-icon" class="popup-notification-icon"/>
190
      <vbox flex="1">
191
        <description id="social-activation-message" class="popup-notification-description">&social.activated.description;</description>
192
        <spacer flex="1"/>
193
        <hbox pack="start" align="center" class="popup-notification-button-container">
194
          <label  id="social-undoactivation-button"
195
                  class="text-link"
196
                  value="&social.activated.undo.label;"
197
                  accesskey="&social.activated.undo.accesskey;"
198
                  onclick="SocialUI.undoActivation(this);"/>
199
          <spacer flex="1"/>
200
          <button id="social-activation-button"
201
                  default="true"
202
                  autofocus="autofocus"
203
                  label="&social.ok.label;"
204
                  accesskey="&social.ok.accesskey;"
205
                  oncommand="SocialUI.activationPanel.hidePopup();"/>
206
        </hbox>
207
      </vbox>
208
    </panel>
209
210
    <panel id="social-share-panel"
211
           class="social-panel"
212
           type="arrow"
213
           orient="horizontal"
214
           onpopupshowing="SocialShare.onShowing()"
215
           onpopuphidden="SocialShare.onHidden()"
216
           consumeoutsideclicks="true"
217
           hidden="true">
218
      <vbox class="social-share-toolbar">
219
        <vbox id="social-share-provider-buttons" flex="1"/>
220
      </vbox>
221
    </panel>
222
223
    <panel id="social-notification-panel"
224
           class="social-panel"
225
           type="arrow"
226
           hidden="true"
227
           noautofocus="true"/>
228
    <panel id="social-flyout-panel"
229
           class="social-panel"
230
           onpopupshown="SocialFlyout.onShown()"
231
           onpopuphidden="SocialFlyout.onHidden()"
232
           side="right"
233
           type="arrow"
234
           hidden="true"
235
           flip="slide"
236
           rolluponmousewheel="true"
237
           consumeoutsideclicks="false"
238
           noautofocus="true"
239
           position="topcenter topright"/>
240
241
    <menupopup id="toolbar-context-menu"
242
               onpopupshowing="onViewToolbarsPopupShowing(event);">
243
      <menuseparator/>
244
      <menuitem command="cmd_ToggleTabsOnTop"
245
                type="checkbox"
246
                label="&viewTabsOnTop.label;"
247
                accesskey="&viewTabsOnTop.accesskey;"/>
248
      <menuitem command="cmd_CustomizeToolbars"
249
                label="&viewCustomizeToolbar.label;"
250
                accesskey="&viewCustomizeToolbar.accesskey;"/>
251
    </menupopup>
252
253
    <menupopup id="blockedPopupOptions"
254
               onpopupshowing="gPopupBlockerObserver.fillPopupList(event);"
255
               onpopuphiding="gPopupBlockerObserver.onPopupHiding(event);">
256
      <menuitem observes="blockedPopupAllowSite"/>
257
      <menuitem observes="blockedPopupEditSettings"/>
258
      <menuitem observes="blockedPopupDontShowMessage"/>
259
      <menuseparator observes="blockedPopupsSeparator"/>
260
    </menupopup>
261
262
    <menupopup id="autohide-context"
263
           onpopupshowing="FullScreen.getAutohide(this.firstChild);">
264
      <menuitem type="checkbox" label="&fullScreenAutohide.label;"
265
                accesskey="&fullScreenAutohide.accesskey;"
266
                oncommand="FullScreen.setAutohide();"/>
267
      <menuseparator/>
268
      <menuitem label="&fullScreenExit.label;"
269
                accesskey="&fullScreenExit.accesskey;"
270
                oncommand="BrowserFullScreen();"/>
271
    </menupopup>
272
273
    <menupopup id="contentAreaContextMenu" pagemenu="start"
274
               onpopupshowing="if (event.target != this)
275
                                 return true;
276
                               gContextMenu = new nsContextMenu(this, event.shiftKey);
277
                               if (gContextMenu.shouldDisplay)
278
                                 updateEditUIVisibility();
279
                               return gContextMenu.shouldDisplay;"
280
               onpopuphiding="if (event.target != this)
281
                                return;
282
                              gContextMenu.hiding();
283
                              gContextMenu = null;
284
                              updateEditUIVisibility();">
285
#include browser-context.inc
286
    </menupopup>
287
288
    <menupopup id="placesContext"/>
289
290
291
    <panel id="ctrlTab-panel" class="KUI-panel" hidden="true" norestorefocus="true" level="top">
292
      <hbox>
293
        <button class="ctrlTab-preview" flex="1"/>
294
        <button class="ctrlTab-preview" flex="1"/>
295
        <button class="ctrlTab-preview" flex="1"/>
296
        <button class="ctrlTab-preview" flex="1"/>
297
        <button class="ctrlTab-preview" flex="1"/>
298
        <button class="ctrlTab-preview" flex="1"/>
299
      </hbox>
300
      <hbox pack="center">
301
        <button id="ctrlTab-showAll" class="ctrlTab-preview" noicon="true"/>
302
      </hbox>
303
    </panel>
304
305
    <!-- Bookmarks and history tooltip -->
306
    <tooltip id="bhTooltip"/>
307
308
    <panel id="customizeToolbarSheetPopup"
309
           noautohide="true"
310
           sheetstyle="&dialog.dimensions;"/>
311
312
    <tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/>
313
314
    <tooltip id="back-button-tooltip">
315
      <label class="tooltip-label" value="&backButton.tooltip;"/>
316
#ifdef XP_MACOSX
317
      <label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
318
#else
319
      <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
320
#endif
321
    </tooltip>
322
323
    <tooltip id="forward-button-tooltip">
324
      <label class="tooltip-label" value="&forwardButton.tooltip;"/>
325
#ifdef XP_MACOSX
326
      <label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
327
#else
328
      <label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
329
#endif
330
    </tooltip>
331
332
#include popup-notifications.inc
333
334
  </popupset>
335
336
#ifdef CAN_DRAW_IN_TITLEBAR
337
<vbox id="titlebar">
338
  <hbox id="titlebar-content">
339
#ifdef MENUBAR_CAN_AUTOHIDE
340
    <hbox id="appmenu-button-container">
341
      <button id="appmenu-button"
342
              type="menu"
343
              label="&brandShortName;"
344
              style="-moz-user-focus: ignore;">
345
#include browser-appmenu.inc
346
      </button>
347
    </hbox>
348
#endif
349
    <spacer id="titlebar-spacer" flex="1"/>
350
    <hbox id="titlebar-buttonbox-container" align="start">
351
      <hbox id="titlebar-buttonbox">
352
        <toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
353
        <toolbarbutton class="titlebar-button" id="titlebar-max" oncommand="onTitlebarMaxClick();"/>
354
        <toolbarbutton class="titlebar-button" id="titlebar-close" command="cmd_closeWindow"/>
355
      </hbox>
356
    </hbox>
357
  </hbox>
358
</vbox>
359
#endif
360
361
<deck flex="1" id="tab-view-deck">
362
<vbox flex="1" id="browser-panel">
363
364
  <toolbox id="navigator-toolbox"
365
           defaultmode="icons" mode="icons"
366
           iconsize="large">
367
    <!-- Menu -->
368
    <toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
369
             defaultset="menubar-items"
370
             mode="icons" iconsize="small" defaulticonsize="small"
371
             lockiconsize="true"
372
#ifdef MENUBAR_CAN_AUTOHIDE
373
             toolbarname="&menubarCmd.label;"
374
             accesskey="&menubarCmd.accesskey;"
375
#endif
376
             context="toolbar-context-menu">
377
      <toolbaritem id="menubar-items" align="center">
378
# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by
379
# hiddenWindow.xul.
380
#include browser-menubar.inc
381
      </toolbaritem>
382
383
#ifdef CAN_DRAW_IN_TITLEBAR
384
      <hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/>
385
      <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/>
386
#endif
387
    </toolbar>
388
389
    <toolbar id="nav-bar" class="toolbar-primary chromeclass-toolbar"
390
             toolbarname="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;"
391
             fullscreentoolbar="true" mode="icons" customizable="true"
392
             iconsize="large"
393
             defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,webrtc-status-button,bookmarks-menu-button,downloads-button,home-button,window-controls"
394
             context="toolbar-context-menu">
395
396
      <toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
397
                   context="backForwardMenu" removable="true"
398
                   forwarddisabled="true"
399
                   title="&backForwardItem.title;">
400
        <toolbarbutton id="back-button" class="toolbarbutton-1"
401
                       label="&backCmd.label;"
402
                       command="Browser:BackOrBackDuplicate"
403
                       onclick="checkForMiddleClick(this, event);"
404
                       tooltip="back-button-tooltip"/>
405
        <toolbarbutton id="forward-button" class="toolbarbutton-1"
406
                       label="&forwardCmd.label;"
407
                       command="Browser:ForwardOrForwardDuplicate"
408
                       onclick="checkForMiddleClick(this, event);"
409
                       tooltip="forward-button-tooltip"/>
410
        <dummyobservertarget hidden="true"
411
                             onbroadcast="if (this.getAttribute('disabled') == 'true')
412
                                            this.parentNode.setAttribute('forwarddisabled', 'true');
413
                                          else
414
                                            this.parentNode.removeAttribute('forwarddisabled');">
415
          <observes element="Browser:ForwardOrForwardDuplicate" attribute="disabled"/>
416
        </dummyobservertarget>
417
      </toolbaritem>
418
419
      <toolbaritem id="urlbar-container" align="center" flex="400" persist="width" combined="true"
420
                   title="&locationItem.title;" class="chromeclass-location" removable="true">
421
        <textbox id="urlbar" flex="1"
422
                 placeholder="&urlbar.placeholder2;"
423
                 type="autocomplete"
424
                 autocompletesearch="urlinline history"
425
                 autocompletesearchparam="enable-actions"
426
                 autocompletepopup="PopupAutoCompleteRichResult"
427
                 completeselectedindex="true"
428
                 tabscrolling="true"
429
                 showcommentcolumn="true"
430
                 showimagecolumn="true"
431
                 enablehistory="true"
432
                 maxrows="6"
433
                 newlines="stripsurroundingwhitespace"
434
                 oninput="gBrowser.userTypedValue = this.value;"
435
                 ontextentered="this.handleCommand(param);"
436
                 ontextreverted="return this.handleRevert();"
437
                 pageproxystate="invalid"
438
                 onfocus="document.getElementById('identity-box').style.MozUserFocus= 'normal'"
439
                 onblur="setTimeout(function() document.getElementById('identity-box').style.MozUserFocus = '', 0);">
440
          <box id="notification-popup-box" hidden="true" align="center">
441
            <image id="default-notification-icon" class="notification-anchor-icon" role="button"/>
442
            <image id="identity-notification-icon" class="notification-anchor-icon" role="button"/>
443
            <image id="geo-notification-icon" class="notification-anchor-icon" role="button"/>
444
            <image id="addons-notification-icon" class="notification-anchor-icon" role="button"/>
445
            <image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"/>
446
            <image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
447
            <image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
448
            <image id="plugins-notification-icon" class="notification-anchor-icon" role="button"/>
449
            <image id="web-notifications-notification-icon" class="notification-anchor-icon" role="button"/>
450
            <image id="alert-plugins-notification-icon" class="notification-anchor-icon" role="button"/>
451
            <image id="blocked-plugins-notification-icon" class="notification-anchor-icon" role="button"/>
452
            <image id="plugin-install-notification-icon" class="notification-anchor-icon" role="button"/>
453
            <image id="mixed-content-blocked-notification-icon" class="notification-anchor-icon" role="button"/>
454
            <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon" role="button"/>
455
            <image id="webRTC-sharingDevices-notification-icon" class="notification-anchor-icon" role="button"/>
456
            <image id="pointerLock-notification-icon" class="notification-anchor-icon" role="button"/>
457
            <image id="servicesInstall-notification-icon" class="notification-anchor-icon" role="button"/>
458
          </box>
459
          <!-- Use onclick instead of normal popup= syntax since the popup
460
               code fires onmousedown, and hence eats our favicon drag events.
461
               We only add the identity-box button to the tab order when the location bar
462
               has focus, otherwise pressing F6 focuses it instead of the location bar -->
463
          <box id="identity-box" role="button"
464
               align="center"
465
               onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
466
               onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);"
467
               ondragstart="gIdentityHandler.onDragStart(event);">
468
            <image id="page-proxy-favicon"
469
                   onclick="PageProxyClickHandler(event);"
470
                   pageproxystate="invalid"/>
471
            <hbox id="identity-icon-labels">
472
              <label id="identity-icon-label" class="plain" flex="1"/>
473
              <label id="identity-icon-country-label" class="plain"/>
474
            </hbox>
475
          </box>
476
          <box id="urlbar-display-box" align="center">
477
            <label id="urlbar-display" value="&urlbar.switchToTab.label;"/>
478
          </box>
479
          <hbox id="urlbar-icons">
480
            <image id="page-report-button"
481
                   class="urlbar-icon"
482
                   hidden="true"
483
                   tooltiptext="&pageReportIcon.tooltip;"
484
                   onclick="gPopupBlockerObserver.onReportButtonClick(event);"/>
485
            <image id="star-button"
486
                   class="urlbar-icon"
487
                   onclick="BookmarkingUI.onCommand(event);"/>
488
            <image id="go-button"
489
                   class="urlbar-icon"
490
                   tooltiptext="&goEndCap.tooltip;"
491
                   onclick="gURLBar.handleCommand(event);"/>
492
          </hbox>
493
          <toolbarbutton id="urlbar-go-button"
494
                         class="chromeclass-toolbar-additional"
495
                         onclick="gURLBar.handleCommand(event);"
496
                         tooltiptext="&goEndCap.tooltip;"/>
497
          <toolbarbutton id="urlbar-reload-button"
498
                         class="chromeclass-toolbar-additional"
499
                         command="Browser:ReloadOrDuplicate"
500
                         onclick="checkForMiddleClick(this, event);"
501
                         tooltiptext="&reloadButton.tooltip;"/>
502
          <toolbarbutton id="urlbar-stop-button"
503
                         class="chromeclass-toolbar-additional"
504
                         command="Browser:Stop"
505
                         tooltiptext="&stopButton.tooltip;"/>
506
        </textbox>
507
      </toolbaritem>
508
509
      <toolbarbutton id="reload-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
510
                     label="&reloadCmd.label;" removable="true"
511
                     command="Browser:ReloadOrDuplicate"
512
                     onclick="checkForMiddleClick(this, event);"
513
                     tooltiptext="&reloadButton.tooltip;"/>
514
515
      <toolbarbutton id="stop-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
516
                     label="&stopCmd.label;" removable="true"
517
                     command="Browser:Stop"
518
                     tooltiptext="&stopButton.tooltip;"/>
519
520
      <toolbaritem id="search-container" title="&searchItem.title;"
521
                   align="center" class="chromeclass-toolbar-additional"
522
                   flex="100" persist="width" removable="true">
523
        <searchbar id="searchbar" flex="1"/>
524
      </toolbaritem>
525
526
      <toolbarbutton id="webrtc-status-button"
527
                     class="toolbarbutton-1 chromeclass-toolbar-additional"
528
                     type="menu"
529
                     hidden="true"
530
                     orient="horizontal"
531
                     label="&webrtcIndicatorButton.label;"
532
                     tooltiptext="&webrtcIndicatorButton.tooltip;">
533
        <menupopup onpopupshowing="WebrtcIndicator.fillPopup(this);"
534
                   onpopuphiding="WebrtcIndicator.clearPopup(this);"
535
                   oncommand="WebrtcIndicator.menuCommand(event.target);"/>
536
      </toolbarbutton>
537
538
      <toolbarbutton id="bookmarks-menu-button"
539
                     class="toolbarbutton-1 chromeclass-toolbar-additional"
540
                     persist="class"
541
                     removable="true"
542
                     type="menu"
543
                     label="&bookmarksMenuButton.label;"
544
                     tooltiptext="&bookmarksMenuButton.tooltip;"
545
                     ondragenter="PlacesMenuDNDHandler.onDragEnter(event);"
546
                     ondragover="PlacesMenuDNDHandler.onDragOver(event);"
547
                     ondragleave="PlacesMenuDNDHandler.onDragLeave(event);"
548
                     ondrop="PlacesMenuDNDHandler.onDrop(event);">
549
        <menupopup id="BMB_bookmarksPopup"
550
                   placespopup="true"
551
                   context="placesContext"
552
                   openInTabs="children"
553
                   oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);"
554
                   onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
555
                   onpopupshowing="BookmarkingUI.onPopupShowing(event);
556
                                   if (!this.parentNode._placesView)
557
                                     new PlacesMenu(event, 'place:folder=BOOKMARKS_MENU');"
558
                   tooltip="bhTooltip" popupsinherittooltip="true">
559
          <menuitem id="BMB_viewBookmarksToolbar"
560
                    placesanonid="view-toolbar"
561
                    toolbarId="PersonalToolbar"
562
                    type="checkbox"
563
                    oncommand="onViewToolbarCommand(event)"
564
                    label="&viewBookmarksToolbar.label;"/>
565
          <menuseparator/>
566
          <menuitem id="BMB_bookmarksShowAll"
567
                    label="&showAllBookmarks2.label;"
568
                    command="Browser:ShowAllBookmarks"
569
                    key="manBookmarkKb"/>
570
          <menuseparator/>
571
          <menuitem id="BMB_bookmarkThisPage"
572
#ifndef XP_MACOSX
573
                    class="menuitem-iconic"
574
#endif
575
                    label="&bookmarkThisPageCmd.label;"
576
                    command="Browser:AddBookmarkAs"
577
                    key="addBookmarkAsKb"/>
578
          <menuitem id="BMB_subscribeToPageMenuitem"
579
#ifndef XP_MACOSX
580
                    class="menuitem-iconic"
581
#endif
582
                    label="&subscribeToPageMenuitem.label;"
583
                    oncommand="return FeedHandler.subscribeToFeed(null, event);"
584
                    onclick="checkForMiddleClick(this, event);"
585
                    observes="singleFeedMenuitemState"/>
586
          <menu id="BMB_subscribeToPageMenupopup"
587
#ifndef XP_MACOSX
588
                class="menu-iconic"
589
#endif
590
                label="&subscribeToPageMenupopup.label;"
591
                observes="multipleFeedsMenuState">
592
            <menupopup id="BMB_subscribeToPageSubmenuMenupopup"
593
                       onpopupshowing="return FeedHandler.buildFeedList(event.target);"
594
                       oncommand="return FeedHandler.subscribeToFeed(null, event);"
595
                       onclick="checkForMiddleClick(this, event);"/>
596
          </menu>
597
          <menuseparator/>
598
          <menu id="BMB_bookmarksToolbar"
599
                placesanonid="toolbar-autohide"
600
                class="menu-iconic bookmark-item"
601
                label="&personalbarCmd.label;"
602
                container="true">
603
            <menupopup id="BMB_bookmarksToolbarPopup"
604
                       placespopup="true"
605
                       context="placesContext"
606
                       onpopupshowing="if (!this.parentNode._placesView)
607
                                         new PlacesMenu(event, 'place:folder=TOOLBAR');"/>
608
          </menu>
609
          <menuseparator/>
610
          <!-- Bookmarks menu items -->
611
          <menuseparator builder="end"
612
                         class="hide-if-empty-places-result"/>
613
          <menuitem id="BMB_unsortedBookmarks"
614
                    label="&bookmarksMenuButton.unsorted.label;"
615
                    oncommand="PlacesCommandHook.showPlacesOrganizer('UnfiledBookmarks');"
616
                    class="menuitem-iconic"/>
617
        </menupopup>
618
      </toolbarbutton>
619
620
      <toolbarbutton id="home-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
621
                     persist="class" removable="true"
622
                     label="&homeButton.label;"
623
                     ondragover="homeButtonObserver.onDragOver(event)"
624
                     ondragenter="homeButtonObserver.onDragOver(event)"
625
                     ondrop="homeButtonObserver.onDrop(event)"
626
                     ondragexit="homeButtonObserver.onDragExit(event)"
627
                     onclick="BrowserGoHome(event);"
628
                     aboutHomeOverrideTooltip="&abouthome.pageTitle;"/>
629
630
      <toolbarbutton id="social-share-button"
631
                     class="toolbarbutton-1 chromeclass-toolbar-additional"
632
                     hidden="true"
633
                     label="&sharePageCmd.label;"
634
                     tooltiptext="&sharePageCmd.label;"
635
                     command="Social:SharePage"/>
636
637
      <toolbaritem id="social-toolbar-item"
638
                   class="chromeclass-toolbar-additional"
639
                   removable="false"
640
                   title="&socialToolbar.title;"
641
                   hidden="true"
642
                   skipintoolbarset="true"
643
                   observes="socialActiveBroadcaster">
644
        <toolbarbutton id="social-notification-icon" class="default-notification-icon toolbarbutton-1 notification-anchor-icon"
645
                   oncommand="PopupNotifications._reshowNotifications(this,
646
                                document.getElementById('social-sidebar-browser'));"/>
647
        <toolbarbutton id="social-provider-button"
648
                       class="toolbarbutton-1"
649
                       type="menu">
650
          <menupopup id="social-statusarea-popup">
651
            <menuitem class="social-statusarea-user menuitem-iconic" pack="start" align="center"
652
                      observes="socialBroadcaster_userDetails"
653
                      oncommand="SocialUI.showProfile(); document.getElementById('social-statusarea-popup').hidePopup();">
654
              <image class="social-statusarea-user-portrait"
655
                     observes="socialBroadcaster_userDetails"/>
656
              <vbox>
657
                <label class="social-statusarea-loggedInStatus"
658
                       observes="socialBroadcaster_userDetails"/>
659
              </vbox>
660
            </menuitem>
661
#ifndef XP_WIN
662
            <menuseparator class="social-statusarea-separator"/>
663
#endif
664
            <menuitem class="social-toggle-sidebar-menuitem"
665
                      type="checkbox"
666
                      autocheck="false"
667
                      command="Social:ToggleSidebar"
668
                      label="&social.toggleSidebar.label;"
669
                      accesskey="&social.toggleSidebar.accesskey;"/>
670
            <menuitem class="social-toggle-notifications-menuitem"
671
                      type="checkbox"
672
                      autocheck="false"
673
                      command="Social:ToggleNotifications"
674
                      label="&social.toggleNotifications.label;"
675
                      accesskey="&social.toggleNotifications.accesskey;"/>
676
            <menuitem class="social-toggle-menuitem" command="Social:Toggle"/>
677
            <menuseparator/>
678
            <menuseparator class="social-provider-menu" hidden="true"/>
679
            <menuitem class="social-addons-menuitem" command="Social:Addons"
680
                      label="&social.addons.label;"/>
681
            <menuitem label="&social.learnMore.label;"
682
                      accesskey="&social.learnMore.accesskey;"
683
                      oncommand="SocialUI.showLearnMore();"/>
684
          </menupopup>
685
        </toolbarbutton>
686
        <toolbarbutton id="social-mark-button"
687
                       class="toolbarbutton-1"
688
                       hidden="true"
689
                       disabled="true"
690
                       command="Social:TogglePageMark"/>
691
      </toolbaritem>
692
693
      <hbox id="window-controls" hidden="true" pack="end">
694
        <toolbarbutton id="minimize-button"
695
                       tooltiptext="&fullScreenMinimize.tooltip;"
696
                       oncommand="window.minimize();"/>
697
698
        <toolbarbutton id="restore-button"
699
                       tooltiptext="&fullScreenRestore.tooltip;"
700
                       oncommand="BrowserFullScreen();"/>
701
702
        <toolbarbutton id="close-button"
703
                       tooltiptext="&fullScreenClose.tooltip;"
704
                       oncommand="BrowserTryToCloseWindow();"/>
705
      </hbox>
706
    </toolbar>
707
708
    <toolbarset id="customToolbars" context="toolbar-context-menu"/>
709
710
    <toolbar id="PersonalToolbar"
711
             mode="icons" iconsize="small" defaulticonsize="small"
712
             lockiconsize="true"
713
             class="chromeclass-directories"
714
             context="toolbar-context-menu"
715
             defaultset="personal-bookmarks"
716
             toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;"
717
             collapsed="true"
718
             customizable="true">
719
      <toolbaritem flex="1" id="personal-bookmarks" title="&bookmarksItem.title;"
720
                   removable="true">
721
        <hbox flex="1"
722
              id="PlacesToolbar"
723
              context="placesContext"
724
              onclick="BookmarksEventHandler.onClick(event, this._placesView);"
725
              oncommand="BookmarksEventHandler.onCommand(event, this._placesView);"
726
              tooltip="bhTooltip"
727
              popupsinherittooltip="true">
728
          <toolbarbutton class="bookmark-item bookmarks-toolbar-customize"
729
                         mousethrough="never"
730
                         label="&bookmarksToolbarItem.label;"/>
731
          <hbox flex="1">
732
            <hbox align="center">
733
              <image id="PlacesToolbarDropIndicator"
734
                     mousethrough="always"
735
                     collapsed="true"/>
736
            </hbox>
737
            <scrollbox orient="horizontal"
738
                       id="PlacesToolbarItems"
739
                       flex="1"/>
740
            <toolbarbutton type="menu"
741
                           id="PlacesChevron"
742
                           class="chevron"
743
                           mousethrough="never"
744
                           collapsed="true"
745
                           tooltiptext="&bookmarksToolbarChevron.tooltip;"
746
                           onpopupshowing="document.getElementById('PlacesToolbar')
747
                                                   ._placesView._onChevronPopupShowing(event);">
748
              <menupopup id="PlacesChevronPopup"
749
                         placespopup="true"
750
                         tooltip="bhTooltip" popupsinherittooltip="true"
751
                         context="placesContext"/>
752
            </toolbarbutton>
753
          </hbox>
754
        </hbox>
755
      </toolbaritem>
756
    </toolbar>
757
758
#ifdef MENUBAR_CAN_AUTOHIDE
759
#ifndef CAN_DRAW_IN_TITLEBAR
760
#define APPMENU_ON_TABBAR
761
#endif
762
#endif
763
764
765
    <toolbar id="TabsToolbar"
766
             class="toolbar-primary"
767
             fullscreentoolbar="true"
768
             customizable="true"
769
             mode="icons" lockmode="true"
770
             iconsize="small" defaulticonsize="small" lockiconsize="true"
771
             aria-label="&tabsToolbar.label;"
772
             context="toolbar-context-menu"
773
#ifdef APPMENU_ON_TABBAR
774
             defaultset="appmenu-toolbar-button,tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton"
775
#else
776
             defaultset="tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton"
777
#endif
778
             collapsed="true">
779
780
#ifdef APPMENU_ON_TABBAR
781
      <toolbarbutton id="appmenu-toolbar-button"
782
                     class="chromeclass-toolbar-additional"
783
                     type="menu"
784
                     label="&brandShortName;"
785
                     tooltiptext="&appMenuButton.tooltip;">
786
#include browser-appmenu.inc
787
      </toolbarbutton>
788
#endif
789
790
      <tabs id="tabbrowser-tabs"
791
            class="tabbrowser-tabs"
792
            tabbrowser="content"
793
            flex="1"
794
            setfocus="false"
795
            tooltip="tabbrowser-tab-tooltip"
796
            stopwatchid="FX_TAB_CLICK_MS">
797
        <tab class="tabbrowser-tab" selected="true" fadein="true"/>
798
      </tabs>
799
800
      <toolbarbutton id="new-tab-button"
801
                     class="toolbarbutton-1 chromeclass-toolbar-additional"
802
                     label="&tabCmd.label;"
803
                     command="cmd_newNavigatorTab"
804
                     onclick="checkForMiddleClick(this, event);"
805
                     tooltiptext="&newTabButton.tooltip;"
806
                     ondrop="newTabButtonObserver.onDrop(event)"
807
                     ondragover="newTabButtonObserver.onDragOver(event)"
808
                     ondragenter="newTabButtonObserver.onDragOver(event)"
809
                     ondragexit="newTabButtonObserver.onDragExit(event)"
810
                     removable="true"/>
811
812
      <toolbarbutton id="alltabs-button"
813
                     class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button"
814
                     type="menu"
815
                     label="&listAllTabs.label;"
816
                     tooltiptext="&listAllTabs.label;"
817
                     removable="true">
818
        <menupopup id="alltabs-popup"
819
                   position="after_end">
820
          <menuitem id="menu_tabview"
821
                    class="menuitem-iconic"
822
                    key="key_tabview"
823
                    label="&viewTabGroups.label;"
824
                    command="Browser:ToggleTabView"
825
                    observes="tabviewGroupsNumber"/>
826
          <menuseparator id="alltabs-popup-separator"/>
827
        </menupopup>
828
      </toolbarbutton>
829
830
      <toolbarbutton id="tabs-closebutton"
831
                     class="close-button tabs-closebutton"
832
                     command="cmd_close"
833
                     label="&closeTab.label;"
834
                     tooltiptext="&closeTab.label;"/>
835
836
#ifdef CAN_DRAW_IN_TITLEBAR
837
      <hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/>
838
      <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/>
839
#endif
840
    </toolbar>
841
842
    <toolbarpalette id="BrowserToolbarPalette">
843
844
# Update primaryToolbarButtons in browser/themes/shared/browser.inc when adding
845
# or removing default items with the toolbarbutton-1 class.
846
847
      <toolbarbutton id="print-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
848
                     label="&printButton.label;" command="cmd_print"
849
                     tooltiptext="&printButton.tooltip;"/>
850
851
      <!-- This is a placeholder for the Downloads Indicator.  It is visible
852
           during the customization of the toolbar, in the palette, and before
853
           the Downloads Indicator overlay is loaded. -->
854
      <toolbarbutton id="downloads-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
855
                     oncommand="DownloadsIndicatorView.onCommand(event);"
856
                     ondrop="DownloadsIndicatorView.onDrop(event);"
857
                     ondragover="DownloadsIndicatorView.onDragOver(event);"
858
                     ondragenter="DownloadsIndicatorView.onDragOver(event);"
859
                     label="&downloads.label;"
860
                     tooltiptext="&downloads.tooltip;"/>
861
862
      <toolbarbutton id="history-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
863
                     observes="viewHistorySidebar" label="&historyButton.label;"
864
                     tooltiptext="&historyButton.tooltip;"/>
865
866
      <toolbarbutton id="bookmarks-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
867
                     observes="viewBookmarksSidebar"
868
                     tooltiptext="&bookmarksButton.tooltip;"
869
                     ondrop="bookmarksButtonObserver.onDrop(event)"
870
                     ondragover="bookmarksButtonObserver.onDragOver(event)"
871
                     ondragenter="bookmarksButtonObserver.onDragOver(event)"
872
                     ondragexit="bookmarksButtonObserver.onDragExit(event)"/>
873
874
      <toolbarbutton id="new-window-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
875
                     label="&newNavigatorCmd.label;"
876
                     command="key_newNavigator"
877
                     tooltiptext="&newWindowButton.tooltip;"
878
                     ondrop="newWindowButtonObserver.onDrop(event)"
879
                     ondragover="newWindowButtonObserver.onDragOver(event)"
880
                     ondragenter="newWindowButtonObserver.onDragOver(event)"
881
                     ondragexit="newWindowButtonObserver.onDragExit(event)"/>
882
883
      <toolbarbutton id="fullscreen-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
884
                     observes="View:FullScreen"
885
                     type="checkbox"
886
                     label="&fullScreenCmd.label;"
887
                     tooltiptext="&fullScreenButton.tooltip;"/>
888
889
      <toolbaritem id="zoom-controls" class="chromeclass-toolbar-additional"
890
                   title="&zoomControls.label;">
891
        <toolbarbutton id="zoom-out-button" class="toolbarbutton-1"
892
                       label="&fullZoomReduceCmd.label;"
893
                       command="cmd_fullZoomReduce"
894
                       tooltiptext="&zoomOutButton.tooltip;"/>
895
        <toolbarbutton id="zoom-in-button" class="toolbarbutton-1"
896
                       label="&fullZoomEnlargeCmd.label;"
897
                       command="cmd_fullZoomEnlarge"
898
                       tooltiptext="&zoomInButton.tooltip;"/>
899
      </toolbaritem>
900
901
      <toolbarbutton id="feed-button"
902
                     type="menu"
903
                     class="toolbarbutton-1 chromeclass-toolbar-additional"
904
                     disabled="true"
905
                     label="&feedButton.label;"
906
                     tooltiptext="&feedButton.tooltip;"
907
                     onclick="return FeedHandler.onFeedButtonClick(event);">
908
        <menupopup position="after_end"
909
                   id="feed-menu"
910
                   onpopupshowing="return FeedHandler.buildFeedList(this);"
911
                   oncommand="return FeedHandler.subscribeToFeed(null, event);"
912
                   onclick="checkForMiddleClick(this, event);"/>
913
      </toolbarbutton>
914
915
      <toolbarbutton id="cut-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
916
                     label="&cutCmd.label;"
917
                     command="cmd_cut"
918
                     tooltiptext="&cutButton.tooltip;"/>
919
920
      <toolbarbutton id="copy-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
921
                     label="&copyCmd.label;"
922
                     command="cmd_copy"
923
                     tooltiptext="&copyButton.tooltip;"/>
924
925
      <toolbarbutton id="paste-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
926
                     label="&pasteCmd.label;"
927
                     command="cmd_paste"
928
                     tooltiptext="&pasteButton.tooltip;"/>
929
930
#ifdef MOZ_SERVICES_SYNC
931
      <toolbarbutton id="sync-button"
932
                     class="toolbarbutton-1 chromeclass-toolbar-additional"
933
                     label="&syncToolbarButton.label;"
934
                     oncommand="gSyncUI.handleToolbarButton()"/>
935
#endif
936
937
      <toolbaritem id="navigator-throbber" title="&throbberItem.title;" align="center" pack="center"
938
                   mousethrough="always">
939
        <image/>
940
      </toolbaritem>
941
942
      <toolbarbutton id="tabview-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
943
                     label="&tabGroupsButton.label;"
944
                     command="Browser:ToggleTabView"
945
                     tooltiptext="&tabGroupsButton.tooltip;"
946
                     observes="tabviewGroupsNumber"/>
947
    </toolbarpalette>
948
  </toolbox>
949
950
  <hbox id="fullscr-toggler" collapsed="true"/>
951
952
  <hbox flex="1" id="browser">
953
    <vbox id="browser-border-start" hidden="true" layer="true"/>
954
    <vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
955
      <sidebarheader id="sidebar-header" align="center">
956
        <label id="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
957
        <image id="sidebar-throbber"/>
958
        <toolbarbutton class="tabs-closebutton" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="toggleSidebar();"/>
959
      </sidebarheader>
960
      <browser id="sidebar" flex="1" autoscroll="false" disablehistory="true"
961
                style="min-width: 14em; width: 18em; max-width: 36em;"/>
962
    </vbox>
963
964
    <splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/>
965
    <vbox id="appcontent" flex="1">
966
      <tabbrowser id="content" disablehistory="true"
967
                  flex="1" contenttooltip="aHTMLTooltip"
968
                  tabcontainer="tabbrowser-tabs"
969
                  contentcontextmenu="contentAreaContextMenu"
970
                  autocompletepopup="PopupAutoComplete"/>
971
      <chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/>
972
      <statuspanel id="statusbar-display" inactive="true"/>
973
    </vbox>
974
    <splitter id="social-sidebar-splitter"
975
              class="chromeclass-extrachrome sidebar-splitter"
976
              observes="socialSidebarBroadcaster"/>
977
    <vbox id="social-sidebar-box"
978
          class="chromeclass-extrachrome"
979
          observes="socialSidebarBroadcaster"
980
          persist="width">
981
      <browser id="social-sidebar-browser"
982
               type="content"
983
               context="contentAreaContextMenu"
984
               disableglobalhistory="true"
985
               tooltip="aHTMLTooltip"
986
               popupnotificationanchor="social-notification-icon"
987
               flex="1"
988
               style="min-width: 14em; width: 18em; max-width: 36em;"/>
989
    </vbox>
990
    <vbox id="browser-border-end" hidden="true" layer="true"/>
991
  </hbox>
992
993
  <hbox id="full-screen-warning-container" hidden="true" fadeout="true">
994
    <hbox style="width: 100%;" pack="center"> <!-- Inner hbox needed due to bug 579776. -->
995
      <vbox id="full-screen-warning-message" align="center">
996
        <description id="full-screen-domain-text"/>
997
        <description class="full-screen-description" value="&fullscreenExitHint.value;"/>
998
        <vbox id="full-screen-approval-pane" align="center">
999
          <description class="full-screen-description" value="&fullscreenApproval.value;"/>
1000
          <hbox>
1001
            <button label="&fullscreenAllowButton.label;"
1002
                    oncommand="FullScreen.setFullscreenAllowed(true);"
1003
                    class="full-screen-approval-button"/>
1004
            <button label="&fullscreenExitButton.label;"
1005
                    oncommand="FullScreen.setFullscreenAllowed(false);"
1006
                    class="full-screen-approval-button"/>
1007
          </hbox>
1008
          <checkbox id="full-screen-remember-decision"/>
1009
        </vbox>
1010
      </vbox>
1011
    </hbox>
1012
  </hbox>
1013
1014
  <vbox id="browser-bottombox" layer="true">
1015
    <notificationbox id="global-notificationbox"/>
1016
    <toolbar id="developer-toolbar"
1017
             class="devtools-toolbar"
1018
             hidden="true">
1019
#ifdef XP_MACOSX
1020
          <toolbarbutton id="developer-toolbar-closebutton"
1021
                         class="devtools-closebutton"
1022
                         oncommand="DeveloperToolbar.hide();"
1023
                         tooltiptext="&devToolbarCloseButton.tooltiptext;"/>
1024
#endif
1025
          <stack class="gclitoolbar-stack-node" flex="1">
1026
            <textbox class="gclitoolbar-input-node" rows="1"/>
1027
            <hbox class="gclitoolbar-complete-node"/>
1028
          </stack>
1029
          <toolbarbutton id="developer-toolbar-toolbox-button"
1030
                         class="developer-toolbar-button"
1031
                         observes="devtoolsMenuBroadcaster_DevToolbox"
1032
                         tooltiptext="&devToolbarToolsButton.tooltip;"/>
1033
#ifndef XP_MACOSX
1034
          <toolbarbutton id="developer-toolbar-closebutton"
1035
                         class="devtools-closebutton"
1036
                         oncommand="DeveloperToolbar.hide();"
1037
                         tooltiptext="&devToolbarCloseButton.tooltiptext;"/>
1038
#endif
1039
   </toolbar>
1040
1041
    <toolbar id="addon-bar"
1042
             toolbarname="&addonBarCmd.label;" accesskey="&addonBarCmd.accesskey;"
1043
             collapsed="true"
1044
             class="toolbar-primary chromeclass-toolbar"
1045
             context="toolbar-context-menu" toolboxid="navigator-toolbox"
1046
             mode="icons" iconsize="small" defaulticonsize="small"
1047
             lockiconsize="true"
1048
             defaultset="addonbar-closebutton,spring,status-bar"
1049
             customizable="true"
1050
             key="key_toggleAddonBar">
1051
      <toolbarbutton id="addonbar-closebutton"
1052
                     tooltiptext="&addonBarCloseButton.tooltip;"
1053
                     oncommand="setToolbarVisibility(this.parentNode, false);"/>
1054
      <statusbar id="status-bar" ordinal="1000"/>
1055
    </toolbar>
1056
  </vbox>
1057
1058
#ifndef XP_UNIX
1059
  <svg:svg height="0">
1060
    <svg:clipPath id="windows-keyhole-forward-clip-path" clipPathUnits="objectBoundingBox">
1061
      <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"/>
1062
    </svg:clipPath>
1063
    <svg:clipPath id="windows-urlbar-back-button-clip-path" clipPathUnits="userSpaceOnUse">
1064
      <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"/>
1065
    </svg:clipPath>
1066
  </svg:svg>
1067
#endif
1068
#ifdef XP_MACOSX
1069
  <svg:svg height="0">
1070
    <svg:clipPath id="osx-keyhole-forward-clip-path" clipPathUnits="objectBoundingBox">
1071
      <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"/>
1072
    </svg:clipPath>
1073
    <svg:clipPath id="osx-urlbar-back-button-clip-path" clipPathUnits="userSpaceOnUse">
1074
      <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"/>
1075
    </svg:clipPath>
1076
    <svg:clipPath id="osx-tab-ontop-left-curve-clip-path" clipPathUnits="userSpaceOnUse">
1077
      <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"/>
1078
    </svg:clipPath>
1079
    <svg:clipPath id="osx-tab-ontop-right-curve-clip-path" clipPathUnits="userSpaceOnUse">
1080
      <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"/>
1081
    </svg:clipPath>
1082
    <svg:clipPath id="osx-tab-onbottom-left-curve-clip-path" clipPathUnits="userSpaceOnUse">
1083
      <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"/>
1084
    </svg:clipPath>
1085
    <svg:clipPath id="osx-tab-onbottom-right-curve-clip-path" clipPathUnits="userSpaceOnUse">
1086
      <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"/>
1087
    </svg:clipPath>
1088
  </svg:svg>
1089
#endif
1090
1091
</vbox>
1092
# <iframe id="tab-view"> is dynamically appended as the 2nd child of #tab-view-deck.
1093
#     Introducing the iframe dynamically, as needed, was found to be better than
1094
#     starting with an empty iframe here in browser.xul from a Ts standpoint.
1095
</deck>
1096
1097
</window>
(-)a/browser/base/jar.mn (+2 lines)
Lines 53-68 browser.jar: Link Here
53
        content/browser/abouthealthreport/abouthealth.css     (content/abouthealthreport/abouthealth.css)
53
        content/browser/abouthealthreport/abouthealth.css     (content/abouthealthreport/abouthealth.css)
54
#endif
54
#endif
55
        content/browser/aboutRobots-icon.png          (content/aboutRobots-icon.png)
55
        content/browser/aboutRobots-icon.png          (content/aboutRobots-icon.png)
56
        content/browser/aboutRobots-widget-left.png   (content/aboutRobots-widget-left.png)
56
        content/browser/aboutRobots-widget-left.png   (content/aboutRobots-widget-left.png)
57
        content/browser/aboutSocialError.xhtml        (content/aboutSocialError.xhtml)
57
        content/browser/aboutSocialError.xhtml        (content/aboutSocialError.xhtml)
58
*       content/browser/browser.css                   (content/browser.css)
58
*       content/browser/browser.css                   (content/browser.css)
59
*       content/browser/browser.js                    (content/browser.js)
59
*       content/browser/browser.js                    (content/browser.js)
60
*       content/browser/browser.xul                   (content/browser.xul)
60
*       content/browser/browser.xul                   (content/browser.xul)
61
*       content/browser/browser-kde.xul               (content/browser-kde.xul)
62
%       override chrome://browser/content/browser.xul chrome://browser/content/browser-kde.xul desktop=kde
61
*       content/browser/browser-tabPreviews.xml       (content/browser-tabPreviews.xml)
63
*       content/browser/browser-tabPreviews.xml       (content/browser-tabPreviews.xml)
62
*       content/browser/chatWindow.xul                (content/chatWindow.xul)
64
*       content/browser/chatWindow.xul                (content/chatWindow.xul)
63
        content/browser/content.js                    (content/content.js)
65
        content/browser/content.js                    (content/content.js)
64
        content/browser/newtab/newTab.xul             (content/newtab/newTab.xul)
66
        content/browser/newtab/newTab.xul             (content/newtab/newTab.xul)
65
*       content/browser/newtab/newTab.js              (content/newtab/newTab.js)
67
*       content/browser/newtab/newTab.js              (content/newtab/newTab.js)
66
        content/browser/newtab/newTab.css             (content/newtab/newTab.css)
68
        content/browser/newtab/newTab.css             (content/newtab/newTab.css)
67
*       content/browser/pageinfo/pageInfo.xul         (content/pageinfo/pageInfo.xul)
69
*       content/browser/pageinfo/pageInfo.xul         (content/pageinfo/pageInfo.xul)
68
        content/browser/pageinfo/pageInfo.js          (content/pageinfo/pageInfo.js)
70
        content/browser/pageinfo/pageInfo.js          (content/pageinfo/pageInfo.js)
(-)a/browser/components/build/nsModule.cpp (-4 / +2 lines)
Lines 8-24 Link Here
8
#include "nsBrowserCompsCID.h"
8
#include "nsBrowserCompsCID.h"
9
#include "DirectoryProvider.h"
9
#include "DirectoryProvider.h"
10
10
11
#if defined(XP_WIN)
11
#if defined(XP_WIN)
12
#include "nsWindowsShellService.h"
12
#include "nsWindowsShellService.h"
13
#elif defined(XP_MACOSX)
13
#elif defined(XP_MACOSX)
14
#include "nsMacShellService.h"
14
#include "nsMacShellService.h"
15
#elif defined(MOZ_WIDGET_GTK)
15
#elif defined(MOZ_WIDGET_GTK)
16
#include "nsGNOMEShellService.h"
16
#include "nsUnixShellService.h"
17
#endif
17
#endif
18
18
19
#if defined(XP_WIN)
19
#if defined(XP_WIN)
20
#include "nsIEHistoryEnumerator.h"
20
#include "nsIEHistoryEnumerator.h"
21
#endif
21
#endif
22
22
23
#include "rdf.h"
23
#include "rdf.h"
24
#include "nsFeedSniffer.h"
24
#include "nsFeedSniffer.h"
Lines 31-48 using namespace mozilla::browser; Link Here
31
31
32
/////////////////////////////////////////////////////////////////////////////
32
/////////////////////////////////////////////////////////////////////////////
33
33
34
NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
34
NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
35
#if defined(XP_WIN)
35
#if defined(XP_WIN)
36
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService)
36
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService)
37
#elif defined(XP_MACOSX)
37
#elif defined(XP_MACOSX)
38
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
38
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
39
#elif defined(MOZ_WIDGET_GTK)
40
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
41
#endif
39
#endif
42
40
43
#if defined(XP_WIN)
41
#if defined(XP_WIN)
44
NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator)
42
NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator)
45
#endif
43
#endif
46
44
47
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
45
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
48
46
Lines 60-76 NS_DEFINE_NAMED_CID(NS_WINIEHISTORYENUME Link Here
60
NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
58
NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
61
#endif
59
#endif
62
60
63
static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
61
static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
64
    { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, NULL, DirectoryProviderConstructor },
62
    { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, NULL, DirectoryProviderConstructor },
65
#if defined(XP_WIN)
63
#if defined(XP_WIN)
66
    { &kNS_SHELLSERVICE_CID, false, NULL, nsWindowsShellServiceConstructor },
64
    { &kNS_SHELLSERVICE_CID, false, NULL, nsWindowsShellServiceConstructor },
67
#elif defined(MOZ_WIDGET_GTK)
65
#elif defined(MOZ_WIDGET_GTK)
68
    { &kNS_SHELLSERVICE_CID, false, NULL, nsGNOMEShellServiceConstructor },
66
    { &kNS_SHELLSERVICE_CID, false, NULL, nsUnixShellServiceConstructor },
69
#endif
67
#endif
70
    { &kNS_FEEDSNIFFER_CID, false, NULL, nsFeedSnifferConstructor },
68
    { &kNS_FEEDSNIFFER_CID, false, NULL, nsFeedSnifferConstructor },
71
    { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, NULL, AboutRedirector::Create },
69
    { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, NULL, AboutRedirector::Create },
72
#if defined(XP_WIN)
70
#if defined(XP_WIN)
73
    { &kNS_WINIEHISTORYENUMERATOR_CID, false, NULL, nsIEHistoryEnumeratorConstructor },
71
    { &kNS_WINIEHISTORYENUMERATOR_CID, false, NULL, nsIEHistoryEnumeratorConstructor },
74
#elif defined(XP_MACOSX)
72
#elif defined(XP_MACOSX)
75
    { &kNS_SHELLSERVICE_CID, false, NULL, nsMacShellServiceConstructor },
73
    { &kNS_SHELLSERVICE_CID, false, NULL, nsMacShellServiceConstructor },
76
#endif
74
#endif
(-)a/browser/components/preferences/advanced.js (+17 lines)
Lines 23-38 var gAdvancedPane = { Link Here
23
    if (extraArgs && extraArgs["advancedTab"]){
23
    if (extraArgs && extraArgs["advancedTab"]){
24
      advancedPrefs.selectedTab = document.getElementById(extraArgs["advancedTab"]);
24
      advancedPrefs.selectedTab = document.getElementById(extraArgs["advancedTab"]);
25
    } else {
25
    } else {
26
      var preference = document.getElementById("browser.preferences.advanced.selectedTabIndex");
26
      var preference = document.getElementById("browser.preferences.advanced.selectedTabIndex");
27
      if (preference.value !== null)
27
      if (preference.value !== null)
28
        advancedPrefs.selectedIndex = preference.value;
28
        advancedPrefs.selectedIndex = preference.value;
29
    }
29
    }
30
30
31
    var env = Components.classes["@mozilla.org/process/environment;1"]
32
                        .getService(Components.interfaces.nsIEnvironment);
33
    var kde_session = 0;
34
    if (env.get('KDE_FULL_SESSION') == "true")
35
      kde_session = 1;
36
31
#ifdef HAVE_SHELL_SERVICE
37
#ifdef HAVE_SHELL_SERVICE
32
    this.updateSetDefaultBrowser();
38
    this.updateSetDefaultBrowser();
33
#ifdef XP_WIN
39
#ifdef XP_WIN
34
    // In Windows 8 we launch the control panel since it's the only
40
    // In Windows 8 we launch the control panel since it's the only
35
    // way to get all file type association prefs. So we don't know
41
    // way to get all file type association prefs. So we don't know
36
    // when the user will select the default.  We refresh here periodically
42
    // when the user will select the default.  We refresh here periodically
37
    // in case the default changes.  On other Windows OS's defaults can also
43
    // in case the default changes.  On other Windows OS's defaults can also
38
    // be set while the prefs are open.
44
    // be set while the prefs are open.
Lines 857-870 var gAdvancedPane = { Link Here
857
   * Set browser as the operating system default browser.
863
   * Set browser as the operating system default browser.
858
   */
864
   */
859
  setDefaultBrowser: function()
865
  setDefaultBrowser: function()
860
  {
866
  {
861
    let shellSvc = getShellService();
867
    let shellSvc = getShellService();
862
    if (!shellSvc)
868
    if (!shellSvc)
863
      return;
869
      return;
864
    shellSvc.setDefaultBrowser(true, false);
870
    shellSvc.setDefaultBrowser(true, false);
871
    if (kde_session == 1) {
872
      var shellObj = Components.classes["@mozilla.org/file/local;1"]
873
                               .createInstance(Components.interfaces.nsILocalFile);
874
      shellObj.initWithPath("/usr/bin/kwriteconfig");
875
      var process = Components.classes["@mozilla.org/process/util;1"]
876
                              .createInstance(Components.interfaces.nsIProcess);
877
      process.init(shellObj);
878
      var args = ["--file", "kdeglobals", "--group", "General", "--key",
879
          "BrowserApplication", "MozillaFirefox"];
880
      process.run(false, args, args.length);
881
    }
865
    let selectedIndex =
882
    let selectedIndex =
866
      shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
883
      shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
867
    document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
884
    document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
868
  }
885
  }
869
#endif
886
#endif
870
};
887
};
(-)a/browser/components/shell/src/Makefile.in (+2 lines)
Lines 17-26 DISABLED_EXTRA_COMPONENTS = nsSetDefault Link Here
17
17
18
include $(topsrcdir)/config/rules.mk
18
include $(topsrcdir)/config/rules.mk
19
19
20
DEFINES += -DMOZ_APP_NAME=\"$(MOZ_APP_NAME)\" \
20
DEFINES += -DMOZ_APP_NAME=\"$(MOZ_APP_NAME)\" \
21
  -DMOZ_APP_VERSION=\"$(MOZ_APP_VERSION)\"
21
  -DMOZ_APP_VERSION=\"$(MOZ_APP_VERSION)\"
22
22
23
CXXFLAGS += $(TK_CFLAGS)
23
CXXFLAGS += $(TK_CFLAGS)
24
24
25
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
26
25
clobber::
27
clobber::
26
	rm -f $(DIST)/lib/$(LIBRARY_NAME).lib
28
	rm -f $(DIST)/lib/$(LIBRARY_NAME).lib
(-)a/browser/components/shell/src/moz.build (+2 lines)
Lines 11-27 if CONFIG['OS_ARCH'] == 'WINNT': Link Here
11
        'nsWindowsShellService.cpp',
11
        'nsWindowsShellService.cpp',
12
    ]
12
    ]
13
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
13
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
14
    CPP_SOURCES += [
14
    CPP_SOURCES += [
15
        'nsMacShellService.cpp',
15
        'nsMacShellService.cpp',
16
    ]
16
    ]
17
elif CONFIG['MOZ_WIDGET_GTK']:
17
elif CONFIG['MOZ_WIDGET_GTK']:
18
    CPP_SOURCES += [
18
    CPP_SOURCES += [
19
        'nsUnixShellService.cpp',
19
        'nsGNOMEShellService.cpp',
20
        'nsGNOMEShellService.cpp',
21
	'nsKDEShellService.cpp'
20
    ]
22
    ]
21
23
22
if CPP_SOURCES:
24
if CPP_SOURCES:
23
    LIBRARY_NAME = 'shellservice_s'
25
    LIBRARY_NAME = 'shellservice_s'
24
26
25
EXTRA_COMPONENTS += [
27
EXTRA_COMPONENTS += [
26
    'nsSetDefaultBrowser.js',
28
    'nsSetDefaultBrowser.js',
27
    'nsSetDefaultBrowser.manifest',
29
    'nsSetDefaultBrowser.manifest',
(-)a/browser/components/shell/src/nsKDEShellService.cpp (+234 lines)
Line 0 Link Here
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* This Source Code Form is subject to the terms of the Mozilla Public
3
 * License, v. 2.0. If a copy of the MPL was not distributed with this
4
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6
#include "nsKDEShellService.h"
7
#include "nsShellService.h"
8
#include "nsKDEUtils.h"
9
#include "nsCOMPtr.h"
10
#include "nsIPrefService.h"
11
#include "nsIProcess.h"
12
#include "nsIFile.h"
13
#include "nsServiceManagerUtils.h"
14
#include "nsComponentManagerUtils.h"
15
#include "nsIMutableArray.h"
16
#include "nsISupportsPrimitives.h"
17
#include "nsArrayUtils.h"
18
19
nsresult
20
nsKDEShellService::Init()
21
    {
22
    if( !nsKDEUtils::kdeSupport())
23
        return NS_ERROR_NOT_AVAILABLE;
24
    return NS_OK;
25
    }
26
27
NS_IMPL_ISUPPORTS1(nsKDEShellService, nsIShellService)
28
29
NS_IMETHODIMP
30
nsKDEShellService::IsDefaultBrowser(bool aStartupCheck,
31
                                    bool aForAllTypes,
32
                                    bool* aIsDefaultBrowser)
33
    {
34
    *aIsDefaultBrowser = false;
35
    if (aStartupCheck)
36
        mCheckedThisSession = true;
37
38
    nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
39
    if (!command)
40
        return NS_ERROR_FAILURE;
41
42
    nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
43
    if (!str)
44
        return NS_ERROR_FAILURE;
45
46
    str->SetData( NS_LITERAL_CSTRING( "ISDEFAULTBROWSER" ));
47
    command->AppendElement( str, false );
48
49
    if( nsKDEUtils::command( command ))
50
        *aIsDefaultBrowser = true;
51
    return NS_OK;
52
    }
53
54
NS_IMETHODIMP
55
nsKDEShellService::SetDefaultBrowser(bool aClaimAllTypes,
56
                                     bool aForAllUsers)
57
    {
58
    nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
59
    if (!command)
60
        return NS_ERROR_FAILURE;
61
62
    nsCOMPtr<nsISupportsCString> cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
63
    nsCOMPtr<nsISupportsCString> paramstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
64
    if (!cmdstr || !paramstr)
65
        return NS_ERROR_FAILURE;
66
67
    cmdstr->SetData( NS_LITERAL_CSTRING( "SETDEFAULTBROWSER" ));
68
    command->AppendElement( cmdstr, false );
69
70
    paramstr->SetData( aClaimAllTypes ? NS_LITERAL_CSTRING( "ALLTYPES" ) : NS_LITERAL_CSTRING( "NORMAL" ));
71
    command->AppendElement( paramstr, false );
72
73
    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
74
    }
75
76
NS_IMETHODIMP
77
nsKDEShellService::GetShouldCheckDefaultBrowser(bool* aResult)
78
{
79
  // If we've already checked, the browser has been started and this is a
80
  // new window open, and we don't want to check again.
81
  if (mCheckedThisSession) {
82
    *aResult = false;
83
    return NS_OK;
84
  }
85
86
  nsCOMPtr<nsIPrefBranch> prefs;
87
  nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
88
  if (pserve)
89
    pserve->GetBranch("", getter_AddRefs(prefs));
90
91
  if (prefs)
92
    prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult);
93
94
  return NS_OK;
95
}
96
97
NS_IMETHODIMP
98
nsKDEShellService::SetShouldCheckDefaultBrowser(bool aShouldCheck)
99
{
100
  nsCOMPtr<nsIPrefBranch> prefs;
101
  nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
102
  if (pserve)
103
    pserve->GetBranch("", getter_AddRefs(prefs));
104
105
  if (prefs)
106
    prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck);
107
108
  return NS_OK;
109
}
110
111
NS_IMETHODIMP
112
nsKDEShellService::GetCanSetDesktopBackground(bool* aResult)
113
{
114
  *aResult = true;
115
  return NS_OK;
116
}
117
118
NS_IMETHODIMP
119
nsKDEShellService::SetDesktopBackground(nsIDOMElement* aElement,
120
                                          PRInt32 aPosition)
121
    {
122
    return NS_ERROR_NOT_IMPLEMENTED;
123
    }
124
125
NS_IMETHODIMP
126
nsKDEShellService::GetDesktopBackgroundColor(PRUint32 *aColor)
127
    {
128
    return NS_ERROR_NOT_IMPLEMENTED;
129
    }
130
131
NS_IMETHODIMP
132
nsKDEShellService::SetDesktopBackgroundColor(PRUint32 aColor)
133
    {
134
    return NS_ERROR_NOT_IMPLEMENTED;
135
    }
136
137
NS_IMETHODIMP
138
nsKDEShellService::OpenApplication(PRInt32 aApplication)
139
    {
140
    nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
141
    if (!command)
142
        return NS_ERROR_FAILURE;
143
144
    nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
145
    if (!str)
146
        return NS_ERROR_FAILURE;
147
148
    if( aApplication == APPLICATION_MAIL )
149
        str->SetData( NS_LITERAL_CSTRING( "OPENMAIL" ));
150
    else if( aApplication == APPLICATION_NEWS )
151
        str->SetData( NS_LITERAL_CSTRING( "OPENNEWS" ));
152
    else
153
        return NS_ERROR_NOT_IMPLEMENTED;
154
155
    command->AppendElement( str, false );
156
    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
157
    }
158
159
NS_IMETHODIMP
160
nsKDEShellService::OpenApplicationWithURI(nsIFile* aApplication, const nsACString& aURI)
161
    {
162
    nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
163
    if (!command)
164
        return NS_ERROR_FAILURE;
165
166
    nsCOMPtr<nsISupportsCString> cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
167
    nsCOMPtr<nsISupportsCString> appstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
168
    nsCOMPtr<nsISupportsCString> uristr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
169
    if (!cmdstr || !appstr || !uristr)
170
        return NS_ERROR_FAILURE;
171
172
    cmdstr->SetData( NS_LITERAL_CSTRING( "RUN" ));
173
    command->AppendElement( cmdstr, false );
174
    nsAutoCString app;
175
    nsresult rv = aApplication->GetNativePath( app );
176
    NS_ENSURE_SUCCESS( rv, rv );
177
    appstr->SetData( app );
178
    command->AppendElement( appstr, false );
179
    uristr->SetData( aURI );
180
    command->AppendElement( uristr, false );
181
    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
182
    }
183
184
NS_IMETHODIMP
185
nsKDEShellService::GetDefaultFeedReader(nsIFile** _retval)
186
    {
187
    *_retval = nullptr;
188
189
    nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
190
    if( !command )
191
        return NS_ERROR_FAILURE;
192
193
    nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
194
    if( !str )
195
        return NS_ERROR_FAILURE;
196
197
    str->SetData( NS_LITERAL_CSTRING( "GETDEFAULTFEEDREADER" ));
198
    command->AppendElement( str, false );
199
200
    nsCOMPtr<nsIArray> output;
201
    if( !nsKDEUtils::command( command, getter_AddRefs( output ) ) )
202
        return NS_ERROR_FAILURE;
203
204
    PRUint32 length;
205
    output->GetLength( &length );
206
    if( length != 1 )
207
        return NS_ERROR_FAILURE;
208
209
    nsCOMPtr<nsISupportsCString> resstr = do_QueryElementAt( output, 0 );
210
    if( !resstr )
211
        return NS_ERROR_FAILURE;
212
213
    nsAutoCString path;
214
    resstr->GetData( path );
215
    if (path.IsEmpty())
216
        return NS_ERROR_FAILURE;
217
218
    nsresult rv;
219
    nsCOMPtr<nsIFile> defaultReader =
220
        do_CreateInstance("@mozilla.org/file/local;1", &rv);
221
    NS_ENSURE_SUCCESS(rv, rv);
222
223
    rv = defaultReader->InitWithNativePath(path);
224
    NS_ENSURE_SUCCESS(rv, rv);
225
226
    bool exists;
227
    rv = defaultReader->Exists(&exists);
228
    NS_ENSURE_SUCCESS(rv, rv);
229
    if (!exists)
230
        return NS_ERROR_FAILURE;
231
232
    NS_ADDREF(*_retval = defaultReader);
233
    return NS_OK;
234
    }
(-)a/browser/components/shell/src/nsKDEShellService.h (+59 lines)
Line 0 Link Here
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ***** BEGIN LICENSE BLOCK *****
3
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
 *
5
 * The contents of this file are subject to the Mozilla Public License Version
6
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 * the License. You may obtain a copy of the License at
8
 * http://www.mozilla.org/MPL/
9
 *
10
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 * for the specific language governing rights and limitations under the
13
 * License.
14
 *
15
 * The Original Code is Shell Service.
16
 *
17
 * The Initial Developer of the Original Code is mozilla.org.
18
 * Portions created by the Initial Developer are Copyright (C) 2004
19
 * the Initial Developer. All Rights Reserved.
20
 *
21
 * Contributor(s):
22
 *
23
 * Alternatively, the contents of this file may be used under the terms of
24
 * either the GNU General Public License Version 2 or later (the "GPL"), or
25
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26
 * in which case the provisions of the GPL or the LGPL are applicable instead
27
 * of those above. If you wish to allow use of your version of this file only
28
 * under the terms of either the GPL or the LGPL, and not to allow others to
29
 * use your version of this file under the terms of the MPL, indicate your
30
 * decision by deleting the provisions above and replace them with the notice
31
 * and other provisions required by the GPL or the LGPL. If you do not delete
32
 * the provisions above, a recipient may use your version of this file under
33
 * the terms of any one of the MPL, the GPL or the LGPL.
34
 *
35
 * ***** END LICENSE BLOCK ***** */
36
37
#ifndef nskdeshellservice_h____
38
#define nskdeshellservice_h____
39
40
#include "nsIShellService.h"
41
#include "nsStringAPI.h"
42
43
class nsKDEShellService : public nsIShellService
44
{
45
public:
46
  nsKDEShellService() : mCheckedThisSession(PR_FALSE) { }
47
48
  NS_DECL_ISUPPORTS
49
  NS_DECL_NSISHELLSERVICE
50
51
  nsresult Init() NS_HIDDEN;
52
53
private:
54
  ~nsKDEShellService() {}
55
56
  PRPackedBool mCheckedThisSession;
57
};
58
59
#endif // nskdeshellservice_h____
(-)a/browser/components/shell/src/nsUnixShellService.cpp (+52 lines)
Line 0 Link Here
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ***** BEGIN LICENSE BLOCK *****
3
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
 *
5
 * The contents of this file are subject to the Mozilla Public License Version
6
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 * the License. You may obtain a copy of the License at
8
 * http://www.mozilla.org/MPL/
9
 *
10
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 * for the specific language governing rights and limitations under the
13
 * License.
14
 *
15
 * The Original Code is Shell Service.
16
 *
17
 * The Initial Developer of the Original Code is mozilla.org.
18
 * Portions created by the Initial Developer are Copyright (C) 2004
19
 * the Initial Developer. All Rights Reserved.
20
 *
21
 * Contributor(s):
22
 *
23
 * Alternatively, the contents of this file may be used under the terms of
24
 * either the GNU General Public License Version 2 or later (the "GPL"), or
25
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26
 * in which case the provisions of the GPL or the LGPL are applicable instead
27
 * of those above. If you wish to allow use of your version of this file only
28
 * under the terms of either the GPL or the LGPL, and not to allow others to
29
 * use your version of this file under the terms of the MPL, indicate your
30
 * decision by deleting the provisions above and replace them with the notice
31
 * and other provisions required by the GPL or the LGPL. If you do not delete
32
 * the provisions above, a recipient may use your version of this file under
33
 * the terms of any one of the MPL, the GPL or the LGPL.
34
 *
35
 * ***** END LICENSE BLOCK ***** */
36
37
#include "nsUnixShellService.h"
38
#include "nsGNOMEShellService.h"
39
#include "nsKDEShellService.h"
40
#include "nsKDEUtils.h"
41
#include "mozilla/ModuleUtils.h"
42
43
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
44
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsKDEShellService, Init)
45
46
NS_METHOD
47
nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult)
48
{
49
    if( nsKDEUtils::kdeSupport())
50
        return nsKDEShellServiceConstructor( aOuter, aIID, aResult );
51
    return nsGNOMEShellServiceConstructor( aOuter, aIID, aResult );
52
}
(-)a/browser/components/shell/src/nsUnixShellService.h (+45 lines)
Line 0 Link Here
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ***** BEGIN LICENSE BLOCK *****
3
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
 *
5
 * The contents of this file are subject to the Mozilla Public License Version
6
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 * the License. You may obtain a copy of the License at
8
 * http://www.mozilla.org/MPL/
9
 *
10
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 * for the specific language governing rights and limitations under the
13
 * License.
14
 *
15
 * The Original Code is Shell Service.
16
 *
17
 * The Initial Developer of the Original Code is mozilla.org.
18
 * Portions created by the Initial Developer are Copyright (C) 2004
19
 * the Initial Developer. All Rights Reserved.
20
 *
21
 * Contributor(s):
22
 *
23
 * Alternatively, the contents of this file may be used under the terms of
24
 * either the GNU General Public License Version 2 or later (the "GPL"), or
25
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26
 * in which case the provisions of the GPL or the LGPL are applicable instead
27
 * of those above. If you wish to allow use of your version of this file only
28
 * under the terms of either the GPL or the LGPL, and not to allow others to
29
 * use your version of this file under the terms of the MPL, indicate your
30
 * decision by deleting the provisions above and replace them with the notice
31
 * and other provisions required by the GPL or the LGPL. If you do not delete
32
 * the provisions above, a recipient may use your version of this file under
33
 * the terms of any one of the MPL, the GPL or the LGPL.
34
 *
35
 * ***** END LICENSE BLOCK ***** */
36
37
#ifndef nsunixshellservice_h____
38
#define nsunixshellservice_h____
39
40
#include "nsIShellService.h"
41
42
NS_METHOD
43
nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult);
44
45
#endif // nsunixshellservice_h____
(-)a/browser/installer/package-manifest.in (+2 lines)
Lines 601-619 Link Here
601
@BINPATH@/defaults/autoconfig/prefcalls.js
601
@BINPATH@/defaults/autoconfig/prefcalls.js
602
@BINPATH@/browser/defaults/profile/prefs.js
602
@BINPATH@/browser/defaults/profile/prefs.js
603
603
604
#ifndef LIBXUL_SDK
604
#ifndef LIBXUL_SDK
605
; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
605
; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
606
; Technically this is an app pref file, but we are keeping it in the original
606
; Technically this is an app pref file, but we are keeping it in the original
607
; gre location for now.
607
; gre location for now.
608
@BINPATH@/defaults/pref/channel-prefs.js
608
@BINPATH@/defaults/pref/channel-prefs.js
609
@BINPATH@/defaults/pref/kde.js
609
#else
610
#else
610
; For Fx-on-xr, channel-prefs lives with the app preferences. (Bug 762588)
611
; For Fx-on-xr, channel-prefs lives with the app preferences. (Bug 762588)
611
@BINPATH@/@PREF_DIR@/channel-prefs.js
612
@BINPATH@/@PREF_DIR@/channel-prefs.js
613
@BINPATH@/@PREF_DIR@/kde.js
612
#endif
614
#endif
613
615
614
; Services (gre) prefs
616
; Services (gre) prefs
615
#ifdef MOZ_SERVICES_NOTIFICATIONS
617
#ifdef MOZ_SERVICES_NOTIFICATIONS
616
@BINPATH@/defaults/pref/services-notifications.js
618
@BINPATH@/defaults/pref/services-notifications.js
617
#endif
619
#endif
618
#ifdef MOZ_SERVICES_SYNC
620
#ifdef MOZ_SERVICES_SYNC
619
@BINPATH@/defaults/pref/services-sync.js
621
@BINPATH@/defaults/pref/services-sync.js

Return to bug 493722