mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
bug 213228: new toolkit independence bug, part 2.
bind our dialog.xml and wizard.xml widgets. remove the need for platformXUL.css and platformDialog.xml sync dialog.xml (bug 197568, patch by ajvincent@juno.com) with seamonkey
This commit is contained in:
parent
7cf6b9e3ed
commit
574479afa4
@ -1 +0,0 @@
|
||||
Makefile
|
@ -1,45 +0,0 @@
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Mozilla Browser code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2002
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Brian Ryner <bryner@netscape.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
@ -1,2 +0,0 @@
|
||||
toolkit.jar:
|
||||
content/global/platformXUL.css
|
@ -1,27 +0,0 @@
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
dialog {
|
||||
-moz-binding: url("chrome://global/content/platformDialog.xml#dialog") !important;
|
||||
}
|
||||
|
||||
.wizard-header {
|
||||
-moz-binding: url("chrome://global/content/bindings/wizard.xml#wizard-header-mac");
|
||||
}
|
||||
|
||||
.wizard-buttons {
|
||||
-moz-binding: url("chrome://global/content/bindings/wizard.xml#wizard-buttons-mac");
|
||||
}
|
||||
|
||||
statusbar {
|
||||
padding-right: 14px;
|
||||
}
|
||||
|
||||
.statusbar-resizerpanel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
toolbar[type="menubar"] {
|
||||
min-height: 0 !important;
|
||||
border: 0 !important;
|
||||
}
|
@ -17,14 +17,26 @@
|
||||
<children/>
|
||||
</xul:vbox>
|
||||
|
||||
<xul:hbox class="dialog-button-box" pack="end" anonid="buttons"
|
||||
xbl:inherits="pack=buttonpack,align=buttonalign,dir=buttondir,orient=buttonorient">
|
||||
<xul:hbox class="dialog-button-box" anonid="buttons"
|
||||
xbl:inherits="pack=buttonpack,align=buttonalign,dir=buttondir,orient=buttonorient"
|
||||
#ifdef XP_MACOSX
|
||||
>
|
||||
<xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/>
|
||||
<xul:button dlgtype="help" class="dialog-button" hidden="true"/>
|
||||
<xul:button dlgtype="extra2" class="dialog-button" hidden="true" label=""/>
|
||||
<xul:button dlgtype="extra1" class="dialog-button" hidden="true" label=""/>
|
||||
<xul:spacer flex="1"/>
|
||||
<xul:button dlgtype="cancel" class="dialog-button"/>
|
||||
<xul:button dlgtype="accept" class="dialog-button"/>
|
||||
#else
|
||||
pack="end">
|
||||
<xul:button dlgtype="accept" class="dialog-button"/>
|
||||
<xul:button dlgtype="extra1" class="dialog-button" hidden="true" label=""/>
|
||||
<xul:button dlgtype="extra2" class="dialog-button" hidden="true" label=""/>
|
||||
<xul:button dlgtype="cancel" class="dialog-button"/>
|
||||
<xul:button dlgtype="help" class="dialog-button" hidden="true"/>
|
||||
<xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/>
|
||||
#endif
|
||||
</xul:hbox>
|
||||
</content>
|
||||
|
||||
@ -34,7 +46,13 @@
|
||||
if (!document.documentElement.cancelDialog())
|
||||
event.preventDefault();
|
||||
})</field>
|
||||
<field name="enterDefaultAlways">false</field>
|
||||
<field name="enterDefaultAlways">
|
||||
#ifdef XP_MACOSX
|
||||
true
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
</field>
|
||||
|
||||
<property name="buttons"
|
||||
onget="return this.getAttribute('buttons');"
|
||||
@ -290,8 +308,13 @@
|
||||
</method>
|
||||
|
||||
<method name="_hitEnter">
|
||||
<parameter name="evt"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var target = evt.originalTarget;
|
||||
if ((target.localName == "textarea")&&(target.namespaceURI == "http://www.w3.org/1999/xhtml")) {
|
||||
return;
|
||||
}
|
||||
// if a button is focused, do nothing, so that activating the button
|
||||
// doesn't cause the dialog to exit
|
||||
if (!this.enterDefaultAlways) {
|
||||
@ -311,9 +334,12 @@
|
||||
</implementation>
|
||||
|
||||
<handlers>
|
||||
<handler event="keypress" keycode="VK_ENTER" action="this._hitEnter();"/>
|
||||
<handler event="keypress" keycode="VK_RETURN" action="this._hitEnter();"/>
|
||||
<handler event="keypress" keycode="VK_ENTER" action="this._hitEnter(event);"/>
|
||||
<handler event="keypress" keycode="VK_RETURN" action="this._hitEnter(event);"/>
|
||||
<handler event="keypress" keycode="VK_ESCAPE" action="this.cancelDialog();"/>
|
||||
#ifdef XP_MACOSX
|
||||
<handler event="keypress" key="." modifiers="meta" phase="capturing" action="this.cancelDialog();"/>
|
||||
#endif
|
||||
</handlers>
|
||||
|
||||
</binding>
|
||||
|
@ -405,6 +405,57 @@
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<binding id="wizard-header" extends="chrome://global/content/bindings/wizard.xml#wizard-base">
|
||||
<content>
|
||||
<xul:stack class="wizard-header-stack" flex="1">
|
||||
<xul:vbox class="wizard-header-box-1">
|
||||
<xul:vbox class="wizard-header-box-2">
|
||||
<xul:vbox class="wizard-header-box-text">
|
||||
<xul:label class="wizard-header-label" xbl:inherits="value=label"/>
|
||||
</xul:vbox>
|
||||
</xul:vbox>
|
||||
</xul:vbox>
|
||||
<xul:hbox class="wizard-header-box-icon">
|
||||
<xul:spacer flex="1"/>
|
||||
<xul:image class="wizard-header-icon" xbl:inherits="src=iconsrc"/>
|
||||
</xul:hbox>
|
||||
</xul:stack>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="wizard-buttons" extends="chrome://global/content/bindings/wizard.xml#wizard-base">
|
||||
<content>
|
||||
<xul:vbox flex="1">
|
||||
<xul:hbox class="wizard-buttons-top" xbl:inherits="hidden=hidetoprow">
|
||||
<xul:spacer flex="1"/>
|
||||
<xul:button class="wizard-button" dlgtype="cancel"/>
|
||||
<xul:button class="wizard-button" dlgtype="finish" default="true"/>
|
||||
</xul:hbox>
|
||||
<xul:separator class="wizard-buttons-separator groove"/>
|
||||
<xul:hbox class="wizard-buttons-btm">
|
||||
<xul:spacer flex="1"/>
|
||||
<xul:button class="wizard-button wizard-nav-button" dlgtype="back"/>
|
||||
<xul:hbox class="wizard-label-box" align="center">
|
||||
<xul:label class="wizard-page-label" xbl:inherits="value=pagestep"/>
|
||||
</xul:hbox>
|
||||
<xul:button class="wizard-button wizard-nav-button" dlgtype="next" default="true" xbl:inherits="disabled=lastpage"/>
|
||||
</xul:hbox>
|
||||
</xul:vbox>
|
||||
</content>
|
||||
|
||||
<implementation>
|
||||
<method name="onPageChange">
|
||||
<body><![CDATA[
|
||||
this.setAttribute("hidetoprow", !(this.getAttribute("lastpage") == "true"));
|
||||
]]></body>
|
||||
</method>
|
||||
</implementation>
|
||||
|
||||
</binding>
|
||||
|
||||
#else
|
||||
|
||||
<binding id="wizard-header" extends="chrome://global/content/bindings/wizard.xml#wizard-base">
|
||||
<content>
|
||||
<xul:hbox class="wizard-header-box-1" flex="1">
|
||||
@ -453,53 +504,6 @@
|
||||
</method>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
<binding id="wizard-header-mac" extends="chrome://global/content/bindings/wizard.xml#wizard-base">
|
||||
<content>
|
||||
<xul:stack class="wizard-header-stack" flex="1">
|
||||
<xul:vbox class="wizard-header-box-1">
|
||||
<xul:vbox class="wizard-header-box-2">
|
||||
<xul:vbox class="wizard-header-box-text">
|
||||
<xul:label class="wizard-header-label" xbl:inherits="value=label"/>
|
||||
</xul:vbox>
|
||||
</xul:vbox>
|
||||
</xul:vbox>
|
||||
<xul:hbox class="wizard-header-box-icon">
|
||||
<xul:spacer flex="1"/>
|
||||
<xul:image class="wizard-header-icon" xbl:inherits="src=iconsrc"/>
|
||||
</xul:hbox>
|
||||
</xul:stack>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
<binding id="wizard-buttons-mac" extends="chrome://global/content/bindings/wizard.xml#wizard-base">
|
||||
<content>
|
||||
<xul:vbox flex="1">
|
||||
<xul:hbox class="wizard-buttons-top" xbl:inherits="hidden=hidetoprow">
|
||||
<xul:spacer flex="1"/>
|
||||
<xul:button class="wizard-button" dlgtype="cancel"/>
|
||||
<xul:button class="wizard-button" dlgtype="finish" default="true"/>
|
||||
</xul:hbox>
|
||||
<xul:separator class="wizard-buttons-separator groove"/>
|
||||
<xul:hbox class="wizard-buttons-btm">
|
||||
<xul:spacer flex="1"/>
|
||||
<xul:button class="wizard-button wizard-nav-button" dlgtype="back"/>
|
||||
<xul:hbox class="wizard-label-box" align="center">
|
||||
<xul:label class="wizard-page-label" xbl:inherits="value=pagestep"/>
|
||||
</xul:hbox>
|
||||
<xul:button class="wizard-button wizard-nav-button" dlgtype="next" default="true" xbl:inherits="disabled=lastpage"/>
|
||||
</xul:hbox>
|
||||
</xul:vbox>
|
||||
</content>
|
||||
|
||||
<implementation>
|
||||
<method name="onPageChange">
|
||||
<body><![CDATA[
|
||||
this.setAttribute("hidetoprow", !(this.getAttribute("lastpage") == "true"));
|
||||
]]></body>
|
||||
</method>
|
||||
</implementation>
|
||||
|
||||
</binding>
|
||||
#endif
|
||||
|
||||
</bindings>
|
||||
|
@ -6,8 +6,6 @@
|
||||
CHANGES REVIEWED BY hyatt@netscape.com.
|
||||
**/
|
||||
|
||||
@import url("chrome://global/content/platformXUL.css");
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */
|
||||
@namespace html url("http://www.w3.org/1999/xhtml"); /* namespace for HTML elements */
|
||||
@namespace xbl url("http://www.mozilla.org/xbl"); /* namespace for XBL elements */
|
||||
@ -208,6 +206,13 @@ toolbar {
|
||||
-moz-binding: url("chrome://global/content/widgets/toolbar.xml#toolbar");
|
||||
}
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
toolbar[type="menubar"] {
|
||||
min-height: 0 !important;
|
||||
border: 0 !important;
|
||||
}
|
||||
#endif
|
||||
|
||||
toolbarseparator {
|
||||
-moz-binding: url("chrome://global/content/widgets/toolbar.xml#toolbardecoration");
|
||||
}
|
||||
@ -310,9 +315,15 @@ tooltip {
|
||||
margin-top: 21px;
|
||||
}
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
.statusbar-resizerpanel {
|
||||
display: none;
|
||||
}
|
||||
#else
|
||||
window[sizemode="maximized"] statusbarpanel.statusbar-resizerpanel {
|
||||
visibility: collapse;
|
||||
}
|
||||
#endif
|
||||
|
||||
/********** floating popups **********/
|
||||
|
||||
@ -814,6 +825,9 @@ autorepeatbutton {
|
||||
statusbar
|
||||
{
|
||||
-moz-binding: url("chrome://global/content/widgets/general.xml#statusbar");
|
||||
#ifdef XP_MACOSX
|
||||
padding-right: 14px;
|
||||
#endif
|
||||
}
|
||||
|
||||
statusbarpanel {
|
||||
@ -849,12 +863,12 @@ stringbundle {
|
||||
/********** dialog **********/
|
||||
|
||||
dialog {
|
||||
-moz-binding: url("chrome://global/content/bindings/dialog.xml#dialog");
|
||||
-moz-binding: url("chrome://global/content/widgets/dialog.xml#dialog");
|
||||
-moz-box-orient: vertical;
|
||||
}
|
||||
|
||||
dialogheader {
|
||||
-moz-binding: url("chrome://global/content/bindings/dialog.xml#dialogheader");
|
||||
-moz-binding: url("chrome://global/content/widgets/dialog.xml#dialogheader");
|
||||
}
|
||||
|
||||
/********* page ************/
|
||||
@ -866,22 +880,22 @@ page {
|
||||
/********** wizard **********/
|
||||
|
||||
wizard {
|
||||
-moz-binding: url("chrome://global/content/bindings/wizard.xml#wizard");
|
||||
-moz-binding: url("chrome://global/content/widgets/wizard.xml#wizard");
|
||||
-moz-box-orient: vertical;
|
||||
}
|
||||
|
||||
wizardpage {
|
||||
-moz-binding: url("chrome://global/content/bindings/wizard.xml#wizardpage");
|
||||
-moz-binding: url("chrome://global/content/widgets/wizard.xml#wizardpage");
|
||||
-moz-box-orient: vertical;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.wizard-header {
|
||||
-moz-binding: url("chrome://global/content/bindings/wizard.xml#wizard-header");
|
||||
-moz-binding: url("chrome://global/content/widgets/wizard.xml#wizard-header");
|
||||
}
|
||||
|
||||
.wizard-buttons {
|
||||
-moz-binding: url("chrome://global/content/bindings/wizard.xml#wizard-buttons");
|
||||
-moz-binding: url("chrome://global/content/widgets/wizard.xml#wizard-buttons");
|
||||
}
|
||||
|
||||
/********** expander ********/
|
||||
|
@ -23,7 +23,7 @@ toolkit.jar:
|
||||
content/global/widgets/toolbar.xml (content/widgets/toolbar.xml)
|
||||
content/global/widgets/toolbarbutton.xml (content/widgets/toolbarbutton.xml)
|
||||
content/global/widgets/colorpicker.xml (content/widgets/colorpicker.xml)
|
||||
content/global/widgets/dialog.xml (content/widgets/dialog.xml)
|
||||
* content/global/widgets/dialog.xml (content/widgets/dialog.xml)
|
||||
content/global/widgets/general.xml (content/widgets/general.xml)
|
||||
content/global/widgets/groupbox.xml (content/widgets/groupbox.xml)
|
||||
content/global/widgets/listbox.xml (content/widgets/listbox.xml)
|
||||
@ -39,7 +39,7 @@ toolkit.jar:
|
||||
content/global/widgets/stringbundle.xml (content/widgets/stringbundle.xml)
|
||||
content/global/widgets/text.xml (content/widgets/text.xml)
|
||||
content/global/widgets/tree.xml (content/widgets/tree.xml)
|
||||
content/global/widgets/wizard.xml (content/widgets/wizard.xml)
|
||||
* content/global/widgets/wizard.xml (content/widgets/wizard.xml)
|
||||
content/global/widgets/autoscroll_all.png (content/widgets/autoscroll_all.png)
|
||||
content/global/widgets/autoscroll_h.png (content/widgets/autoscroll_h.png)
|
||||
content/global/widgets/autoscroll_v.png (content/widgets/autoscroll_v.png)
|
||||
|
Loading…
Reference in New Issue
Block a user