Iconifying a console window

A forum for general AmigaOS 4.x support questions that are not platform-specific
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Iconifying a console window

Post by tonyw »

Exactly.
cheers
tony
User avatar
Amigo1
Posts: 221
Joined: Sun Jan 01, 2012 3:32 pm

Re: Iconifying a console window

Post by Amigo1 »

tonyw wrote:There is no way to specify your own icon to be used when iconifying a console window. However, the console looks in these three places for an icon to use. Perhaps you could overwrite one of these. The console seizes on the first icon it finds, so the one in ENVARC: is checked first:

1) ENVARC:Sys/def_shell.info
2) SYS:System/Shell.info
3) Default Project icon
What if it looked for the Default Project Icon first? The email script would probably look good with an email icon.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Iconifying a console window

Post by broadblues »

The console.device is looking in several places for 'def_shell.info' before it finds one to use.
If you want the def_shell.info icon you should be doing:

dobj = GetIconTagList(NULL,ICONGETA_GetDefaultName,"shell",ICONGETA_FailIfUnavailable,TRUE,TAG_DONE);
ENVARC: is a directory assignment while ENV: is a device that's not supposed to be accessed as a media device. Locking or opening a file in ENV: to see if a file is present would violate the styleguide for environmental variables.
No I don't think so, in this case you are not accessing an environment variable, but a 'system preset'. Remember all the prefs files are in ENV:sys If you want to access and environment variable you *must* use the API they may not always reside in ENV: in the future, but accessing prefs files and icons from there is legitimate, and infact essential it's how the whole SAVE USE CANCEL prefs paradigm works.
Last edited by broadblues on Tue Mar 12, 2019 1:43 pm, edited 2 times in total.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Iconifying a console window

Post by broadblues »

Amigo1 wrote: What if it looked for the Default Project Icon first? The email script would probably look good with an email icon.
Bt default the the def project icon is just a plain white icon that's hardly suitable for an iconfied anything let alone shell.
User avatar
Amigo1
Posts: 221
Joined: Sun Jan 01, 2012 3:32 pm

Re: Iconifying a console window

Post by Amigo1 »

broadblues wrote:
Amigo1 wrote: What if it looked for the Default Project Icon first? The email script would probably look good with an email icon.
Bt default the the def project icon is just a plain white icon that's hardly suitable for an iconfied anything let alone shell.
Right, sorry I misread that. I thought it was looking for the icon of the script itself, but it is really looking for the def_project icon in envarc:sys.. oh well.. there goes my genius idea! :lol: :roll:
Post Reply