Skip to content

Commit 55ab88a

Browse files
committed
add "ssl" statusfield
* default off (because the navigation toolbar is showed by default)
1 parent 27f9069 commit 55ab88a

File tree

7 files changed

+70
-14
lines changed

7 files changed

+70
-14
lines changed

common/content/buffer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ const Buffer = Module("buffer", {
244244
// for notifying the user about secure web pages
245245
onSecurityChange: function onSecurityChange(webProgress, request, state) {
246246
onSecurityChange.superapply(this, arguments);
247+
statusline.updateField("ssl", state);
247248
},
248249
onStatusChange: function onStatusChange(webProgress, request, status, message) {
249250
onStatusChange.superapply(this, arguments);

common/content/liberator.xul

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@
9090
<toolbaritem id="liberator-status" flex="10000000" liberator:highlight="StatusLine">
9191
<spacer liberatorPosition="-1" flex="10000000"/>
9292
<label id="liberator-status-input"/>
93+
<toolbarbutton id="liberator-status-ssl"
94+
oncommand="liberator.modules.statusline.ssl.openPopup(this);"/>
9395
<label id="liberator-status-location" flex="1" crop="center"/>
9496
<label id="liberator-status-history"/>
9597
<label id="liberator-status-bookmark"/>

common/content/statusline.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,37 @@ const StatusLine = Module("statusline", {
153153

154154
node.value = buffer;
155155
});
156+
statusline.addField("ssl", "The currently SSL status", "liberator-status-ssl",
157+
function updateSSLState (node, state) {
158+
var className = "";
159+
if (!state) {
160+
let securityUI = config.tabbrowser.securityUI;
161+
if (securityUI)
162+
state = securityUI.state || 0;
163+
}
164+
const WPL = Components.interfaces.nsIWebProgressListener;
165+
if (state & WPL.STATE_IDENTITY_EV_TOPLEVEL)
166+
className = "verifiedIdentity";
167+
else if (state & WPL.STATE_IS_SECURE)
168+
className = "verifiedDomain";
169+
else if (state & WPL.STATE_IS_BROKEN) {
170+
if ((state & WPL.STATE_LOADED_MIXED_ACTIVE_CONTENT) &&
171+
options.getPref("security.mixed_content.block_active_content", false))
172+
className = "mixedActiveContent";
173+
}
174+
175+
node.className = className;
176+
}, {
177+
openPopup: function (anchor) {
178+
var handler = window.gIdentityHandler;
179+
if (typeof handler === "undefiend") // Thunderbird has none
180+
return;
181+
182+
handler._identityPopup.hidden = false;
183+
handler.setPopupMessages(handler._identityBox.className);
184+
handler._identityPopup.openPopup(anchor);
185+
},
186+
});
156187
statusline.addField("location", "The currently loaded URL", "liberator-status-location",
157188
/**
158189
* Update the URL displayed in the status line

common/locale/en-US/options.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,7 @@
752752
<dt>tabcount</dt> <dd>[N/M]: N is the index of the currently selected tab and M is
753753
the total number of tabs in the current window.</dd>
754754
<dt>position</dt> <dd>The vertical scroll position</dd>
755+
<dt>ssl</dt> <dd>Show an icon when the current buffer is connecting with SSL.</dd>
755756
</dl>
756757
</description>
757758
</item>

common/locale/ja/options.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -722,28 +722,28 @@
722722
</description>
723723
</item>
724724

725-
726725
<item>
727-
<tags>'ls' 'laststatus'</tags>
728-
<spec>'laststatus' 'ls'</spec>
729-
<type>number</type>
730-
<default>2</default>
726+
<tags>'status'</tags>
727+
<spec>'status'</spec>
728+
<type>stringlist</type>
729+
<default>input,location,bookmark,history,tabcount,position</default>
731730
<description>
732-
<p>ステータスラインを表示するタイミングを決定します。</p>
731+
<p>ステータスラインに表示する要素を示します。</p>
733732

734-
<p>以下の値が使用できます:</p>
733+
<p>指定可能な値</p>
735734

736735
<dl>
737-
<dt>0</dt> <dd>常に表示しません</dd>
738-
<dt>1</dt> <dd>複数のウィンドウがあるときのみ表示します</dd>
739-
<dt>2</dt> <dd>常に表示します</dd>
736+
<dt>input</dt> <dd>'gg' と入力する場合、'g' の様に入力キーの一部を表示します</dd>
737+
<dt>location</dt> <dd>現在表示しているページのURLを表示します</dd>
738+
<dt>bookmark</dt> <dd>現在のURLがブックマーク済みである場合に &#x2764; を表示します</dd>
739+
<dt>history</dt> <dd>履歴の戻る/進むを &lt;&gt; で示します</dd>
740+
<dt>tabcount</dt> <dd>現Windowのタブ数と現タブの位置を [タブ位置/タブ数] で示します</dd>
741+
<dt>position</dt> <dd>スクロール位置を示します</dd>
742+
<dt>ssl</dt> <dd>SSL接続している場合にアイコンを表示します</dd>
740743
</dl>
741-
742-
<note>laststatus=1 はまだ実装されていません。</note>
743744
</description>
744745
</item>
745746

746-
747747
<item>
748748
<tags>'nolks' 'nolinksearch'</tags>
749749
<tags>'lks' 'linksearch'</tags>

common/skin/liberator.css

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
border: none !important;
118118
padding: 0 0px !important;
119119
background: transparent !important;
120-
height: 18px !important;
120+
height: 16px !important;
121121
}
122122
#liberator-statusline > *,
123123
#liberator-commandline > * {
@@ -142,6 +142,25 @@
142142
padding: 0 1px;
143143
margin: 0;
144144
}
145+
#liberator-status-ssl {
146+
-moz-appearance: none;
147+
width: 16px;
148+
height: 16px;
149+
visibility: collapse;
150+
-moz-image-region: rect(0, 16px, 16px, 0);
151+
}
152+
#liberator-status-ssl.verifiedIdentity {
153+
visibility: visible;
154+
list-style-image: url(chrome://browser/skin/identity-icons-https-ev.png);
155+
}
156+
#liberator-status-ssl.verifiedDomain {
157+
visibility: visible;
158+
list-style-image: url(chrome://browser/skin/identity-icons-https.png);
159+
}
160+
#liberator-status-ssl.mixedActiveContent {
161+
visibility: visible;
162+
list-style-image: url(chrome://browser/skin/identity-icons-https-mixed-active.png);
163+
}
145164

146165
#liberator-commandline-prompt {
147166
background-color: inherit;

vimperator/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
2013-XX-XX:
2+
* version 3.8
3+
* Add "ssl" field shows SSL connection icon to "status" option (default: off)
24

35
2013-05-22:
46
* version 3.7.1

0 commit comments

Comments
 (0)