From e8bff10f07b80d820545661cee9337d8664a64cb Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Sun, 18 Jul 2010 20:47:29 +0000 Subject: minor UI tweaks, removed some outdated txt files, (and json-rpc password -rpcpw= switch, which we're going to revert) git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@108 1a98c847-1fd6-4fd8-948a-caf3550aa51b --- bugs.txt | 2 - changelog.txt | 7 ---- init.cpp | 6 +-- locale/de/LC_MESSAGES/bitcoin.mo | Bin 16092 -> 16083 bytes locale/de/LC_MESSAGES/bitcoin.po | 2 +- locale/es/LC_MESSAGES/bitcoin.mo | Bin 15005 -> 14996 bytes locale/es/LC_MESSAGES/bitcoin.po | 2 +- locale/fr/LC_MESSAGES/bitcoin.mo | Bin 15732 -> 15723 bytes locale/fr/LC_MESSAGES/bitcoin.po | 2 +- locale/it/LC_MESSAGES/bitcoin.mo | Bin 15616 -> 15607 bytes locale/it/LC_MESSAGES/bitcoin.po | 2 +- locale/nl/LC_MESSAGES/bitcoin.mo | Bin 14923 -> 14914 bytes locale/nl/LC_MESSAGES/bitcoin.po | 2 +- locale/pt/LC_MESSAGES/bitcoin.mo | Bin 15663 -> 15654 bytes locale/pt/LC_MESSAGES/bitcoin.po | 2 +- rpc.cpp | 81 +++++++++++++++++++++++++++------------ serialize.h | 2 +- ui.cpp | 4 +- util.cpp | 3 +- 19 files changed, 71 insertions(+), 46 deletions(-) delete mode 100644 bugs.txt delete mode 100644 changelog.txt diff --git a/bugs.txt b/bugs.txt deleted file mode 100644 index f990b67a3c..0000000000 --- a/bugs.txt +++ /dev/null @@ -1,2 +0,0 @@ -Known bugs: -- Window flickers when blocks are added (problem with repainting?) \ No newline at end of file diff --git a/changelog.txt b/changelog.txt deleted file mode 100644 index d2380b8a09..0000000000 --- a/changelog.txt +++ /dev/null @@ -1,7 +0,0 @@ -Changes after 0.1.5: --------------------- -+ Options dialog layout changed - added the UI options panel -+ Minimize to tray feature -+ Startup on system boot feature -+ Ask before closing -+ NSIS installer \ No newline at end of file diff --git a/init.cpp b/init.cpp index e7382d77fa..68e90aab04 100644 --- a/init.cpp +++ b/init.cpp @@ -389,7 +389,7 @@ bool CMyApp::OnInit2() " bitcoin [options] \t" + "\n" + " bitcoin [command] \t" + _("Send command to bitcoin running with -server or -daemon\n") + " bitcoin [command] -? \t" + _("Get help for a command\n") + - " bitcoin help \t" + _("List commands\n") + + " bitcoin help \t" + _("List commands\n") + _("Options:\n") + " -gen \t " + _("Generate coins\n") + " -gen=0 \t " + _("Don't generate coins\n") + @@ -398,7 +398,7 @@ bool CMyApp::OnInit2() " -proxy=\t " + _("Connect through socks4 proxy\n") + " -addnode= \t " + _("Add a node to connect to\n") + " -connect= \t " + _("Connect only to the specified node\n") + - " -server \t " + _("Accept command line and JSON-RPC commands\n") + + " -rpcpw= \t " + _("Accept command line and JSON-RPC commands with the given password\n") + " -daemon \t " + _("Run in the background as a daemon and accept commands\n") + " -? \t " + _("This help message\n"); @@ -611,7 +611,7 @@ bool CMyApp::OnInit2() if (!CreateThread(StartNode, NULL)) wxMessageBox("Error: CreateThread(StartNode) failed", "Bitcoin"); - if (mapArgs.count("-server") || fDaemon) + if (mapArgs.count("-server") || mapArgs.count("-rpcpw") || fDaemon) CreateThread(ThreadRPCServer, NULL); if (fFirstRun) diff --git a/locale/de/LC_MESSAGES/bitcoin.mo b/locale/de/LC_MESSAGES/bitcoin.mo index d53b22f7b1..2b5ff6f963 100644 Binary files a/locale/de/LC_MESSAGES/bitcoin.mo and b/locale/de/LC_MESSAGES/bitcoin.mo differ diff --git a/locale/de/LC_MESSAGES/bitcoin.po b/locale/de/LC_MESSAGES/bitcoin.po index 9d1b6b08cb..b8857929ab 100644 --- a/locale/de/LC_MESSAGES/bitcoin.po +++ b/locale/de/LC_MESSAGES/bitcoin.po @@ -216,7 +216,7 @@ msgstr "&Neue Empfangs-Adresse" #: ../../../ui.cpp:1124 #: ../../../ui.cpp:2352 msgid "" -"It's good policy to use a new address for each payment you receive.\n" +"You should use a new address for each payment you receive.\n" "\n" "Label" msgstr "" diff --git a/locale/es/LC_MESSAGES/bitcoin.mo b/locale/es/LC_MESSAGES/bitcoin.mo index 96bdece336..8d7cf0ba68 100644 Binary files a/locale/es/LC_MESSAGES/bitcoin.mo and b/locale/es/LC_MESSAGES/bitcoin.mo differ diff --git a/locale/es/LC_MESSAGES/bitcoin.po b/locale/es/LC_MESSAGES/bitcoin.po index e0b3170b49..b55a8daa70 100644 --- a/locale/es/LC_MESSAGES/bitcoin.po +++ b/locale/es/LC_MESSAGES/bitcoin.po @@ -242,7 +242,7 @@ msgstr "Nueva direccion de recepcion" #: ../../../ui.cpp:1129 #: ../../../ui.cpp:2369 msgid "" -"It's good policy to use a new address for each payment you receive.\n" +"You should use a new address for each payment you receive.\n" "\n" "Label" msgstr "" diff --git a/locale/fr/LC_MESSAGES/bitcoin.mo b/locale/fr/LC_MESSAGES/bitcoin.mo index c42e539d4e..25db2af273 100644 Binary files a/locale/fr/LC_MESSAGES/bitcoin.mo and b/locale/fr/LC_MESSAGES/bitcoin.mo differ diff --git a/locale/fr/LC_MESSAGES/bitcoin.po b/locale/fr/LC_MESSAGES/bitcoin.po index f8a7e48943..46ee83c200 100644 --- a/locale/fr/LC_MESSAGES/bitcoin.po +++ b/locale/fr/LC_MESSAGES/bitcoin.po @@ -242,7 +242,7 @@ msgstr "Nouvelle adresse de reception" #: ../../../ui.cpp:1129 #: ../../../ui.cpp:2369 msgid "" -"It's good policy to use a new address for each payment you receive.\n" +"You should use a new address for each payment you receive.\n" "\n" "Label" msgstr "" diff --git a/locale/it/LC_MESSAGES/bitcoin.mo b/locale/it/LC_MESSAGES/bitcoin.mo index dc7b94edfa..4a4f7a3fd1 100644 Binary files a/locale/it/LC_MESSAGES/bitcoin.mo and b/locale/it/LC_MESSAGES/bitcoin.mo differ diff --git a/locale/it/LC_MESSAGES/bitcoin.po b/locale/it/LC_MESSAGES/bitcoin.po index 7a267079fc..ef75bf6219 100644 --- a/locale/it/LC_MESSAGES/bitcoin.po +++ b/locale/it/LC_MESSAGES/bitcoin.po @@ -216,7 +216,7 @@ msgstr "Nuovo indirizzo ricevente" #: ../../../ui.cpp:1124 #: ../../../ui.cpp:2352 msgid "" -"It's good policy to use a new address for each payment you receive.\n" +"You should use a new address for each payment you receive.\n" "\n" "Label" msgstr "" diff --git a/locale/nl/LC_MESSAGES/bitcoin.mo b/locale/nl/LC_MESSAGES/bitcoin.mo index 380eafe929..2b515433b0 100644 Binary files a/locale/nl/LC_MESSAGES/bitcoin.mo and b/locale/nl/LC_MESSAGES/bitcoin.mo differ diff --git a/locale/nl/LC_MESSAGES/bitcoin.po b/locale/nl/LC_MESSAGES/bitcoin.po index c97d7d63d2..54ef4d3c67 100644 --- a/locale/nl/LC_MESSAGES/bitcoin.po +++ b/locale/nl/LC_MESSAGES/bitcoin.po @@ -216,7 +216,7 @@ msgstr "Nieuw Ontvangings Adres" #: ../../../ui.cpp:1124 #: ../../../ui.cpp:2352 msgid "" -"It's good policy to use a new address for each payment you receive.\n" +"You should use a new address for each payment you receive.\n" "\n" "Label" msgstr "" diff --git a/locale/pt/LC_MESSAGES/bitcoin.mo b/locale/pt/LC_MESSAGES/bitcoin.mo index 0b7d49fa45..dceec49df2 100644 Binary files a/locale/pt/LC_MESSAGES/bitcoin.mo and b/locale/pt/LC_MESSAGES/bitcoin.mo differ diff --git a/locale/pt/LC_MESSAGES/bitcoin.po b/locale/pt/LC_MESSAGES/bitcoin.po index b6aceff724..48102a1368 100644 --- a/locale/pt/LC_MESSAGES/bitcoin.po +++ b/locale/pt/LC_MESSAGES/bitcoin.po @@ -216,7 +216,7 @@ msgstr "Novo Endereço de Recepção" #: ../../../ui.cpp:1124 #: ../../../ui.cpp:2352 msgid "" -"It's good policy to use a new address for each payment you receive.\n" +"You should use a new address for each payment you receive.\n" "\n" "Label" msgstr "" diff --git a/rpc.cpp b/rpc.cpp index 4408d36347..5e0b5e77f0 100644 --- a/rpc.cpp +++ b/rpc.cpp @@ -21,6 +21,8 @@ void ThreadRPCServer2(void* parg); typedef Value(*rpcfn_type)(const Array& params, bool fHelp); extern map mapCallTable; +static string strRPCPassword; + @@ -37,16 +39,24 @@ Value help(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( - "help\n" + "help \n" "List commands."); string strRet; + set setDone; for (map::iterator mi = mapCallTable.begin(); mi != mapCallTable.end(); ++mi) { + string strMethod = (*mi).first; + // We already filter duplicates, but these deprecated screw up the sort order + if (strMethod == "getamountreceived" || + strMethod == "getallreceived") + continue; try { Array params; - (*(*mi).second)(params, true); + rpcfn_type pfn = (*mi).second; + if (setDone.insert(pfn).second) + (*pfn)(params, true); } catch (std::exception& e) { @@ -66,7 +76,7 @@ Value stop(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( - "stop\n" + "stop \n" "Stop bitcoin server."); // Shutdown will take long enough that the response should get back @@ -79,7 +89,7 @@ Value getblockcount(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( - "getblockcount\n" + "getblockcount \n" "Returns the number of blocks in the longest block chain."); return nBestHeight + 1; @@ -90,7 +100,7 @@ Value getblocknumber(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( - "getblocknumber\n" + "getblocknumber \n" "Returns the block number of the latest block in the longest block chain."); return nBestHeight; @@ -101,7 +111,7 @@ Value getconnectioncount(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( - "getconnectioncount\n" + "getconnectioncount \n" "Returns the number of connections to other nodes."); return (int)vNodes.size(); @@ -124,7 +134,7 @@ Value getdifficulty(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( - "getdifficulty\n" + "getdifficulty \n" "Returns the proof-of-work difficulty as a multiple of the minimum difficulty."); return GetDifficulty(); @@ -135,7 +145,7 @@ Value getbalance(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( - "getbalance\n" + "getbalance \n" "Returns the server's available balance."); return ((double)GetBalance() / (double)COIN); @@ -146,7 +156,7 @@ Value getgenerate(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( - "getgenerate\n" + "getgenerate \n" "Returns true or false."); return (bool)fGenerateBitcoins; @@ -157,7 +167,7 @@ Value setgenerate(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( - "setgenerate [genproclimit]\n" + "setgenerate [genproclimit]\n" " is true or false to turn generation on or off.\n" "Generation is limited to [genproclimit] processors, -1 is unlimited."); @@ -183,7 +193,7 @@ Value getinfo(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( - "getinfo"); + "getinfo "); Object obj; obj.push_back(Pair("balance", (double)GetBalance() / (double)COIN)); @@ -201,7 +211,7 @@ Value getnewaddress(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( - "getnewaddress [label]\n" + "getnewaddress [label]\n" "Returns a new bitcoin address for receiving payments. " "If [label] is specified (recommended), it is added to the address book " "so payments received with the address will be labeled."); @@ -223,7 +233,7 @@ Value setlabel(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( - "setlabel