Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add dark mode support, warnings for big dirs #45

Merged

Conversation

molsonkiko
Copy link
Contributor

  1. All forms will now be colored to match the Notepad++ theme. This is true in dark mode and also with non-dark-mode themes that the user might use (e.g., Vim Dark Blue, Blackboard). However, the background of the DataGridView containing the filename rows is bugged in a very weird way. Hopefully someone can figure that out.
    image
  2. Added a system for checking if the current directory is very large and could potentially cause tremendously long latency when the user has chosen recursive subdirectory search. Now a warning will pop up if there are more than 5000 files in the current directory tree, so that the user can choose to search only the top directory, or not to search that dir at all.
    image

1. All forms will now be colored to match the Notepad++ theme.
    This is true in dark mode and also with non-dark-mode themes
    that the user might use (e.g., Vim Dark Blue, Blackboard).
    However, the background of the DataGridView containing
    the filename rows is bugged in a very weird way.
    Hopefully someone can figure that out.
2. Added a system for checking if the current directory is very large
    and could potentially cause tremendously long latency
    when the user has chosen recursive subdirectory search.
    Now a warning will pop up if there are more than 5000 files
    in the current directory tree, so that the user can choose
    to search only the top directory, or not to search that dir at all.
@young-developer young-developer merged commit 790f500 into young-developer:master Jun 6, 2023
@young-developer
Copy link
Owner

@molsonkiko I get error after typing:
image

Stack trace:

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary2.get_Item(TKey key) at NavigateTo.Plugin.Namespace.FrmNavigateTo.FilterCurrentDirectory(Func2 filterFunc)
at NavigateTo.Plugin.Namespace.FrmNavigateTo.FilterDataGrid(String filter)
at NavigateTo.Plugin.Namespace.FrmNavigateTo.SearchComboBoxTextChanged(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnTextChanged(EventArgs e)
at System.Windows.Forms.ComboBox.OnTextChanged(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ComboBox.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9139.0 built by: NET481REL1LAST_B
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

NavigateTo
Assembly Version: 2.5.2.0
Win32 Version: 2.5.2.0
CodeBase: file:///C:/Program%20Files/Notepad++/plugins/NavigateTo/NavigateTo.dll

System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9139.0 built by: NET481REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9075.0 built by: NET481REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9139.0 built by: NET481REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.9032.0 built by: NET481REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

@molsonkiko
Copy link
Contributor Author

molsonkiko commented Jun 6, 2023

Oh no! I'm sorry I messed up. That's really weird. I've tried pretty much everything I can think of to replicate that bug on my machine and I can't.
Things I've tried include:

  1. Just opening a file with subdirectory search turned off
  2. Just opening a file with top directory search on but subdir search off
  3. Opening a file with subdir search on, but the dir tree is big so I click yes to limit to top dir
  4. Opening a file with subdir search on, but the dir tree is big, but I click no and search subdirs anyway
  5. Opening a file with subdir search on, but the top dir is big, so I click yes to eliminate both subdir and top dir search
  6. Opening a file with top dir search on, but top dir is big, so I click yes to eliminate top dir search
  7. Doing most of the above, and then opening the settings form and changing various settings
  8. Opening the settings form to turn on fuzzy search before ever opening the navigateto form and then typing in some stuff
  9. Turning fuzzy search on or off while the navigateto form is already open
  10. Doing various things with a "new 1" file open with subdir search active

@young-developer
Copy link
Owner

@molsonkiko It crashes only if search in top directory is enabled

? DirectorySearchLevel.RecurseSubdirs
: DirectorySearchLevel.None;
filesInCurrentDirectory = SearchCurrentDirectory(searchLevel, nextTimeToRefresh, currentDirectory);
searchLevel = subDirSearchAllowances[currentDirectory];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@molsonkiko It crashes here with top dir search enabled and sub dir disabled.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@molsonkiko It looks like some caching of refresh and dictionary key mismatch.

@molsonkiko
Copy link
Contributor Author

molsonkiko commented Jun 8, 2023 via email

@molsonkiko molsonkiko deleted the dark_mode_support branch June 10, 2023 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants