[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co... |
Date: |
Fri, 16 Jul 2010 13:58:39 +0000 |
CVSROOT: /sources/mldonkey
Module name: mldonkey
Changes by: spiralvoice <spiralvoice> 10/07/16 13:58:39
Modified files:
distrib : ChangeLog
src/daemon/common: commonMessages.ml
src/daemon/driver: driverCommands.ml
Log message:
patch #7245
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1441&r2=1.1442
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonMessages.ml?cvsroot=mldonkey&r1=1.72&r2=1.73
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/driver/driverCommands.ml?cvsroot=mldonkey&r1=1.254&r2=1.255
Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1441
retrieving revision 1.1442
diff -u -b -r1.1441 -r1.1442
--- distrib/ChangeLog 16 Jul 2010 13:57:38 -0000 1.1441
+++ distrib/ChangeLog 16 Jul 2010 13:58:39 -0000 1.1442
@@ -15,6 +15,7 @@
=========
2010/07/16
+7245: HTML: Fix unstable option sections links position (ygrek)
7210: upload scheduler: correctly handle clock jumps (ygrek)
7219: fsync rename options files (ygrek)
Index: src/daemon/common/commonMessages.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonMessages.ml,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -b -r1.72 -r1.73
--- src/daemon/common/commonMessages.ml 23 May 2010 09:05:07 -0000 1.72
+++ src/daemon/common/commonMessages.ml 16 Jul 2010 13:58:39 -0000 1.73
@@ -233,6 +233,10 @@
font-family: Verdana;
font-size: 8px;
}
+.hcenter {
+ margin-left: auto;
+ margin-right: auto;
+}
td.fbig {
color: @color_general_text@;
cursor: pointer;
Index: src/daemon/driver/driverCommands.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/driver/driverCommands.ml,v
retrieving revision 1.254
retrieving revision 1.255
diff -u -b -r1.254 -r1.255
--- src/daemon/driver/driverCommands.ml 15 Jul 2010 18:25:23 -0000 1.254
+++ src/daemon/driver/driverCommands.ml 16 Jul 2010 13:58:39 -0000 1.255
@@ -1863,12 +1863,13 @@
"voo", Arg_multiple (fun args o ->
let buf = o.conn_buf in
+ let put fmt = Printf.bprintf buf fmt in
let changed_list = List.sort (fun d1 d2 -> compare d1 d2) (List.filter
(fun o ->
o.option_value <> o.option_default && not (String2.starts_with
o.option_name "enable_")
) (CommonInteractive.all_simple_options ())) in
if use_html_mods o then begin
- Printf.bprintf buf "\\<script type=\\\"text/javascript\\\"\\>
+ put "\\<script type=\\\"text/javascript\\\"\\>
\\<!--
function pluginSubmit() {
var formID = document.getElementById(\\\"pluginForm\\\");
@@ -1885,23 +1886,32 @@
//--\\>
\\</script\\>";
+ let button ~title ~cls ~cmd content = put "\\<td nowrap
title=\\\"%s\\\" class=\\\"%s\\\"\\>\\<a
onclick=\\\"javascript:window.location.href='submit?q=%s';setTimeout('window.location.replace(window.location.href)',500)\\\"\\>%s\\</a\\>\\</td\\>"
title cls cmd content
+ in
+
+ let select name options =
+ put "\\<select id=\\\"%s\\\" name=\\\"%s\\\"
+style=\\\"padding: 0px; font-size: 10px; font-family: verdana\\\"
onchange=\\\"this.form.submit()\\\"\\>" name name;
+ List.iter (fun (n,v) ->
+ put "\\<option value=\\\"%s\\\"\\>%s\\</option\\>\n" n v;
+ ) options;
+ put "\\</select\\>"
+ in
let tabnumber = ref 0 in
let mtabs = ref 1 in
if !!html_mods_use_js_helptext then
- Printf.bprintf buf "\\<div id=\\\"object1\\\"
style=\\\"position:absolute;
background-color:#FFFFDD;color:black;border-color:black;border-width:20px;font-size:8pt;
visibility:visible; left:25px; top:-100px; z-index:+1\\\"
onmouseover=\\\"overdiv=1;\\\" onmouseout=\\\"overdiv=0;
setTimeout(\\\'hideLayer()\\\',1000)\\\"\\>\\ \\</div\\>";
-
- Printf.bprintf buf "\\<div class=\\\"vo\\\"\\>\\<table class=main
cellspacing=0 cellpadding=0\\>
-\\<tr\\>\\<td\\>
-\\<table cellspacing=0 cellpadding=0 width=100%%\\>\\<tr\\>
-\\<td class=downloaded width=100%%\\>\\</td\\>";
+ put "\\<div id=\\\"object1\\\" style=\\\"position:absolute;
background-color:#FFFFDD;color:black;border-color:black;border-width:20px;font-size:8pt;
visibility:visible; left:25px; top:-100px; z-index:+1\\\"
onmouseover=\\\"overdiv=1;\\\" onmouseout=\\\"overdiv=0;
setTimeout(\\\'hideLayer()\\\',1000)\\\"\\>\\ \\</div\\>";
+ put "\\<div class=\\\"vo\\\"\\>";
+ put "\\<table class=main cellspacing=0 cellpadding=0\\>";
+ put "\\<tr\\>\\<td\\>";
+ put "\\<table cellspacing=0 cellpadding=0
class='hcenter'\\>\\<tr\\>";
- List.iter (fun (s,d) ->
+ List.iter (fun (s,title) ->
incr tabnumber; incr mtabs;
- Printf.bprintf buf "\\<td nowrap title=\\\"%s\\\"
class=fbig\\>\\<a
onclick=\\\"javascript:window.location.href='submit?q=voo+%d';setTimeout('window.location.replace(window.location.href)',500)\\\"\\>%s\\</a\\>\\</td\\>"
- d !tabnumber s
+ button ~title ~cls:"fbig" ~cmd:(Printf.sprintf "voo+%d"
!tabnumber) s
) [ ("Client", "Client related options & Up/Download limitations
") ;
("Ports", "Interface ports, each Network port is stored in
Network plugin options") ;
("html", "Show Webinterface related options") ;
@@ -1912,39 +1922,29 @@
("Misc", "miscellaneous") ;
("changed", "Show changed options") ];
- Printf.bprintf buf "
-\\<td nowrap title=\\\"Show all options\\\" class=\\\"fbig\\\"\\>\\<a
onclick=\\\"javascript:window.location.href='submit?q=voo'\\\"\\>All\\</a\\>\\</td\\>
-\\<td nowrap class=\\\"fbig fbig pr\\\"\\>
+ button ~title:"Show all options" ~cls:"fbig" ~cmd:"voo" "All";
+ put "\\<td nowrap class=\\\"fbig pr\\\"\\>
\\<form style=\\\"margin: 0px;\\\" name=\\\"pluginForm\\\"
id=\\\"pluginForm\\\"
-action=\\\"javascript:pluginSubmit();\\\"\\>
-\\<select id=\\\"plugin\\\" name=\\\"plugin\\\"
-style=\\\"padding: 0px; font-size: 10px; font-family: verdana\\\"
onchange=\\\"this.form.submit()\\\"\\>
-\\<option value=\\\"0\\\"\\>Plugins\n";
-
- let netlist = ref [] in
- List.iter (fun s ->
- incr tabnumber;
- netlist := !netlist @ [(s,!tabnumber)]
-
- ) (CommonInteractive.all_active_network_opfile_network_names ());
+action=\\\"javascript:pluginSubmit();\\\"\\>";
+ let options =
+ let netlist = List.map
+ (fun s -> incr tabnumber; s,!tabnumber)
+ (CommonInteractive.all_active_network_opfile_network_names ())
+ in
let duplist = ref [] in
- let netname = ref "" in
- List.iter (fun tup ->
- let s = (fst tup) in
- let t = (snd tup) in
- if List.memq s !duplist then
- netname := Printf.sprintf "%s+" s
- else netname := s;
- duplist := !duplist @ [!netname];
- Printf.bprintf buf "\\<option
value=\\\"%d\\\"\\>%s\\</option\\>\n"
- t !netname
- ) (List.sort (fun d1 d2 -> compare (fst d1) (fst d2)) !netlist);
+ List.map (fun (s,t) ->
+ let name = if List.memq s !duplist then s^"+" else s in
+ duplist := name :: !duplist;
+ string_of_int t, name
+ ) (List.sort (fun (s1,_) (s2,_) -> compare s1 s2) netlist);
+ in
- Printf.bprintf buf "\\</select\\>\\</td\\>\\</form\\>
-\\</tr\\>\\</table\\>
-\\</td\\>\\</tr\\>
-\\<tr\\>\\<td\\>";
+ select "plugin" (("0","Plugins") :: options);
+
+ put "\\</form\\>\\</td\\>\\</tr\\>\\</table\\>";
+ put "\\</td\\>\\</tr\\>";
+ put "\\<tr\\>\\<td\\>";
list_options_html o (
match args with
@@ -2173,45 +2173,50 @@
);
- Printf.bprintf buf "
-\\</td\\>\\</tr\\>
-\\<tr\\>\\<td\\>
-\\<table cellspacing=0 cellpadding=0 width=100%%\\>\\<tr\\>
-\\<td class=downloaded width=100%%\\>\\</td\\>
-\\<td nowrap title=\\\"Show shares Tab (also related for incoming
directory)\\\" class=\\\"fbig fbigb\\\"\\>\\<a
onclick=\\\"javascript:window.location.href='submit?q=shares'\\\"\\>Shares\\</a\\>\\</td\\>
-%s
-\\<td nowrap title=\\\"Show Web_infos Tab where you can add/remove automatic
downloads like serverlists\\\" class=\\\"fbig fbigb\\\"\\>\\<a
onclick=\\\"javascript:window.location.href='submit?q=vwi'\\\"\\>Web
infos\\</a\\>\\</td\\>
-\\<td nowrap title=\\\"Show Calendar Tab, there are informations about
automatically jobs\\\" class=\\\"fbig fbigb\\\"\\>\\<a
onclick=\\\"javascript:window.location.href='submit?q=vcal'\\\"\\>Calendar\\</a\\>\\</td\\>
-\\<td nowrap class=\\\"fbig fbigb pr\\\"\\>
-\\<form style=\\\"margin: 0px;\\\" name=\\\"htmlModsStyleForm\\\"
id=\\\"htmlModsStyleForm\\\"
-action=\\\"javascript:submitHtmlModsStyle();\\\"\\>
-\\<select id=\\\"modsStyle\\\" name=\\\"modsStyle\\\"
-style=\\\"padding: 0px; font-size: 10px; font-family: verdana\\\"
onchange=\\\"this.form.submit()\\\"\\>
-\\<option value=\\\"0\\\"\\>style/theme\n"
-(if (user2_is_admin o.conn_user.ui_user) then
- "\\<td nowrap title=\\\"Show users Tab where you can add/remove Users\\\"
class=\\\"fbig fbigb\\\"\\>\\<a
onclick=\\\"javascript:window.location.href='submit?q=users'\\\"\\>Users\\</a\\>\\</td\\>"
- else "");
+ put "\\</td\\>\\</tr\\>";
+ put "\\<tr\\>\\<td\\>";
- Array.iteri (fun i style ->
- Printf.bprintf buf "\\<option
value=\\\"%d\\\"\\>%s\\</option\\>\n" i style.style_name
- ) CommonMessages.styles;
+ put "\\<table cellspacing=0 cellpadding=0
class='hcenter'\\>\\<tr\\>";
+
+ button ~title:"Show shares Tab (also related for incoming
directory)" ~cls:"fbig fbigb" ~cmd:"shares" "Shares";
+ if (user2_is_admin o.conn_user.ui_user) then
+ button ~title:"Show users Tab where you can add/remove Users"
~cls:"fbig fbigb" ~cmd:"users" "Users";
+
+ button ~title:"Show Web_infos Tab where you can add/remove
automatic downloads like serverlists" ~cls:"fbig fbigb" ~cmd:"vwi" "Web infos";
+ button ~title:"Show Calendar Tab, there are informations about
automatically jobs" ~cls:"fbig fbigb" ~cmd:"vcal" "Calendar";
+ put "\\<td nowrap class=\\\"fbig fbigb pr\\\"\\>
+\\<form style=\\\"margin: 0px;\\\" name=\\\"htmlModsStyleForm\\\"
id=\\\"htmlModsStyleForm\\\"
+action=\\\"javascript:submitHtmlModsStyle();\\\"\\>";
+ let options =
+ ("0", "style/theme")
+ ::
+ Array.to_list (Array.mapi (fun i style -> string_of_int i,
style.style_name) CommonMessages.styles)
+ @
if Sys.file_exists html_themes_dir then begin
let list = Unix2.list_directory html_themes_dir in
- List.iter (fun d ->
+ List.fold_left (fun acc d ->
if Unix2.is_directory (Filename.concat html_themes_dir d)
then
let sd = (if String.length d > 11 then String.sub d 0 11
else d) in
- Printf.bprintf buf "\\<option
value=\\\"%s\\\"\\>%s\\</option\\>\n" d sd;
- ) (List.sort (fun d1 d2 -> compare d1 d2) list);
- end;
+ (d,sd) :: acc
+ else
+ acc
+ ) [] (List.sort (fun d1 d2 -> compare d1 d2) list);
+ end
+ else []
+ in
+
+ select "modsStyle" options;
+
+ put "\\</form\\>\\</td\\>\\</tr\\>\\</table\\>";
+ put "\\</td\\>\\</tr\\>";
+ put "\\<tr\\>\\<td\\>";
+ put "\\<table cellspacing=0 cellpadding=0
class='hcenter'\\>\\<tr\\>";
+ button ~title:"Change to simple Webinterface without html_mods"
~cls:"fbig fbigb fbigpad" ~cmd:"html_mods" "toggle html_mods";
+ put "\\<td nowrap title=\\\"Toggle option helptext from javascript
popup to html table\\\" class=\\\"fbig fbigb pr fbigpad\\\"\\>
+\\<a onclick=\\\"javascript:
{parent.fstatus.location.href='submit?q=set+html_mods_use_js_helptext+%s';
setTimeout('window.location.replace(window.location.href)',1000);return
true;}\\\"\\>toggle js_helptext\\</a\\>" (if !!html_mods_use_js_helptext then
"false" else "true");
+ put
"\\</tr\\>\\</table\\>\\</td\\>\\</tr\\>\\</table\\>\\</div\\>\\</br\\>";
- Printf.bprintf buf
"\\</select\\>\\</td\\>\\</tr\\>\\</form\\>\\</table\\>
-\\<table cellspacing=0 cellpadding=0 width=100%%\\>\\<tr\\>
-\\<td class=downloaded width=100%%\\>\\</td\\>
-\\<td nowrap title=\\\"Change to simple Webinterface without html_mods\\\"
class=\\\"fbig fbigb fbigpad\\\"\\>\\<a
onclick=\\\"javascript:window.location.href='submit?q=html_mods'\\\"\\>toggle
html_mods\\</a\\>\\</td\\>
-\\<td nowrap title=\\\"Toggle option helptext from javascript popup to html
table\\\" class=\\\"fbig fbigb pr fbigpad\\\"\\>
-\\<a onclick=\\\"javascript:
{parent.fstatus.location.href='submit?q=set+html_mods_use_js_helptext+%s';
setTimeout('window.location.replace(window.location.href)',1000);return
true;}\\\"\\>toggle js_helptext\\</a\\>
-\\</td\\>\\</tr\\>\\</table\\>\\</td\\>\\</tr\\>\\</table\\>\\</div\\>\\</br\\>"
(if !!html_mods_use_js_helptext then "false" else "true");
html_mods_table_one_row buf "downloaderTable" "downloaders" [
("", "srh", "!! press ENTER to send changes to core !!"); ];
end
@@ -2230,8 +2235,8 @@
if use_html_mods o then begin
Printf.bprintf buf "\\<div class=\\\"shares\\\"\\>\\<table
class=main cellspacing=0 cellpadding=0\\>
\\<tr\\>\\<td\\>
-\\<table cellspacing=0 cellpadding=0 width=100%%\\>\\<tr\\>
-\\<td class=downloaded width=100%%\\>\\</td\\>
+\\<table cellspacing=0 cellpadding=0 width='100%%'\\>\\<tr\\>
+\\<td class=downloaded width='100%%'\\>\\</td\\>
\\<td nowrap title=\\\"force downloading all web_infos files\\\"
class=\\\"fbig\\\"\\>
\\<a onclick=\\\"javascript:
{parent.fstatus.location.href='submit?q=force_web_infos';}\\\"\\>Re-download
all\\</a\\>
\\<td nowrap class=\\\"fbig pr\\\"\\>\\<a onclick=\\\"javascript: {
@@ -2495,7 +2500,7 @@
if use_html_mods o then begin
Printf.bprintf buf "\\<div class=\\\"shares\\\"\\>\\<table
class=main cellspacing=0 cellpadding=0\\>
\\<tr\\>\\<td\\>
-\\<table cellspacing=0 cellpadding=0 width=100%%\\>\\<tr\\>
+\\<table cellspacing=0 cellpadding=0 width='100%%'\\>\\<tr\\>
\\<td class=downloaded width=100%%\\>\\</td\\>
\\<td nowrap class=\\\"fbig pr\\\"\\>\\<a onclick=\\\"javascript: {
var getdir = prompt('Input: <priority#> <directory>
[<strategy>] (surround dir with quotes if necessary)','0 /home/mldonkey/share')