Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 74 lines (54 sloc) 1.961 kb
c0a429b5 » Zachary Schneirov
2010-02-15 use a license header
1 /*Copyright (c) 2010, Zachary Schneirov. All rights reserved.
7af2491c » scrod
2011-03-02 Changed license to GPLv3. See http://scrodlog.notational.net/44603382
2 This file is part of Notational Velocity.
3
4 Notational Velocity is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 Notational Velocity is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with Notational Velocity. If not, see <http://www.gnu.org/licenses/>. */
c0a429b5 » Zachary Schneirov
2010-02-15 use a license header
16
17
7aef3686 » Zachary Schneirov
2009-09-06 (UNINTELLIGIBLE)
18 #import "EmptyView.h"
19 #import "AppController.h"
20
21 @implementation EmptyView
22
23 - (id)initWithFrame:(NSRect)frameRect {
24 if ((self = [super initWithFrame:frameRect]) != nil) {
25 // Add initialization code here
26
27 lastNotesNumber = -1;
28 }
29 return self;
30 }
31
32 - (void)awakeFromNib {
33 outletObjectAwoke(self);
34 }
35
ad3e6a37 » scrod
2011-01-03 initial horizontal/vertical layout implementation; all non-titles col…
36 - (void)mouseDown:(NSEvent*)anEvent {
37 [[NSApp delegate] performSelector:@selector(_expandToolbar)];
38 }
39
7aef3686 » Zachary Schneirov
2009-09-06 (UNINTELLIGIBLE)
40 - (void)setLabelStatus:(int)notesNumber {
41 if (notesNumber != lastNotesNumber) {
42
43 NSString *statusString = nil;
44 if (notesNumber > 1) {
45 statusString = [NSString stringWithFormat:NSLocalizedString(@"%d Notes Selected",nil), notesNumber];
46 } else {
47 statusString = NSLocalizedString(@"No Note Selected",nil); //\nPress return to create one.";
48 }
49
50 [labelText setStringValue:statusString];
51
52 lastNotesNumber = notesNumber;
53 }
54 }
55
ad3e6a37 » scrod
2011-01-03 initial horizontal/vertical layout implementation; all non-titles col…
56 - (void)resetCursorRects {
57 [self addCursorRect:[self bounds] cursor: [NSCursor arrowCursor]];
58 }
59
60 - (BOOL)isOpaque {
61 return YES;
62 }
63
7aef3686 » Zachary Schneirov
2009-09-06 (UNINTELLIGIBLE)
64 - (void)drawRect:(NSRect)rect {
65 NSRect bounds = [self bounds];
66
67 [[NSColor whiteColor] set];
68 NSRectFill(bounds);
69
ad3e6a37 » scrod
2011-01-03 initial horizontal/vertical layout implementation; all non-titles col…
70 [[NSColor lightGrayColor] set];
7aef3686 » Zachary Schneirov
2009-09-06 (UNINTELLIGIBLE)
71 NSFrameRect(bounds);
72 }
73
74 @end
Something went wrong with that request. Please try again.