firefox-kde.patch
changeset 916 2f9f2e040647
parent 911 32eafb4c7b34
child 923 3cc9f17ca9bb
equal deleted inserted replaced
915:e969636be188 916:2f9f2e040647
     1 # HG changeset patch
     1 # HG changeset patch
     2 # Parent  fd5629206dcf3f64d85ab177be6bc6076f0f1619
     2 # Parent  4311c6bdf61ac317bc60b25cd89ff67662a75049
     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,1175 @@
     8 @@ -0,0 +1,1160 @@
     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
    75 +#include global-scripts.inc
    75 +#include global-scripts.inc
    76 +<script type="application/javascript" src="chrome://browser/content/nsContextMenu.js"/>
    76 +<script type="application/javascript" src="chrome://browser/content/nsContextMenu.js"/>
    77 +
    77 +
    78 +<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
    78 +<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
    79 +
    79 +
       
    80 +<script type="application/javascript" src="chrome://browser/content/downloads/downloads.js"/>
       
    81 +<script type="application/javascript" src="chrome://browser/content/downloads/indicator.js"/>
    80 +<script type="application/javascript" src="chrome://browser/content/places/editBookmarkOverlay.js"/>
    82 +<script type="application/javascript" src="chrome://browser/content/places/editBookmarkOverlay.js"/>
    81 +
    83 +
    82 +# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the
    84 +# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the
    83 +# browser-sets.inc file for sharing with hiddenWindow.xul.
    85 +# browser-sets.inc file for sharing with hiddenWindow.xul.
    84 +#define FULL_BROWSER_WINDOW
    86 +#define FULL_BROWSER_WINDOW
   186 +          <image id="editBookmarkPanelStarIcon"/>
   188 +          <image id="editBookmarkPanelStarIcon"/>
   187 +        </vbox>
   189 +        </vbox>
   188 +        <vbox>
   190 +        <vbox>
   189 +          <label id="editBookmarkPanelTitle"/>
   191 +          <label id="editBookmarkPanelTitle"/>
   190 +          <description id="editBookmarkPanelDescription"/>
   192 +          <description id="editBookmarkPanelDescription"/>
   191 +          <hbox>
       
   192 +            <button id="editBookmarkPanelRemoveButton"
       
   193 +                    class="editBookmarkPanelHeaderButton"
       
   194 +                    oncommand="StarUI.removeBookmarkButtonCommand();"
       
   195 +                    accesskey="&editBookmark.removeBookmark.accessKey;"/>
       
   196 +          </hbox>
       
   197 +        </vbox>
   193 +        </vbox>
   198 +      </row>
   194 +      </row>
   199 +      <vbox id="editBookmarkPanelContent" flex="1" hidden="true"/>
   195 +      <vbox id="editBookmarkPanelContent" flex="1" hidden="true"/>
   200 +      <hbox id="editBookmarkPanelBottomButtons" pack="end">
   196 +      <hbox id="editBookmarkPanelBottomButtons" pack="end">
   201 +#ifdef XP_UNIX
   197 +#ifdef XP_UNIX
   202 +        <button id="editBookmarkPanelDoneButton"
   198 +        <button id="editBookmarkPanelDoneButton"
   203 +                class="editBookmarkPanelBottomButton"
   199 +                class="editBookmarkPanelBottomButton"
   204 +                label="&editBookmark.done.label;"
   200 +                label="&editBookmark.done.label;"
   205 +                default="true"
   201 +                default="true"
   206 +                oncommand="StarUI.panel.hidePopup();"/>
   202 +                oncommand="StarUI.panel.hidePopup();"/>
   207 +        <button id="editBookmarkPanelDeleteButton"
   203 +        <button id="editBookmarkPanelRemoveButton"
   208 +                class="editBookmarkPanelBottomButton"
   204 +                class="editBookmarkPanelBottomButton"
   209 +                label="&editBookmark.cancel.label;"
   205 +                oncommand="StarUI.removeBookmarkButtonCommand();"
   210 +                oncommand="StarUI.cancelButtonOnCommand();"/>
   206 +                accesskey="&editBookmark.removeBookmark.accessKey;"/>
   211 +#else
   207 +#else
   212 +        <button id="editBookmarkPanelDeleteButton"
   208 +        <button id="editBookmarkPanelRemoveButton"
   213 +                class="editBookmarkPanelBottomButton"
   209 +                class="editBookmarkPanelBottomButton"
   214 +                label="&editBookmark.cancel.label;"
   210 +                oncommand="StarUI.removeBookmarkButtonCommand();"
   215 +                oncommand="StarUI.cancelButtonOnCommand();"/>
   211 +                accesskey="&editBookmark.removeBookmark.accessKey;"/>
   216 +        <button id="editBookmarkPanelDoneButton"
   212 +        <button id="editBookmarkPanelDoneButton"
   217 +                class="editBookmarkPanelBottomButton"
   213 +                class="editBookmarkPanelBottomButton"
   218 +                label="&editBookmark.done.label;"
   214 +                label="&editBookmark.done.label;"
   219 +                default="true"
   215 +                default="true"
   220 +                oncommand="StarUI.panel.hidePopup();"/>
   216 +                oncommand="StarUI.panel.hidePopup();"/>
   469 +      </vbox>
   465 +      </vbox>
   470 +    </hbox>
   466 +    </hbox>
   471 +
   467 +
   472 +    <tooltip id="dynamic-shortcut-tooltip"
   468 +    <tooltip id="dynamic-shortcut-tooltip"
   473 +             onpopupshowing="UpdateDynamicShortcutTooltipText(this);"/>
   469 +             onpopupshowing="UpdateDynamicShortcutTooltipText(this);"/>
       
   470 +
       
   471 +    <menupopup id="SyncedTabsSidebarContext">
       
   472 +      <menuitem label="&syncedTabs.context.openTab.label;"
       
   473 +                accesskey="&syncedTabs.context.openTab.accesskey;"
       
   474 +                id="syncedTabsOpenSelected"/>
       
   475 +      <menuitem label="&syncedTabs.context.bookmarkSingleTab.label;"
       
   476 +                accesskey="&syncedTabs.context.bookmarkSingleTab.accesskey;"
       
   477 +                id="syncedTabsBookmarkSelected"/>
       
   478 +      <menuseparator/>
       
   479 +      <menuitem label="&syncSyncNowItem.label;"
       
   480 +                accesskey="&syncSyncNowItem.accesskey;"
       
   481 +                id="syncedTabsRefresh"/>
       
   482 +    </menupopup>
       
   483 +    <menupopup id="SyncedTabsSidebarTabsFilterContext"
       
   484 +               class="textbox-contextmenu">
       
   485 +      <menuitem label="&undoCmd.label;"
       
   486 +                accesskey="&undoCmd.accesskey;"
       
   487 +                cmd="cmd_undo"/>
       
   488 +      <menuseparator/>
       
   489 +      <menuitem label="&cutCmd.label;"
       
   490 +                accesskey="&cutCmd.accesskey;"
       
   491 +                cmd="cmd_cut"/>
       
   492 +      <menuitem label="&copyCmd.label;"
       
   493 +                accesskey="&copyCmd.accesskey;"
       
   494 +                cmd="cmd_copy"/>
       
   495 +      <menuitem label="&pasteCmd.label;"
       
   496 +                accesskey="&pasteCmd.accesskey;"
       
   497 +                cmd="cmd_paste"/>
       
   498 +      <menuitem label="&deleteCmd.label;"
       
   499 +                accesskey="&deleteCmd.accesskey;"
       
   500 +                cmd="cmd_delete"/>
       
   501 +      <menuseparator/>
       
   502 +      <menuitem label="&selectAllCmd.label;"
       
   503 +                accesskey="&selectAllCmd.accesskey;"
       
   504 +                cmd="cmd_selectAll"/>
       
   505 +      <menuseparator/>
       
   506 +      <menuitem label="&syncSyncNowItem.label;"
       
   507 +                accesskey="&syncSyncNowItem.accesskey;"
       
   508 +                id="syncedTabsRefreshFilter"/>
       
   509 +    </menupopup>
   474 +  </popupset>
   510 +  </popupset>
   475 +
   511 +
   476 +#ifdef CAN_DRAW_IN_TITLEBAR
   512 +#ifdef CAN_DRAW_IN_TITLEBAR
   477 +<vbox id="titlebar">
   513 +<vbox id="titlebar">
   478 +  <hbox id="titlebar-content">
   514 +  <hbox id="titlebar-content">
   665 +                     onfocus="document.getElementById('identity-box').style.MozUserFocus= 'normal'"
   701 +                     onfocus="document.getElementById('identity-box').style.MozUserFocus= 'normal'"
   666 +                     onblur="setTimeout(() => { document.getElementById('identity-box').style.MozUserFocus = ''; }, 0);">
   702 +                     onblur="setTimeout(() => { document.getElementById('identity-box').style.MozUserFocus = ''; }, 0);">
   667 +              <box id="notification-popup-box" hidden="true" align="center">
   703 +              <box id="notification-popup-box" hidden="true" align="center">
   668 +                <image id="default-notification-icon" class="notification-anchor-icon" role="button"
   704 +                <image id="default-notification-icon" class="notification-anchor-icon" role="button"
   669 +                       aria-label="&urlbar.defaultNotificationAnchor.label;"/>
   705 +                       aria-label="&urlbar.defaultNotificationAnchor.label;"/>
   670 +                <!-- NB: the identity-notification-icon is used for persona-based auth and preffed
       
   671 +                     off by default. It hasn't been updated for some time and liable to being
       
   672 +                     removed.-->
       
   673 +                <image id="identity-notification-icon" class="notification-anchor-icon" role="button"/>
       
   674 +                <image id="geo-notification-icon" class="notification-anchor-icon" role="button"
   706 +                <image id="geo-notification-icon" class="notification-anchor-icon" role="button"
   675 +                       aria-label="&urlbar.geolocationNotificationAnchor.label;"/>
   707 +                       aria-label="&urlbar.geolocationNotificationAnchor.label;"/>
   676 +                <image id="addons-notification-icon" class="notification-anchor-icon" role="button"
   708 +                <image id="addons-notification-icon" class="notification-anchor-icon" role="button"
   677 +                       aria-label="&urlbar.addonsNotificationAnchor.label;"/>
   709 +                       aria-label="&urlbar.addonsNotificationAnchor.label;"/>
   678 +                <image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"
   710 +                <image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"
   809 +                      class="menuitem-iconic subviewbutton"
   841 +                      class="menuitem-iconic subviewbutton"
   810 +                      label="&showAllBookmarks2.label;"
   842 +                      label="&showAllBookmarks2.label;"
   811 +                      command="Browser:ShowAllBookmarks"
   843 +                      command="Browser:ShowAllBookmarks"
   812 +                      key="manBookmarkKb"/>
   844 +                      key="manBookmarkKb"/>
   813 +            <menuseparator/>
   845 +            <menuseparator/>
   814 +            <menuitem id="BMB_subscribeToPageMenuitem"
       
   815 +#ifndef XP_MACOSX
       
   816 +                      class="menuitem-iconic subviewbutton"
       
   817 +#else
       
   818 +                      class="subviewbutton"
       
   819 +#endif
       
   820 +                      label="&subscribeToPageMenuitem.label;"
       
   821 +                      oncommand="return FeedHandler.subscribeToFeed(null, event);"
       
   822 +                      onclick="checkForMiddleClick(this, event);"
       
   823 +                      observes="singleFeedMenuitemState"/>
       
   824 +            <menu id="BMB_subscribeToPageMenupopup"
       
   825 +#ifndef XP_MACOSX
       
   826 +                  class="menu-iconic subviewbutton"
       
   827 +#else
       
   828 +                  class="subviewbutton"
       
   829 +#endif
       
   830 +                  label="&subscribeToPageMenupopup.label;"
       
   831 +                  observes="multipleFeedsMenuState">
       
   832 +              <menupopup id="BMB_subscribeToPageSubmenuMenupopup"
       
   833 +                         onpopupshowing="return FeedHandler.buildFeedList(event.target);"
       
   834 +                         oncommand="return FeedHandler.subscribeToFeed(null, event);"
       
   835 +                         onclick="checkForMiddleClick(this, event);"/>
       
   836 +            </menu>
       
   837 +            <menuseparator/>
       
   838 +            <menu id="BMB_bookmarksToolbar"
   846 +            <menu id="BMB_bookmarksToolbar"
   839 +                  class="menu-iconic bookmark-item subviewbutton"
   847 +                  class="menu-iconic bookmark-item subviewbutton"
   840 +                  label="&personalbarCmd.label;"
   848 +                  label="&personalbarCmd.label;"
   841 +                  container="true">
   849 +                  container="true">
   842 +              <menupopup id="BMB_bookmarksToolbarPopup"
   850 +              <menupopup id="BMB_bookmarksToolbarPopup"
  1131 +    </html:button>
  1139 +    </html:button>
  1132 +  </html:div>
  1140 +  </html:div>
  1133 +
  1141 +
  1134 +  <vbox id="browser-bottombox" layer="true">
  1142 +  <vbox id="browser-bottombox" layer="true">
  1135 +    <notificationbox id="global-notificationbox" notificationside="bottom"/>
  1143 +    <notificationbox id="global-notificationbox" notificationside="bottom"/>
  1136 +    <toolbar id="developer-toolbar"
       
  1137 +             hidden="true">
       
  1138 +#ifdef XP_MACOSX
       
  1139 +          <toolbarbutton id="developer-toolbar-closebutton"
       
  1140 +                         class="devtools-closebutton"
       
  1141 +                         oncommand="DeveloperToolbar.hide();"
       
  1142 +                         tooltiptext="&devToolbarCloseButton.tooltiptext;"/>
       
  1143 +#endif
       
  1144 +          <stack class="gclitoolbar-stack-node" flex="1">
       
  1145 +            <textbox class="gclitoolbar-input-node" rows="1"/>
       
  1146 +            <hbox class="gclitoolbar-complete-node"/>
       
  1147 +          </stack>
       
  1148 +          <toolbarbutton id="developer-toolbar-toolbox-button"
       
  1149 +                         class="developer-toolbar-button"
       
  1150 +                         observes="devtoolsMenuBroadcaster_DevToolbox"
       
  1151 +                         tooltiptext="&devToolbarToolsButton.tooltip;"/>
       
  1152 +#ifndef XP_MACOSX
       
  1153 +          <toolbarbutton id="developer-toolbar-closebutton"
       
  1154 +                         class="devtools-closebutton"
       
  1155 +                         oncommand="DeveloperToolbar.hide();"
       
  1156 +                         tooltiptext="&devToolbarCloseButton.tooltiptext;"/>
       
  1157 +#endif
       
  1158 +   </toolbar>
       
  1159 +  </vbox>
  1144 +  </vbox>
  1160 +
  1145 +
  1161 +  <svg:svg height="0">
  1146 +  <svg:svg height="0">
  1162 +#include tab-shape.inc.svg
  1147 +#include tab-shape.inc.svg
  1163 +    <svg:clipPath id="urlbar-back-button-clip-path">
  1148 +    <svg:clipPath id="urlbar-back-button-clip-path">
  1264      { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
  1249      { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
  1265  #endif
  1250  #endif
  1266 diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js
  1251 diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js
  1267 --- a/browser/components/preferences/in-content/main.js
  1252 --- a/browser/components/preferences/in-content/main.js
  1268 +++ b/browser/components/preferences/in-content/main.js
  1253 +++ b/browser/components/preferences/in-content/main.js
  1269 @@ -19,16 +19,22 @@ var gMainPane = {
  1254 @@ -23,16 +23,22 @@ var gMainPane = {
  1270    init: function ()
  1255    init: function ()
  1271    {
  1256    {
  1272      function setEventListener(aId, aEventType, aCallback)
  1257      function setEventListener(aId, aEventType, aCallback)
  1273      {
  1258      {
  1274        document.getElementById(aId)
  1259        document.getElementById(aId)
  1285      this.updateSetDefaultBrowser();
  1270      this.updateSetDefaultBrowser();
  1286  #ifdef XP_WIN
  1271  #ifdef XP_WIN
  1287      // In Windows 8 we launch the control panel since it's the only
  1272      // In Windows 8 we launch the control panel since it's the only
  1288      // way to get all file type association prefs. So we don't know
  1273      // way to get all file type association prefs. So we don't know
  1289      // when the user will select the default.  We refresh here periodically
  1274      // when the user will select the default.  We refresh here periodically
  1290      // in case the default changes.  On other Windows OS's defaults can also
  1275      // in case the default changes. On other Windows OS's defaults can also
  1291      // be set while the prefs are open.
  1276      // be set while the prefs are open.
  1292 @@ -704,16 +710,27 @@ var gMainPane = {
  1277 @@ -736,16 +742,27 @@ var gMainPane = {
  1293     */
  1278      let alwaysCheckPref = document.getElementById("browser.shell.checkDefaultBrowser");
  1294    setDefaultBrowser: function()
  1279      alwaysCheckPref.value = true;
  1295    {
  1280  
  1296      let shellSvc = getShellService();
  1281      let shellSvc = getShellService();
  1297      if (!shellSvc)
  1282      if (!shellSvc)
  1298        return;
  1283        return;
  1299      try {
  1284      try {
  1300        shellSvc.setDefaultBrowser(true, false);
  1285        shellSvc.setDefaultBrowser(true, false);
  1301 +      if (kde_session == 1) {
  1286 +      if (kde_session == 1) {
  1302 +        var shellObj = Components.classes["@mozilla.org/file/local;1"]
  1287 +        var shellObj = Components.classes["@mozilla.org/file/local;1"]
  1303 +                                   .createInstance(Components.interfaces.nsILocalFile);
  1288 +          .createInstance(Components.interfaces.nsILocalFile);
  1304 +        shellObj.initWithPath("/usr/bin/kwriteconfig");
  1289 +        shellObj.initWithPath("/usr/bin/kwriteconfig");
  1305 +        var process = Components.classes["@mozilla.org/process/util;1"]
  1290 +        var process = Components.classes["@mozilla.org/process/util;1"]
  1306 +                                  .createInstance(Components.interfaces.nsIProcess);
  1291 +          .createInstance(Components.interfaces.nsIProcess);
  1307 +        process.init(shellObj);
  1292 +        process.init(shellObj);
  1308 +        var args = ["--file", "kdeglobals", "--group", "General", "--key",
  1293 +        var args = ["--file", "kdeglobals", "--group", "General", "--key",
  1309 +            "BrowserApplication", "firefox"];
  1294 +            "BrowserApplication", "firefox"];
  1310 +        process.run(false, args, args.length);
  1295 +        process.run(false, args, args.length);
  1311 +      }
  1296 +      }
  1312      } catch (ex) {
  1297      } catch (ex) {
  1313        Cu.reportError(ex);
  1298        Cu.reportError(ex);
  1314        return;
  1299        return;
  1315      }
  1300      }
  1316      let selectedIndex =
  1301  
  1317        shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
  1302      let selectedIndex = shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
  1318      document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
  1303      document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
  1319    }
  1304    }
  1320 diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build
  1305 diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build
  1321 --- a/browser/components/shell/moz.build
  1306 --- a/browser/components/shell/moz.build
  1322 +++ b/browser/components/shell/moz.build
  1307 +++ b/browser/components/shell/moz.build
  1630 +
  1615 +
  1631 +#endif // nsunixshellservice_h____
  1616 +#endif // nsunixshellservice_h____
  1632 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
  1617 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
  1633 --- a/browser/installer/package-manifest.in
  1618 --- a/browser/installer/package-manifest.in
  1634 +++ b/browser/installer/package-manifest.in
  1619 +++ b/browser/installer/package-manifest.in
  1635 @@ -703,16 +703,17 @@
  1620 @@ -697,16 +697,17 @@
  1636  @RESPATH@/greprefs.js
  1621  @RESPATH@/greprefs.js
  1637  @RESPATH@/defaults/autoconfig/prefcalls.js
  1622  @RESPATH@/defaults/autoconfig/prefcalls.js
  1638  @RESPATH@/browser/defaults/permissions
  1623  @RESPATH@/browser/defaults/permissions
  1639  
  1624  
  1640  ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
  1625  ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)