[comp.sys.mac] desktop icons

cosmos@druhi.ATT.COM (GuestRA) (01/14/88)

This is probably a dumb question, but...
I have hacked together a little application for myself.  It works now so I
gave it it's own little icon.  However, I decided to change the icon but the
finder doesn't seem to recognize the change.  I guess it's got a copy in the
Desktop and doesn't bother to look at the resource anymore.  Is there a
simple way to get the finder to recognize the new icon?  I'd rather not
rebuild the entire desktop just for this...
Ron Guest
ihnp4!druhi!cosmos

kwallich@hpsmtc1.HP.COM (Ken Wallich) (01/15/88)

>Is there a simple way to get the finder to recognize the new icon?  I'd 
>rather not rebuild the entire desktop just for this...

The simple way is rebuilding the desktop.  Doesn't take THAT long, so
I would recommend that as the "correct" way of doing it.  You can use 
RedEdit to delete your old icon, and optionally paste in your new 
one to the desktop, but bizzare things can happen if you don't do it 
right.

Or not...

--------------------
Ken Wallich			*My views are mine, and mine alone*
Consultant			"Slimey? Mud Hole? my HOME this is!"
DCI 				kwallich@hpsmtc1.HP.COM
@Hewlett Packard		...hplabs!hpsmtc1!kwallich

"Why am I soft in the middle, when the rest of my life is so hard? - P.Simon"

macak@lakesys.UUCP (Jim Macak) (01/15/88)

In article <2571@druhi.ATT.COM> cosmos@druhi.ATT.COM (GuestRA) writes:
>....
>I have hacked together a little application for myself.  It works now so I
>gave it it's own little icon.  However, I decided to change the icon but the
>finder doesn't seem to recognize the change.  I guess it's got a copy in the
>Desktop and doesn't bother to look at the resource anymore.  Is there a
>simple way to get the finder to recognize the new icon?  I'd rather not
>rebuild the entire desktop just for this...

There is an application or two (I think one is called "DeskTop Cleaner" that
would do the job for you.  I believe the 'Cleaner' is ShareWare or public
domain.  Otherwise, I bet you could get your new icon to appear by changing
the four letter CREATOR of your application.  Upon returning to the Finder
after doing this, an icon for that Creator will not be found and the Finder
should look into the application for an icon, and find the new one that you
have created.  (This might not work if you try to do it from within the Finder
with a DA like DiskTop so it might be better to make the change from within an
application using a DA or with an application that will do the job.)

Jim            USENET -->   macak@lakesys.UUCP (Jim Macak)

steele@thorin.cs.unc.edu (Oliver Steele) (01/15/88)

}Is there a simple way to get the finder to recognize the new icon?  I'd 
}rather not rebuild the entire desktop just for this...

kwallich@hpsmtc1.HP.COM (Ken Wallich) writes:
>The simple way is rebuilding the desktop.  Doesn't take THAT long, so
>I would recommend that as the "correct" way of doing it.

It does throw away all your comments, though.  If you're not running under
MultiFinder, you can use ResEdit to delete the BNDL for your application
from the Desktop file and clear the 'inited' flag.  Also delete the
0-resourse with the type of your application signature from the Desktop.
When you return to the Finder a new BNDL will be added.  Not guaranteed to
work in half a year; I suspect the Desktop format is in for some major
redesign.

If you want to keep your desktop clean, get rid of ICN# and FREF as well.
It's easier just to let things get cluttered and run DiskExpress every
once in a while.

If you ever need to rebuild the entire desktop without losing comments,
use ResEdit to copy all the FCMTs from Desktop to a new file; rebuild
the Desktop; and move the FCMTs back.  (If the type isn't FCMT then it's
something equally obvious.)

------------------------------------------------------------------------------
Oliver Steele				  ...!{decvax,ihnp4}!mcnc!unc!steele
UNC-CH LING Senior					   steele@cs.unc.edu

