From 290d71be5715a585259408dc210817ed931d34f3 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Sun, 20 May 2007 16:01:32 +0000 Subject: [PATCH] changed colors --- ChangeLog | 1 + chrome/content/vimperator/default.css | 4 ++-- chrome/content/vimperator/vimperator.js | 21 ++++++++++++--------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2fae36e4..6aab3fb6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@
 2007-05-02:
 	* version ???
+	* changed secure sites -> green, broken sites -> red in the statusbar
 	* Vimperator now sets the window title, so it's "vimperator.mozdev.org -
 	  Vimperator" instead of "vimperator.mozdev.org - Mozilla Firefox"
 	  Use :set title=... to change it back (help from Hannes Rist)
diff --git a/chrome/content/vimperator/default.css b/chrome/content/vimperator/default.css
index 72e61800..fcd4a962 100644
--- a/chrome/content/vimperator/default.css
+++ b/chrome/content/vimperator/default.css
@@ -83,10 +83,10 @@ table.settings {
     background-color: transparent;
 }
 .status_secure, .status_secure * {
-    background-color: yellow;
+    background-color: #B0FF00; /* light green */
     color: black;
 }
 .status_broken, .status_broken * {
-    background-color: #ff9900;
+    background-color: #FF6060; /* light red */
     color: black;
 }
diff --git a/chrome/content/vimperator/vimperator.js b/chrome/content/vimperator/vimperator.js
index 9b34e3c7..bd9602c6 100644
--- a/chrome/content/vimperator/vimperator.js
+++ b/chrome/content/vimperator/vimperator.js
@@ -41,11 +41,12 @@ var heredoc = '';
 // handles to our gui elements
 var command_line = null;
 
-function nsBrowserStatusHandler2() /*{{{*/
+// FIXME: if I rename this to another class name, it doesn't work, find the reason
+function nsBrowserStatusHandler() /*{{{*/
 {
     this.init();
 }
-nsBrowserStatusHandler2.prototype =
+nsBrowserStatusHandler.prototype =
 {
     QueryInterface : function(aIID)
     {
@@ -669,7 +670,13 @@ function Vimperator()
 //    this.search = new Search();
 
     /////////////// callbacks ////////////////////////////
-	// type='[submit|change|cancel|complete]'
+	/**
+     * @param type Can be:
+     *  "submit": when the user pressed enter in the command line
+     *  "change"
+     *  "cancel"
+     *  "complete"
+     */
 	this.registerCallback = function(type, mode, func)
 	{
 		// TODO: check if callback is already registered
@@ -732,19 +739,14 @@ function Vimperator()
         showMode();
     }
 
-    /* After pressing Escape, put focus on a non-input field of the browser document */
+    // After pressing Escape, put focus on a non-input field of the browser document
     this.focusContent = function()
     {
-//        count = -1;
-//        inputbuffer = "";
-
         var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"].getService(Components.interfaces.nsIWindowWatcher);
         if (window == ww.activeWindow && document.commandDispatcher.focusedElement)
             document.commandDispatcher.focusedElement.blur();
 
         content.focus();
-        //this.setMode(vimperator.modes.NORMAL);
-        //showMode();
     }
 
     this.onEvent = function(event)/*{{{*/
@@ -978,6 +980,7 @@ function Vimperator()
     }/*}}}*/
 
 
+    // FIXME: is not called for onLocationChange etc, find the reason
     this.browserStatusHandler = function() { this.init(); }
     this.browserStatusHandler.prototype =
     {