Iconifying a console window

A forum for general AmigaOS 4.x support questions that are not platform-specific

Re: Iconifying a console window

Postby tonyw » Tue Mar 12, 2019 12:46 am

Exactly.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1381
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: Iconifying a console window

Postby Amigo1 » Tue Mar 12, 2019 1:45 pm

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
Amigo1
 
Posts: 191
Joined: Sun Jan 01, 2012 4:32 pm

Re: Iconifying a console window

Postby broadblues » Tue Mar 12, 2019 2:35 pm

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 2:43 pm, edited 2 times in total.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 590
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

Re: Iconifying a console window

Postby broadblues » Tue Mar 12, 2019 2:37 pm

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
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 590
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

Re: Iconifying a console window

Postby Amigo1 » Wed Mar 13, 2019 8:22 pm

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:
User avatar
Amigo1
 
Posts: 191
Joined: Sun Jan 01, 2012 4:32 pm

Previous

Return to General AmigaOS

Who is online

Users browsing this forum: No registered users and 3 guests

cron