summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorculler <culler>2020-11-05 19:07:37 (GMT)
committerculler <culler>2020-11-05 19:07:37 (GMT)
commit761262151f938bc9d578fb0f30962a3c9b1b1002 (patch)
tree2978fd0e37d3a28c7357333a3a1d7e6ff686744b /macosx
parent311e44dabf3785577589f90b768cc241615cb1b8 (diff)
downloadtk-761262151f938bc9d578fb0f30962a3c9b1b1002.zip
tk-761262151f938bc9d578fb0f30962a3c9b1b1002.tar.gz
tk-761262151f938bc9d578fb0f30962a3c9b1b1002.tar.bz2
Test using the real standardAboutPanel as the manual indicates is done
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Credits.html.in24
-rw-r--r--macosx/tkMacOSXDialog.c61
-rw-r--r--macosx/tkMacOSXMenus.c2
3 files changed, 28 insertions, 59 deletions
diff --git a/macosx/Credits.html.in b/macosx/Credits.html.in
new file mode 100644
index 0000000..cc409b1
--- /dev/null
+++ b/macosx/Credits.html.in
@@ -0,0 +1,24 @@
+<!doctype htmL>
+<html>
+<head>
+</head>
+<body style="font-size:120%;font-family:Arial,sans-serif;">
+<p>
+Tcl and Tk are distributed under a modified BSD license:<br>
+<a href="https:www.tcl.tk/software/tcltk/license.html">
+ https:www.tcl.tk/software/tcltk/license.html
+</a>
+</p>
+<ul style="list-style-type:none;">
+<li>&copy; 1987-@TK_YEAR@ Tcl Core Team and Contributers.</li>
+<li>&copy; 2011-@TK_YEAR@ Kevin Walzer/WordTech Communications LLC.</li>
+<li>&copy; 2014-@TK_YEAR@ Marc Culler.</li>
+<li>&copy; 2002-2012 Daniel A. Steffen.</li>
+<li>&copy; 2001-2009 Apple Inc.</li>
+<li>&copy; 2001-2002 Jim Ingham &amp; Ian Reid.</li>
+<li>&copy; 1998-2000 Jim Ingham &amp; Ray Johnson.</li>
+<li>&copy; 1998-2000 Scriptics Inc.</li>
+<li>&copy; 1996-1997 Sun Microsystems Inc.</li>
+</ul>
+</body>
+</html>
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index 71bb120..52b6e99 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -1315,64 +1315,9 @@ Tk_ChooseDirectoryObjCmd(
void
TkAboutDlg(void)
{
- NSImage *image;
- NSString *path = [NSApp tkFrameworkImagePath: @"Tk.tiff"];
-
- if (path) {
- image = [[[NSImage alloc] initWithContentsOfFile:path] autorelease];
- } else {
- image = [NSApp applicationIconImage];
- }
-
- NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
-
- [dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4];
- [dateFormatter setDateFormat:@"Y"];
-
- NSString *year = [dateFormatter stringFromDate:[NSDate date]];
-
- [dateFormatter release];
-
- /*
- * 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 *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:url];
- about.accessoryView = credits;
- [about runModal];
- [about release];
+ [NSApp orderFrontStandardAboutPanel:nil];
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1400,7 +1345,7 @@ TkMacOSXStandardAboutPanelObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
}
- TkAboutDlg();
+ [NSApp orderFrontStandardAboutPanel:nil];
return TCL_OK;
}
diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c
index a1519f5..54105d2 100644
--- a/macosx/tkMacOSXMenus.c
+++ b/macosx/tkMacOSXMenus.c
@@ -201,7 +201,7 @@ static Tcl_Obj * GetWidgetDemoPath(Tcl_Interp *interp);
{
if (!_eventInterp || !Tcl_FindCommand(_eventInterp, "tkAboutDialog",
NULL, 0) || (GetCurrentEventKeyModifiers() & optionKey)) {
- TkAboutDlg();
+ [super orderFrontStandardAboutPanel:nil];
} else {
int code = Tcl_EvalEx(_eventInterp, "tkAboutDialog", -1,
TCL_EVAL_GLOBAL);