mozilla-kde.patch
branchmozilla-1.9.2
changeset 330 1c2c7f8923f1
parent 246 ea1f88b778f7
equal deleted inserted replaced
314:0103840bc431 330:1c2c7f8923f1
   632  *+ content/global/bindings/splitter.xml        (widgets/splitter.xml)
   632  *+ content/global/bindings/splitter.xml        (widgets/splitter.xml)
   633 diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/dialog-kde.xml
   633 diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/dialog-kde.xml
   634 new file mode 100644
   634 new file mode 100644
   635 --- /dev/null
   635 --- /dev/null
   636 +++ b/toolkit/content/widgets/dialog-kde.xml
   636 +++ b/toolkit/content/widgets/dialog-kde.xml
   637 @@ -0,0 +1,445 @@
   637 @@ -0,0 +1,447 @@
   638 +<?xml version="1.0"?>
   638 +<?xml version="1.0"?>
   639 +
   639 +
   640 +<bindings id="dialogBindings"
   640 +<bindings id="dialogBindings"
   641 +          xmlns="http://www.mozilla.org/xbl"
   641 +          xmlns="http://www.mozilla.org/xbl"
   642 +          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
   642 +          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
   806 +            // give focus to the first focusable element in the dialog
   806 +            // give focus to the first focusable element in the dialog
   807 +            if (!document.commandDispatcher.focusedElement) {
   807 +            if (!document.commandDispatcher.focusedElement) {
   808 +              document.commandDispatcher.advanceFocusIntoSubtree(dialog);
   808 +              document.commandDispatcher.advanceFocusIntoSubtree(dialog);
   809 +
   809 +
   810 +              var focusedElt = document.commandDispatcher.focusedElement;
   810 +              var focusedElt = document.commandDispatcher.focusedElement;
   811 +              var initialFocusedElt = focusedElt;
   811 +              if (focusedElt) {
   812 +              while (focusedElt.localName == "tab" ||
   812 +                var initialFocusedElt = focusedElt;
   813 +                     focusedElt.getAttribute("noinitialfocus") == "true") {
   813 +                while (focusedElt.localName == "tab" ||
   814 +                document.commandDispatcher.advanceFocusIntoSubtree(focusedElt);
   814 +                       focusedElt.getAttribute("noinitialfocus") == "true") {
   815 +                focusedElt = document.commandDispatcher.focusedElement;
   815 +                  document.commandDispatcher.advanceFocusIntoSubtree(focusedElt);
   816 +                if (focusedElt == initialFocusedElt)
   816 +                  focusedElt = document.commandDispatcher.focusedElement;
   817 +                  break;
   817 +                  if (focusedElt == initialFocusedElt)
       
   818 +                    break;
       
   819 +                }
       
   820 +
       
   821 +                if (initialFocusedElt.localName == "tab") {
       
   822 +                  if (focusedElt.hasAttribute("dlgtype")) {
       
   823 +                    // We don't want to focus on anonymous OK, Cancel, etc. buttons,
       
   824 +                    // so return focus to the tab itself
       
   825 +                    initialFocusedElt.focus();
       
   826 +                  }
       
   827 +                }
       
   828 +#ifndef XP_MACOSX
       
   829 +                else if (focusedElt.hasAttribute("dlgtype") && focusedElt != defaultButton) {
       
   830 +                  defaultButton.focus();
       
   831 +                }
       
   832 +#endif
   818 +              }
   833 +              }
   819 +
       
   820 +              if (initialFocusedElt.localName == "tab") {
       
   821 +                if (focusedElt.hasAttribute("dlgtype")) {
       
   822 +                  // We don't want to focus on anonymous OK, Cancel, etc. buttons,
       
   823 +                  // so return focus to the tab itself
       
   824 +                  initialFocusedElt.focus();
       
   825 +                }
       
   826 +              }
       
   827 +#ifndef XP_MACOSX
       
   828 +              else if (focusedElt.hasAttribute("dlgtype") && focusedElt != defaultButton) {
       
   829 +                defaultButton.focus();
       
   830 +              }
       
   831 +#endif
       
   832 +            }
   834 +            }
   833 +
   835 +
   834 +            try {
   836 +            try {
   835 +              if (defaultButton)
   837 +              if (defaultButton)
   836 +                window.notifyDefaultButtonLoaded(defaultButton);
   838 +                window.notifyDefaultButtonLoaded(defaultButton);
  3980  #include <glib.h>
  3982  #include <glib.h>
  3981  #include <hildon-uri.h>
  3983  #include <hildon-uri.h>
  3982  #include <hildon-mime.h>
  3984  #include <hildon-mime.h>
  3983  #include <libosso.h>
  3985  #include <libosso.h>
  3984  #endif
  3986  #endif
  3985 @@ -1627,36 +1628,46 @@ nsLocalFile::Launch()
  3987 @@ -1666,36 +1667,46 @@ nsLocalFile::Launch()
  3986  
  3988  
  3987      return NS_OK;
  3989      return NS_OK;
  3988  }
  3990  }
  3989  #else
  3991  #else
  3990  NS_IMETHODIMP
  3992  NS_IMETHODIMP
  4033  }
  4035  }
  4034  
  4036  
  4035  NS_IMETHODIMP
  4037  NS_IMETHODIMP
  4036  nsLocalFile::Launch()
  4038  nsLocalFile::Launch()
  4037  {
  4039  {
  4038 @@ -1674,16 +1685,23 @@ nsLocalFile::Launch()
  4040 @@ -1713,16 +1724,23 @@ nsLocalFile::Launch()
  4039  
  4041  
  4040      if (nsnull == connection)
  4042      if (nsnull == connection)
  4041        return NS_ERROR_FAILURE;
  4043        return NS_ERROR_FAILURE;
  4042  
  4044  
  4043      if (hildon_mime_open_file(connection, mPath.get()) != kHILDON_SUCCESS)
  4045      if (hildon_mime_open_file(connection, mPath.get()) != kHILDON_SUCCESS)