Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to hide the info dialog #16

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Brushes.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1893,7 +1893,7 @@
ORGANIZATIONNAME = "Taptrix, Inc.";
TargetAttributes = {
1D6058900D05DD3D006BFB54 = {
DevelopmentTeam = CQ46W8F62S;
DevelopmentTeam = YUA2T3VNM9;
SystemCapabilities = {
com.apple.GameCenter = {
enabled = 0;
Expand Down
25 changes: 19 additions & 6 deletions Classes/WDCanvasController.m
Original file line number Diff line number Diff line change
Expand Up @@ -759,12 +759,16 @@ - (void) blueToothStatusChanged:(NSNotification *)aNotification

- (void) stylusConnected:(NSNotification *)aNotification
{
[self.actionNameView setConnectedDeviceName:(aNotification.userInfo)[@"name"]];
if ([self showActionNameView]) {
[self.actionNameView setConnectedDeviceName:(aNotification.userInfo)[@"name"]];
}
}

- (void) stylusDisconnected:(NSNotification *)aNotification
{
[self.actionNameView setDisconnectedDeviceName:(aNotification.userInfo)[@"name"]];
if ([self showActionNameView]) {
[self.actionNameView setDisconnectedDeviceName:(aNotification.userInfo)[@"name"]];
}
}

#pragma mark - Undo/Redo
Expand Down Expand Up @@ -1532,6 +1536,11 @@ - (void) registerNotifications

[nc addObserver:self selector:@selector(blueToothStatusChanged:) name:WDBlueToothStateChangedNotification object:nil];
}

- (BOOL) showActionNameView
{
return ![[NSUserDefaults standardUserDefaults] boolForKey:@"WDHideInfoDialogToggle"];
}

- (void) fadingOutActionNameView:(WDActionNameView *)inActionNameView
{
Expand All @@ -1555,18 +1564,22 @@ - (void) willUndo:(NSNotification *)aNotification
NSString *actionName = self.painting.undoManager.undoActionName;

if (actionName && ![actionName isEqualToString:@""]) {
[self.actionNameView setUndoActionName:actionName];
if ([self showActionNameView]) {
[self.actionNameView setUndoActionName:actionName];
}
} else {
WDLog(@"Undo with no action name.");
}
}

- (void) willRedo:(NSNotification *)aNotification
{
NSString *actionName = self.painting.undoManager.redoActionName;

if (actionName && ![actionName isEqualToString:@""]) {
[self.actionNameView setRedoActionName:actionName];
if ([self showActionNameView]) {
[self.actionNameView setUndoActionName:actionName];
}
} else {
WDLog(@"Redo with no action name.");
}
Expand Down
16 changes: 16 additions & 0 deletions Settings.bundle/Root.plist
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>Hiding and Showing Visual Elements</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Hide Information Dialog</string>
<key>Key</key>
<string>WDHideInfoDialogToggle</string>
<key>DefaultValue</key>
<string>WDHideInfoDialogToggle</string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
Expand Down
Binary file modified Settings.bundle/en.lproj/Root.strings
Binary file not shown.