Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: The dialog resizing (for Windows OS), the template is not wrapped, style clean up #2194

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 13 additions & 7 deletions content/bindings.xml
Expand Up @@ -97,7 +97,7 @@
</method>
</implementation>
<handlers>
<handler event="select" action="this._onSelect();"/>
<handler event="select" action="this._onSelect();" />
</handlers>
</binding>
<binding id="clude-editor-editable"
Expand All @@ -107,11 +107,12 @@
<xul:hbox flex="1">
<xul:listbox flex="1" id="listbox" />
<xul:vbox>
<xul:button id="btnAdd" label="&button.add;" oncommand="_onAddPage()" />
<xul:button id="btnEdit" label="&button.edit;" oncommand="_onEditPage()"
<xul:button id="btnAdd" label="&button.add;" oncommand="_onAddPage();" />
<xul:button id="btnEdit" label="&button.edit;" oncommand="_onEditPage();"
disabled="true" />
<xul:button id="btnDel" label="&button.remove;" oncommand="_onRemovePage()"
<xul:button id="btnDel" label="&button.remove;" oncommand="_onRemovePage();"
disabled="true" />
<xul:resizer id="resizer" dir="right" />
<xul:spacer flex="1" />
</xul:vbox>
</xul:hbox>
Expand All @@ -124,6 +125,11 @@
this, 'id', 'btnEdit');
this._btnDel = document.getAnonymousElementByAttribute(
this, 'id', 'btnDel');
if (navigator.appVersion.indexOf("Win") != -1) {
if (this == document.getElementById("globalExcludes")) {
document.getElementById("resizer").style.display = "block";
}
}
</constructor>

<method name="_onSelect">
Expand Down Expand Up @@ -169,7 +175,7 @@
<xul:listbox flex="1" id="listbox" />
<xul:vbox>
<xul:button id="btnUserClude" label="&button.addUserExclude;"
oncommand="_addUserClude('Exclude')" disabled="true" />
oncommand="_addUserClude('Exclude');" disabled="true" />
</xul:vbox>
</xul:hbox>
</content>
Expand All @@ -182,7 +188,7 @@
<xul:listbox flex="1" id="listbox" />
<xul:vbox id="vboxUserCludeMatch">
<xul:button id="btnUserClude" label="&button.addUserExclude;"
oncommand="_addUserClude('Exclude')" disabled="true" />
oncommand="_addUserClude('Exclude');" disabled="true" />
</xul:vbox>
</xul:hbox>
</content>
Expand All @@ -195,7 +201,7 @@
<xul:listbox flex="1" id="listbox" />
<xul:vbox>
<xul:button id="btnUserClude" label="&button.addUserInclude;"
oncommand="_addUserClude('Include')" disabled="true" />
oncommand="_addUserClude('Include');" disabled="true" />
</xul:vbox>
</xul:hbox>
</content>
Expand Down
14 changes: 7 additions & 7 deletions content/options.xul
Expand Up @@ -18,13 +18,13 @@

id="greasemonkey-options-dialog"
persist="screenX screenY"
onload="GM_loadOptions()"
ondialogaccept="GM_saveOptions()"
ondialogcancel="close()"
onload="GM_loadOptions();"
ondialogaccept="GM_saveOptions();"
ondialogcancel="close();"
>
<script type="application/x-javascript" src="chrome://greasemonkey/content/options.js" />

<dialogheader title="Greasemonkey" description="&prefWindow.titleWin;"/>
<dialogheader title="Greasemonkey" description="&prefWindow.titleWin;" />

<vbox flex="1">
<groupbox>
Expand All @@ -37,8 +37,8 @@
<groupbox>
<caption label="&options.editor;" />
<hbox>
<button oncommand="GM_util.setEditor(1)" label="&options.defaultEditor;" flex="1"/>
<button oncommand="GM_util.setEditor(0)" label="&options.browseForEditor;" flex="1"/>
<button oncommand="GM_util.setEditor(1)" label="&options.defaultEditor;" />
<button oncommand="GM_util.setEditor(0)" label="&options.browseForEditor;" />
</hbox>
</groupbox>

Expand All @@ -50,7 +50,7 @@
<groupbox flex="1">
<caption label="&options.newScript.template;" />
<checkbox id="newScript-removeUnused" label="&options.newScript.removeUnused;" />
<textbox id="newScript-template" multiline="true" rows="5" flex="1" />
<textbox id="newScript-template" multiline="true" rows="5" wrap="off" flex="1" />
</groupbox>
</vbox>

Expand Down
4 changes: 4 additions & 0 deletions content/scriptprefs.js
Expand Up @@ -54,6 +54,10 @@ window.addEventListener('load', function() {
gTabboxEl.selectedTab = gUserTabEl;
};
gUserExcludesEl.pages = gScript.userExcludes;

if (navigator.appVersion.indexOf("Win") != -1) {
document.getElementById("resizer").style.display = "block";
}
}, false);

function onDialogAccept() {
Expand Down
5 changes: 3 additions & 2 deletions content/scriptprefs.xul
Expand Up @@ -25,17 +25,18 @@
<tabs>
<tab label="&scriptprefs.usersettings;" />
<tab label="&scriptprefs.scriptsettings;" />
<resizer id="resizer" dir="right" />
</tabs>
<tabpanels>
<tabpanel>
<vbox flex="1">
<vbox flex="1" class="include">
<label value="&label.grpIncluded;" />
<cludes id="user-includes"/>
<cludes id="user-includes" />
</vbox>
<vbox flex="1" class="match">
<label value="&label.grpMatched;" />
<cludes id="user-matches"/>
<cludes id="user-matches" />
</vbox>
<vbox flex="1" class="exclude">
<label value="&label.grpExcluded;" />
Expand Down
3 changes: 3 additions & 0 deletions skin/bindings.css
@@ -1,6 +1,9 @@
cludes {
-moz-binding: url('chrome://greasemonkey/content/bindings.xml#clude-editor-editable');
}
#resizer {
display: none;
}
.include cludes.readonly {
-moz-binding: url('chrome://greasemonkey/content/bindings.xml#clude-editor-readonly-include');
}
Expand Down
3 changes: 3 additions & 0 deletions skin/scriptprefs.css
@@ -1,3 +1,6 @@
cludes {
min-width: 500px;
}
#resizer {
display: none;
}