summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXDialog.c
diff options
context:
space:
mode:
authorculler <culler>2018-11-08 21:45:43 (GMT)
committerculler <culler>2018-11-08 21:45:43 (GMT)
commit653b68156bf6eb7fa6514493fa5e02bb6e5734c6 (patch)
treea7eb8b31ea01a775c6f437b0daff22e95f95094d /macosx/tkMacOSXDialog.c
parent23edb997712e41c74e3a457f54beb42ce5ed14a4 (diff)
downloadtk-653b68156bf6eb7fa6514493fa5e02bb6e5734c6.zip
tk-653b68156bf6eb7fa6514493fa5e02bb6e5734c6.tar.gz
tk-653b68156bf6eb7fa6514493fa5e02bb6e5734c6.tar.bz2
Restore the list of contributors to the new About dialog.
Diffstat (limited to 'macosx/tkMacOSXDialog.c')
-rw-r--r--macosx/tkMacOSXDialog.c37
1 files changed, 30 insertions, 7 deletions
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index f79cad0..f8453c7 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -1199,16 +1199,39 @@ TkAboutDlg(void)
[dateFormatter release];
- /*Replace old about dialog with standard alert that displays correctly on 10.14.*/
+ /*
+ * This replaces the old about dialog with a standard alert that displays
+ * correctly on 10.14.
+ */
+
NSString *version = @"Tcl " TCL_PATCH_LEVEL " & Tk " TCL_PATCH_LEVEL;
- NSString *copyright = @"Copyright 1987-";
- NSString *contributors = @" Tcl Core Team and Contributors";
- NSString *credits = [NSString stringWithFormat:@"%@%@%@", copyright, year, contributors];
- NSAlert *about = [[NSAlert alloc] init];
+ NSString *url = @"www.tcl-lang.org";
+ NSTextView *credits = [[NSTextView alloc] initWithFrame:NSMakeRect(0,0,300,300)];
+ NSFont *font = [NSFont systemFontOfSize:[NSFont systemFontSize]];
+ NSDictionary *textAttributes = [NSDictionary dictionaryWithObject:font
+ forKey:NSFontAttributeName];
+ [credits insertText: [[NSAttributedString alloc]
+ initWithString:[NSString stringWithFormat: @"\n"
+ "Tcl and Tk are distributed under a modified BSD license: "
+ "www.tcl.tk/software/tcltk/license.html\n\n"
+ "%1$C 1987-%2$@ Tcl Core Team and Contributers.\n\n"
+ "%1$C 2011-%2$@ Kevin Walzer/WordTech Communications LLC.\n\n"
+ "%1$C 2014-%2$@ Marc Culler.\n\n"
+ "%1$C 2002-2012 Daniel A. Steffen.\n\n"
+ "%1$C 2001-2009 Apple Inc.\n\n"
+ "%1$C 2001-2002 Jim Ingham & Ian Reid\n\n"
+ "%1$C 1998-2000 Jim Ingham & Ray Johnson\n\n"
+ "%1$C 1998-2000 Scriptics Inc.\n\n"
+ "%1$C 1996-1997 Sun Microsystems Inc.", 0xA9, year]
+ attributes:textAttributes]
+ replacementRange:NSMakeRange(0,0)];
+ [credits setDrawsBackground:NO];
+ [credits setEditable:NO];
+ NSAlert *about = [[NSAlert alloc] init];
[[about window] setTitle:@"About Tcl & Tk"];
[about setMessageText: version];
- [about setInformativeText:credits];
- [about addButtonWithTitle:@"OK"];
+ [about setInformativeText:url];
+ about.accessoryView = credits;
[about runModal];
[about release];
}