Skip to content
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

Asynchro issues #388

Merged
merged 12 commits into from Jun 30, 2011
Merged

Asynchro issues #388

merged 12 commits into from Jun 30, 2011

Conversation

pjrobertson
Copy link
Member

There were a few problems that people had reported with the asynchro icon loading changes.
This pull request hopefully fixes them.

Outside of adding a few comments and altering some header files to tidy them up, here's what I've done:

  • Added a new objectIconModified notification. The original objectModified notif was being called when the icon was changed. The corresponding method meant all actions were being reloaded every time the icon loaded: a bit wasteful. Plus, asking the actions to reload when the icon's reloaded meant any key presses in pane 2 would be lost. See issue Pane 2 loses typed letters after resolving an image in pane 1 #338
  • Made QS only refresh the results window if it's open
  • Made icons reliably load when you have things being returned to QS (cases where you rename a file or use ⌘⎋ to grab a file) See issue Renaming files causes QS to lose their preview thumbnail #339

@skurfer
Copy link
Member

skurfer commented Jun 22, 2011

Make your life easier. Just put “closes #339” or something like that in the commit message. The issue will then refer to this pull request automatically (no need to go post a link back to here manually) and when this gets merged, those issues will close on their own. :)

https://github.com/blog/831-issues-2-0-the-next-generation

@pjrobertson
Copy link
Member Author

Oh yeah, I think you mentioned that before. Thanks for the link, definitely
use it in the future :)

On 23 June 2011 00:01, skurfer <
reply@reply.github.com>wrote:

Make your life easier. Just put closes #339 or something like that in the
commit message. The issue will then refer to this pull request automatically
(no need to go post a link back to here manually) and when this gets merged,
those issues will close on their own. :)

https://github.com/blog/831-issues-2-0-the-next-generation

Reply to this email directly or view it on GitHub:
#388 (comment)

@@ -375,7 +371,7 @@ NSArray *recentDocumentsForBundle(NSString *bundleIdentifier) {
theImage = [self prepareImageforIcon:theImage];

[object setIcon:theImage];
[[NSNotificationCenter defaultCenter] postNotificationName:@"ObjectModified" object:object];
[[NSNotificationCenter defaultCenter] postNotificationName:@"ObjectIconModified" object:object];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you define a constant in Code-QuickStepCore/QSNotifications.h for the notification name and document it with a few words?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I'll do that (tomorrow-ish) for the ObjectModified notif as well if it hasn't already been done (tired)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I've doe that now. The last two commits do this.

@HenningJ
Copy link
Contributor

Cool. I knew there were a few problems with it, but never got around to looking at it.

@@ -13,6 +13,7 @@
@interface QSFileSystemObjectHandler : NSObject {
NSMutableDictionary *applicationIcons;
}
- (NSArray *)actionsForDirectObject:(QSObject *)dObject indirectObject:(QSObject *)iObject;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm? why wasn't this here...of why is it needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure now since I made this change a while ago. I have a feeling that line 287 of QSExecutor.m may have given me a warning at some point or something like that. I'm not entirely sure :/

Just tried it without this line and I don't get any different behaviour...

@pjrobertson
Copy link
Member Author

I've made a few changes. See what you think :)

There's still the debate of the actionsForDirectObject method.

@HenningJ
Copy link
Contributor

I've had another look at QSObject_FileHandling.h and I must say it's quite a mess.
For example there is the category definition @interface QSObject (QSObjectFileHandling), QSObject_FileHandling.m implements these methods in @implementation QSObject (FileHandling). I have no idea what's the implication of this, or if it even matters, but it seems wrong.
There is also the definition of the QSFileObjectCreationProtocol category on QSObject and I'm pretty sure that isn't implemented anywhere.
The same goes for QSFileCreatingHandlingProtocolon NSObject (even disregarding that "creatinghandling" just sounds very wrong ;-)).
Then there is QSFileSystemObjectHandlerwhich seems like it's supposed to be a QSObject, but instead inherits from NSObject.

As I said: it's a mess. But all of this is not really related to this pull request, so maybe it should be merged anyway, and it should be clean up in another pull request. But on the other hand, since you were already working on this file, maybe you could just clean it up now. I don't know, your choice. :-)

But I also want to add some encouraging words: I've been running this for a while now and it works great. :-)

@pjrobertson
Copy link
Member Author

I've had another look at QSObject_FileHandling.h and I must say it's quite
a mess.

Tell me something that isn't new! :P

maybe you could just clean it up now. I don't know, your choice. :-)

There are a couple of other things I want to be working on right now, and to
be honest, I don't think I know the formalities of Cocoa well enough to be
the best person for this. I am back in Wales now so I do have access to my
Cocoa books...

I've been running this for a while now and it works great. :-)

Awesome, thanks :)
I think the only underlying issue is whether (NSArray *)actionsForDirectObject:(QSObject *)dObject indirectObject:(QSObject *)iObject
should be in the .m file or not, but you've already touched upon how much of
a mess everything is.
Perhaps the solution could be to leave it in, and just add a comment saying
I added it, and that if/when someone sorts out the files they can look into
it again?

On 30 June 2011 14:13, HenningJ <
reply@reply.github.com>wrote:

I've had another look at QSObject_FileHandling.h and I must say it's quite
a mess.
For example there is the category definition @interface QSObject (QSObjectFileHandling), QSObject_FileHandling.m implements these methods in
@implementation QSObject (FileHandling). I have no idea what's the
implication of this, or if it even matters, but it seems wrong.
There is also the definition of the QSFileObjectCreationProtocol category
on QSObject and I'm pretty sure that isn't implemented anywhere.
The same goes for QSFileCreatingHandlingProtocolon NSObject (even
disregarding that "creatinghandling" just sounds very wrong ;-)).
Then there is QSFileSystemObjectHandlerwhich seems like it's supposed to
be a QSObject, but instead inherits from NSObject.

As I said: it's a mess. But all of this is not really related to this pull
request, so maybe it should be merged anyway, and it should be clean up in
another pull request. But on the other hand, since you were already working
on this file, maybe you could just clean it up now. I don't know, your
choice. :-)

But I also want to add some encouraging words: I've been running this for a
while now and it works great. :-)

Reply to this email directly or view it on GitHub:
#388 (comment)

@HenningJ
Copy link
Contributor

Perhaps the solution could be to leave it in, and just add a comment saying I
added it, and that if/when someone sorts out the files they can look into it again?

Ok, fine with me. Add that and I will merge it. :-)

@pjrobertson
Copy link
Member Author

Yaya! I've done that :)

@skurfer — also stuck in a sneaky couple of fixes #... thanks again for the heads up :)

HenningJ added a commit that referenced this pull request Jun 30, 2011
@HenningJ HenningJ merged commit 3f8d78b into quicksilver:master Jun 30, 2011
@HenningJ
Copy link
Contributor

yay

@skurfer
Copy link
Member

skurfer commented Jun 30, 2011

Cool. For what it’s worth at this point, I’ve also been running this for some time without issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants