]> git.saurik.com Git - wxWidgets.git/commitdiff
linux fixes
authorKarsten Ballüder <ballueder@usa.net>
Sun, 2 Jan 2000 18:45:14 +0000 (18:45 +0000)
committerKarsten Ballüder <ballueder@usa.net>
Sun, 2 Jan 2000 18:45:14 +0000 (18:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/nettest/nettest.cpp

index d292dd6b54bbc2fef949c97f5efb108c14d52613..5c3a6e226f56409954169631ca2fd96e5abdfda4 100644 (file)
@@ -81,7 +81,7 @@ public:
     void OnHangUp(wxCommandEvent& event);
     void OnDial(wxCommandEvent& event);
     void OnEnumISPs(wxCommandEvent& event);
-
+    void OnCheck(wxCommandEvent& event);
     void OnUpdateUI(wxUpdateUIEvent& event);
 
     void OnIdle(wxIdleEvent& event);
@@ -104,6 +104,7 @@ enum
     NetTest_HangUp,
     NetTest_Dial,
     NetTest_EnumISP,
+    NetTest_Check,
     NetTest_Max
 };
 
@@ -125,6 +126,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
     EVT_MENU(NetTest_HangUp, MyFrame::OnHangUp)
     EVT_MENU(NetTest_Dial, MyFrame::OnDial)
     EVT_MENU(NetTest_EnumISP, MyFrame::OnEnumISPs)
+    EVT_MENU(NetTest_Check, MyFrame::OnCheck)
 
     EVT_UPDATE_UI(NetTest_Dial, MyFrame::OnUpdateUI)
 
@@ -219,6 +221,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
     menuFile->Append(NetTest_HangUp, "&HangUp\tCtrl-H", "Hang up modem");
     menuFile->AppendSeparator();
     menuFile->Append(NetTest_EnumISP, "&Enumerate ISPs...\tCtrl-E");
+    menuFile->Append(NetTest_Check, "&Check connection status...\tCtrl-C");
     menuFile->AppendSeparator();
     menuFile->Append(NetTest_About, "&About...\tCtrl-A", "Show about dialog");
     menuFile->AppendSeparator();
@@ -285,6 +288,14 @@ void MyFrame::OnDial(wxCommandEvent& WXUNUSED(event))
     wxEndBusyCursor();
 }
 
+void MyFrame::OnCheck(wxCommandEvent& WXUNUSED(event))
+{
+   if(wxGetApp().GetDialer()->IsOnline())
+      wxLogMessage("Network is online.");
+   else
+      wxLogMessage("Network is offline.");
+}
+
 void MyFrame::OnEnumISPs(wxCommandEvent& WXUNUSED(event))
 {
     wxArrayString names;