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

Disable text replacements, automatic spell checking and switch to a fixed-width font for the Insert Data view #122

Merged
merged 2 commits into from
Jun 5, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Sources/ConnectionWindow/MHQueryWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,18 @@ - (void)awakeFromNib
[self removeQueryComposer:nil];
[self exportQueryComposer:nil];

// Using a fixed-width font is a little easier on the eyes when dealing with JavaScript objects.
[self.insertDataTextView setFont:[NSFont fontWithName:@"Menlo" size:12]];

// Disable spell checking and substitutions.
// When dealing with JavaScript objects, switching regular double quotes into smart quotes isn't helpful.
[self.insertDataTextView setAutomaticDashSubstitutionEnabled:NO];
[self.insertDataTextView setAutomaticDataDetectionEnabled:NO];
[self.insertDataTextView setAutomaticLinkDetectionEnabled:NO];
[self.insertDataTextView setAutomaticQuoteSubstitutionEnabled:NO];
[self.insertDataTextView setAutomaticSpellingCorrectionEnabled:NO];
[self.insertDataTextView setAutomaticTextReplacementEnabled:NO];

if (!self.mongoCollection.mongoServer.isMaster) {
self.findRemoveButton.enabled = NO;
self.findRemoveButton.toolTip = @"Can't remove documents on a non-master node";
Expand Down