aboutsummaryrefslogtreecommitdiff
path: root/rpc.cpp
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-02-25 21:55:27 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-02-25 21:55:27 +0000
commitc2430126d75318508836a24f90d3524320190465 (patch)
treea583b1254b26f49572fb48c52523977b75beabd2 /rpc.cpp
parentcb420a1dfc23d3c11c5281ed8f7ae003c2f61594 (diff)
downloadbitcoin-c2430126d75318508836a24f90d3524320190465.tar.xz
GUI-less build target bitcoind that links to wxBase and shouldn't need GTK,v0.2.7
split init and shutdown from ui.cpp into init.cpp, support wxUSE_GUI=0 -- version 0.2.7 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@71 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'rpc.cpp')
-rw-r--r--rpc.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/rpc.cpp b/rpc.cpp
index 7f3e71dbac..f298137aa2 100644
--- a/rpc.cpp
+++ b/rpc.cpp
@@ -676,18 +676,18 @@ int CommandLineRPC(int argc, char *argv[])
string strResult = (result.type() == str_type ? result.get_str() : write_string(result, true));
if (result.type() != null_type)
{
- if (fWindows)
+ if (fWindows && fGUI)
// Windows GUI apps can't print to command line,
- // so for now settle for a message box yuck
- wxMessageBox(strResult.c_str(), "Bitcoin", wxOK);
+ // so settle for a message box yuck
+ MyMessageBox(strResult.c_str(), "Bitcoin", wxOK);
else
fprintf(stdout, "%s\n", strResult.c_str());
}
return 0;
}
catch (std::exception& e) {
- if (fWindows)
- wxMessageBox(strprintf("error: %s\n", e.what()).c_str(), "Bitcoin", wxOK);
+ if (fWindows && fGUI)
+ MyMessageBox(strprintf("error: %s\n", e.what()).c_str(), "Bitcoin", wxOK);
else
fprintf(stderr, "error: %s\n", e.what());
} catch (...) {