diff --git a/uppsrc/RichEdit/Editor.cpp b/uppsrc/RichEdit/Editor.cpp index 8ce446d6b..34a5ccbb6 100644 --- a/uppsrc/RichEdit/Editor.cpp +++ b/uppsrc/RichEdit/Editor.cpp @@ -707,6 +707,8 @@ RichEdit::RichEdit() singleline = false; clipzoom = Zoom(1, 1); + + bullet_indent = 150; } RichEdit::~RichEdit() {} diff --git a/uppsrc/RichEdit/Formating.cpp b/uppsrc/RichEdit/Formating.cpp index fbaf3a02f..d8b9d439d 100644 --- a/uppsrc/RichEdit/Formating.cpp +++ b/uppsrc/RichEdit/Formating.cpp @@ -530,7 +530,7 @@ void RichEdit::SetBullet(int bullet) } else { formatinfo.bullet = bullet; - formatinfo.indent = 150; + formatinfo.indent = bullet_indent; } ApplyFormat(0, RichText::INDENT|RichText::BULLET); } diff --git a/uppsrc/RichEdit/RichEdit.h b/uppsrc/RichEdit/RichEdit.h index 4f837b7e9..44ca6a7ae 100644 --- a/uppsrc/RichEdit/RichEdit.h +++ b/uppsrc/RichEdit/RichEdit.h @@ -279,6 +279,8 @@ private: Vector ffs; + int bullet_indent; + static int fh[]; @@ -758,6 +760,7 @@ public: RichEdit& ClipZoom(Zoom z) { clipzoom = z; return *this; } RichEdit& ClipZoom(int m, int d) { clipzoom = Zoom(m, d); return *this; } Zoom GetClipZoom() const { return clipzoom; } + RichEdit& BulletIndent(int i) { bullet_indent = i; return *this; } struct UndoInfo { int undoserial; diff --git a/uppsrc/Web/httpcli.cpp b/uppsrc/Web/httpcli.cpp index 45457643f..dd157984d 100644 --- a/uppsrc/Web/httpcli.cpp +++ b/uppsrc/Web/httpcli.cpp @@ -166,7 +166,7 @@ String HttpClient::CalculateDigest(String authenticate) const String hv1, hv2; hv1 << username << ':' << realm << ':' << password; String ha1 = MD5String(hv1); - hv2 << (method == METHOD_GET ? "GET" : method == METHOD_POST ? "POST" : "READ") + hv2 << (method == METHOD_GET ? "GET" : method == METHOD_PUT ? "PUT" : method == METHOD_POST ? "POST" : "READ") << ':' << path; String ha2 = MD5String(hv2); int nc = 1; @@ -235,7 +235,12 @@ String HttpClient::Execute(Gate2 progress) if(IsNull(ctype)) ctype = "application/x-www-form-urlencoded"; break; - case METHOD_HEAD: request << "HEAD "; break; + case PUT: + request << "PUT "; + if(IsNull(ctype)) + ctype = "application/x-www-form-urlencoded"; + break; + case METHOD_HEAD: request << "HEAD "; break; default: NEVER(); // invalid method } String host_port = host; @@ -258,7 +263,7 @@ String HttpClient::Execute(Gate2 progress) request << "Accept: " << Nvl(accept, "*/*") << "\r\n"; request << "Accept-Encoding: gzip\r\n"; request << "Agent: " << Nvl(agent, "Ultimate++ HTTP client") << "\r\n"; - if(method == METHOD_POST) + if(method == METHOD_POST || method == METHOD_PUT) request << "Content-Length: " << postdata.GetLength() << "\r\n"; if(ctype.GetCount()) request << "Content-Type: " << ctype << "\r\n"; diff --git a/uppsrc/Web/httpcli.h b/uppsrc/Web/httpcli.h index 3df42c3f5..6fa36cf6d 100644 --- a/uppsrc/Web/httpcli.h +++ b/uppsrc/Web/httpcli.h @@ -38,6 +38,7 @@ public: HttpClient& Get() { return Method(METHOD_GET); } HttpClient& Post() { return Method(METHOD_POST); } HttpClient& Head() { return Method(METHOD_HEAD); } + HttpClient& Put() { return Method(METHOD_PUT); } HttpClient& PostData(String pd) { postdata = pd; return *this; } HttpClient& PostUData(String pd) { return PostData(UrlEncode(pd)); } @@ -127,6 +128,7 @@ public: METHOD_GET, METHOD_POST, METHOD_HEAD, + METHOD_PUT, }; private: