aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Interfaces/English.lproj/MainMenu.xib449
-rw-r--r--Source/SPTextViewAdditions.h1
-rw-r--r--Source/SPTextViewAdditions.m22
3 files changed, 44 insertions, 428 deletions
diff --git a/Interfaces/English.lproj/MainMenu.xib b/Interfaces/English.lproj/MainMenu.xib
index 9bcc891e..39c100b9 100644
--- a/Interfaces/English.lproj/MainMenu.xib
+++ b/Interfaces/English.lproj/MainMenu.xib
@@ -8,6 +8,7 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="846"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -4190,6 +4191,14 @@ ARcABAAAAAEAAAACARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
</object>
<int key="connectionID">904</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">doRemoveDiacritics:</string>
+ <reference key="source" ref="63651044"/>
+ <reference key="destination" ref="413134863"/>
+ </object>
+ <int key="connectionID">905</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -6987,7 +6996,7 @@ ARcABAAAAAEAAAACARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA</bytes>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
- <string>{{556, 261}, {157, 233}}</string>
+ <string>{{503, 315}, {157, 233}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>{{654, 613}, {157, 223}}</string>
@@ -7197,7 +7206,7 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
- <string>{{408, 494}, {511, 20}}</string>
+ <string>{{355, 548}, {511, 20}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>{{506, 836}, {511, 20}}</string>
@@ -7586,7 +7595,7 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{713, 301}, {213, 143}}</string>
+ <string>{{660, 355}, {213, 143}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableDictionary">
<string key="NS.key.0">ToolTip</string>
@@ -7682,24 +7691,12 @@ w6gg4oaSIGZhY2FkZV0</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">904</int>
+ <int key="maxID">905</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
- <string key="className">CMCopyTable</string>
- <string key="superclassName">NSTableView</string>
- <object class="NSMutableDictionary" key="actions">
- <string key="NS.key.0">copy:</string>
- <string key="NS.object.0">id</string>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/CMCopyTable.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
<string key="className">FirstResponder</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
@@ -7772,14 +7769,6 @@ w6gg4oaSIGZhY2FkZV0</string>
<string key="className">KeyChain</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/KeyChain.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">KeyChain</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
@@ -7788,108 +7777,6 @@ w6gg4oaSIGZhY2FkZV0</string>
<string key="className">MainController</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>addFavorite:</string>
- <string>checkForUpdates:</string>
- <string>chooseLimitRows:</string>
- <string>closeFavoriteSheet:</string>
- <string>copyFavorite:</string>
- <string>donate:</string>
- <string>openPreferences:</string>
- <string>removeFavorite:</string>
- <string>toggleUseSSH:</string>
- <string>visitHelpWebsite:</string>
- <string>visitWebsite:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>databaseField</string>
- <string>dontShowBlobSwitch</string>
- <string>encodingPopUpButton</string>
- <string>favoriteSheet</string>
- <string>fetchRowCountSwitch</string>
- <string>hostField</string>
- <string>keyChainInstance</string>
- <string>limitRowsField</string>
- <string>limitRowsSwitch</string>
- <string>nameField</string>
- <string>nullValueField</string>
- <string>passwordField</string>
- <string>portField</string>
- <string>preferencesWindow</string>
- <string>reloadAfterAddingSwitch</string>
- <string>reloadAfterEditingSwitch</string>
- <string>reloadAfterRemovingSwitch</string>
- <string>showErrorSwitch</string>
- <string>socketField</string>
- <string>sshCheckbox</string>
- <string>sshHostField</string>
- <string>sshPasswordField</string>
- <string>sshPortField</string>
- <string>sshUserField</string>
- <string>tableView</string>
- <string>useMonospacedFontsSwitch</string>
- <string>userField</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/MainController.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">MainController</string>
- <string key="superclassName">NSObject</string>
- <object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">closePreferences:</string>
<string key="NS.object.0">id</string>
</object>
@@ -7906,18 +7793,14 @@ w6gg4oaSIGZhY2FkZV0</string>
<string key="minorKey"/>
</object>
</object>
+ </object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/CMImageView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/CMMCPConnection.h</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="939419192">
+ <string key="majorKey">IBDocumentRelativeSource</string>
+ <string key="minorKey">../../Frameworks/Sparkle.framework/Versions/A/Headers/SUUpdater.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
@@ -7930,6 +7813,7 @@ w6gg4oaSIGZhY2FkZV0</string>
<string>doDecomposedStringWithCompatibilityMapping:</string>
<string>doPrecomposedStringWithCanonicalMapping:</string>
<string>doPrecomposedStringWithCompatibilityMapping:</string>
+ <string>doRemoveDiacritics:</string>
<string>doSelectionLowerCase:</string>
<string>doSelectionTitleCase:</string>
<string>doSelectionUpperCase:</string>
@@ -7949,303 +7833,12 @@ w6gg4oaSIGZhY2FkZV0</string>
<string>id</string>
<string>id</string>
<string>id</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/SPTextViewAdditions.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">SPQueryConsole</string>
- <string key="superclassName">NSWindowController</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>clearConsole:</string>
- <string>copy:</string>
- <string>saveConsoleAs:</string>
- <string>toggleShowSelectShowStatements:</string>
- <string>toggleShowTimeStamps:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>clearConsoleButton</string>
- <string>consoleSearchField</string>
- <string>consoleTableView</string>
- <string>includeTimeStampsButton</string>
- <string>progressIndicator</string>
- <string>saveConsoleButton</string>
- <string>saveLogView</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>NSButton</string>
- <string>NSSearchField</string>
- <string>NSTableView</string>
- <string>NSButton</string>
- <string>NSProgressIndicator</string>
- <string>NSButton</string>
- <string>NSView</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/SPQueryConsole.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">TableDocument</string>
- <string key="superclassName">NSDocument</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>addDatabase:</string>
- <string>analyzeTable:</string>
- <string>cancelConnectSheet:</string>
- <string>checkTable:</string>
- <string>checksumTable:</string>
- <string>chooseDatabase:</string>
- <string>chooseEncoding:</string>
- <string>chooseFavorite:</string>
- <string>closeDatabaseSheet:</string>
- <string>closeSheet:</string>
- <string>connect:</string>
- <string>connectSheetAddToFavorites:</string>
- <string>connectToDB:</string>
- <string>copyCreateTableSyntax:</string>
- <string>export:</string>
- <string>exportMultipleTables:</string>
- <string>exportTable:</string>
- <string>flushPrivileges:</string>
- <string>flushTable:</string>
- <string>import:</string>
- <string>optimizeTable:</string>
- <string>removeDatabase:</string>
- <string>removeFavorite:</string>
- <string>repairTable:</string>
- <string>setDatabases:</string>
- <string>showCreateTableSyntax:</string>
- <string>showVariables:</string>
- <string>viewContent:</string>
- <string>viewQuery:</string>
- <string>viewStatus:</string>
- <string>viewStructure:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>addDatabaseButton</string>
- <string>chooseDatabaseButton</string>
- <string>connectFavoritesTableView</string>
- <string>connectProgressBar</string>
- <string>connectProgressStatusText</string>
- <string>connectSheet</string>
- <string>createTableSyntaxWindow</string>
- <string>customQueryInstance</string>
- <string>customQueryTextView</string>
- <string>databaseEncodingButton</string>
- <string>databaseField</string>
- <string>databaseNameField</string>
- <string>databaseSheet</string>
- <string>dbTablesTableView</string>
- <string>favoritesButton</string>
- <string>favoritesController</string>
- <string>hostField</string>
- <string>keyChainInstance</string>
- <string>passwordField</string>
- <string>portField</string>
- <string>queryProgressBar</string>
- <string>sidebarGrabber</string>
- <string>socketField</string>
- <string>syntaxView</string>
- <string>syntaxViewContent</string>
- <string>tableContentInstance</string>
- <string>tableDataInstance</string>
- <string>tableDumpInstance</string>
- <string>tableSourceInstance</string>
- <string>tableStatusInstance</string>
- <string>tableTabView</string>
- <string>tableWindow</string>
- <string>tablesListInstance</string>
- <string>userField</string>
- <string>variablesSheet</string>
- <string>variablesTableView</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>NSTableView</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>NSWindow</string>
- <string>id</string>
- <string>NSTextView</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>NSTableView</string>
- <string>id</string>
- <string>NSArrayController</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>NSTabView</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/TableDocument.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">TablesList</string>
- <string key="superclassName">NSObject</string>
- <object class="NSMutableDictionary" key="actions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>addTable:</string>
- <string>closeCopyTableSheet:</string>
- <string>closeTableSheet:</string>
- <string>copyTable:</string>
- <string>removeTable:</string>
- <string>updateTables:</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- </object>
- </object>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>addTableButton</string>
- <string>copyTableContentSwitch</string>
- <string>copyTableNameField</string>
- <string>copyTableSheet</string>
- <string>customQueryInstance</string>
- <string>tabView</string>
- <string>tableContentInstance</string>
- <string>tableDataInstance</string>
- <string>tableDocumentInstance</string>
- <string>tableDumpInstance</string>
- <string>tableEncodingButton</string>
- <string>tableNameField</string>
- <string>tableSheet</string>
- <string>tableSourceInstance</string>
- <string>tableStatusInstance</string>
- <string>tableWindow</string>
- <string>tablesListView</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
- <string>id</string>
<string>id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Source/TablesList.h</string>
- </object>
- </object>
- </object>
- <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="939419192">
<string key="majorKey">IBDocumentRelativeSource</string>
- <string key="minorKey">../../Frameworks/Sparkle.framework/Versions/A/Headers/SUUpdater.h</string>
+ <string key="minorKey">../../Source/SPTextViewAdditions.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
diff --git a/Source/SPTextViewAdditions.h b/Source/SPTextViewAdditions.h
index e5e38d3d..95075165 100644
--- a/Source/SPTextViewAdditions.h
+++ b/Source/SPTextViewAdditions.h
@@ -34,5 +34,6 @@
- (IBAction)doPrecomposedStringWithCanonicalMapping:(id)sender;
- (IBAction)doPrecomposedStringWithCompatibilityMapping:(id)sender;
- (IBAction)doTranspose:(id)sender;
+- (IBAction)doRemoveDiacritics:(id)sender;
@end \ No newline at end of file
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index 4c467a22..c7491215 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -181,6 +181,28 @@
}
}
+- (IBAction)doRemoveDiacritics:(id)sender
+{
+
+ NSRange curRange = [self selectedRange];
+ NSRange selRange = (curRange.length) ? curRange : [self getRangeForCurrentWord];
+ [self setSelectedRange:selRange];
+ NSString* convString = [[[self string] substringWithRange:selRange] decomposedStringWithCanonicalMapping];
+ NSArray* chars;
+ chars = [convString componentsSeparatedByCharactersInSet:[NSCharacterSet nonBaseCharacterSet]];
+ NSString* cleanString = [chars componentsJoinedByString:@""];
+ [self insertText:cleanString];
+ if(curRange.length)
+ [self setSelectedRange:NSMakeRange(selRange.location, [cleanString length])];
+ else
+ // if no selection place the caret at the end of the current word
+ {
+ NSRange newRange = [self getRangeForCurrentWord];
+ [self setSelectedRange:NSMakeRange(newRange.location + newRange.length, 0)];
+ }
+
+}
+
/*
* Change selection or current word according to Unicode's NFKC to title case and preserves the selection.
*/