mirror of
https://github.com/textmate/textmate.git
synced 2026-01-21 04:38:13 -05:00
Adhere to naming convention
Given constraint-based layouts, we’re more likely to create views in code, and as helper functions are often involved, it makes sense to name them so that we can quickly get a list of all helpers (via search), either for copy/paste or for evaluating wether or not it makes sense to move all helpers to a single library. Since helpers are declared with static storage, they do not pollute the global namespace.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#import "OFBHeaderView.h"
|
||||
#import <OakAppKit/OakAppKit.h>
|
||||
|
||||
static NSButton* ImageButton (NSString* imageName)
|
||||
static NSButton* OakCreateImageButton (NSString* imageName)
|
||||
{
|
||||
NSButton* res = [NSButton new];
|
||||
|
||||
@@ -18,7 +18,7 @@ static NSButton* ImageButton (NSString* imageName)
|
||||
return res;
|
||||
}
|
||||
|
||||
static NSPopUpButton* PopUpButton ()
|
||||
static NSPopUpButton* OakCreatePopUpButton ()
|
||||
{
|
||||
NSPopUpButton* res = [NSPopUpButton new];
|
||||
[[res cell] setBackgroundStyle:NSBackgroundStyleLight];
|
||||
@@ -39,10 +39,10 @@ static NSPopUpButton* PopUpButton ()
|
||||
{
|
||||
if(self = [super initWithFrame:aRect])
|
||||
{
|
||||
self.folderPopUpButton = PopUpButton();
|
||||
self.goBackButton = ImageButton(NSImageNameGoLeftTemplate);
|
||||
self.folderPopUpButton = OakCreatePopUpButton();
|
||||
self.goBackButton = OakCreateImageButton(NSImageNameGoLeftTemplate);
|
||||
self.goBackButton.toolTip = @"Go Back";
|
||||
self.goForwardButton = ImageButton(NSImageNameGoRightTemplate);
|
||||
self.goForwardButton = OakCreateImageButton(NSImageNameGoRightTemplate);
|
||||
self.goForwardButton.toolTip = @"Go Forward";
|
||||
|
||||
self.darkDividerView = OakCreateViewWithColor([NSColor colorWithCalibratedWhite:0.551 alpha:1.000]);
|
||||
|
||||
@@ -391,7 +391,7 @@ private:
|
||||
}
|
||||
@end
|
||||
|
||||
static NSScrollView* CreateTextView (NSRect aRect = NSMakeRect(0, 0, 600, 800))
|
||||
static NSScrollView* OakCreateTextView (NSRect aRect = NSMakeRect(0, 0, 600, 800))
|
||||
{
|
||||
NSScrollView* scrollView = [[NSScrollView alloc] initWithFrame:aRect];
|
||||
NSSize textViewSize = [NSScrollView contentSizeForFrameSize:aRect.size hasHorizontalScroller:NO hasVerticalScroller:YES borderType:NSNoBorder];
|
||||
@@ -425,6 +425,6 @@ class LayoutTests : public CxxTest::TestSuite
|
||||
public:
|
||||
void test_layout ()
|
||||
{
|
||||
OakSetupApplicationWithView(CreateTextView());
|
||||
OakSetupApplicationWithView(OakCreateTextView());
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user