Skip to content

Commit

Permalink
merge r79 from the new GUI plus bugfixes
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R-packages/trunk/Mac-GUI@5705 694ef91d-65df-0310-b7bb-92e67a308ead
  • Loading branch information
s-u committed Mar 14, 2011
1 parent acdc364 commit 0ff4655
Show file tree
Hide file tree
Showing 50 changed files with 27,105 additions and 2,946 deletions.
3 changes: 3 additions & 0 deletions AMPrefs/AMPreferenceWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,9 @@ - (void)windowWillClose:(NSNotification *)aNotification
// }
if ([activePane respondsToSelector:@selector(willUnselect)])
[(id)activePane willUnselect];
// Close opened NSColorPanel if Preferences window will be closed
if([NSColorPanel sharedColorPanelExists])
[[NSColorPanel sharedColorPanel] close];
}

- (void)windowDidClose:(NSNotification *)aNotification
Expand Down
1 change: 1 addition & 0 deletions DataManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- (id) window;
- (IBAction)loadRData:(id)sender;
- (IBAction)showHelp:(id)sender;

- (void) show;

- (void) resetDatasets;
Expand Down
44 changes: 44 additions & 0 deletions DataManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ - (void)awakeFromNib
{
[RDataSource setDoubleAction:@selector(loadRData:)];
[RDataSource setDataSource: dataSource];
[dataInfoView setFrameLoadDelegate:self];
}

- (id)init
Expand Down Expand Up @@ -130,4 +131,47 @@ - (void) show
[DataManagerWindow makeKeyAndOrderFront:self];
}

- (void)tableViewSelectionDidChange:(NSNotification *)aNotification
{
// Check our notification object is our table
if ([aNotification object] != RDataSource) return;

// Update Info delayed
[NSObject cancelPreviousPerformRequestsWithTarget:self
selector:@selector(showHelp:)
object:RDataSource];

[self performSelector:@selector(showHelp:) withObject:RDataSource afterDelay:0.5];

}

- (void)sheetDidEnd:(id)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo
{
[DataManagerWindow makeKeyAndOrderFront:nil];
}

- (IBAction)printDocument:(id)sender
{

[NSObject cancelPreviousPerformRequestsWithTarget:self
selector:@selector(showHelp:)
object:RDataSource];

NSPrintInfo *printInfo;
NSPrintOperation *printOp;

printInfo = [NSPrintInfo sharedPrintInfo];
[printInfo setHorizontalPagination: NSFitPagination];
[printInfo setVerticalPagination: NSAutoPagination];
[printInfo setVerticallyCentered:NO];

printOp = [NSPrintOperation printOperationWithView:[[[dataInfoView mainFrame] frameView] documentView]
printInfo:printInfo];
[printOp setShowPanels:YES];
[printOp runOperationModalForWindow:[self window]
delegate:self
didRunSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
contextInfo:@""];
}

@end
Loading

0 comments on commit 0ff4655

Please sign in to comment.