]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/fswatcher/fswatcher.cpp
Fix duplicate symbol link errors in wxMSW wxTextEntry code.
[wxWidgets.git] / samples / fswatcher / fswatcher.cpp
index 0c2bdf62ffcd4871626ef10cd9b3e09caa9ee529..824f4c94e271dc153e2232a920ffd784c898898c 100644 (file)
@@ -178,7 +178,7 @@ MyFrame::MyFrame(const wxString& title)
                                   _("If checked, dereference symlinks")
                                  );
     it->Check(false);
-    Connect(MENU_ID_DEREFERENCE, wxEVT_COMMAND_MENU_SELECTED,
+    Connect(MENU_ID_DEREFERENCE, wxEVT_MENU,
             wxCommandEventHandler(MyFrame::OnFollowLinks));
 #endif // __UNIX__
 
@@ -263,21 +263,21 @@ MyFrame::MyFrame(const wxString& title)
     // event handlers & show
 
     // menu
-    Connect(MENU_ID_CLEAR, wxEVT_COMMAND_MENU_SELECTED,
+    Connect(MENU_ID_CLEAR, wxEVT_MENU,
             wxCommandEventHandler(MyFrame::OnClear));
-    Connect(MENU_ID_QUIT, wxEVT_COMMAND_MENU_SELECTED,
+    Connect(MENU_ID_QUIT, wxEVT_MENU,
             wxCommandEventHandler(MyFrame::OnQuit));
-    Connect(MENU_ID_WATCH, wxEVT_COMMAND_MENU_SELECTED,
+    Connect(MENU_ID_WATCH, wxEVT_MENU,
             wxCommandEventHandler(MyFrame::OnWatch));
-    Connect(wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED,
+    Connect(wxID_ABOUT, wxEVT_MENU,
             wxCommandEventHandler(MyFrame::OnAbout));
 
     // buttons
-    Connect(BTN_ID_ADD, wxEVT_COMMAND_BUTTON_CLICKED,
+    Connect(BTN_ID_ADD, wxEVT_BUTTON,
             wxCommandEventHandler(MyFrame::OnAdd));
-    Connect(BTN_ID_ADD_TREE, wxEVT_COMMAND_BUTTON_CLICKED,
+    Connect(BTN_ID_ADD_TREE, wxEVT_BUTTON,
             wxCommandEventHandler(MyFrame::OnAddTree));
-    Connect(BTN_ID_REMOVE, wxEVT_COMMAND_BUTTON_CLICKED,
+    Connect(BTN_ID_REMOVE, wxEVT_BUTTON,
             wxCommandEventHandler(MyFrame::OnRemove));
     Connect(BTN_ID_REMOVE, wxEVT_UPDATE_UI,
             wxUpdateUIEventHandler(MyFrame::OnRemoveUpdateUI));
@@ -420,7 +420,7 @@ void MyFrame::OnRemove(wxCommandEvent& WXUNUSED(event))
     if (idx == -1)
         return;
 
-    bool ret;
+    bool ret = false;
     wxString path = m_filesList->GetItemText(idx).Mid(6);
 
     // This will tell wxFileSystemWatcher whether to dereference symlinks
@@ -535,8 +535,12 @@ static wxString GetFSWEventChangeTypeName(int changeType)
         return "MODIFY";
     case wxFSW_EVENT_ACCESS:
         return "ACCESS";
-    case wxFSW_EVENT_ATTRIB: // Currently this is wxGTK-only
+    case wxFSW_EVENT_ATTRIB:  // Currently this is wxGTK-only
         return "ATTRIBUTE";
+#ifdef wxHAS_INOTIFY
+    case wxFSW_EVENT_UNMOUNT: // Currently this is wxGTK-only
+        return "UNMOUNT";
+#endif
     case wxFSW_EVENT_WARNING:
         return "WARNING";
     case wxFSW_EVENT_ERROR: