diff options
author | dgp <dgp@users.sourceforge.net> | 2020-11-10 17:58:34 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2020-11-10 17:58:34 (GMT) |
commit | 6bf3b7356d8f53c983b5a5a196752afd7031000d (patch) | |
tree | b25d9e14f68a409a3bb30e1b0d0fe87f96670705 /macosx | |
parent | c2eb7f87d2d736efb9a7fc487ac996fe0030d612 (diff) | |
parent | 5c53cd20a9fb061ca2f2e8bd5695a67302cdd5d4 (diff) | |
download | tk-6bf3b7356d8f53c983b5a5a196752afd7031000d.zip tk-6bf3b7356d8f53c983b5a5a196752afd7031000d.tar.gz tk-6bf3b7356d8f53c983b5a5a196752afd7031000d.tar.bz2 |
merge 8.6
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Credits.html.in | 24 | ||||
-rw-r--r-- | macosx/tkMacOSXDialog.c | 61 | ||||
-rw-r--r-- | macosx/tkMacOSXMenus.c | 2 |
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>© 1987-@TK_YEAR@ Tcl Core Team and Contributers.</li> +<li>© 2011-@TK_YEAR@ Kevin Walzer/WordTech Communications LLC.</li> +<li>© 2014-@TK_YEAR@ Marc Culler.</li> +<li>© 2002-2012 Daniel A. Steffen.</li> +<li>© 2001-2009 Apple Inc.</li> +<li>© 2001-2002 Jim Ingham & Ian Reid.</li> +<li>© 1998-2000 Jim Ingham & Ray Johnson.</li> +<li>© 1998-2000 Scriptics Inc.</li> +<li>© 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); |