Skip to content

Commit

Permalink
Balthisar Tidy 4.0
Browse files Browse the repository at this point in the history
  - _Balthisar Tidy_ and _Balthisar Tidy for Work_:
    - Update to HTML Tidy 5.7.16.
    - Offer validation using the W3C Nu HTML Checker.
      - Include a built-in version of this checker. When selected as an option
        and Balthisar Tidy is running, it operates as a local server and can be
        used from a web browser, as well.
      - Also include the ability to use an online version of the validator.
    - Preferences added to support the new Validator.
    - When switching the aspect of the source code view, splitters now remember
      their previous positions.
    - The Balthisar Tidy Help has been updated with all of the new content.
    - The Balthisar Tidy Help has been redesigned to use Apple’s native "Eagle"
      system to display native-looking help.
    - Tasteful animations where appropriate, such as hiding panels and changing
      the source text orientation.
    - The Quick Tutorial has been updated to show off new features to upgraders.
  - Developer changes:
    - The built-in Validator is a Java application. As such, a reduced version
      of the Java Runtime Engine is now included in the source and the binary.
      Note that the Jave.runtime is packaged as a bundle, _and signed as such_.
      If you want to build your own, signed version of Balthisar Tidy, you will
      have to re-codesign this directory with your own credentials.
    - JSDTidyFramework has been exposed as a module in Xcode.
    - HTML Tidy has been exposed as a module in Xcode.
    - Project directories have been reorganized. Some of the modules now have
  	external dependencies, but it avoids code duplication. I'll work on this if
  	I ever make these standalone public modules.
    - Transitioning towards PDF image templates with tinting via code. This is
  	an effort to reduce the executable sizes, but now that we have an embedded
  	JRE, it seems to kind of not matter any more.
    - Added categories to JSDTidyModel and other data sources to make generic
  	how the source view controller gets display data.
    - Help is now built using Middlemac version 3.0. As of release date, this
      version is not publicly available, but look for it soon, or get it from
      Github.
  • Loading branch information
balthisar committed May 24, 2018
1 parent 9830121 commit 47bcda2
Show file tree
Hide file tree
Showing 1,448 changed files with 41,943 additions and 5,969 deletions.
24 changes: 24 additions & 0 deletions Balthisar Common/Classes/NSImage+Tinted.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**************************************************************************************************
NSImage+Tinted
Copyright © 2018 by Jim Derry. All rights reserved.
**************************************************************************************************/

@import Cocoa;


/**
* A simple category to NSImage that adds a tinted variation.
*/
@interface NSImage (Tinted)


/**
* Returns a copy of the image tinted with the specified color.
*/
- (NSImage *)tintedWithColor:(NSColor *)tint;


@end
35 changes: 35 additions & 0 deletions Balthisar Common/Classes/NSImage+Tinted.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**************************************************************************************************
NSImage+Tinted
Copyright © 2018 by Jim Derry. All rights reserved.
**************************************************************************************************/

#import "NSImage+Tinted.h"


@implementation NSImage (Tinted)


/*–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*
- drawRect:
Forces redraw using the new instrinsicContentSize.
*–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*/

- (NSImage *)tintedWithColor:(NSColor *)tint
{
NSImage *image = [self copy];
if (tint)
{
[image lockFocus];
[tint set];
NSRect imageRect = {NSZeroPoint, [image size]};
NSRectFillUsingOperation(imageRect, NSCompositeSourceAtop);
[image unlockFocus];
}
return image;
}


@end
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
CommonHeaders.h
Copyright © 2003-2017 by Jim Derry. All rights reserved.
Copyright © 2003-2018 by Jim Derry. All rights reserved.
Application-wide preferences and definitions.
- Keys for top-hierarchy preferences managed by this application.
Expand Down Expand Up @@ -59,6 +59,7 @@
#define JSDKeySavingPrefStyle @"SavingPrefStyle"

/* Editor - Preferences Group and Key for Editor and Color */

#define JSDKeyTidyEditorSourceOptions @"JSDTidyEditorSourceOptions"
#define JSDKeyTidyEditorTidyOptions @"JSDTidyEditorTidyOptions"

Expand All @@ -67,19 +68,39 @@

#define JSDKeyAllowMacOSTextSubstitutions @"AllowMacOSTextSubstitutions"
#define JSDKeyFirstRunComplete @"FirstRunComplete"
#define JSDKeyFirstRunCompleteVersion @"FirstRunCompleteVersion"
#define JSDKeyIgnoreInputEncodingWhenOpening @"IgnoreInputEncodingWhenOpeningFiles"
#define JSDKeyAllowServiceHelperTSR @"ServiceHelperDontForceQuit"
#define JSDKeyAlreadyAskedServiceHelperTSR @"ServiceHelperAskedUserTSR"
#define JSDKeyAnimationReduce @"AnimationReduce"
#define JSDKeyAnimationStandardTime @"AnimationStandardTime"

