Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

disable the paste action for multiple items. Fixes #593 #1167

Merged
merged 1 commit into from

2 participants

@pjrobertson
Owner

The best solution would be to implement the new NSPasteboard methods introduced in 10.6, as you can pass an array of items to the pasteboard, and it will paste them all. This is a lot harder than it looks

This is an interim fix to avoid the crash.

@pjrobertson pjrobertson disable the paste action for multiple items. Fixes #593
The best solution would be to implement the new NSPasteboard methods introduced in 10.6, as you can pass an array of items to the pasteboard, and it will paste them all. This is an interim fix to avoid the crash.
e53e83b
@skurfer skurfer merged commit 0ed19f0 into quicksilver:master
@skurfer
Owner

Merged, as long as you promise to implement “the new NSPasteboard methods introduced in 10.6” one day. ;-)

@pjrobertson
Owner
@skurfer
Owner

Heh. Not because we have to. Just because it sounds cool to be able to paste multiple things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 11, 2012
  1. @pjrobertson

    disable the paste action for multiple items. Fixes #593

    pjrobertson authored
    The best solution would be to implement the new NSPasteboard methods introduced in 10.6, as you can pass an array of items to the pasteboard, and it will paste them all. This is an interim fix to avoid the crash.
This page is out of date. Refresh to see the latest.
View
9 Quicksilver/PlugIns-Main/QSCorePlugIn/Code/QSActionProvider_EmbeddedProviders.m
@@ -788,8 +788,17 @@ - (NSArray *)validActionsForDirectObject:(QSObject *)dObject indirectObject:(QSO
@end
# define kPasteboardPasteAction @"PasteboardPasteAction"
+# define kPasteboardPasteActionAsPlainText @"PasteboardPasteActionAsPlainText"
@implementation ClipboardActions
+
+- (NSArray *)validActionsForDirectObject:(QSObject *)dObject indirectObject:(QSObject *)iObject {
+ if ([dObject count] == 1) {
+ return [NSArray arrayWithObjects:kPasteboardPasteAction,kPasteboardPasteActionAsPlainText,nil];
+ }
+ return nil;
+}
+
- (QSObject *)copyObject:(QSObject *)dObject {
[dObject putOnPasteboard:[NSPasteboard generalPasteboard]];
return nil;
View
4 Quicksilver/PlugIns-Main/QSCorePlugIn/QSCorePlugIn-Info.plist
@@ -956,6 +956,8 @@
</dict>
<key>PasteboardPasteActionAsPlainText</key>
<dict>
+ <key>validatesObjects</key>
+ <true/>
<key>actionClass</key>
<string>ClipboardActions</string>
<key>directTypes</key>
@@ -1374,6 +1376,8 @@
</dict>
<key>PasteboardPasteAction</key>
<dict>
+ <key>validatesObjects</key>
+ <true/>
<key>alternateAction</key>
<string>PasteboardPasteActionAsPlainText</string>
<key>actionClass</key>
Something went wrong with that request. Please try again.