Add catalog action #1276

Merged
merged 10 commits into from Jan 17, 2013

Projects

None yet

3 participants

@pjrobertson
Member

Adds a new action to allow you to add files/folders directly to the catalog.

Plus a few other tidyups

@skurfer
Member
skurfer commented Dec 12, 2012

Nice idea. But it doesn't seem to work for me. It opens the catalog prefs with the panel open, but there's nothing selected and the new entry isn't there. If I click on one of the other catalog sections and come back, I see a new entry with the folder's name, but it's missing the path to the folder so I have to manually set it.

@skurfer
Member
skurfer commented Dec 12, 2012

Oh, and the precedence was set very low, but anything above 0 must be significant. It ended up as the 5th action overall for me (so it became the default for all files/folders).

pjrobertson added some commits Jan 6, 2013
@pjrobertson pjrobertson Lower precedence of Add to Catalog action d46c11b
@pjrobertson pjrobertson Add a 'reloadData' method for a common catalog prefs task 4233a64
@pjrobertson pjrobertson Fix up the 'add to catalog' action 217aa3b
@pjrobertson pjrobertson Prefer 'base' catalog entries when returning the first entry containi…
…ng an object

This means that if you run 'show source in catalog' on an object in 'Recent Objects' and another catalog source, the method will always return the original catalog source (not 'recent objects')
6ffd184
@pjrobertson
Member

Right you are. I've added a few more commits to fix things properly.

Cheers

@skurfer
Member
skurfer commented Jan 8, 2013

The UI looks better. The new entry is selected with its info panel open. But when I try to touch it, changing the contents from "None" to "Folder Contents", QS hangs. For what it's worth, I pulled this down yesterday so I don't have the last commit on my end. I don't think that would fix it though.

Here's the stack trace. Sorry I'm just finding problems today. :-)

2013-01-08 09:35:05.701 Quicksilver[76661:303] -[__NSDictionaryI setObject:forKey:]: unrecognized selector sent to instance 0x10106c5d0
An exception of type NSInvalidArgumentException occured.
-[__NSDictionaryI setObject:forKey:]: unrecognized selector sent to instance 0x10106c5d0
Stack trace:
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/atos) has __RESTRICT/__restrict section
     1  -[NSObject(NSObject) doesNotRecognizeSelector:] (in CoreFoundation) + 186
     2  ___forwarding___ (in CoreFoundation) + 414
     3  _CF_forwarding_prep_0 (in CoreFoundation) + 232
     4  -[QSFileSystemObjectSource setValueForSender:] (in Core Support) (QSFileSystemObjectSource.m:261)
     5  -[NSApplication sendAction:to:from:] (in AppKit) + 342
     6  -[NSControl sendAction:to:] (in AppKit) + 85
     7  -[NSCell _sendActionFrom:] (in AppKit) + 138
     8  -[NSApplication sendAction:to:from:] (in AppKit) + 342
     9  -[NSMenuItem _corePerformAction] (in AppKit) + 406
    10  -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] (in AppKit) + 133
    11  -[NSMenu _internalPerformActionForItemAtIndex:] (in AppKit) + 36
    12  -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] (in AppKit) + 135
    13  NSSLMMenuEventHandler (in AppKit) + 342
    14  DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) (in HIToolbox) + 1206
    15  SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) (in HIToolbox) + 410
    16  SendEventToEventTarget (in HIToolbox) + 40
    17  SendHICommandEvent(unsigned int, HICommand const*, unsigned int, unsigned int, unsigned char, void const*, OpaqueEventTargetRef*, OpaqueEventTargetRef*, OpaqueEventRef**) (in HIToolbox) + 443
    18  SendMenuCommandWithContextAndModifiers (in HIToolbox) + 59
    19  SendMenuItemSelectedEvent (in HIToolbox) + 254
    20  FinishMenuSelection(SelectionData*, MenuResult*, MenuResult*) (in HIToolbox) + 94
    21  PopUpMenuSelectCore(MenuData*, Point, double, Point, unsigned short, unsigned int, Rect const*, unsigned short, unsigned int, Rect const*, Rect const*, __CFString const*, OpaqueMenuRef**, unsigned short*) (in HIToolbox) + 1673
    22  _HandlePopUpMenuSelection7 (in HIToolbox) + 629
    23  _NSSLMPopUpCarbonMenu3 (in AppKit) + 3916
    24  _NSPopUpCarbonMenu3 (in AppKit) + 39
    25  -[NSCarbonMenuImpl popUpMenu:atLocation:width:forView:withSelectedItem:withFont:withFlags:withOptions:] (in AppKit) + 346
    26  -[NSPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:] (in AppKit) + 540
    27  -[NSControl mouseDown:] (in AppKit) + 820
    28  -[NSWindow sendEvent:] (in AppKit) + 6853
    29  -[NSApplication sendEvent:] (in AppKit) + 5761
    30  -[QSApp sendEvent:] (in Quicksilver) (QSApp.m:133)
    31  -[NSApplication run] (in AppKit) + 636
    32  NSApplicationMain (in AppKit) + 869
    33  main (in Quicksilver) (main.m:21)
    34  start (in Quicksilver) + 52
    35  0x00000003 (in Quicksilver)
