From f62dfb0abf7f748efb5004dc91a0d316acb65d91 Mon Sep 17 00:00:00 2001
From: z3d <z3d@mail.i2p>
Date: Mon, 20 Sep 2010 11:26:28 +0000
Subject: [PATCH] I2PSnark: Invert show/hide peer icon functionality, tooltip
 change to "toggle peers"; fix alignment of "No torrents loaded" message with
 new css class; Replace brackets on Totals with &raquo;.

---
 .../src/org/klomp/snark/web/I2PSnarkServlet.java     | 12 ++++++------
 installer/resources/themes/console/snark/snark.css   | 10 +++++++++-
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
index 7098c90899..1ccfe56e88 100644
--- a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
+++ b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
@@ -243,10 +243,10 @@ public class I2PSnarkServlet extends Default {
             out.write(req.getRequestURI());
             if (peerParam != null) {
                 out.write("\">");
-                out.write(_("<img border=\"0\" src=\"/themes/console/snark/images/hidepeers.png\" title=\"Hide Peers\" alt=\"Hide Peers\">"));
+                out.write(_("<img border=\"0\" src=\"/themes/console/snark/images/showpeers.png\" title=\"Toggle Peer Visibility\" alt=\"Hide Peers\">"));
             } else {
                 out.write("?p=1\">");
-                out.write(_("<img border=\"0\" src=\"/themes/console/snark/images/showpeers.png\" title=\"Show Peers\" alt=\"Show Peers\">"));
+                out.write(_("<img border=\"0\" src=\"/themes/console/snark/images/hidepeers.png\" title=\"Toggle Peer Visibility\" alt=\"Show Peers\">"));
             }
             out.write("</a><br>\n"); 
         }
@@ -291,8 +291,8 @@ public class I2PSnarkServlet extends Default {
         }
 
         if (snarks.isEmpty()) {
-            out.write("<tr class=\"snarkTorrentEven\">" +
-                      "<td class=\"snarkTorrentEven\" align=\"center\"" +
+            out.write("<tr class=\"snarkTorrentNoneLoaded\">" +
+                      "<td class=\"snarkTorrentNoneLoaded\"" +
                       " colspan=\"8\"><i>");
             out.write(_("No torrents loaded."));
             out.write("</i></td></tr>\n");
@@ -300,12 +300,12 @@ public class I2PSnarkServlet extends Default {
             out.write("<tfoot><tr>\n" +
                       "    <th align=\"left\" colspan=\"2\">");
             out.write(_("Totals"));
-            out.write(" (");
+            out.write(" &raquo;&nbsp;");
             out.write(ngettext("1 torrent", "{0} torrents", snarks.size()));
             out.write(", ");
             out.write(DataHelper.formatSize2(stats[5]) + "B, ");
             out.write(ngettext("1 connected peer", "{0} connected peers", (int) stats[4]));
-            out.write(")</th>\n" +
+            out.write("</th>\n" +
                       "    <th>&nbsp;</th>\n" +
                       "    <th align=\"right\">" + formatSize(stats[0]) + "</th>\n" +
                       "    <th align=\"right\">" + formatSize(stats[1]) + "</th>\n" +
diff --git a/installer/resources/themes/console/snark/snark.css b/installer/resources/themes/console/snark/snark.css
index f62bb390c2..042e99e3a8 100644
--- a/installer/resources/themes/console/snark/snark.css
+++ b/installer/resources/themes/console/snark/snark.css
@@ -2,7 +2,7 @@
 /* Guantanamo Commemorative Edition. */
 
 body {
-     background: #333 url('/themes/console/snark/images/graytile.png');
+     background: #101 url('/themes/console/snark/images/graytile.png');
      color: #001;
      font: 8pt "Lucida Sans Unicode","Bitstream Vera Sans",Verdana,Tahoma,Helvetica,sans-serif;
 }
@@ -167,6 +167,14 @@ td:first-child {
      font-size: 8pt;
 }
 
+.snarkTorrentNoneLoaded {
+     background: #323;
+     font-size: 8.5pt;
+	 font-weight: bold;
+	 text-align: center !important;
+	 color: #bbb !important;
+}
+
 .snarkTorrentStatus {
      padding: 1px 0 2px;
 }
-- 
GitLab