Menu

#1470 [PATCH] Make FileSystemWatcher interface optional

Next_Nightly
applied
None
Patch
2024-04-21
2024-04-15
No

wxWidgets provides wxFileSystemWatcher for testing the changes on the file system.
Actually, this has been made as an optional feature into the library because not all operating systems and environment allow to do it.
The presence of this feature can be tested by checking if wxUSE_FSWATCHER macro is defined, as you can see by the wx/fswatcher.h include header of the wxWidgets library:
https://github.com/wxWidgets/wxWidgets/blob/a08c710b38d228a935b83281a0962ad173c7c34f/include/wx/fswatcher.h#L15
Hopefully, C::B can be fixed very easily for working if FileSystemWatcher is supported or not.
The feature is interely provided by projectmanagerui.cpp and projectmanagerui.h and just few checks on wxUSE_FSWATCHER are needed for doing this.
If the file system notifications are supported, the correction doesn't change anything on the current code and its behaviour.
An example of platform without this feature is CYGWIN, but perhaps there are others.
Attached patch fixes the issue

Discussion

  • Carlo Bramini

    Carlo Bramini - 2024-04-15

    The patch

     
  • Morten MacFly

    Morten MacFly - 2024-04-21
    • status: open --> applied
    • assigned_to: Morten MacFly
    • Milestone: Undefined --> Next_Nightly
     
  • Morten MacFly

    Morten MacFly - 2024-04-21

    You are correct. Applied in SVN [r13507]
    Thank you for the contribution!

     

    Related

    Commit: [r13507]


Log in to post a comment.