Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Can I program a 'Doze' Button / Menu command??

Can I program a 'Doze' Button / Menu command??
Thread Tools
Fresh-Faced Recruit
Join Date: Nov 2001
Location: Chicago, IL
Status: Offline
Reply With Quote
Nov 12, 2001, 02:19 PM
 
Hello,

I have come to the conclusion that I never want my machine to 'full sleep', but rather, to only 'doze'. In the Energy Saver control panel, I specified 'never' sleep the machine, but spin down the hard drives and the displays. However, when I want the machine to do this immediately, selecting 'sleep' also kills the CPU (and the network connection.) I always want my machine to be network-aware, so that it can serve webpages and accept incoming ssh/scp/file sharing/timbuktu connections.

The following URL sort of spelled it out for me:
http://developer.apple.com/techpubs/...html#TPXREF110

Therefore, I would like to create a menu item in the Apple Menu of Mac OS X 10.1 that says 'Doze', with a possible keyboard shortcut.

I would also like to create an additional button in the dialogue which pops up with you hit the Power key (or control + eject on the new pro keyboard) that says 'Doze'.

I have a copy of CodeWarrior and a lot of time on my hands. If anyone could point me at the proper resources (libraries, function calls, whatever) to achieve this, I would be most appreciative.

Or, finding out that 'it's already do-able / it's been done' would also be a nice surprise.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Nov 12, 2001, 04:39 PM
 
Both of these things are impossible. You cannot modify the Apple Menu, and there is no easy way of modifying the log out button (although it's theoretically possible by hacking loginwindow somewhat... actually, give me some $$$ and I'll do it for you! ). You can find the nib at /System/Library/CoreServices/loginwindow.app/Resources/English.lproj/ShutDownAlert.nib

Add another button there, and you can create a loadable bundle for loginwindow that creates a category for the ShutDownAlert class
I won't tell you any more than that, I don't want anybody and their mother creating loadable bundles for loginwindow -- that would be a major security risk.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:52 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2