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

displaysResult is ignored for some actions #232

Closed
skurfer opened this issue Apr 21, 2011 · 2 comments · Fixed by #254
Closed

displaysResult is ignored for some actions #232

skurfer opened this issue Apr 21, 2011 · 2 comments · Fixed by #254
Assignees
Labels
Milestone

Comments

@skurfer
Copy link
Member

@skurfer skurfer commented Apr 21, 2011

Most easily reproduced with the Calculator module.

Expected default behavior:

  1. invoke QS
  2. type = to get text input
  3. enter valid expression
  4. type to perform calculation
  5. bezel remains displayed with result in first pane
    (6. result is available for other QS actions i.e. ⌘C copies result
    to clipboard)

Current default behavior:

  1. invoke QS
  2. type = to get text input
  3. enter valid expression
  4. type to perform calculation
  5. bezel disappears
  6. user must invoke QS again to see result

This also happens with the various “Get XYZ URL” actions in the Remote Hosts module, but only if you call it as an alternate action via ⌘. If you run those actions directly, the interface is redisplayed correctly.

@ghost
Copy link

@ghost ghost commented Apr 21, 2011

the calculator works as how you'd expect it to work up until step 5 with this fix: 39e4880
it should probably select the first pane as well, which would be step 6.

@skurfer
Copy link
Member Author

@skurfer skurfer commented Apr 25, 2011

I’ve tracked this to QSInterfaceController.m:483

if ([action isKindOfClass:[QSRankedObject class]] && [(QSRankedObject *)action object])

Need to figure out what that’s testing for.

UPDATE: I guess I should have just looked at the commit you linked. :) Should it be more like this?

if (action) {
    if ([action isKindOfClass:[QSRankedObject class]] && [(QSRankedObject *)action object]) {
        QSAction* rankedAction = [(QSRankedObject *)action object];
        if (rankedAction != action) {
            [rankedAction retain];
            [action release];
            action = rankedAction;
        }
    }
    if ([action displaysResult]) {
        [self showMainWindow:self];
    }
}

Since the showMainWindow is going to be unconditional, we should only have it in there once and this will make sure it runs after the rankedAction stuff like it does now (in case that matters). I’ll implement and test on my fork, but wanted your opinion.

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

Successfully merging a pull request may close this issue.

1 participant