2013-01-08 09:35:05.803 Quicksilver[76661:303] An uncaught exception was raised
2013-01-08 09:35:05.804 Quicksilver[76661:303] -[__NSDictionaryI setObject:forKey:]: unrecognized selector sent to instance 0x10106c5d0
2013-01-08 09:35:05.813 Quicksilver[76661:303] (
    0   CoreFoundation                      0x00007fff9879b0a6 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x00007fff9a0803f0 objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff9882f229 -[NSException raise] + 9
    3   ExceptionHandling                   0x00000001002a865b NSExceptionHandlerExceptionRaiser + 210
    4   libobjc.A.dylib                     0x00007fff9a0803f0 objc_exception_throw + 43
    5   CoreFoundation                      0x00007fff988316ea -[NSObject(NSObject) doesNotRecognizeSelector:] + 186
    6   CoreFoundation                      0x00007fff987895ce ___forwarding___ + 414
    7   CoreFoundation                      0x00007fff987893b8 _CF_forwarding_prep_0 + 232
    8   Core Support                        0x00000001043c8d42 -[QSFileSystemObjectSource setValueForSender:] + 802
    9   AppKit                              0x00007fff95b36a59 -[NSApplication sendAction:to:from:] + 342
    10  AppKit                              0x00007fff95b368b7 -[NSControl sendAction:to:] + 85
    11  AppKit                              0x00007fff95b367eb -[NSCell _sendActionFrom:] + 138
    12  AppKit                              0x00007fff95b36a59 -[NSApplication sendAction:to:from:] + 342
    13  AppKit                              0x00007fff95c6c44c -[NSMenuItem _corePerformAction] + 406
    14  AppKit                              0x00007fff95c6c13a -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 133
    15  AppKit                              0x00007fff9595946f -[NSMenu _internalPerformActionForItemAtIndex:] + 36
    16  AppKit                              0x00007fff959592f7 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 135
    17  AppKit                              0x00007fff95c65245 NSSLMMenuEventHandler + 342
    18  HIToolbox                           0x00007fff99b10f0a _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1206
    19  HIToolbox                           0x00007fff99b103d9 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 410
    20  HIToolbox                           0x00007fff99b261bd SendEventToEventTarget + 40
    21  HIToolbox                           0x00007fff99b5ce89 _ZL18SendHICommandEventjPK9HICommandjjhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 443
    22  HIToolbox                           0x00007fff99b01c11 SendMenuCommandWithContextAndModifiers + 59
    23  HIToolbox                           0x00007fff99b01bc3 SendMenuItemSelectedEvent + 254
    24  HIToolbox                           0x00007fff99b01a4f _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 94
    25  HIToolbox                           0x00007fff99c78009 _ZL19PopUpMenuSelectCoreP8MenuData5PointdS1_tjPK4RecttjS4_S4_PK10__CFStringPP13OpaqueMenuRefPt + 1673
    26  HIToolbox                           0x00007fff99c77924 _HandlePopUpMenuSelection7 + 629
    27  AppKit                              0x00007fff95ce861b _NSSLMPopUpCarbonMenu3 + 3916
    28  AppKit                              0x00007fff96049d2a _NSPopUpCarbonMenu3 + 39
    29  AppKit                              0x00007fff95ce75dc -[NSCarbonMenuImpl popUpMenu:atLocation:width:forView:withSelectedItem:withFont:withFlags:withOptions:] + 346
    30  AppKit                              0x00007fff95eab315 -[NSPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 540
    31  AppKit                              0x00007fff95b33c9c -[NSControl mouseDown:] + 820
    32  AppKit                              0x00007fff95b2b60e -[NSWindow sendEvent:] + 6853
    33  AppKit                              0x00007fff95b27744 -[NSApplication sendEvent:] + 5761
    34  Quicksilver                         0x0000000100002404 -[QSApp sendEvent:] + 1940
    35  AppKit                              0x00007fff95a3d2fa -[NSApplication run] + 636
    36  AppKit                              0x00007fff959e1cb6 NSApplicationMain + 869
    37  Quicksilver                         0x000000010001fc26 main + 198
    38  Quicksilver                         0x0000000100001794 start + 52
)
An exception of type NSInvalidArgumentException occured.
-[__NSDictionaryI setObject:forKey:]: unrecognized selector sent to instance 0x10106c5d0
Stack trace:
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/atos) has __RESTRICT/__restrict section
     1  SendEventToEventTarget (in HIToolbox) + 40
     2  SendHICommandEvent(unsigned int, HICommand const*, unsigned int, unsigned int, unsigned char, void const*, OpaqueEventTargetRef*, OpaqueEventTargetRef*, OpaqueEventRef**) (in HIToolbox) + 443
     3  SendMenuCommandWithContextAndModifiers (in HIToolbox) + 59
     4  SendMenuItemSelectedEvent (in HIToolbox) + 254
     5  FinishMenuSelection(SelectionData*, MenuResult*, MenuResult*) (in HIToolbox) + 94
     6  PopUpMenuSelectCore(MenuData*, Point, double, Point, unsigned short, unsigned int, Rect const*, unsigned short, unsigned int, Rect const*, Rect const*, __CFString const*, OpaqueMenuRef**, unsigned short*) (in HIToolbox) + 1673
     7  _HandlePopUpMenuSelection7 (in HIToolbox) + 629
     8  _NSSLMPopUpCarbonMenu3 (in AppKit) + 3916
     9  _NSPopUpCarbonMenu3 (in AppKit) + 39
    10  -[NSCarbonMenuImpl popUpMenu:atLocation:width:forView:withSelectedItem:withFont:withFlags:withOptions:] (in AppKit) + 346
    11  -[NSPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:] (in AppKit) + 540
    12  -[NSControl mouseDown:] (in AppKit) + 820
    13  -[NSWindow sendEvent:] (in AppKit) + 6853
    14  -[NSApplication sendEvent:] (in AppKit) + 5761
    15  -[QSApp sendEvent:] (in Quicksilver) (QSApp.m:133)
    16  -[NSApplication run] (in AppKit) + 636
    17  NSApplicationMain (in AppKit) + 869
    18  main (in Quicksilver) (main.m:21)
    19  start (in Quicksilver) + 52
    20  0x00000003 (in Quicksilver)
