-
Notifications
You must be signed in to change notification settings - Fork 0
/
ArxivNewArticleList.m
46 lines (43 loc) · 1.29 KB
/
ArxivNewArticleList.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
// ArxivNewArticleList.m
// spires
//
// Created by Yuji on 08/10/15.
// Copyright 2008 Y. Tachikawa. All rights reserved.
//
#import "ArxivNewArticleList.h"
#import "Article.h"
#import "DumbOperation.h"
#import "ArxivNewArticleListReloadOperation.h"
#import "ReloadButton.h"
@implementation ArxivNewArticleList
+(ArxivNewArticleList*)createArXivNewArticleListWithName:(NSString*)s inMOC:(NSManagedObjectContext*)moc
{
NSEntityDescription*entity=[NSEntityDescription entityForName:@"ArxivNewArticleList" inManagedObjectContext:moc];
ArxivNewArticleList* mo=(ArxivNewArticleList*)[[NSManagedObject alloc] initWithEntity:entity
insertIntoManagedObjectContext:moc];
mo.name=s;
NSSortDescriptor *sd=[[NSSortDescriptor alloc] initWithKey:@"eprintForSorting" ascending:YES];
[mo setSortDescriptors:[NSArray arrayWithObjects:sd,nil]];
return mo;
}
-(void)reload
{
[[OperationQueues arxivQueue] addOperation:[[ArxivNewArticleListReloadOperation alloc] initWithArxivNewArticleList:self]];
}
-(NSImage*)icon
{
return [NSImage imageNamed:@"arxiv.png"];
}
-(NSButtonCell*)button
{
NSButtonCell* button=[[ReloadButton alloc] init];
[button setTarget:self];
[button setAction:@selector(reload)];
return button;
}
-(BOOL)searchStringEnabled
{
return NO;
}
@end