• R/O
  • SSH
  • HTTPS

minimize: Commit


Commit MetaInfo

Revision21 (tree)
Zeit2021-01-05 10:51:59
Autortejima

Log Message

(empty log message)

Ändern Zusammenfassung

Diff

--- dllmain.cpp (revision 20)
+++ dllmain.cpp (revision 21)
@@ -59,14 +59,14 @@
5959 Registry::ValueNode(L"", clsid)
6060 })
6161 }),
62- Registry::KeyNode(L"Microsoft\\Office\\Outlook\\Addins", true,
62+ }),
63+ Registry::KeyNode(L"Microsoft\\Office\\Outlook\\Addins", true,
64+ {
65+ Registry::KeyNode(progid, false,
6366 {
64- Registry::KeyNode(progid, false,
65- {
66- Registry::ValueNode(L"Description", L"Minimize on Close"),
67- Registry::ValueNode(L"FriendlyName", L"Minimize on Close"),
68- Registry::ValueNode(L"LoadBehavior", 3)
69- })
67+ Registry::ValueNode(L"Description", L"Minimize on Close"),
68+ Registry::ValueNode(L"FriendlyName", L"Minimize on Close"),
69+ Registry::ValueNode(L"LoadBehavior", 3)
7070 })
7171 })
7272 })
--- registry.h (revision 20)
+++ registry.h (revision 21)
@@ -106,6 +106,7 @@
106106 if (r != ERROR_SUCCESS) { throw Error(r); }
107107 Finally a([k] { if (k != 0) ::RegCloseKey(k); });
108108 for (auto i = children.cbegin(); i != children.cend(); ++i) { i->second.Create(k); }
109+ for (auto i = values.cbegin(); i != values.cend(); ++i) { i->second.Create(k); }
109110 } else if (value.type == REG_SZ) {
110111 LONG r = ::RegSetValueEx(h, name.c_str(), 0, REG_SZ, reinterpret_cast<const BYTE *>(value.reg_sz.c_str()), (DWORD)(sizeof(char16_t) * (value.reg_sz.length() + 1)));
111112 if (r != ERROR_SUCCESS) { throw Error(r); }
@@ -140,12 +141,12 @@
140141 }
141142 friend Registry;
142143 protected:
143- static NodeMap makeChildren(const std::initializer_list<Registry::ValueNode> c) { NodeMap r; for (const Node& cc : c) { r.insert(std::make_pair(cc.subkey, cc)); } return r; }
144+ static NodeMap makeChildren(const std::initializer_list<Registry::ValueNode> c) { NodeMap r; for (const Node& cc : c) { r.insert(std::make_pair(cc.name, cc)); } return r; }
144145 static NodeMap makeChildren(const std::initializer_list<Registry::KeyNode> c) { NodeMap r; for (const Node& cc : c) { r.insert(std::make_pair(cc.subkey, cc)); } return r; }
145146 };
146147 struct ValueNode : Node {
147- ValueNode(const std::wstring& name, const std::wstring& value) noexcept : Node(0, false, std::wstring(), name, value, NodeMap(), NodeMap()) { }
148- ValueNode(const std::wstring& name, const DWORD value) noexcept : Node(0, false, std::wstring(), name, value, NodeMap(), NodeMap()) { }
148+ ValueNode(const std::wstring& name, const std::wstring& value) noexcept : Node(0, false, std::wstring(), name, value, NodeMap(), NodeMap()) {}
149+ ValueNode(const std::wstring& name, const DWORD value) noexcept : Node(0, false, std::wstring(), name, value, NodeMap(), NodeMap()) {}
149150 };
150151 struct KeyNode : Node {
151152 KeyNode(const std::wstring& name, const bool shared) noexcept : Node(0, shared, name, std::wstring(), Value(), NodeMap(), NodeMap()) {}
Show on old repository browser