* i2psnark:

- Fix delete and remove buttons for Opera and w3m (thx xiake)
      - Stop torrent if no valid trackers
      - Fix war build dependencies
This commit is contained in:
zzz
2011-02-24 15:45:18 +00:00
parent fde783b156
commit bb7d0287d9
5 changed files with 20 additions and 8 deletions

View File

@ -86,7 +86,7 @@
<target name="warUpToDate">
<uptodate property="war.uptodate" targetfile="../i2psnark.war" >
<srcfiles dir= "." includes="build/obj/web/**/*.class ../_icons/* ../web.xml" />
<srcfiles dir= "." includes="build/obj/org/klomp/snark/web/*.class ../_icons/* ../web.xml" />
</uptodate>
</target>

View File

@ -185,10 +185,12 @@ public class TrackerClient extends I2PAppThread
}
if (trackers.isEmpty()) {
// FIXME really need to get this message to the gui
stop = true;
_log.error("No valid trackers for infoHash: " + infoHash);
// FIXME translate
SnarkManager.instance().addMessage("No valid trackers for " + this.snark.getBaseName() + " - enable opentrackers?");
_log.error("No valid trackers for " + this.snark.getBaseName());
// FIXME keep going if DHT enabled
this.snark.stopTorrent();
return;
}

View File

@ -348,8 +348,9 @@ public class I2PSnarkServlet extends Default {
out.write("</th>\n<th align=\"center\">");
// Opera and text-mode browsers: no &thinsp; and no input type=image values submitted
// Using a unique name fixes Opera, except for the buttons with js confirms, see below
String ua = req.getHeader("User-Agent");
boolean isDegraded = ua != null && (ua.startsWith("Lynx") ||
boolean isDegraded = ua != null && (ua.startsWith("Lynx") || ua.startsWith("w3m") ||
ua.startsWith("ELinks") || ua.startsWith("Dillo"));
boolean noThinsp = isDegraded || ua.startsWith("Opera");
@ -960,7 +961,8 @@ public class I2PSnarkServlet extends Default {
if (isDegraded)
out.write("</a>");
} else {
if (isDegraded)
// This works in Opera but it's displayed a little differently, so use noThinsp here too so all 3 icons are consistent
if (noThinsp)
out.write("<a href=\"/i2psnark/?action=Start_" + b64 + "&amp;nonce=" + _nonce + "\"><img title=\"");
else
out.write("<input type=\"image\" name=\"action_Start_" + b64 + "\" value=\"foo\" title=\"");
@ -972,7 +974,8 @@ public class I2PSnarkServlet extends Default {
out.write("</a>");
if (isValid) {
if (isDegraded)
// Doesnt work with Opera so use noThinsp instead of isDegraded
if (noThinsp)
out.write("<a href=\"/i2psnark/?action=Remove_" + b64 + "&amp;nonce=" + _nonce + "\"><img title=\"");
else
out.write("<input type=\"image\" name=\"action\" value=\"Remove_" + b64 + "\" title=\"");
@ -990,7 +993,8 @@ public class I2PSnarkServlet extends Default {
out.write("</a>");
}
if (isDegraded)
// Doesnt work with Opera so use noThinsp instead of isDegraded
if (noThinsp)
out.write("<a href=\"/i2psnark/?action=Delete_" + b64 + "&amp;nonce=" + _nonce + "\"><img title=\"");
else
out.write("<input type=\"image\" name=\"action_Delete_" + b64 + "\" value=\"foo\" title=\"");

View File

@ -1,3 +1,9 @@
2011-02-24 zzz
* i2psnark:
- Fix delete and remove buttons for Opera and w3m
- Stop torrent if no valid trackers
- Fix war build dependencies
2011-02-23 zzz
* BuildHandler:
- Lower participating throttler max limit

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 19;
public final static long BUILD = 20;
/** for example "-test" */
public final static String EXTRA = "-rc";