Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

prostuff1

macrumors 65816
Original poster
Jul 29, 2005
1,482
18
Don't step into the kawoosh...
I am modifying the code of Transmission to include a crude menulet. As of now it only displays the upload and download speed, pause all torrents, resume all torrents, toggle the speed limit and bring up some of the Transmission windows.

The one problem I am having is that if i hide the app or minimize it and then use the menulet to bring up the main Transmission it does not come to the front.

I have done some basic searching but could not find anything.

What code would i need to add to make the window come to the front when selecting it from the menulet.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
You probably need to activate the app also. Try this:
Code:
[NSApp activateIgnoringOtherApps:YES];
[window makeKeyAndOrderFront:nil];
 

hiddenpremise

macrumors regular
Make the controller for your the NIB for your window to be an NSWindowController. Then cntrl drag from that class in interface builder to the window and select "window"

In your code write
[self showWindow:self];
Or from another controller
[myNibController showWindow:self];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.