aboutsummaryrefslogtreecommitdiff
path: root/ui.h
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-07-26 17:15:18 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-07-26 17:15:18 +0000
commit793200e5e918a6e993ddf701967a8b6535a6828f (patch)
treee983c5b11c032a309edb230f8694225aef478d98 /ui.h
parent6966768a554575ca329fbcd4aad0d4f21c702f9a (diff)
bitcoind now compiles without wxWidgets or wxBase
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@112 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'ui.h')
-rw-r--r--ui.h63
1 files changed, 15 insertions, 48 deletions
diff --git a/ui.h b/ui.h
index a59e43262c..1fb6f265eb 100644
--- a/ui.h
+++ b/ui.h
@@ -4,24 +4,9 @@
DECLARE_EVENT_TYPE(wxEVT_UITHREADCALL, -1)
-#if wxUSE_GUI
-static const bool fGUI=true;
-#else
-static const bool fGUI=false;
-#endif
-inline int MyMessageBox(const wxString& message, const wxString& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1)
-{
-#if wxUSE_GUI
- if (!fDaemon)
- return wxMessageBox(message, caption, style, parent, x, y);
-#endif
- printf("wxMessageBox %s: %s\n", string(caption).c_str(), string(message).c_str());
- fprintf(stderr, "%s: %s\n", string(caption).c_str(), string(message).c_str());
- return wxOK;
-}
-#define wxMessageBox MyMessageBox
+extern wxLocale g_locale;
@@ -33,38 +18,23 @@ bool ThreadSafeAskFee(int64 nFeeRequired, const string& strCaption, wxWindow* pa
void CalledSetStatusBar(const string& strText, int nField);
void MainFrameRepaint();
void CreateMainWindow();
+void SetStartOnSystemStartup(bool fAutoStart);
-
-#if !wxUSE_GUI
-inline int ThreadSafeMessageBox(const string& message, const string& caption, int style, wxWindow* parent, int x, int y)
-{
- return MyMessageBox(message, caption, style, parent, x, y);
-}
-
-inline bool ThreadSafeAskFee(int64 nFeeRequired, const string& strCaption, wxWindow* parent)
-{
- return true;
-}
-
-inline void CalledSetStatusBar(const string& strText, int nField)
-{
-}
-
-inline void UIThreadCall(boost::function0<void> fn)
-{
-}
-
-inline void MainFrameRepaint()
+inline int MyMessageBox(const wxString& message, const wxString& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1)
{
+#ifdef GUI
+ if (!fDaemon)
+ return wxMessageBox(message, caption, style, parent, x, y);
+#endif
+ printf("wxMessageBox %s: %s\n", string(caption).c_str(), string(message).c_str());
+ fprintf(stderr, "%s: %s\n", string(caption).c_str(), string(message).c_str());
+ return wxOK;
}
+#define wxMessageBox MyMessageBox
-inline void CreateMainWindow()
-{
-}
-#else // wxUSE_GUI
@@ -334,11 +304,10 @@ public:
m_textCtrl2->SetValue(strValue2);
y += 46 + wxString(strMessage2).Freq('\n') * 14;
}
- if (!fWindows)
- {
- x *= 1.14;
- y *= 1.14;
- }
+#ifndef __WXMSW__
+ x *= 1.14;
+ y *= 1.14;
+#endif
SetSize(x, y);
}
@@ -375,5 +344,3 @@ public:
DECLARE_EVENT_TABLE()
};
-
-#endif // wxUSE_GUI