Skip to content

[WIP] Move plugins into Quicksilver project #3044

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

Open
wants to merge 3 commits into
base: main
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
4 changes: 2 additions & 2 deletions Quicksilver/Code-QuickStepCore/QSGlobalSelectionProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ - (void)performService:(NSPasteboard *)pboard

- (NSPasteboard *)getSelectionFromFrontApp {
id __block result = nil;
QSGCDMainSync(^{

//NSLog(@"GET SEL");
id oldServicesProvider = [NSApp servicesProvider];
[NSApp setServicesProvider:self];
Expand All @@ -63,7 +63,7 @@ - (NSPasteboard *)getSelectionFromFrontApp {
[NSApp setServicesProvider:oldServicesProvider];
result = self->resultPboard;
self->resultPboard = nil;
});

return result;
}

Expand Down
51 changes: 51 additions & 0 deletions Quicksilver/PlugIns-Main/Mini Interface/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>Mini Interface</string>
<key>CFBundleExecutable</key>
<string>Mini Interface</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Mini Interface</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.1.0</string>
<key>CFBundleVersion</key>
<string>100</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2004, Blacktree, Inc.</string>
<key>QSModulePreview</key>
<string>BezelInterfacePreview</string>
<key>QSPlugIn</key>
<dict>
<key>author</key>
<string>Blacktree, Inc.</string>
<key>categories</key>
<array>
<string>Interfaces</string>
</array>
<key>description</key>
<string>Provides a miniature interface</string>
<key>icon</key>
<string>Interface</string>
<key>requiresFeature</key>
<string>0</string>
</dict>
<key>QSRegistration</key>
<dict>
<key>QSCommandInterfaceControllers</key>
<dict>
<key>QSMiniInterfaceController</key>
<string>QSMiniInterfaceController</string>
</dict>
</dict>
</dict>
</plist>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* QSController */


#import <Cocoa/Cocoa.h>

@interface QSMiniInterfaceController : QSResizingInterfaceController{
// NSRect standardRect;
}
@end
132 changes: 132 additions & 0 deletions Quicksilver/PlugIns-Main/Mini Interface/QSMiniInterfaceController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
#import "QSMiniInterfaceController.h"

#import <IOKit/IOCFBundle.h>
#import <ApplicationServices/ApplicationServices.h>

//#import "QSMenuButton.h"

#define DIFF 18

@implementation QSMiniInterfaceController


- (id)init {
self = [super initWithWindowNibName:@"MiniInterface"];
if (self) {

}
return self;
}

- (void) windowDidLoad{
[super windowDidLoad];
QSWindow *window = (QSWindow *)[self window];
[window setLevel:NSModalPanelWindowLevel];
[window setFrameAutosaveName:@"MiniInterfaceWindow"];

[[self window] setCollectionBehavior:NSWindowCollectionBehaviorTransient];

[window setFrame:constrainRectToRect([[self window]frame],[[[self window]screen]visibleFrame]) display:NO];
[window setHideOffset:NSMakePoint(150,0)];
[window setShowOffset:NSMakePoint(-150,0)];


[window setShowEffect:[NSDictionary dictionaryWithObjectsAndKeys:@"QSVExpandEffect",@"transformFn",@"show",@"type",[NSNumber numberWithDouble:0.15],@"duration",nil]];

[window setWindowProperty:[NSDictionary dictionaryWithObjectsAndKeys:@"QSExplodeEffect",@"transformFn",@"hide",@"type",[NSNumber numberWithDouble:0.2],@"duration",nil]
forKey:kQSWindowExecEffect];

[window setWindowProperty:[NSDictionary dictionaryWithObjectsAndKeys:@"hide",@"type",[NSNumber numberWithDouble:0.15],@"duration",nil]
forKey:kQSWindowFadeEffect];

[window setWindowProperty:[NSDictionary dictionaryWithObjectsAndKeys:@"QSVContractEffect",@"transformFn",@"hide",@"type",[NSNumber numberWithDouble:0.333],@"duration",nil,[NSNumber numberWithDouble:0.25],@"brightnessB",@"QSStandardBrightBlending",@"brightnessFn",nil]
forKey:kQSWindowCancelEffect];


[[[self window] contentView] bind:@"color" toObject:[NSUserDefaultsController sharedUserDefaultsController] withKeyPath:@"values.QSAppearance1B" options:[NSDictionary dictionaryWithObject:NSUnarchiveFromDataTransformerName forKey:@"NSValueTransformerName"]];
[[self window] bind:@"hasShadow" toObject:[NSUserDefaultsController sharedUserDefaultsController] withKeyPath:@"values.QSBezelHasShadow" options:nil];
[commandView bind:@"textColor" toObject:[NSUserDefaultsController sharedUserDefaultsController] withKeyPath:@"values.QSAppearance1T" options:[NSDictionary dictionaryWithObject:NSUnarchiveFromDataTransformerName forKey:@"NSValueTransformerName"]];




[(QSCollectingSearchObjectView *)dSelector setCollectionSpace:0.0f];
[(QSCollectingSearchObjectView *)iSelector setCollectionSpace:0.0f];
[(QSCollectingSearchObjectView *)dSelector setCollectionEdge:NSMinXEdge];
[(QSCollectingSearchObjectView *)iSelector setCollectionEdge:NSMinXEdge];



[self contractWindow:self];
}

- (void)updateViewLocations{
[super updateViewLocations];

// [[[self window]contentView]display];
}


- (void)hideMainWindow:(id)sender{

[[self window] saveFrameUsingName:@"MiniInterfaceWindow"];

[super hideMainWindow:sender];
}

- (NSSize)maxIconSize{
return NSMakeSize(32,32);
}
- (NSRect)window:(NSWindow *)window willPositionSheet:(NSWindow *)sheet usingRect:(NSRect)rect{
//
return NSOffsetRect(NSInsetRect(rect,8,0),0,-21);
return NSMakeRect(0,[(NSView *)[window firstResponder]frame].origin.y,NSWidth(rect),0);
}


- (void)showIndirectSelector:(id)sender{
if (![iSelector superview] && !expanded)
[iSelector setFrame:NSOffsetRect([aSelector frame],0,-NSHeight([aSelector frame]))];
[super showIndirectSelector:sender];
}

- (void)expandWindow:(id)sender{
if (![self expanded]) {
NSRect expandedRect=[[self window]frame];
expandedRect.size.height+=DIFF;
expandedRect.origin.y-=DIFF;
[[self window]setFrame:expandedRect display:YES animate:YES];
}
[super expandWindow:sender];
}

- (void)contractWindow:(id)sender{
if ([self expanded]) {
NSRect contractedRect=[[self window]frame];

contractedRect.size.height-=DIFF;
contractedRect.origin.y+=DIFF;

[[self window]setFrame:contractedRect display:YES animate:YES];
}
[super contractWindow:sender];
}


@end
















Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"QSMiniInterfaceController" = "Mini Interface";
Loading