Use new NSDockTile class to show testing status

This commit is contained in:
Gregory John Casamento 2023-07-27 04:24:23 -04:00
parent 9fc62200c4
commit e604adf9a6
2 changed files with 14 additions and 3 deletions

View file

@ -41,6 +41,7 @@
@class GormClassManager;
@class GormPalettesManager;
@class GormPluginManager;
@class NSDockTile;
@interface GormAbstractDelegate : NSObject <IB, GormAppDelegate, GormServer>
{
@ -69,6 +70,7 @@
id connectDestination;
NSMutableArray *testingWindows;
NSSet *topObjects;
NSDockTile *dockTile;
}
// testing the interface

View file

@ -435,7 +435,8 @@
id obj;
id savedDelegate = [NSApp delegate];
NSMenu *modelMenu = [activeDoc objectForName: @"NSMenu"];
// which windows were open when testing started...
testingWindows = [[NSMutableArray alloc] init];
en = [[NSApp windows] objectEnumerator];
@ -449,7 +450,14 @@
// set here, so that beginArchiving and endArchiving do not use templates.
isTesting = YES;
[NSApp setApplicationIconImage: testingImage];
// [NSApp setApplicationIconImage: testingImage];
// Set up the dock tile...
dockTile = [[NSDockTile alloc] init];
[dockTile setShowsApplicationBadge: YES];
[dockTile setBadgeLabel: @"Test!"];
archiver = [[NSArchiver alloc] init];
[activeDoc deactivateEditors];
[archiver encodeClassName: @"GormCustomView"
@ -720,7 +728,8 @@
[NSApp setMainMenu: mainMenu];
[NSApp setApplicationIconImage: gormImage];
[[NSApp mainMenu] display];
RELEASE(dockTile);
e = [testingWindows objectEnumerator];
while ((val = [e nextObject]) != nil)
{