aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2011-01-05 09:20:00 +0000
committerBibiko <bibiko@eva.mpg.de>2011-01-05 09:20:00 +0000
commit2d6c795da8a79126bb25c646f43369df02593f19 (patch)
tree53231b3622a6a3da0f52096a6833949ac66fb574
parentba66d86c0006f8f9c8f479511277e57cddbdb318 (diff)
downloadsequelpro-2d6c795da8a79126bb25c646f43369df02593f19.tar.gz
sequelpro-2d6c795da8a79126bb25c646f43369df02593f19.tar.bz2
sequelpro-2d6c795da8a79126bb25c646f43369df02593f19.zip
• enabled Bundle main menu
• improved rendering of line number display in Query Editor and Bundle command text view after scrolling to avoid displaying them unreadable
-rw-r--r--Interfaces/English.lproj/MainMenu.xib11
-rw-r--r--Source/SPBundleCommandTextView.m10
-rw-r--r--Source/SPTextView.m2
3 files changed, 21 insertions, 2 deletions
diff --git a/Interfaces/English.lproj/MainMenu.xib b/Interfaces/English.lproj/MainMenu.xib
index 71e0d7f3..548082af 100644
--- a/Interfaces/English.lproj/MainMenu.xib
+++ b/Interfaces/English.lproj/MainMenu.xib
@@ -1760,7 +1760,6 @@
</object>
<object class="NSMenuItem" id="558064231">
<reference key="NSMenu" ref="171386461"/>
- <bool key="NSIsHidden">YES</bool>
<string key="NSTitle">Bundles</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
@@ -3103,6 +3102,14 @@
</object>
<int key="connectionID">1190</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="171386461"/>
+ <reference key="destination" ref="432083121"/>
+ </object>
+ <int key="connectionID">1193</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -5399,7 +5406,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">1190</int>
+ <int key="maxID">1193</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
diff --git a/Source/SPBundleCommandTextView.m b/Source/SPBundleCommandTextView.m
index 6411ccfd..d467da46 100644
--- a/Source/SPBundleCommandTextView.m
+++ b/Source/SPBundleCommandTextView.m
@@ -60,6 +60,7 @@
// add NSViewBoundsDidChangeNotification to scrollView
[[commandScrollView contentView] setPostsBoundsChangedNotifications:YES];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(boundsDidChangeNotification:) name:@"NSViewBoundsDidChangeNotification" object:[commandScrollView contentView]];
// disabled to get the current text range in textView safer
[[self layoutManager] setBackgroundLayoutEnabled:NO];
@@ -781,6 +782,15 @@
textWasChanged = YES;
}
+/**
+ * Scrollview delegate after the command textView's view port was changed.
+ * Manily used to render line numbering.
+ */
+- (void)boundsDidChangeNotification:(NSNotification *)notification
+{
+ [commandScrollView display];
+}
+
#pragma mark -
// Store the font in the prefs for selected delegates only
diff --git a/Source/SPTextView.m b/Source/SPTextView.m
index af4356a2..dd582e59 100644
--- a/Source/SPTextView.m
+++ b/Source/SPTextView.m
@@ -3029,6 +3029,8 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
if(![[self textStorage] changeInLength])
[self performSelector:@selector(doSyntaxHighlighting) withObject:nil afterDelay:0.4];
}
+ else
+ [[scrollView contentView] display];
}