mozilla-kde.patch
changeset 1006 5ba9b67de554
parent 1005 6d716caa6abe
child 1007 65e317e42eff
equal deleted inserted replaced
1005:6d716caa6abe 1006:5ba9b67de554
     1 # HG changeset patch
     1 # HG changeset patch
     2 # Parent  c5bcac47a3f81790e9c2724d9d17ea5a7f20e735
     2 # Parent  87a32e5d11e9d652e331a5f852bb951069b20c4a
     3 Description: Add KDE integration to Firefox (toolkit parts)
     3 Description: Add KDE integration to Firefox (toolkit parts)
     4 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
     4 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
     5 Author: Lubos Lunak <lunak@suse.com>
     5 Author: Lubos Lunak <lunak@suse.com>
     6 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751
     6 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751
     7      https://bugzilla.novell.com/show_bug.cgi?id=170055
     7      https://bugzilla.novell.com/show_bug.cgi?id=170055
   566 +
   566 +
   567 +            // show the spacer on Windows only when the extra2 button is present
   567 +            // show the spacer on Windows only when the extra2 button is present
   568 +            if (/Win/.test(navigator.platform)) {
   568 +            if (/Win/.test(navigator.platform)) {
   569 +              var spacer = document.getAnonymousElementByAttribute(this, "anonid", "spacer");
   569 +              var spacer = document.getAnonymousElementByAttribute(this, "anonid", "spacer");
   570 +              spacer.removeAttribute("hidden");
   570 +              spacer.removeAttribute("hidden");
   571 +              spacer.setAttribute("flex", shown["extra2"] ? "1" : "0");
   571 +              spacer.setAttribute("flex", shown.extra2 ? "1" : "0");
   572 +            }
   572 +            }
   573 +          }
   573 +          }
   574 +        ]]>
   574 +        ]]>
   575 +        </body>
   575 +        </body>
   576 +      </method>
   576 +      </method>
   801 +      <field name="defaultBranch">
   801 +      <field name="defaultBranch">
   802 +        this.service.getDefaultBranch("");
   802 +        this.service.getDefaultBranch("");
   803 +      </field>
   803 +      </field>
   804 +      <field name="rootBranchInternal">
   804 +      <field name="rootBranchInternal">
   805 +        Components.classes["@mozilla.org/preferences-service;1"]
   805 +        Components.classes["@mozilla.org/preferences-service;1"]
   806 +                  .getService(Components.interfaces.nsIPrefBranchInternal);
   806 +                  .getService(Components.interfaces.nsIPrefBranch);
   807 +      </field>
   807 +      </field>
   808 +      <property name="type" readonly="true">
   808 +      <property name="type" readonly="true">
   809 +        <getter>
   809 +        <getter>
   810 +          <![CDATA[
   810 +          <![CDATA[
   811 +            return document.documentElement.type || "";
   811 +            return document.documentElement.type || "";
  1081 +              var fontEnumerator = Components.classes["@mozilla.org/gfx/fontenumerator;1"]
  1081 +              var fontEnumerator = Components.classes["@mozilla.org/gfx/fontenumerator;1"]
  1082 +                                             .createInstance(Components.interfaces.nsIFontEnumerator);
  1082 +                                             .createInstance(Components.interfaces.nsIFontEnumerator);
  1083 +              return fontEnumerator.getStandardFamilyName(family);
  1083 +              return fontEnumerator.getStandardFamilyName(family);
  1084 +            case "file":
  1084 +            case "file":
  1085 +              var f = this._branch
  1085 +              var f = this._branch
  1086 +                          .getComplexValue(this.name, Components.interfaces.nsILocalFile);
  1086 +                          .getComplexValue(this.name, Components.interfaces.nsIFile);
  1087 +              return f;
  1087 +              return f;
  1088 +            default:
  1088 +            default:
  1089 +              this._reportUnknownType();
  1089 +              this._reportUnknownType();
  1090 +            }
  1090 +            }
  1091 +          } catch (e) { }
  1091 +          } catch (e) { }
  1126 +            break;
  1126 +            break;
  1127 +          case "file":
  1127 +          case "file":
  1128 +            var lf;
  1128 +            var lf;
  1129 +            if (typeof(val) == "string") {
  1129 +            if (typeof(val) == "string") {
  1130 +              lf = Components.classes["@mozilla.org/file/local;1"]
  1130 +              lf = Components.classes["@mozilla.org/file/local;1"]
  1131 +                             .createInstance(Components.interfaces.nsILocalFile);
  1131 +                             .createInstance(Components.interfaces.nsIFile);
  1132 +              lf.persistentDescriptor = val;
  1132 +              lf.persistentDescriptor = val;
  1133 +              if (!lf.exists())
  1133 +              if (!lf.exists())
  1134 +                lf.initWithPath(val);
  1134 +                lf.initWithPath(val);
  1135 +            } else
  1135 +            } else
  1136 +              lf = val.QueryInterface(Components.interfaces.nsILocalFile);
  1136 +              lf = val.QueryInterface(Components.interfaces.nsIFile);
  1137 +            this.preferences.rootBranch
  1137 +            this.preferences.rootBranch
  1138 +                .setComplexValue(this.name, Components.interfaces.nsILocalFile, lf);
  1138 +                .setComplexValue(this.name, Components.interfaces.nsIFile, lf);
  1139 +            break;
  1139 +            break;
  1140 +          default:
  1140 +          default:
  1141 +            this._reportUnknownType();
  1141 +            this._reportUnknownType();
  1142 +          }
  1142 +          }
  1143 +          if (!this.batching)
  1143 +          if (!this.batching)