}
#define OUTPUT_PANE_MIN_WIDTH 390
+#define INPUT_PANE_MIN_WIDTH 160
+
+- (CGFloat)splitView:(NSSplitView *)splitView constrainMinCoordinate:(CGFloat)proposedMinimumPosition ofSubviewAt:(NSInteger)dividerIndex {
+ return INPUT_PANE_MIN_WIDTH;
+}
- (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset {
return proposedMax - OUTPUT_PANE_MIN_WIDTH;
IBOutlet NJMappingsController *mappingsController;
IBOutlet NSButton *translatingEventsButton;
IBOutlet NSMenuItem *translatingEventsMenu;
+ IBOutlet NSView *connectDevicePrompt;
}
@property (nonatomic, readonly) NJInput *selectedInput;
dev.index = findAvailableIndex(_devices, dev);
[_devices addObject:dev];
[outlineView reloadData];
+ [connectDevicePrompt setHidden:!!_devices.count];
}
static void add_callback(void *ctx, IOReturn inResult, void *inSender, IOHIDDeviceRef device) {
if (match) {
[_devices removeObject:match];
[outlineView reloadData];
+ [connectDevicePrompt setHidden:!!_devices.count];
}
}