/* Application preferences */

#define JSDKeyMessagesTableInitialSortKey @"MessagesTableInitialSortKey"
#define JSDKeyMessagesTableSortDescriptors @"MessagesTableSortDescriptors"
#define JSDKeyValidatorTableSortDescriptors @"ValidatorTableSortDescriptors"

/* Validator */

#define JSDKeyValidatorSelection @"ValidatorSelection"
#define JSDKeyValidatorAuto @"ValidatorAuto"
#define JSDKeyValidatorThrottleTime @"ValidatorThrottleTime"
#define JSDKeyValidatorURL @"ValidatorURL"

#define JSDKeyValidatorAutoBuiltIn @"ValidatorAutoBuiltIn"
#define JSDKeyValidatorThrottleBuiltIn @"ValidatorThrottleBuiltIn"
#define JSDKeyValidatorBuiltInPort @"ValidatorBuiltInPort"
#define JSDKeyValidatorAutoW3C @"ValidatorAutoW3C"
#define JSDKeyValidatorThrottleW3C @"ValidatorThrottleW3C"
#define JSDKeyValidatorAutoCustom @"ValidatorAutoCustom"
#define JSDKeyValidatorThrottleCustom @"ValidatorThrottleCustom"
#define JSDKeyValidatorCustomServer @"ValidatorCustomServer"

/* Other */

#define JSDKeyWebPreviewThrottleTime @"WebPreviewThrottleTime"


/*
Note that builds that include Sparkle have Sparkle-related
preferences keys that are implemented automatically by
Expand All @@ -106,7 +127,7 @@
* user-defined build settings.
*
* FEATURE_SPARKLE Includes Sparkle into the build.
* USE_STANDARD_QUIT_MENU_NAME Quit menu item name "for Work" versus not.
* USE_STANDARD_MENU_NAME Main and Quit menu item names "for Work" versus not.
* FEATURE_FAKE_SPARKLE Fakes Sparkle. Useful for automating screenshots.
* FEATURE_SUPPORTS_SERVICE Include support for our System Services.
* FEATURE_SUPPORTS_EXTENSIONS Include support for our Action Extensions.
Expand All @@ -119,7 +140,7 @@

#if defined(TARGET_WEB)
#define FEATURE_SPARKLE
#define USE_STANDARD_QUIT_MENU_NAME
#define USE_STANDARD_MENU_NAME
// #define FEATURE_FAKE_SPARKLE
#define FEATURE_SUPPORTS_SERVICE
#define FEATURE_SUPPORTS_EXTENSIONS
Expand All @@ -132,7 +153,7 @@
#define APP_GROUP_PREFS @"9PN2JXXG7Y.com.balthisar.Balthisar-Tidy.prefs"
#elif defined(TARGET_APP)
// #define FEATURE_SPARKLE
#define USE_STANDARD_QUIT_MENU_NAME
#define USE_STANDARD_MENU_NAME
// #define FEATURE_FAKE_SPARKLE
#define FEATURE_SUPPORTS_SERVICE
#define FEATURE_SUPPORTS_EXTENSIONS
Expand All @@ -145,7 +166,7 @@
#define APP_GROUP_PREFS @"9PN2JXXG7Y.com.balthisar.Balthisar-Tidy.prefs"
#elif defined(TARGET_PRO)
// #define FEATURE_SPARKLE
// #define USE_STANDARD_QUIT_MENU_NAME
// #define USE_STANDARD_MENU_NAME
// #define FEATURE_FAKE_SPARKLE
#define FEATURE_SUPPORTS_SERVICE
#define FEATURE_SUPPORTS_EXTENSIONS
Expand All @@ -167,12 +188,28 @@
*=======================================================*/

/* The values for the save type behaviours related to app preferences. */
typedef enum : NSInteger
typedef NS_OPTIONS(NSUInteger, JSDSaveType)
{
kJSDSaveNormal = 0,
kJSDSaveButWarn = 1,
kJSDSaveAsOnly = 2
} JSDSaveType;
};


/*=======================================================*
This enum is used in the Validator preferences and
stored in user defaults to control which validator is
used.
*=======================================================*/

/* The values for the validator type related to app preferences. */
typedef NS_OPTIONS(NSUInteger, JSDValidatorSelectionType)
{
JSDValidatorUndefined = 0,
JSDValidatorBuiltIn = 1,
JSDValidatorW3C = 2,
JSDValidatorCustom = 3
};


#pragma mark - JSDLocalizedString
Expand Down
Binary file not shown.
Loading

0 comments on commit 47bcda2

Please sign in to comment.