]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fswatchercmn.cpp
Don't set cell value in wxDataViewEvent in one place only.
[wxWidgets.git] / src / common / fswatchercmn.cpp
index 14c16bb5434994cbd4d71421d90f6b6b4c9987e5..51d9d578f8687052ea57d931772ae3116c691586 100644 (file)
@@ -40,6 +40,16 @@ static wxString GetFSWEventChangeTypeName(int type)
         return "MODIFY";
     case wxFSW_EVENT_ACCESS:
         return "ACCESS";
+    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:
+        return "ERROR";
     }
 
     // should never be reached!
@@ -90,7 +100,10 @@ bool wxFileSystemWatcherBase::Add(const wxFileName& path, int events)
     }
     else
     {
-        wxLogError(_("Can't monitor non-existent path \"%s\" for changes."),
+        // Don't overreact to being passed a non-existent item. It may have
+        // only just been deleted, in which case doing nothing is correct
+        wxLogTrace(wxTRACE_FSWATCHER,
+                   "Can't monitor non-existent path \"%s\" for changes.",
                    path.GetFullPath());
         return false;
     }
@@ -120,7 +133,7 @@ wxFileSystemWatcherBase::AddAny(const wxFileName& path,
     if ( it == m_watches.end() )
     {
         wxFSWatchInfoMap::value_type val(canonical, watch);
-        m_watches.insert(val).second;
+        m_watches.insert(val);
     }
     else
     {