Skip to content

Commit 0ff4655

Browse files
committed
merge r79 from the new GUI plus bugfixes
git-svn-id: https://svn.r-project.org/R-packages/trunk/Mac-GUI@5705 694ef91d-65df-0310-b7bb-92e67a308ead
1 parent acdc364 commit 0ff4655

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+27105
-2946
lines changed

AMPrefs/AMPreferenceWindowController.m

+3
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,9 @@ - (void)windowWillClose:(NSNotification *)aNotification
582582
// }
583583
if ([activePane respondsToSelector:@selector(willUnselect)])
584584
[(id)activePane willUnselect];
585+
// Close opened NSColorPanel if Preferences window will be closed
586+
if([NSColorPanel sharedColorPanelExists])
587+
[[NSColorPanel sharedColorPanel] close];
585588
}
586589

587590
- (void)windowDidClose:(NSNotification *)aNotification

DataManager.h

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
- (id) window;
4545
- (IBAction)loadRData:(id)sender;
4646
- (IBAction)showHelp:(id)sender;
47+
4748
- (void) show;
4849

4950
- (void) resetDatasets;

DataManager.m

+44
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ - (void)awakeFromNib
4242
{
4343
[RDataSource setDoubleAction:@selector(loadRData:)];
4444
[RDataSource setDataSource: dataSource];
45+
[dataInfoView setFrameLoadDelegate:self];
4546
}
4647

4748
- (id)init
@@ -130,4 +131,47 @@ - (void) show
130131
[DataManagerWindow makeKeyAndOrderFront:self];
131132
}
132133

134+
- (void)tableViewSelectionDidChange:(NSNotification *)aNotification
135+
{
136+
// Check our notification object is our table
137+
if ([aNotification object] != RDataSource) return;
138+
139+
// Update Info delayed
140+
[NSObject cancelPreviousPerformRequestsWithTarget:self
141+
selector:@selector(showHelp:)
142+
object:RDataSource];
143+
144+
[self performSelector:@selector(showHelp:) withObject:RDataSource afterDelay:0.5];
145+
146+
}
147+
148+
- (void)sheetDidEnd:(id)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo
149+
{
150+
[DataManagerWindow makeKeyAndOrderFront:nil];
151+
}
152+
153+
- (IBAction)printDocument:(id)sender
154+
{
155+
156+
[NSObject cancelPreviousPerformRequestsWithTarget:self
157+
selector:@selector(showHelp:)
158+
object:RDataSource];
159+
160+
NSPrintInfo *printInfo;
161+
NSPrintOperation *printOp;
162+
163+
printInfo = [NSPrintInfo sharedPrintInfo];
164+
[printInfo setHorizontalPagination: NSFitPagination];
165+
[printInfo setVerticalPagination: NSAutoPagination];
166+
[printInfo setVerticallyCentered:NO];
167+
168+
printOp = [NSPrintOperation printOperationWithView:[[[dataInfoView mainFrame] frameView] documentView]
169+
printInfo:printInfo];
170+
[printOp setShowPanels:YES];
171+
[printOp runOperationModalForWindow:[self window]
172+
delegate:self
173+
didRunSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
174+
contextInfo:@""];
175+
}
176+
133177
@end

0 commit comments

Comments
 (0)