firefox-kde.patch
changeset 885 ee3c462047d5
parent 881 1268ddc9dc16
child 889 de3a92aed259
equal deleted inserted replaced
882:82af81b0a6c7 885:ee3c462047d5
     1 # HG changeset patch
     1 # HG changeset patch
     2 # Parent  8d1e0e3997402b94742eded6477abed4b559f373
     2 # Parent  95b421ca30846be2b5d7230d72263e6dff042d0b
     3 
     3 
     4 diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul
     4 diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul
     5 new file mode 100644
     5 new file mode 100644
     6 --- /dev/null
     6 --- /dev/null
     7 +++ b/browser/base/content/browser-kde.xul
     7 +++ b/browser/base/content/browser-kde.xul
     8 @@ -0,0 +1,1264 @@
     8 @@ -0,0 +1,1234 @@
     9 +#filter substitution
     9 +#filter substitution
    10 +<?xml version="1.0"?>
    10 +<?xml version="1.0"?>
    11 +# -*- Mode: HTML -*-
    11 +# -*- Mode: HTML -*-
    12 +#
    12 +#
    13 +# This Source Code Form is subject to the terms of the Mozilla Public
    13 +# This Source Code Form is subject to the terms of the Mozilla Public
    64 +        windowtype="navigator:browser"
    64 +        windowtype="navigator:browser"
    65 +        macanimationtype="document"
    65 +        macanimationtype="document"
    66 +        screenX="4" screenY="4"
    66 +        screenX="4" screenY="4"
    67 +        fullscreenbutton="true"
    67 +        fullscreenbutton="true"
    68 +        sizemode="normal"
    68 +        sizemode="normal"
       
    69 +        retargetdocumentfocus="urlbar"
    69 +        persist="screenX screenY width height sizemode">
    70 +        persist="screenX screenY width height sizemode">
    70 +
    71 +
    71 +# All JS files which are not content (only) dependent that browser.xul
    72 +# All JS files which are not content (only) dependent that browser.xul
    72 +# wishes to include *must* go into the global-scripts.inc file
    73 +# wishes to include *must* go into the global-scripts.inc file
    73 +# so that they can be shared by macBrowserOverlay.xul.
    74 +# so that they can be shared by macBrowserOverlay.xul.
   151 +
   152 +
   152 +    <!-- for search with one-off buttons -->
   153 +    <!-- for search with one-off buttons -->
   153 +    <panel type="autocomplete" id="PopupSearchAutoComplete" noautofocus="true" hidden="true"/>
   154 +    <panel type="autocomplete" id="PopupSearchAutoComplete" noautofocus="true" hidden="true"/>
   154 +
   155 +
   155 +    <!-- for url bar autocomplete -->
   156 +    <!-- for url bar autocomplete -->
   156 +    <panel type="autocomplete-richlistbox" id="PopupAutoCompleteRichResult" noautofocus="true" hidden="true"/>
   157 +    <panel type="autocomplete-richlistbox" id="PopupAutoCompleteRichResult" noautofocus="true" hidden="true">
       
   158 +#ifdef NIGHTLY_BUILD
       
   159 +      <hbox id="urlbar-search-footer" flex="1" align="stretch" pack="end">
       
   160 +        <button id="urlbar-search-settings" label="&changeSearchSettings.button;"
       
   161 +                oncommand="BrowserUITelemetry.countSearchSettingsEvent('urlbar'); openPreferences('paneSearch')"/>
       
   162 +      </hbox>
       
   163 +#endif
       
   164 +    </panel>
   157 +
   165 +
   158 +    <!-- for select dropdowns. The menupopup is what shows the list of options,
   166 +    <!-- for select dropdowns. The menupopup is what shows the list of options,
   159 +         and the popuponly menulist makes things like the menuactive attributes
   167 +         and the popuponly menulist makes things like the menuactive attributes
   160 +         work correctly on the menupopup. ContentSelectDropdown expects the
   168 +         work correctly on the menupopup. ContentSelectDropdown expects the
   161 +         popuponly menulist to be its immediate parent. -->
   169 +         popuponly menulist to be its immediate parent. -->
   195 +          </hbox>
   203 +          </hbox>
   196 +        </vbox>
   204 +        </vbox>
   197 +      </row>
   205 +      </row>
   198 +      <vbox id="editBookmarkPanelContent" flex="1" hidden="true"/>
   206 +      <vbox id="editBookmarkPanelContent" flex="1" hidden="true"/>
   199 +      <hbox id="editBookmarkPanelBottomButtons" pack="end">
   207 +      <hbox id="editBookmarkPanelBottomButtons" pack="end">
   200 +#ifndef XP_UNIX
   208 +#ifdef XP_UNIX
   201 +        <button id="editBookmarkPanelDoneButton"
   209 +        <button id="editBookmarkPanelDoneButton"
   202 +                class="editBookmarkPanelBottomButton"
   210 +                class="editBookmarkPanelBottomButton"
   203 +                label="&editBookmark.done.label;"
   211 +                label="&editBookmark.done.label;"
   204 +                default="true"
   212 +                default="true"
   205 +                oncommand="StarUI.panel.hidePopup();"/>
   213 +                oncommand="StarUI.panel.hidePopup();"/>
   716 +                     type="autocomplete"
   724 +                     type="autocomplete"
   717 +                     autocompletesearch="urlinline history"
   725 +                     autocompletesearch="urlinline history"
   718 +                     autocompletesearchparam="enable-actions"
   726 +                     autocompletesearchparam="enable-actions"
   719 +                     autocompletepopup="PopupAutoCompleteRichResult"
   727 +                     autocompletepopup="PopupAutoCompleteRichResult"
   720 +                     completeselectedindex="true"
   728 +                     completeselectedindex="true"
       
   729 +                     shrinkdelay="250"
   721 +                     tabscrolling="true"
   730 +                     tabscrolling="true"
   722 +                     showcommentcolumn="true"
   731 +                     showcommentcolumn="true"
   723 +                     showimagecolumn="true"
   732 +                     showimagecolumn="true"
   724 +                     enablehistory="true"
   733 +                     enablehistory="true"
   725 +                     maxrows="6"
   734 +                     maxrows="6"
   739 +                <image id="login-fill-notification-icon" class="notification-anchor-icon" role="button"/>
   748 +                <image id="login-fill-notification-icon" class="notification-anchor-icon" role="button"/>
   740 +                <image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
   749 +                <image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
   741 +                <image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
   750 +                <image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
   742 +                <image id="plugins-notification-icon" class="notification-anchor-icon" role="button"/>
   751 +                <image id="plugins-notification-icon" class="notification-anchor-icon" role="button"/>
   743 +                <image id="web-notifications-notification-icon" class="notification-anchor-icon" role="button"/>
   752 +                <image id="web-notifications-notification-icon" class="notification-anchor-icon" role="button"/>
   744 +                <image id="bad-content-blocked-notification-icon" class="notification-anchor-icon" role="button"/>
       
   745 +                <image id="bad-content-unblocked-notification-icon" class="notification-anchor-icon" role="button"/>
       
   746 +                <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon" role="button"/>
   753 +                <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon" role="button"/>
   747 +                <image id="webRTC-sharingDevices-notification-icon" class="notification-anchor-icon" role="button"/>
   754 +                <image id="webRTC-sharingDevices-notification-icon" class="notification-anchor-icon" role="button"/>
   748 +                <image id="webRTC-shareMicrophone-notification-icon" class="notification-anchor-icon" role="button"/>
   755 +                <image id="webRTC-shareMicrophone-notification-icon" class="notification-anchor-icon" role="button"/>
   749 +                <image id="webRTC-sharingMicrophone-notification-icon" class="notification-anchor-icon" role="button"/>
   756 +                <image id="webRTC-sharingMicrophone-notification-icon" class="notification-anchor-icon" role="button"/>
   750 +                <image id="webRTC-shareScreen-notification-icon" class="notification-anchor-icon" role="button"/>
   757 +                <image id="webRTC-shareScreen-notification-icon" class="notification-anchor-icon" role="button"/>
   762 +              <box id="identity-box" role="button"
   769 +              <box id="identity-box" role="button"
   763 +                   align="center"
   770 +                   align="center"
   764 +                   onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
   771 +                   onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
   765 +                   onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);"
   772 +                   onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);"
   766 +                   ondragstart="gIdentityHandler.onDragStart(event);">
   773 +                   ondragstart="gIdentityHandler.onDragStart(event);">
   767 +                <image id="page-proxy-favicon"
   774 +                <hbox id="identity-icons"
   768 +                       consumeanchor="identity-box"
   775 +                      consumeanchor="identity-box">
   769 +                       onclick="PageProxyClickHandler(event);"
   776 +                  <image id="tracking-protection-icon"/>
   770 +                       pageproxystate="invalid"/>
   777 +                  <image id="page-proxy-favicon"
       
   778 +                         onclick="PageProxyClickHandler(event);"
       
   779 +                         pageproxystate="invalid"/>
       
   780 +                </hbox>
   771 +                <hbox id="identity-icon-labels">
   781 +                <hbox id="identity-icon-labels">
   772 +                  <label id="identity-icon-label" class="plain" flex="1"/>
   782 +                  <label id="identity-icon-label" class="plain" flex="1"/>
   773 +                  <label id="identity-icon-country-label" class="plain"/>
   783 +                  <label id="identity-icon-country-label" class="plain"/>
   774 +                </hbox>
   784 +                </hbox>
   775 +              </box>
   785 +              </box>
   780 +                <image id="page-report-button"
   790 +                <image id="page-report-button"
   781 +                       class="urlbar-icon"
   791 +                       class="urlbar-icon"
   782 +                       hidden="true"
   792 +                       hidden="true"
   783 +                       tooltiptext="&pageReportIcon.tooltip;"
   793 +                       tooltiptext="&pageReportIcon.tooltip;"
   784 +                       onclick="gPopupBlockerObserver.onReportButtonClick(event);"/>
   794 +                       onclick="gPopupBlockerObserver.onReportButtonClick(event);"/>
   785 +                <image id="readinglist-addremove-button"
       
   786 +                       class="urlbar-icon"
       
   787 +                       hidden="true"
       
   788 +                       onclick="ReadingListUI.buttonClick(event);"/>
       
   789 +                <image id="reader-mode-button"
   795 +                <image id="reader-mode-button"
   790 +                       class="urlbar-icon"
   796 +                       class="urlbar-icon"
   791 +                       hidden="true"
   797 +                       hidden="true"
   792 +                       onclick="ReaderParent.buttonClick(event);"/>
   798 +                       onclick="ReaderParent.buttonClick(event);"/>
   793 +              </hbox>
   799 +              </hbox>
   914 +                         context="placesContext"
   920 +                         context="placesContext"
   915 +                         onpopupshowing="if (!this.parentNode._placesView)
   921 +                         onpopupshowing="if (!this.parentNode._placesView)
   916 +                                           new PlacesMenu(event, 'place:folder=UNFILED_BOOKMARKS',
   922 +                                           new PlacesMenu(event, 'place:folder=UNFILED_BOOKMARKS',
   917 +                                                          PlacesUIUtils.getViewForNode(this.parentNode.parentNode).options);"/>
   923 +                                                          PlacesUIUtils.getViewForNode(this.parentNode.parentNode).options);"/>
   918 +            </menu>
   924 +            </menu>
   919 +            <menuseparator>
       
   920 +              <observes element="readingListSidebar" attribute="hidden"/>
       
   921 +            </menuseparator>
       
   922 +            <menu id="BMB_readingList"
       
   923 +                  class="menu-iconic bookmark-item subviewbutton"
       
   924 +                  label="&readingList.label;"
       
   925 +                  container="true">
       
   926 +              <observes element="readingListSidebar" attribute="hidden"/>
       
   927 +              <menupopup id="BMB_readingListPopup"
       
   928 +                         placespopup="true"
       
   929 +                         onpopupshowing="ReadingListUI.onReadingListPopupShowing(this);">
       
   930 +                <menuitem id="BMB_viewReadingListSidebar" class="subviewbutton"
       
   931 +                          oncommand="SidebarUI.show('readingListSidebar');"
       
   932 +                          label="&readingList.showSidebar.label;"/>
       
   933 +              </menupopup>
       
   934 +            </menu>
       
   935 +            <menuseparator/>
   925 +            <menuseparator/>
   936 +            <!-- Bookmarks menu items will go here -->
   926 +            <!-- Bookmarks menu items will go here -->
   937 +            <menuitem id="BMB_bookmarksShowAll"
   927 +            <menuitem id="BMB_bookmarksShowAll"
   938 +                      class="subviewbutton panel-subview-footer"
   928 +                      class="subviewbutton panel-subview-footer"
   939 +                      label="&showAllBookmarks2.label;"
   929 +                      label="&showAllBookmarks2.label;"
   976 +
   966 +
   977 +      <toolbaritem id="PanelUI-button"
   967 +      <toolbaritem id="PanelUI-button"
   978 +                   class="chromeclass-toolbar-additional"
   968 +                   class="chromeclass-toolbar-additional"
   979 +                   removable="false">
   969 +                   removable="false">
   980 +        <toolbarbutton id="PanelUI-menu-button"
   970 +        <toolbarbutton id="PanelUI-menu-button"
   981 +                       class="toolbarbutton-1"
   971 +                       class="toolbarbutton-1 badged-button"
   982 +                       consumeanchor="PanelUI-button"
   972 +                       consumeanchor="PanelUI-button"
   983 +                       label="&brandShortName;"
   973 +                       label="&brandShortName;"
   984 +                       tooltiptext="&appmenu.tooltip;"/>
   974 +                       tooltiptext="&appmenu.tooltip;"/>
   985 +      </toolbaritem>
   975 +      </toolbaritem>
   986 +
   976 +
  1194 +  <hbox id="full-screen-warning-container" hidden="true" fadeout="true">
  1184 +  <hbox id="full-screen-warning-container" hidden="true" fadeout="true">
  1195 +    <hbox style="width: 100%;" pack="center"> <!-- Inner hbox needed due to bug 579776. -->
  1185 +    <hbox style="width: 100%;" pack="center"> <!-- Inner hbox needed due to bug 579776. -->
  1196 +      <vbox id="full-screen-warning-message" align="center">
  1186 +      <vbox id="full-screen-warning-message" align="center">
  1197 +        <description id="full-screen-domain-text"/>
  1187 +        <description id="full-screen-domain-text"/>
  1198 +        <description class="full-screen-description" value="&fullscreenExitHint2.value;"/>
  1188 +        <description class="full-screen-description" value="&fullscreenExitHint2.value;"/>
  1199 +        <vbox id="full-screen-approval-pane" align="center">
       
  1200 +          <hbox>
       
  1201 +#ifdef XP_UNIX
       
  1202 +            <button label="&fullscreenExitButton.label;"
       
  1203 +                    oncommand="FullScreen.setFullscreenAllowed(false);"
       
  1204 +                    class="full-screen-approval-button"/>
       
  1205 +            <button label="&fullscreenAllowButton.label;"
       
  1206 +                    oncommand="FullScreen.setFullscreenAllowed(true);"
       
  1207 +                    class="full-screen-approval-button"/>
       
  1208 +#else
       
  1209 +            <button label="&fullscreenAllowButton.label;"
       
  1210 +                    oncommand="FullScreen.setFullscreenAllowed(true);"
       
  1211 +                    class="full-screen-approval-button"/>
       
  1212 +            <button label="&fullscreenExitButton.label;"
       
  1213 +                    oncommand="FullScreen.setFullscreenAllowed(false);"
       
  1214 +                    class="full-screen-approval-button"/>
       
  1215 +#endif
       
  1216 +          </hbox>
       
  1217 +          <checkbox id="full-screen-remember-decision"/>
       
  1218 +        </vbox>
       
  1219 +      </vbox>
  1189 +      </vbox>
  1220 +    </hbox>
  1190 +    </hbox>
  1221 +  </hbox>
  1191 +  </hbox>
  1222 +
  1192 +
  1223 +  <vbox id="browser-bottombox" layer="true">
  1193 +  <vbox id="browser-bottombox" layer="true">
  1268 +#     Introducing the iframe dynamically, as needed, was found to be better than
  1238 +#     Introducing the iframe dynamically, as needed, was found to be better than
  1269 +#     starting with an empty iframe here in browser.xul from a Ts standpoint.
  1239 +#     starting with an empty iframe here in browser.xul from a Ts standpoint.
  1270 +</deck>
  1240 +</deck>
  1271 +
  1241 +
  1272 +</window>
  1242 +</window>
  1273 diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul
       
  1274 --- a/browser/base/content/browser.xul
       
  1275 +++ b/browser/base/content/browser.xul
       
  1276 @@ -184,17 +184,17 @@
       
  1277                      class="editBookmarkPanelHeaderButton"
       
  1278                      oncommand="StarUI.removeBookmarkButtonCommand();"
       
  1279                      accesskey="&editBookmark.removeBookmark.accessKey;"/>
       
  1280            </hbox>
       
  1281          </vbox>
       
  1282        </row>
       
  1283        <vbox id="editBookmarkPanelContent" flex="1" hidden="true"/>
       
  1284        <hbox id="editBookmarkPanelBottomButtons" pack="end">
       
  1285 -#ifndef XP_UNIX
       
  1286 +#ifdef XP_UNIX
       
  1287          <button id="editBookmarkPanelDoneButton"
       
  1288                  class="editBookmarkPanelBottomButton"
       
  1289                  label="&editBookmark.done.label;"
       
  1290                  default="true"
       
  1291                  oncommand="StarUI.panel.hidePopup();"/>
       
  1292          <button id="editBookmarkPanelDeleteButton"
       
  1293                  class="editBookmarkPanelBottomButton"
       
  1294                  label="&editBookmark.cancel.label;"
       
  1295 @@ -1185,17 +1185,17 @@
       
  1296  
       
  1297    <hbox id="full-screen-warning-container" hidden="true" fadeout="true">
       
  1298      <hbox style="width: 100%;" pack="center"> <!-- Inner hbox needed due to bug 579776. -->
       
  1299        <vbox id="full-screen-warning-message" align="center">
       
  1300          <description id="full-screen-domain-text"/>
       
  1301          <description class="full-screen-description" value="&fullscreenExitHint2.value;"/>
       
  1302          <vbox id="full-screen-approval-pane" align="center">
       
  1303            <hbox>
       
  1304 -#ifdef XP_UNIX
       
  1305 +#ifndef XP_UNIX
       
  1306              <button label="&fullscreenExitButton.label;"
       
  1307                      oncommand="FullScreen.setFullscreenAllowed(false);"
       
  1308                      class="full-screen-approval-button"/>
       
  1309              <button label="&fullscreenAllowButton.label;"
       
  1310                      oncommand="FullScreen.setFullscreenAllowed(true);"
       
  1311                      class="full-screen-approval-button"/>
       
  1312  #else
       
  1313              <button label="&fullscreenAllowButton.label;"
       
  1314 diff --git a/browser/base/jar.mn b/browser/base/jar.mn
  1243 diff --git a/browser/base/jar.mn b/browser/base/jar.mn
  1315 --- a/browser/base/jar.mn
  1244 --- a/browser/base/jar.mn
  1316 +++ b/browser/base/jar.mn
  1245 +++ b/browser/base/jar.mn
  1317 @@ -70,16 +70,18 @@ browser.jar:
  1246 @@ -70,16 +70,18 @@ browser.jar:
  1318          content/browser/aboutSocialError.xhtml        (content/aboutSocialError.xhtml)
  1247          content/browser/aboutSocialError.xhtml        (content/aboutSocialError.xhtml)
  1349 +#include "nsUnixShellService.h"
  1278 +#include "nsUnixShellService.h"
  1350  #endif
  1279  #endif
  1351  
  1280  
  1352  #if defined(XP_WIN)
  1281  #if defined(XP_WIN)
  1353  #include "nsIEHistoryEnumerator.h"
  1282  #include "nsIEHistoryEnumerator.h"
       
  1283  #include "nsEdgeReadingListExtractor.h"
  1354  #endif
  1284  #endif
  1355  
  1285  
  1356  #include "rdf.h"
  1286  #include "rdf.h"
  1357  #include "nsFeedSniffer.h"
  1287 @@ -32,18 +32,16 @@ using namespace mozilla::browser;
  1358 @@ -31,18 +31,16 @@ using namespace mozilla::browser;
       
  1359  
  1288  
  1360  /////////////////////////////////////////////////////////////////////////////
  1289  /////////////////////////////////////////////////////////////////////////////
  1361  
  1290  
  1362  NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
  1291  NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
  1363  #if defined(XP_WIN)
  1292  #if defined(XP_WIN)
  1368 -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
  1297 -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
  1369  #endif
  1298  #endif
  1370  
  1299  
  1371  #if defined(XP_WIN)
  1300  #if defined(XP_WIN)
  1372  NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator)
  1301  NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator)
       
  1302  NS_GENERIC_FACTORY_CONSTRUCTOR(nsEdgeReadingListExtractor)
  1373  #endif
  1303  #endif
  1374  
  1304  
  1375  NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
  1305  NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
  1376  
  1306 @@ -63,17 +61,17 @@ NS_DEFINE_NAMED_CID(NS_EDGEREADINGLISTEX
  1377 @@ -60,17 +58,17 @@ NS_DEFINE_NAMED_CID(NS_WINIEHISTORYENUME
       
  1378  NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
  1307  NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
  1379  #endif
  1308  #endif
  1380  
  1309  
  1381  static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
  1310  static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
  1382      { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor },
  1311      { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor },
  1388  #endif
  1317  #endif
  1389      { &kNS_FEEDSNIFFER_CID, false, nullptr, nsFeedSnifferConstructor },
  1318      { &kNS_FEEDSNIFFER_CID, false, nullptr, nsFeedSnifferConstructor },
  1390      { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create },
  1319      { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create },
  1391  #if defined(XP_WIN)
  1320  #if defined(XP_WIN)
  1392      { &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor },
  1321      { &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor },
       
  1322      { &kNS_EDGEREADINGLISTEXTRACTOR_CID, false, nullptr, nsEdgeReadingListExtractorConstructor },
  1393  #elif defined(XP_MACOSX)
  1323  #elif defined(XP_MACOSX)
  1394      { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
  1324      { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
  1395  #endif
  1325 diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js
  1396 diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
  1326 --- a/browser/components/preferences/in-content/main.js
  1397 --- a/browser/components/preferences/main.js
  1327 +++ b/browser/components/preferences/in-content/main.js
  1398 +++ b/browser/components/preferences/main.js
  1328 @@ -14,16 +14,22 @@ var gMainPane = {
  1399 @@ -12,16 +12,22 @@ var gMainPane = {
       
  1400  
       
  1401    /**
       
  1402     * Initialization of this.
       
  1403     */
       
  1404    init: function ()
  1329    init: function ()
  1405    {
  1330    {
  1406      this._pane = document.getElementById("paneMain");
  1331      function setEventListener(aId, aEventType, aCallback)
       
  1332      {
       
  1333        document.getElementById(aId)
       
  1334                .addEventListener(aEventType, aCallback.bind(gMainPane));
       
  1335      }
  1407  
  1336  
  1408 +    var env = Components.classes["@mozilla.org/process/environment;1"]
  1337 +    var env = Components.classes["@mozilla.org/process/environment;1"]
  1409 +                        .getService(Components.interfaces.nsIEnvironment);
  1338 +                          .getService(Components.interfaces.nsIEnvironment);
  1410 +    var kde_session = 0;
  1339 +    var kde_session = 0;
  1411 +    if (env.get('KDE_FULL_SESSION') == "true")
  1340 +    if (env.get('KDE_FULL_SESSION') == "true")
  1412 +      kde_session = 1;
  1341 +        kde_session = 1;
  1413 +
  1342 +
  1414  #ifdef HAVE_SHELL_SERVICE
  1343  #ifdef HAVE_SHELL_SERVICE
  1415      this.updateSetDefaultBrowser();
  1344      this.updateSetDefaultBrowser();
  1416  #ifdef XP_WIN
  1345  #ifdef XP_WIN
  1417      // In Windows 8 we launch the control panel since it's the only
  1346      // In Windows 8 we launch the control panel since it's the only
  1418      // way to get all file type association prefs. So we don't know
  1347      // way to get all file type association prefs. So we don't know
  1419      // when the user will select the default.  We refresh here periodically
  1348      // when the user will select the default.  We refresh here periodically
  1420      // in case the default changes.  On other Windows OS's defaults can also
  1349      // in case the default changes.  On other Windows OS's defaults can also
  1421      // be set while the prefs are open.
  1350      // be set while the prefs are open.
  1422 @@ -527,16 +533,27 @@ var gMainPane = {
  1351 @@ -709,16 +715,27 @@ var gMainPane = {
  1423     */
  1352     */
  1424    setDefaultBrowser: function()
  1353    setDefaultBrowser: function()
  1425    {
  1354    {
  1426      let shellSvc = getShellService();
  1355      let shellSvc = getShellService();
  1427      if (!shellSvc)
  1356      if (!shellSvc)
  1428        return;
  1357        return;
  1429      try {
  1358      try {
  1430        shellSvc.setDefaultBrowser(true, false);
  1359        shellSvc.setDefaultBrowser(true, false);
  1431 +      if (kde_session == 1) {
  1360 +      if (kde_session == 1) {
  1432 +        var shellObj = Components.classes["@mozilla.org/file/local;1"]
  1361 +        var shellObj = Components.classes["@mozilla.org/file/local;1"]
  1433 +                                 .createInstance(Components.interfaces.nsILocalFile);
  1362 +                                   .createInstance(Components.interfaces.nsILocalFile);
  1434 +        shellObj.initWithPath("/usr/bin/kwriteconfig");
  1363 +        shellObj.initWithPath("/usr/bin/kwriteconfig");
  1435 +        var process = Components.classes["@mozilla.org/process/util;1"]
  1364 +        var process = Components.classes["@mozilla.org/process/util;1"]
  1436 +                                .createInstance(Components.interfaces.nsIProcess);
  1365 +                                  .createInstance(Components.interfaces.nsIProcess);
  1437 +        process.init(shellObj);
  1366 +        process.init(shellObj);
  1438 +        var args = ["--file", "kdeglobals", "--group", "General", "--key",
  1367 +        var args = ["--file", "kdeglobals", "--group", "General", "--key",
  1439 +            "BrowserApplication", "firefox"];
  1368 +            "BrowserApplication", "firefox"];
  1440 +        process.run(false, args, args.length);
  1369 +        process.run(false, args, args.length);
  1441 +      }
  1370 +      }
  1442      } catch (ex) {
  1371      } catch (ex) {
  1443        Components.utils.reportError(ex);
  1372        Cu.reportError(ex);
  1444        return;
  1373        return;
  1445      }
  1374      }
  1446      let selectedIndex =
  1375      let selectedIndex =
  1447        shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
  1376        shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
  1448      document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
  1377      document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
  1885 +
  1814 +
  1886 +#endif // nsunixshellservice_h____
  1815 +#endif // nsunixshellservice_h____
  1887 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
  1816 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
  1888 --- a/browser/installer/package-manifest.in
  1817 --- a/browser/installer/package-manifest.in
  1889 +++ b/browser/installer/package-manifest.in
  1818 +++ b/browser/installer/package-manifest.in
  1890 @@ -703,19 +703,21 @@
  1819 @@ -709,19 +709,21 @@
  1891  @RESPATH@/defaults/autoconfig/prefcalls.js
  1820  @RESPATH@/defaults/autoconfig/prefcalls.js
  1892  @RESPATH@/browser/defaults/profile/prefs.js
  1821  @RESPATH@/browser/defaults/profile/prefs.js
  1893  
  1822  
  1894  #ifndef LIBXUL_SDK
  1823  #ifndef LIBXUL_SDK
  1895  ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
  1824  ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)