Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 59 lines (43 sloc) 1.698 kb
c5cfe65 @ttscoff Slightly better way to handle adding scroll reset script.
ttscoff authored
1 /*Copyright (c) 2010, Zachary Schneirov. All rights reserved.
2 Redistribution and use in source and binary forms, with or without modification, are permitted
3 provided that the following conditions are met:
4 - Redistributions of source code must retain the above copyright notice, this list of conditions
5 and the following disclaimer.
6 - Redistributions in binary form must reproduce the above copyright notice, this list of
7 conditions and the following disclaimer in the documentation and/or other materials provided with
8 the distribution.
9 - Neither the name of Notational Velocity nor the names of its contributors may be used to endorse
10 or promote products derived from this software without specific prior written permission. */
11
12
13 #import "EmptyView.h"
14 #import "AppController.h"
15
16 @implementation EmptyView
17
18 - (id)initWithFrame:(NSRect)frameRect {
19 if ((self = [super initWithFrame:frameRect]) != nil) {
20 // Add initialization code here
21
22 lastNotesNumber = -1;
23 }
24 return self;
25 }
26
27 - (void)awakeFromNib {
28 outletObjectAwoke(self);
29 }
30
31 - (void)setLabelStatus:(int)notesNumber {
32 if (notesNumber != lastNotesNumber) {
33
34 NSString *statusString = nil;
35 if (notesNumber > 1) {
36 statusString = [NSString stringWithFormat:NSLocalizedString(@"%d Notes Selected",nil), notesNumber];
37 } else {
38 statusString = NSLocalizedString(@"No Note Selected",nil); //\nPress return to create one.";
39 }
40
41 [labelText setStringValue:statusString];
42
43 lastNotesNumber = notesNumber;
44 }
45 }
46
47 - (void)drawRect:(NSRect)rect {
48 NSRect bounds = [self bounds];
49
50 [[NSColor whiteColor] set];
51 NSRectFill(bounds);
52
53 [[NSColor grayColor] set];
54 NSFrameRect(bounds);
55
56 }
57
58 @end
Something went wrong with that request. Please try again.