Skip to content

Commit ce3b47a

Browse files
Sujit Raopde
authored andcommitted
Make basic preferences dialogs resizable
1 parent 2264402 commit ce3b47a

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

src/chrome/content/observatory-preferences.xul

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
title="&ssl-observatory.prefs.title;"
1212
width="800"
1313
height="768"
14-
persist="screenX screenY"
14+
persist="screenX screenY width height"
1515
onload="observatory_prefs_init(document)"
1616
ondialogaccept="observatory_prefs_accept()">
1717
<script type="application/x-javascript" src="observatory-xul.js" />

src/chrome/content/preferences.xul

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
buttonlabelextra2="&https-everywhere.prefs.reset_defaults;"
1414
ondialogextra2="reset_defaults();"
1515
title="&https-everywhere.prefs.title;"
16-
persist="screenX screenY"
16+
persist="screenX screenY width height"
1717
onload="https_prefs_init(document)"
1818
ondialogaccept="https_prefs_accept()">
1919

src/chrome/content/toolbar_button.xul

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050
<command id="https-everywhere-menuitem-globalEnableToggle"
5151
oncommand="toggleEnabledState();" />
5252
<command id="https-everywhere-menuitem-preferences"
53-
oncommand="HTTPSEverywhere.chrome_opener('chrome://https-everywhere/content/preferences.xul');" />
53+
oncommand="HTTPSEverywhere.chrome_opener('chrome://https-everywhere/content/preferences.xul', 'chrome,centerscreen,resizable=yes');" />
5454
<command id="https-everywhere-menuitem-about"
5555
oncommand="HTTPSEverywhere.chrome_opener('chrome://https-everywhere/content/about.xul');" />
5656
<command id="https-everywhere-menuitem-observatory"
57-
oncommand="HTTPSEverywhere.chrome_opener('chrome://https-everywhere/content/observatory-preferences.xul');" />
57+
oncommand="HTTPSEverywhere.chrome_opener('chrome://https-everywhere/content/observatory-preferences.xul', 'chrome,centerscreen,resizable=yes');" />
5858
<command id="https-everywhere-menuitem-donate-eff"
5959
oncommand="open_in_tab('https://www.eff.org/donate');" />
6060
<command id="https-everywhere-menuitem-donate-tor"

src/components/https-everywhere.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,13 +621,14 @@ HTTPSEverywhere.prototype = {
621621
}
622622
},
623623

624-
chrome_opener: function(uri) {
624+
chrome_opener: function(uri, args) {
625625
// we don't use window.open, because we need to work around TorButton's
626626
// state control
627+
args = args || 'chrome,centerscreen';
627628
return CC['@mozilla.org/appshell/window-mediator;1']
628629
.getService(CI.nsIWindowMediator)
629630
.getMostRecentWindow('navigator:browser')
630-
.open(uri,'', 'chrome,centerscreen' );
631+
.open(uri,'', args );
631632
},
632633

633634
toggleEnabledState: function() {

0 commit comments

Comments
 (0)