Wanderer Icon Exchange

miker1264 · 17973

new123

  • Newbie
  • *
    • Posts: 29
    • Karma: +38/-0
Reply #105 on: December 26, 2021, 11:53:08 AM
How far did you get with the icon copier?

Just an empty appwindow with drop zones, image handling was missing. I lost my source anyway... :P



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #106 on: December 26, 2021, 11:57:39 AM
How far did you get with the icon copier?

Just an empty appwindow with drop zones, image handling was missing. I lost my source anyway... :P

So you used drop zones? I setup the appwindow and msgport to generate an appmessage. But I didn't use drop zones. I intended to get the filename & mouse coordinates from the appmessage.

But after a drag-n-drop it doesn't produce an appmessage.  :(

Here is the current source code. It's a bit messy! The drag-n-drop code is in main( ). I suspect something is wrong with the AppWindow or the MsgPort for the AppWindow.


« Last Edit: December 26, 2021, 12:45:23 PM by miker1264 »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #107 on: December 26, 2021, 01:10:01 PM
Here is the small video with file without icon made with IconClone on AROS One x86

https://drive.google.com/file/d/1mIyVp7YMDtyNb-NIvjqZu5uuysEdjv1Q/view?usp=sharing


miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #108 on: December 26, 2021, 01:21:03 PM
Here is the small video with file without icon made with IconClone on AROS One x86

https://drive.google.com/file/d/1mIyVp7YMDtyNb-NIvjqZu5uuysEdjv1Q/view?usp=sharing

It can't find the default icon (def_Picture.info).

It's looking for this:
srcefile = "SYS:Prefs/Env-Archive/SYS/def_Picture.info";

We can use any default icon (def_icon). I just randomly chose one. It may change.  :)


« Last Edit: December 26, 2021, 01:24:31 PM by miker1264 »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #109 on: December 26, 2021, 02:17:59 PM
Perfect now it works fine IconClone on AROS One x86, i had deleted the "def_Picture.info" because all graphics formats have their own custom def_icon, I attach new small video that shows how it works.

https://drive.google.com/file/d/1uaV_pTepINDNEcLJhtkzZSlLiqSZHQfK/view?usp=sharing

miker if it can serve you on aminet I found SetIconType, i compiled it with GCC on AROS One x86 and it works perfectly from Shell, now i'm configuring it also on Dopus4.

The only problem is that SetIconType recognizes only the old Amiga icons and AROS "Nightly Build" icons, it does not support Glow icons and DualPNG icons.


AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #110 on: December 26, 2021, 02:28:06 PM
With this update of IconClone you have also solved another problem that you may have missed, now your IconClone can replace any icon including old Amiga icons  ;D


new123

  • Newbie
  • *
    • Posts: 29
    • Karma: +38/-0
Reply #111 on: December 26, 2021, 02:56:15 PM

But after a drag-n-drop it doesn't produce an appmessage.  :(

Here is the current source code. It's a bit messy! The drag-n-drop code is in main( ). I suspect something is wrong with the AppWindow or the MsgPort for the AppWindow.

Put all code that belongs to sigs = Wait(winmask | msgmask); after if (sigs & winmask)

Also, cleanup code is missing

Code: [Select]
RemoveAppWindow(app_winow);
and

Code: [Select]
        while(amsg = (struct AppMessage *)GetMsg(app_port))
              ReplyMsg((struct Message *)amsg);
        DeleteMsgPort(app_port);

Look at appwindow.c example from here: http://aminet.net/package/dev/src/RKRM_Libs_prgs
« Last Edit: December 26, 2021, 03:09:49 PM by new123 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #112 on: December 26, 2021, 06:01:19 PM
@new123

Amazingly the AppWindow works when I set it up correctly!  ;)

Working out the mouse coordinates for the drop zones was easier than I thought it would be.

The last bit to do is to EraseRectangle before displaying the icon image in the correct drop zone.

Thanks for the hints and the link to the sample code. Icon drag-n-drop works great.  :)
« Last Edit: December 26, 2021, 07:32:28 PM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #113 on: December 26, 2021, 08:06:30 PM
AMIGASYSTEM

Try the new drag-n-drop icon feature.

Sorry about the Print Messages. They will be removed.
« Last Edit: December 26, 2021, 08:09:40 PM by miker1264 »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #114 on: December 27, 2021, 01:28:47 AM
Thanks miker, Icon drag-n-drop works great but in this mode images are not exchanged.


AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #115 on: December 27, 2021, 05:03:33 AM
Sorry miker but I found again a problem on IconClone.

If you replace an image to a "Pogetto" Icon, the Project icon loses the tool set, for example if on a "TXT" test file icon the tool "Multiview" is set, after the conversion "Multiview" is deleted and the tab remains empty.

This would not be serious, but unfortunately to write "Multiview" again you have to restart the system because the icon does not allow writing after conversion (write protection) which cannot be disabled.
« Last Edit: December 27, 2021, 06:27:27 AM by AMIGASYSTEM »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #116 on: December 27, 2021, 06:41:18 AM
It's good to find the issues and address them rather than have someone else find them later.  ;)

If I understand the problem correctly not all icon attributes especially the Protection Bits & tools are being preserved from the original icon.

Specifically the default tool set to MultiView. I should fix it. I will examine all the attributes to make sure they are correct after the exchange.

BTW after drag-n-drop the exchange does work. I accidentally uploaded the wrong version! Ooops.  ;)

« Last Edit: December 27, 2021, 07:26:03 AM by miker1264 »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #117 on: December 27, 2021, 07:44:45 AM
The latest correct version of IconClone where can I download it ?  I created a script to run IconClone so that I don't have the Shell open.

Did you have a look at the SetIconType source attached above, do you think something can be added so that it can work with DualPNG icons too ?


miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #118 on: December 27, 2021, 09:11:57 AM
The latest correct version of IconClone where can I download it ?  I created a script to run IconClone so that I don't have the Shell open.

Did you have a look at the SetIconType source attached above, do you think something can be added so that it can work with DualPNG icons too ?

Yes. I looked at the SetIconType. It merely allows you to choose a number corresponding to the Icon Type which then gets set in the attributes.

I'm planning to add a small menu system. One item will be to change type. It will likely use a numerical requester to choose the icon type.

I will upload the latest version which will work as long as you use it from a script rather than drag-n-drop. I have issues with string pointers!




AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #119 on: December 27, 2021, 09:34:20 AM
ìI'm planning to add a small menu system. One item will be to change type. It will likely use a numerical requester to choose the icon type.
Excellent

Quote
I will upload the latest version which will work as long as you use it from a script rather than drag-n-drop. I have issues with string pointers!
Here my English I think was not understood, the script I created to delete the message in the CLI, (CON: added .... Drag Icon into AppWindow)

P.S. IconClone you attached is the same as the one posted above, where the image change doesn't work