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
Rework QSTask. #1611
Rework QSTask. #1611
Conversation
You mean something like “Preferences → Extras → Show the Task Viewer automatically when tasks are created”? 😃 I've always thought that things created with “Run After Delay…” and “Run at Time…” should appear in the Task Viewer. That will let you see that they exist, when they will run, and there should be a way to remove/cancel them from there. I'm not saying you need to implement any of this now, but if we're doing major surgery, we should at least make sure the design will allow for it to be added easily later. Agreed? I’ll take a look at this tomorrow. |
Does this also obviate #1598, since it includes the renames? |
Yep, forgot to point that out ;-).
|
} | ||
- (void)cancel { | ||
@synchronized (self) { | ||
NSAssert(self.isRunning == NO, @"Asked to cancel stopped task %@", self); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The assertion happens if the condition is false, so this should be == YES
, right?
I found a couple of things by trying to implement the stuff I was talking about with “Run after Delay…” (which isn’t going to be that hard at all).
Other than the cancel method, and the progress bar issues, all seems to be working well with this. |
If you're busy, I can add the finishing touches mentioned above and do another pull. |
I'm looking at it atm.
Which hidden property ? There are many I can choose from ;-).
If you think there's a need to, I can put in (deprecated) wrappers for the old names. |
I mean the one literally named “Hidden”. The one that controls whether or not the progress bar is visible. 😃
Looks like the plug-ins mainly use |
I was wondering which one — from the 10-or-so controls/views that are hideable in that XIB — you were talking about (or the NSView itself). Now I now, though still pretty indirectly ;-). Damn, text-based communication isn't getting any easier. On a branch-related note, it seems like it doesn't work as well as when I first wrote it. I'm really wondering what's happening now because I clearly remember noticing the progress bar bug at startup, trying to debug the auto-show/hide behavior, then running it for a whole evening while in a 3-hour-long browsing and drooling in contempt that I didn't get bothered by empty task viewers popping in and out all the time ;-). Now, it won't show itself at startup (I actually If you get the time, can you confirm whether I'm going crazy or something ? ;-) |
I see it during the initial scan when I launch from the Debugger (Xcode 5 here too). Are you asking about a bug with the window or the progress bar? It's too fast to see if the progress bar looks correct, but the initial position of the panel is strange. For me, it appears at the top of the screen (behind the menu bar) and right of the screen's center. |
Okay, updated. This fixes the infinite progress bar issue, tries to make it dockable (since we're using a dockable window), and "various bug fixes". I said "tries" because — as I pointed out in the dev group a while ago — QSInterface is a mess, like in that case, the docked Task Viewer won't undock if you tickle it with you mouse because I don't know, it doesn't. I imagine it has to do with the fact that Okay, just noticed it doesn't animate when popping in... |
I'm always keen for a tickle. If you want to try and figure out why it's not working, I know a bit about it whilst I fixed the forever bug with the clipboard/shelf windows sometimes disappearing etc. I think the main thing was to do with Since you've rebased nicely, I'll have a play. This doesn't depend on any other PR right? Do we still have any 'PR dependencies'? If so, I'll concentrate on those first |
Please do ;-), it should stands alone now. You can see a side-effect of all that mess in the new |
A few minor usability things:
^ The EDIT: I like this:
|
One more thing:
|
What about my comment on line 103. That should be |
Yeah I think you're right @skurfer |
Minor update to that one. I've fixed most things you guys pointed out. Interesting points :
Sadly, that last point creates a visual glitch visible at startup because the QSDelayedScan task finishes before the QSCatalogScan task does, and it still displays through because it's not redrawn correctly when it should, and whatever |
I like those as well, so I’ll try and take a look… although I’m bogged with stuff right now, so maybe not soon. On 17 Chwef 2014, at 00:35, Etienne Samson notifications@github.com wrote:
|
subtasks = [value copy]; | ||
} | ||
- (BOOL)animateProgress { | ||
return self.progress < 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be reversed to >
? Or to put it another way, why do we need animateProgress
and indeterminateProgress
if they’re identical?
Is it just the name of the delayed scan that shows through, or would that explain the progress bar problems I see as well? The position of the progress varies, but it never appears to finish and the list never goes blank. There’s always the delayed scan overlapped with an unfinished catalog scanning task. Also, the progress bar should be hidden when |
1bde077
to
564da82
Compare
Prevents a mutated-while-enumerated exception, but creates an interesting visual glitch. Oh well...
So we don't *accidentally* reset the saved frame that was already loaded.
OK, I’m running with this once again. I know I’ve looked over the code like 3 times, so I’ll just test for real-world functionality. If it looks good, I’ll also update the NIB deployment targets (unless you want to add that here) and I’ll finally be able to work on adding “run after delay” and “run at time” commands to the task viewer. 😃 |
Three years later… Never give up hope! The change log for this might take the rest of the day. |
If I missed anything in 8636c0e, feel free to push change log updates straight to |
I think that covers it all. |
wow, awesome work guys! |
This supersedes #1603 and #1265.
Major surgery on QSTask, this makes QSTask a real model-only object, kills the deadlock issues between
QSTaskController
andQSTaskViewer
and fixes the auto-show/hide behavior once and for all (at least it seems to behave right, now ;-)) :Known issues/discussion:
HIDE_DELAY
by a few millisec, so you can see the task completed. Right now it just closes before you can even see the task has ended (which looks the same to the user, but could be nicer).target
/action
mechanism it had for task cancellation, instead relying on acancelBlock
.-(QSObject *)result
method I've killed, plus the effects of the major surgery). But I don't think that many plugins did that, and I think the API as it is is sufficient for "general user information". But if you find I broke some plugin, I'll happily revise and provide at least a private runtime equivalent.All in all, eyes are welcome so I'm breaking anything, and if you stop a thing I didn't point out in the list above, the