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

Fix TextFields, added support for delegate, make Demo.app an Agent, general cleanup, update README #7

Closed
wants to merge 7 commits into from

Conversation

ShadowLightz
Copy link

I think you know the issue with NSPopover in the Status Bar, I researched in the web about it and finally solved this problem. I also define a protocol for delegating, I think this can be useful. To simplify some tasks I also add togglePopoverand togglePopoverAnimated:.
Demo.app is now an agent. When I make the Popover FirstResponder, the MainMenu appeared and in addition there were some troubles with fullscreen apps. This change fixes this.

In the moment there is a problem when you open an additional Popover in the Status-Popover. To resolve this, you need to close this before you close the Status-Popover. To do this, the delegate methodpopupWillClosecan be used. I added a note in the README.

For better overview I added the necessary NSWindow-category to AXStatusItemPop.h und .m, so these two files are the only needed in future, too.

The other pull request isn't needed anymore. This also fixes the trouble with the Popup-Project.

I updated the Demo-Project (there are two new buttons to toggle the popover and the popover now contains a NSTextField).

Jonathan Rahn added 6 commits January 1, 2014 17:51
- Demo app is now agent-application
- added methods to toggle Popover, updated Demo
- added AXStatusItemPopupDelegate
- updated Project preferences (suggested by Xcode)
- Popup is now FirstResponder when open, updated Demo
{
[self hidePopover];
} else {
[self showPopoverAnimated:self.isAnimated];

Choose a reason for hiding this comment

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

Does it should be [self showPopoverAnimated:animated]; here, instead of self.isAnimated?

Copy link
Author

Choose a reason for hiding this comment

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

Of course your right. I'll change it and update the pull request.

@jeff-h
Copy link

jeff-h commented Mar 19, 2014

I can confirm this commit is great. Would be good to get it rolled in.

@ShadowLightz
Copy link
Author

Thanks :)
In the meantime you can use it from my github, I added there some further improvements cocerning focus handling (but is’t still not completely bugfree). As soon I have time, I will take a look into it again and make a setup for CocoaPods

@aschuch
Copy link
Owner

aschuch commented Mar 23, 2014

@ShadowLightz,

thanks for your effort, the changes look great.
I would be very happy to merge your changes into the main project.

However, I noticed that some parts of the pull request have a different coding style compared to the original project. Here are some examples:

  • Leave curly brackets inline with other code, e.g. if (self) {
  • No space between return type and method name, e.g. - (void)popupDidClose; not - (void) popupDidClose;
  • It should not be necessary to change the seperator comments to # or *

Could you make these changes to match the style of the rest of the project?

@ShadowLightz
Copy link
Author

As stated, I'm busy in the moment. You're right, it would have been better to keep the coding style in mind, I just added the changes as part of my project, later I thought about submitting a pull request.
As soon I have time (probably in one month or two) I will take a look again into this and decide whether I will rework this and update the pull.

@aschuch
Copy link
Owner

aschuch commented Mar 25, 2014

That would be great!
Thanks again for your time to contribute.

@sotirisncl
Copy link

With this implementation the

  • (void)rightMouseDown:(NSEvent *)theEvent
    {
    ...
    }

doesn't seem to fire on osx 10.7 and 10.8 any ideas?
Strange enough on 10.9 it seems to be working just fine.

The problem seems to be the imageview added programatically to the statusitem.
[self addSubview imageview]

It seems that you have to subclass the imageview and override hitTest method
as described here
http://stackoverflow.com/questions/18104039/nsview-subview-right-click-not-working-over-nsimageview

@copa copa mentioned this pull request Jun 17, 2014
@ShadowLightz
Copy link
Author

Are you still interested in this? I saw that @joeljfischer made some changes, but you didn't merged it yet. I now would have time for it, but as this work is so stupid I want to be sure it's worth it.
The problems with mission control as mentioned in Issue #13 and the crash in #16 are resolved in my current code. The window behavior is still not perfect, but much better and really usable.

@aschuch
Copy link
Owner

aschuch commented Aug 27, 2014

@ShadowLightz still interested in it. Have been away for a while, but might have some time on the weekend to look into all open issues.
Thanks for your contributions 👍

@ShadowLightz
Copy link
Author

I close this now, I made a new one with the style changes. Look at PR #21.

@jeff-h
Copy link

jeff-h commented Aug 29, 2014

Thanks @ShadowLightz !

@ShadowLightz
Copy link
Author

You're welcome!

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

5 participants