Life is a negative-sum game.

tedj@hpcilzb.HP.COM (Ted Johnson) (01/16/88)

I think you can get your new icon to appear if you do a "Get Info"
of the application FROM INSIDE OF ResEdit, and then uncheck the
"Inited" flag.  I don't have my notes with me, but I believe that
is the flag which tells the Finder that it has seen this application
before.         

	-Ted

sbb@esquire.UUCP (Stephen B. Baumgarten) (01/16/88)

In article <699@thorin.cs.unc.edu> steele@thorin.UUCP (Oliver Steele) writes:
>If you ever need to rebuild the entire desktop without losing comments,
>use ResEdit to copy all the FCMTs from Desktop to a new file; rebuild
>the Desktop; and move the FCMTs back.  (If the type isn't FCMT then it's
>something equally obvious.)

The easiest way of all is to use a tiny program called "Purge Icons" which
just chucks out all the ICN#s, FREFs and BNDLs.  Then, when you return to
the Finder, it builds what amounts to a new DeskTop file, although your
comments remain.  This is completely automated, although I'm sure it doesn't
work under Multifinder.  Also useful for having the Finder recognize the
new ICN# for a program you're fooling around with.

If there's any interest, send me mail, or if there's a lot, I'll post it.

-- 
   Steve Baumgarten             | "New York... when civilization falls apart,
   Davis Polk & Wardwell        |  remember, we were way ahead of you."
   ...!cmcl2!esquire!sbb        |                           - David Letterman

buzz@phoenix.Princeton.EDU (Mahboud Zabetian) (01/16/88)

I don't believe it myself, but everyonce in a while I have been able to get the
finder to update the desktop this way:

I double click on the folder that the changed icon is in, and the finder seems
to update that folder.  It works more often with the system folder.

This is very unreliable.  It never works when I want it too, but every once in
a while it does.  Now if its just a bug, I think apple should add it to the
finder code.  It seems much better than rebuilding the whole desktop of a hard
disk, especially if you have files without their creating applications.


-- 
Mahboud Zabetian				buzz@phoenix.princeton.edu
183 Little Hall 					(609) 520-1270
Princeton University, Princeton, NJ 08544		(609) 734-7760
****** Anyone need a soon-to-graduate hardware/software engineer? ********

Curtis_E_Reid@cup.portal.com (01/17/88)

Or you can rebuild the desktop by holding down the Option while exiting a
program or booting up.

steele@unc.cs.unc.edu (Oliver Steele) (01/21/88)

tedj@hpcilzb.HP.COM (Ted Johnson) writes:
>I think you can get your new icon to appear if you do a "Get Info"
>of the application FROM INSIDE OF ResEdit, and then uncheck the
>"Inited" flag.  I don't have my notes with me, but I believe that
>is the flag which tells the Finder that it has seen this application
>before.         

Almost, but the Finder takes some shortcuts that often defeat this.  If
your application has never had an icon on the desktop before, and you
want to add one (you've just added or fixed a FREF, BNDL, ICN#, or
signature resource, for instance, or set the bundle bit), then Mr.
Johnson's suggestion will work.  If, however, you've changed your
applications icon and you want the Finder to pay attention to the new
one, then you're out of luck unless you do something to the desktop file
(and a number of people have suggested different things to do to it).
The Finder sees the blank init bit, says "OK, I have to put this
applications ICN# into the Desktop file.  Let's see, what's its
signature?  'FOO '?  There's already a 'FOO ' 0 in the Desktop file, so I
guess I'm done."

------------------------------------------------------------------------------
Oliver Steele				  ...!{decvax,ihnp4}!mcnc!unc!steele
							   steele@cs.unc.edu

I know, I know, I need to change my .signature more often.  It's all
because I'm posting everything on the same day now that our news feed is
up again.  Mail me suggestions for a .signature?  I REALLY wish I'D
thought of "| <- this is not a pipe"!