]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/dialup/nettest.cpp
Source cleaning: whitespaces, tabs, -1/wxNOT_FOUND, TRUE/true, FALSE/false.
[wxWidgets.git] / samples / dialup / nettest.cpp
index 9e85641a9c826b1250d6b55add5114f9e44d31ad..2c0034e022829290120060a9828d66ee471a8710 100644 (file)
@@ -170,7 +170,9 @@ bool MyApp::OnInit()
     {
         wxLogError(wxT("The sample can't run on this system."));
 
+#if wxUSE_LOG
         wxLog::GetActiveTarget()->Flush();
+#endif // wxUSE_LOG
 
         // do it here, OnExit() won't be called
         delete m_dial;
@@ -178,7 +180,9 @@ bool MyApp::OnInit()
         return false;
     }
 
+#if wxUSE_STATUSBAR
     frame->SetStatusText(GetDialer()->IsAlwaysOnline() ? _T("LAN") : _T("No LAN"), 2);
+#endif // wxUSE_STATUSBAR
 
     return true;
 }
@@ -238,10 +242,12 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
     // ... and attach this menu bar to the frame
     SetMenuBar(menuBar);
 
+#if wxUSE_STATUSBAR
     // create status bar and fill the LAN field
     CreateStatusBar(3);
     static const int widths[3] = { -1, 100, 60 };
     SetStatusWidths(3, widths);
+#endif // wxUSE_STATUSBAR
 }
 
 
@@ -335,6 +341,8 @@ void MyFrame::OnIdle(wxIdleEvent& WXUNUSED(event))
     {
         s_isOnline = isOnline;
 
+#if wxUSE_STATUSBAR
         SetStatusText(isOnline ? _T("Online") : _T("Offline"), 1);
+#endif // wxUSE_STATUSBAR
     }
 }