@pjrobertson
Member

Sorry I'm just finding problems today. :-)

You always do a better job than me. I'm looking forward to the synonyms
branch so I can rip it apart :P

That error's from a small typo, fixed in the latest pull request. Cheers :)

On 8 January 2013 14:47, Rob McBroom notifications@github.com wrote:

The UI looks better. The new entry is selected with its info panel open.
But when I try to touch it, changing the contents from "None" to "Folder
Contents", QS hangs. For what it's worth, I pulled this down yesterday so I
don't have the last commit on my end. I don't think that would fix it
though.

Here's the stack trace. Sorry I'm just finding problems today. :-)

2013-01-08 09:35:05.701 Quicksilver[76661:303] -[NSDictionaryI setObject:forKey:]: unrecognized selector sent to instance 0x10106c5d0
An exception of type NSInvalidArgumentException occured.
-[_NSDictionaryI setObject:forKey:]: unrecognized selector sent to instance 0x10106c5d0
Stack trace:
dyld: DYLD
environment variables being ignored because main executable (/usr/bin/atos) has __RESTRICT/__restrict section
1 -[NSObject(NSObject) doesNotRecognizeSelector:](in CoreFoundation) + 186
2 __forwarding
(in CoreFoundation) + 414
3 CF_forwarding_prep_0 (in CoreFoundation) + 232
4 -[QSFileSystemObjectSource setValueForSender:](in Core Support) (QSFileSystemObjectSource.m:261)
5 -[NSApplication sendAction:to:from:](in AppKit) + 342
6 -[NSControl sendAction:to:](in AppKit) + 85
7 -[NSCell sendActionFrom:](in AppKit) + 138
8 -[NSApplication sendAction:to:from:](in AppKit) + 342
9 -[NSMenuItem corePerformAction](in AppKit) + 406
10 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:](in AppKit) + 133
11 -[NSMenu internalPerformActionForItemAtIndex:](in AppKit) + 36
12 -[NSCarbonMenuImpl carbonCommandProcessEvent:handlerCallRef:](in AppKit) + 135
13 NSSLMMenuEventHandler (in AppKit) + 342
14 DispatchEventToHandlers(EventTargetRec
, OpaqueEventRef
, HandlerCallRec
) (in HIToolbox) + 1206
15 SendEventToEventTargetInternal(OpaqueEventRef
, OpaqueEventTargetRef
, HandlerCallRec_) (in HIToolbox) + 410
16 SendEventToEventTarget (in HIToolbox) + 40
17 SendHICommandEvent(unsigned int, HICommand const_, unsigned int, unsigned int, unsigned char, void const_, OpaqueEventTargetRef_, OpaqueEventTargetRef_, OpaqueEventRef**) (in HIToolbox) + 443
18 SendMenuCommandWithContextAndModifiers (in HIToolbox) + 59
19 SendMenuItemSelectedEvent (in HIToolbox) + 254
20 FinishMenuSelection(SelectionData_, MenuResult_, MenuResult_) (in HIToolbox) + 94
21 PopUpMenuSelectCore(MenuData_, Point, double, Point, unsigned short, unsigned int, Rect const_, unsigned short, unsigned int, Rect const_, Rect const_, _CFString const, OpaqueMenuRef**, unsigned short*) (in HIToolbox) + 1673
22 _HandlePopUpMenuSelection7 (in HIToolbox) + 629
23 _NSSLMPopUpCarbonMenu3 (in AppKit) + 3916
24 _NSPopUpCarbonMenu3 (in AppKit) + 39
25 -[NSCarbonMenuImpl popUpMenu:atLocation:width:forView:withSelectedItem:withFont:withFlags:withOptions:](in AppKit) + 346
26 -[NSPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:](in AppKit) + 540
27 -[NSControl mouseDown:](in AppKit) + 820
28 -[NSWindow sendEvent:](in AppKit) + 6853
29 -[NSApplication sendEvent:](in AppKit) + 5761
30 -[QSApp sendEvent:](in Quicksilver) (QSApp.m:133)
31 -[NSApplication run](in AppKit) + 636
32 NSApplicationMain (in AppKit) + 869
33 main (in Quicksilver) (main.m:21)
34 start (in Quicksilver) + 52
35 0x00000003 (in Quicksilver)
2013-01-08 09:35:05.803 Quicksilver[76661:303] An uncaught exception was raised
2013-01-08 09:35:05.804 Quicksilver[76661:303] -[__NSDictionaryI setObject:forKey:]: unrecognized selector sent to instance 0x10106c5d0
2013-01-08 09:35:05.813 Quicksilver[76661:303] (
0 CoreFoundation 0x00007fff9879b0a6 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff9a0803f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff9882f229 -[NSException raise] + 9
3 ExceptionHandling 0x00000001002a865b NSExceptionHandlerExceptionRaiser + 210
4 libobjc.A.dylib 0x00007fff9a0803f0 objc_exception_throw + 43
5 CoreFoundation 0x00007fff988316ea -[NSObject(NSObject) doesNotRecognizeSelector:] + 186
6 CoreFoundation 0x00007fff987895ce forwarding + 414
7 CoreFoundation 0x00007fff987893b8 _CF_forwarding_prep_0 + 232
8 Core Support 0x00000001043c8d42 -[QSFileSystemObjectSource setValueForSender:] + 802
9 AppKit 0x00007fff95b36a59 -[NSApplication sendAction:to:from:] + 342
10 AppKit 0x00007fff95b368b7 -[NSControl sendAction:to:] + 85
11 AppKit 0x00007fff95b367eb -[NSCell _sendActionFrom:] + 138
12 AppKit 0x00007fff95b36a59 -[NSApplication sendAction:to:from:] + 342
13 AppKit 0x00007fff95c6c44c -[NSMenuItem _corePerformAction] + 406
14 AppKit 0x00007fff95c6c13a -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 133
15 AppKit 0x00007fff9595946f -[NSMenu _internalPerformActionForItemAtIndex:] + 36
16 AppKit 0x00007fff959592f7 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 135
17 AppKit 0x00007fff95c65245 NSSLMMenuEventHandler + 342
18 HIToolbox 0x00007fff99b10f0a _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1206
19 HIToolbox 0x00007fff99b103d9 ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 410
20 HIToolbox 0x00007fff99b261bd SendEventToEventTarget + 40
21 HIToolbox 0x00007fff99b5ce89 ZL18SendHICommandEventjPK9HICommandjjhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 443
22 HIToolbox 0x00007fff99b01c11 SendMenuCommandWithContextAndModifiers + 59
23 HIToolbox 0x00007fff99b01bc3 SendMenuItemSelectedEvent + 254
24 HIToolbox 0x00007fff99b01a4f ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2 + 94
25 HIToolbox 0x00007fff99c78009 ZL19PopUpMenuSelectCoreP8MenuData5PointdS1_tjPK4RecttjS4_S4_PK10__CFStringPP13OpaqueMenuRefPt + 1673
26 HIToolbox 0x00007fff99c77924 HandlePopUpMenuSelection7 + 629
27 AppKit 0x00007fff95ce861b NSSLMPopUpCarbonMenu3 + 3916
28 AppKit 0x00007fff96049d2a NSPopUpCarbonMenu3 + 39
29 AppKit 0x00007fff95ce75dc -[NSCarbonMenuImpl popUpMenu:atLocation:width:forView:withSelectedItem:withFont:withFlags:withOptions:] + 346
30 AppKit 0x00007fff95eab315 -[NSPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 540
31 AppKit 0x00007fff95b33c9c -[NSControl mouseDown:] + 820
32 AppKit 0x00007fff95b2b60e -[NSWindow sendEvent:] + 6853
33 AppKit 0x00007fff95b27744 -[NSApplication sendEvent:] + 5761
34 Quicksilver 0x0000000100002404 -[QSApp sendEvent:] + 1940
35 AppKit 0x00007fff95a3d2fa -[NSApplication run] + 636
36 AppKit 0x00007fff959e1cb6 NSApplicationMain + 869
37 Quicksilver 0x000000010001fc26 main + 198
38 Quicksilver 0x0000000100001794 start + 52
)
An exception of type NSInvalidArgumentException occured.
-[NSDictionaryI setObject:forKey:]: unrecognized selector sent to instance 0x10106c5d0
Stack trace:
dyld: DYLD
environment variables being ignored because main executable (/usr/bin/atos) has RESTRICT/restrict section
1 SendEventToEventTarget (in HIToolbox) + 40
2 SendHICommandEvent(unsigned int, HICommand const
, unsigned int, unsigned int, unsigned char, void const
, OpaqueEventTargetRef
, OpaqueEventTargetRef
, OpaqueEventRef**) (in HIToolbox) + 443
3 SendMenuCommandWithContextAndModifiers (in HIToolbox) + 59
4 SendMenuItemSelectedEvent (in HIToolbox) + 254
5 FinishMenuSelection(SelectionData
, MenuResult
, MenuResult
) (in HIToolbox) + 94
6 PopUpMenuSelectCore(MenuData
, Point, double, Point, unsigned short, unsigned int, Rect const
, unsigned short, unsigned int, Rect const
, Rect const
, _CFString const, OpaqueMenuRef**, unsigned short*) (in HIToolbox) + 1673
7 _HandlePopUpMenuSelection7 (in HIToolbox) + 629
8 _NSSLMPopUpCarbonMenu3 (in AppKit) + 3916
9 _NSPopUpCarbonMenu3 (in AppKit) + 39
10 -[NSCarbonMenuImpl popUpMenu:atLocation:width:forView:withSelectedItem:withFont:withFlags:withOptions:](in AppKit) + 346
11 -[NSPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:](in AppKit) + 540
12 -[NSControl mouseDown:](in AppKit) + 820
13 -[NSWindow sendEvent:](in AppKit) + 6853
14 -[NSApplication sendEvent:](in AppKit) + 5761
15 -[QSApp sendEvent:](in Quicksilver) (QSApp.m:133)
16 -[NSApplication run](in AppKit) + 636
17 NSApplicationMain (in AppKit) + 869
18 main (in Quicksilver) (main.m:21)
19 start (in Quicksilver) + 52
20 0x00000003 (in Quicksilver)


Reply to this email directly or view it on GitHubhttps://github.com/quicksilver/Quicksilver/pull/1276#issuecomment-11999630.

@skurfer
Member
skurfer commented Jan 8, 2013

Much better. I'll play with it a bit.

@skurfer

Could this have the same problem we saw on the other branch?

Owner
@skurfer
Member
skurfer commented Jan 15, 2013

Another one waiting to use runOnMainQueueSync()? :-)

@pjrobertson
Member

Yep, as soon as release is merged into master, I'll rebase and add the commit
If there's a conflict, you can just merge this and the other pull request and I'll do a single commit to fix 'em all

@skurfer skurfer merged commit 95a66b3 into quicksilver:master Jan 17, 2013
@skurfer
Member
skurfer commented Jan 17, 2013

…I'll do a single commit to fix 'em all

You're up. :-)

@pjrobertson pjrobertson deleted the pjrobertson:addCatalogAction branch Jan 17, 2013
@philostein
Contributor

QS hangs whenever I use the 'Add To Catalog' action. The folder is added, but I have to relaunch to use QS again. Nothing seems to go to Console. Using 3947 updated from QSapp.com's ß71.

@pjrobertson
Member

See #1388

It'll be fixed in the final release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment