Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
85 user(s) are online (82 user(s) are browsing Forums)

Members: 0
Guests: 85

more...

Support us!

Headlines

 
  Register To Post  

iconmodule and fake icons
Quite a regular
Quite a regular


See User information
I was reading the iconmodule autodoc and I was wondering if this can be used to provide icons for files that don't have one.
let' say for example my iconmodule can generate an icon for text files that don't have one by generating a preview, or the same for image (i.e. what eastern is doing, except that eastern fake icons can't be snapshot'ed)

Back to a quiet home... At last
Go to top
Re: iconmodule and fake icons
Just popping in
Just popping in


See User information
@abalaban

I'm afraid not, since icon modules only deal with real .info files (the icon imagery), and therefore will never be called by icon.library to build a "fake" icon (from what I understood, never did any icon module...).

Go to top
Re: iconmodule and fake icons
Quite a regular
Quite a regular


See User information
@centaurz

real .info or not as we already have a PNG icon module

I was thinking about doing something similar than what eastern does but for movies in a way that *seems* more OS integrated than what eastern is doing (and also because I don't have any idea how eastern is doing )

Back to a quiet home... At last
Go to top
Re: iconmodule and fake icons
Just popping in
Just popping in


See User information
@abalaban

Nice idea
IMHO to avoid patching icon.library for such things, we would need a new plugin system that would allow some kind of "preview generator" to be called (according to the type detected by Deficons) instead of loading the icon imagery, possibly controlled by some tag. Maybe someone will hear us ...

Go to top
Re: iconmodule and fake icons
Just can't stay away
Just can't stay away


See User information
@abalaban

I was thinking this same idea few days ago. Unfortunately I don't know how to make icon modules.

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: iconmodule and fake icons
Quite a regular
Quite a regular


See User information
@TSK

great minds

BTW did you received my emails dated 18 and 24 of february ?

@centaurz

I just finished reading the icon.library autodoc and I guess eastern is probably using ICONCTRLA_SetGlobalIdentifyHook to do its stuff.

So one thing to do might be to first ICONCTRLA_GetGlobalIdentifyHook then install our own using ICONCTRLA_SetGlobalIdentifyHook, and in case it's not called for a supported file format then call the old hook (if any). this should allow chaining of IdentifyHook, but this can also be a bit long...

Back to a quiet home... At last
Go to top
Re: iconmodule and fake icons
Just can't stay away
Just can't stay away


See User information
@abalaban

Quote:
BTW did you received my emails dated 18 and 24 of february ?

Yes, I did.

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: iconmodule and fake icons
Not too shy to talk
Not too shy to talk


See User information
There is already a hook mechanism for files without icons implemented in icon.library. DefIcons makes use of it. Other programs do, too, for example FxPaint. There is no need to patch anything. Although chaining multiple hooks might look like a patch, too.

Bye,
Thomas

Go to top
Re: iconmodule and fake icons
Quite a regular
Quite a regular


See User information
@thomas

Quote:

thomas wrote:
There is no need to patch anything. Although chaining multiple hooks might look like a patch, too.


But then if you are not chaining hooks, that means that you are 'breaking' other softwares that might already have installed their own hook, weird, isn't it ?

Back to a quiet home... At last
Go to top
Re: iconmodule and fake icons
Just popping in
Just popping in


See User information
@abalaban
I had forgotten about this hook... However, like you and Thomas said, unless the hook handle all types of files you want to generate a preview for, each hook will add some more (possibly redundant) file processing in the chain. Would be better if for example Deficons called itself some kind of previewer once the type of the file is known. But it's better than patching the system .

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project