Further UI enhancements

CQTexperiment
vspader 2006-04-30 15:31:57 +00:00
parent 2840348513
commit f7df23de07
7 changed files with 81 additions and 4 deletions

View File

@ -11,6 +11,8 @@
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
8E4C7F080A0509FC003BE25F /* DragScrollView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8E4C7F060A0509FC003BE25F /* DragScrollView.h */; };
8E4C7F090A0509FC003BE25F /* DragScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E4C7F070A0509FC003BE25F /* DragScrollView.m */; };
8E75756909F31D5A0080F1EE /* AppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E75751909F31D5A0080F1EE /* AppController.m */; };
8E75756A09F31D5A0080F1EE /* ClickField.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E75751C09F31D5A0080F1EE /* ClickField.m */; };
8E75756B09F31D5A0080F1EE /* InfoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E75751E09F31D5A0080F1EE /* InfoView.m */; };
@ -139,6 +141,7 @@
8E757B5709F326710080F1EE /* OggFLAC.framework in CopyFiles */,
8E757B5809F326710080F1EE /* FAAD2.framework in CopyFiles */,
8E757B5909F326710080F1EE /* DecMPA.framework in CopyFiles */,
8E4C7F080A0509FC003BE25F /* DragScrollView.h in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -155,6 +158,8 @@
32CA4F630368D1EE00C91783 /* Cog_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cog_Prefix.pch; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* Cog.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Cog.app; sourceTree = BUILT_PRODUCTS_DIR; };
8E4C7F060A0509FC003BE25F /* DragScrollView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DragScrollView.h; sourceTree = "<group>"; };
8E4C7F070A0509FC003BE25F /* DragScrollView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = DragScrollView.m; sourceTree = "<group>"; };
8E75751309F31D130080F1EE /* French */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = French; path = French.lproj/MainMenu.nib; sourceTree = "<group>"; };
8E75751809F31D5A0080F1EE /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = "<group>"; };
8E75751909F31D5A0080F1EE /* AppController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = AppController.m; sourceTree = "<group>"; };
@ -408,6 +413,8 @@
8E75752009F31D5A0080F1EE /* TrackingCell.m */,
8E75752109F31D5A0080F1EE /* TrackingSlider.h */,
8E75752209F31D5A0080F1EE /* TrackingSlider.m */,
8E4C7F060A0509FC003BE25F /* DragScrollView.h */,
8E4C7F070A0509FC003BE25F /* DragScrollView.m */,
);
path = Custom;
sourceTree = "<group>";
@ -691,6 +698,7 @@
8E75758B09F31D5A0080F1EE /* DBLog.m in Sources */,
8E75758C09F31D5A0080F1EE /* Semaphore.m in Sources */,
8E75758D09F31D5A0080F1EE /* VirtualRingBuffer.m in Sources */,
8E4C7F090A0509FC003BE25F /* DragScrollView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

16
Custom/DragScrollView.h Normal file
View File

@ -0,0 +1,16 @@
//
// ScrollableTextField.h
// Cog
//
// Created by Zaphod Beeblebrox on 4/30/06.
// Copyright 2006 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface DragScrollView : NSScrollView {
NSPoint downPoint;
}
@end

46
Custom/DragScrollView.m Normal file
View File

@ -0,0 +1,46 @@
//
// ScrollableTextField.m
// Cog
//
// Created by Zaphod Beeblebrox on 4/30/06.
// Copyright 2006 __MyCompanyName__. All rights reserved.
//
#import "DragScrollView.h"
@implementation DragScrollView
- (BOOL)acceptsFirstMouse:(NSEvent *)event {
return YES;
}
- (void)mouseDown:(NSEvent *)event
{
if([event type] == NSLeftMouseDown)
{
if ([event clickCount] == 2)
{
[[self contentView] scrollToPoint:NSMakePoint(0,0)];
}
downPoint = [event locationInWindow];
downPoint = [[self contentView] convertPoint:downPoint fromView:nil];
}
}
- (void)mouseDragged:(NSEvent *)event
{
NSPoint p = [event locationInWindow];
p = [self convertPoint:p fromView:nil];
p.y = 0;
p.x = -p.x + downPoint.x;
[[self contentView] scrollToPoint:p];
[self setNeedsDisplay:YES];
}
@end

View File

@ -37,6 +37,7 @@
OUTLETS = {tableView = NSTableView; };
SUPERCLASS = NSArrayController;
},
{CLASS = DragScrollView; LANGUAGE = ObjC; SUPERCLASS = NSScrollView; },
{
ACTIONS = {cancel = id; openFeedbackWindow = id; sendFeedback = id; };
CLASS = FeedbackController;
@ -98,7 +99,6 @@
};
SUPERCLASS = NSTableView;
},
{CLASS = RoundBackgroundField; LANGUAGE = ObjC; SUPERCLASS = NSTextField; },
{
ACTIONS = {
changeVolume = id;

View File

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>141 329 617 240 0 0 1024 746 </string>
<string>32 330 617 240 0 0 1024 746 </string>
<key>IBEditorPositions</key>
<dict>
<key>29</key>
@ -28,11 +28,11 @@
<integer>3</integer>
<key>IBOpenObjects</key>
<array>
<integer>513</integer>
<integer>463</integer>
<integer>823</integer>
<integer>29</integer>
<integer>21</integer>
<integer>513</integer>
<integer>823</integer>
</array>
<key>IBSystem Version</key>
<string>8I127</string>

Binary file not shown.

View File

@ -591,6 +591,13 @@
return repeat;
}
- (void)setFilterPredicate:(NSPredicate *)filterPredicate
{
[self updateIndexesFromRow:0];
[super setFilterPredicate:filterPredicate];
}
- (void)savePlaylist:(NSString *)filename
{
// DBLog(@"SAVING PLAYLIST: %@", filename);