[SOLVED] Different icons for PM Desktop & PM Portable

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
buggy

[SOLVED] Different icons for PM Desktop & PM Portable

Unread post by buggy » 2014-07-12, 00:57

Hello,

Soon, as i have for intention to use both Pale Moon Desktop & Pale Moon Portable running together, i wonder if it would be possible on the taskbar to have a different icon for Pale Moon Portable? Thanks for your response in advance.
Last edited by buggy on 2014-07-13, 04:29, edited 1 time in total.

New Tobin Paradigm

Re: Different icons for PM Desktop & PM Portable

Unread post by New Tobin Paradigm » 2014-07-12, 01:56

Heh, could have a USB port sticking out of the moon kinda like this generic one I made for my portable stub turned dev launcher below.
Attachments
m2g.png
m2g.png (49.69 KiB) Viewed 5215 times

buggy

Re: Different icons for PM Desktop & PM Portable

Unread post by buggy » 2014-07-12, 02:30

Ah yes! very nice this one, if it was possible to have it by default on the download page it would be great, we see the difference very well also! About the floppy, black and placed on the upper left this is perfect for me, cause i use Directory Opus which the icon is quite similar, but with white at bottom right, so it can't be confused like that.
Attachments
snap064.jpg

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35481
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Different icons for PM Desktop & PM Portable

Unread post by Moonchild » 2014-07-12, 08:30

The problem with this suggestion is that it needs a different palemoon.exe with a different icon as the main app icon.
Which, in turn, would mean a specialized build of the main browser, which in turn would mean double builds for everything, internal updater failures (.exe checksum wouldn't match for a partial patch) and replacement of the crafted binary with custom icon by the generic ones if updated, unless I make more changes to separate and duplicate that too. That effectively doubles ALL release engineering work which I really don't want to do just for an icon.

If someone has an idea how to massage Windows into displaying a custom icon on-the-fly for a running process, I'm all ears.

EDIT: to save people from some searching, if my memory serves correctly, only the process that owns a Taskbar button can manipulate it.
An external program can't manipulate another process' Taskbar buttons (that's a security measure). A possible workaround would be to hook into the running palemoon.exe process but that's a dangerous hack-around.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Trinoc
Fanatic
Fanatic
Posts: 199
Joined: 2013-10-24, 18:09
Location: UK

Re: Different icons for PM Desktop & PM Portable

Unread post by Trinoc » 2014-07-12, 11:50

I have a similar issue in that I'd like to have two versions of Palemoon Portable, one with all of the add-ons I normally use but which blocks functionality of some pages, and one with no or minimal add-ons for those pages which give problems with the full version (I currently view these in SRware Iron but I'd prefer to use Palemoon).

I considered setting up two profiles, but it appears the portable version does not support these.

Would it not be possible to use an icon from a file (say user.ico) if that file exists, and default to the standard icon if it doesn't?

New Tobin Paradigm

Re: Different icons for PM Desktop & PM Portable

Unread post by New Tobin Paradigm » 2014-07-12, 14:41

Moonchild wrote: If someone has an idea how to massage Windows into displaying a custom icon on-the-fly for a running process, I'm all ears.

EDIT: to save people from some searching, if my memory serves correctly, only the process that owns a Taskbar button can manipulate it.
An external program can't manipulate another process' Taskbar buttons (that's a security measure). A possible workaround would be to hook into the running palemoon.exe process but that's a dangerous hack-around.
What about the chrome icon overrides. If main-window.ico overrides the icon for the main window then the taskbar should reflect this as should the caption icon. Theory needs tested though.

Alternatively, I am pretty sure shortcuts can determine the taskbar icon if not the caption icon. The only problem with THAT is that shortcuts are absolute path and can't really apply here which a stub launches the program and the taskbar has to get the icon from the window/application icon specifically.

---

THOUGH, as far as release engineering goes IF that wasn't an issue, I have a few suggestions that would be good for a portable spin of the browser code. Ifdef the shell service, importer, set default pref for check default browser off, afore mentioned icons, etc.

But I suppose it would create more work as you said it would have different offsets and such so it would be harder to pin down crashes that may only seem to be an issue on portable or normal builds of Pale Moon.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35481
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Different icons for PM Desktop & PM Portable

Unread post by Moonchild » 2014-07-12, 17:01

Simpler solution

Pale Moon still supports legacy overrides. I checked the code for it.
If I have a portable icon file that's suitable, I can easily do this in an otherwise unaltered browser that should survive internal updates.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

mgagnonlv
Lunatic
Lunatic
Posts: 266
Joined: 2013-03-05, 02:06
Location: Canada

Re: Different icons for PM Desktop & PM Portable

Unread post by mgagnonlv » 2014-07-12, 20:43

Another solution I use: Make slightly different profiles. For example, display the full menu bar, or use a different theme so you know which is your "regular" version and which is your special one.
Michel Gagnon
Montréal (Québec, Canada)

User avatar
Trinoc
Fanatic
Fanatic
Posts: 199
Joined: 2013-10-24, 18:09
Location: UK

Re: Different icons for PM Desktop & PM Portable

Unread post by Trinoc » 2014-07-12, 20:47

mgagnonlv wrote:Another solution I use: Make slightly different profiles. For example, display the full menu bar, or use a different theme so you know which is your "regular" version and which is your special one.
But would that change the appearance in the taskbar or system tray when minimized?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35481
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Different icons for PM Desktop & PM Portable

Unread post by Moonchild » 2014-07-12, 23:08

I can't seem to come up with a good design so far for the icon, but instructions to replace the icon with one of your choice is simple:
  1. Create an icon of your choice
  2. Make 2 copies of this icon, one called "default.ico", the other called "main-window.ico"
  3. Put these two files in Bin\palemoon\browser\chrome\icons\default\ under your portable Pale Moon folder
  4. Restart Pale Moon Portable.
And voilà!
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Trinoc
Fanatic
Fanatic
Posts: 199
Joined: 2013-10-24, 18:09
Location: UK

Re: Different icons for PM Desktop & PM Portable

Unread post by Trinoc » 2014-07-12, 23:37

Moonchild wrote:I can't seem to come up with a good design so far for the icon, but instructions to replace the icon with one of your choice is simple:
  1. Create an icon of your choice
  2. Make 2 copies of this icon, one called "default.ico", the other called "main-window.ico"
  3. Put these two files in Bin\palemoon\browser\chrome\icons\default\ under your portable Pale Moon folder
  4. Restart Pale Moon Portable.
And voilà!
Great, that works, thanks!

As for the design, I was just planning to re-colour the existing icon a bit, maybe making a red, eclipsed moon.

buggy

Re: Different icons for PM Desktop & PM Portable

Unread post by buggy » 2014-07-12, 23:47

Works perfectly, many thanks Moonchild :clap: :thumbup:

I could post my own icons if you agree when they will be made, and those who want to do the same it could be chouette... (is it possible in attachement to post .ico or .png with transparency please?)

White Moon below is from this huge pack: http://mattahan.deviantart.com/art/Buuf-37966044
Attachments
iconPMportable.jpg

User avatar
Trinoc
Fanatic
Fanatic
Posts: 199
Joined: 2013-10-24, 18:09
Location: UK

Re: [SOLVED] Different icons for PM Desktop & PM Portable

Unread post by Trinoc » 2014-07-13, 12:16

Creating just main-window.ico seems to do the trick. What is default.ico for?

Here's my eclipsed moon icon:
main-window.ico
Orange Palemoon
(2.19 KiB) Downloaded 1848 times

buggy

Re: [SOLVED] Different icons for PM Desktop & PM Portable

Unread post by buggy » 2014-07-13, 14:43

As apparently in attachment it is not possible .ico are shown you should add the image beside we can see it before downloading.
Also to avoid wrong pixellisation you should keep all display formats, or at least 256x256 - RVB/A

User avatar
Trinoc
Fanatic
Fanatic
Posts: 199
Joined: 2013-10-24, 18:09
Location: UK

Re: [SOLVED] Different icons for PM Desktop & PM Portable

Unread post by Trinoc » 2014-07-13, 14:53

buggy wrote:As apparently in attachment it is not possible .ico are shown you should add the image beside we can see it before downloading.
Also to avoid wrong pixellisation you should keep all display formats, or at least 256x256 - RVB/A
OK, here it is: Image (I didn't think downloading a 2kb file would be an issue)
I extracted the icon from Palemoon.exe and recoloured it without changing resolution, so it should be OK.

buggy

Re: [SOLVED] Different icons for PM Desktop & PM Portable

Unread post by buggy » 2014-07-13, 14:59

Thanks for showing it. I don't know what software you use but Pale Moon icon is in all display formats, your icon is only in 32x32 - 256 colors, so for the taskbar with small icons it can be ok but not with big icons and for the desktop shorcut.

User avatar
Trinoc
Fanatic
Fanatic
Posts: 199
Joined: 2013-10-24, 18:09
Location: UK

Re: [SOLVED] Different icons for PM Desktop & PM Portable

Unread post by Trinoc » 2014-07-13, 15:19

buggy wrote:Thanks for showing it. I don't know what software you use but Pale Moon icon is in all display formats, your icon is only in 32x32 - 256 colors, so for the taskbar with small icons it can be ok but not with big icons and for the desktop shorcut.
I just generated an icon sized for the taskbar and system tray, which is what I wanted it for. I'm sure anyone who wants a higher resolution version can generate their own.

buggy

Re: [SOLVED] Different icons for PM Desktop & PM Portable

Unread post by buggy » 2014-07-13, 15:39

Ok but if people want your nice eclipse they can't generate higher resolution from your work, so if they need big icons they can't use it, like me for example.
Also please can you stop to quote my whole posts each time you answer please, it is not recommended read the rules better please.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35481
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: [SOLVED] Different icons for PM Desktop & PM Portable

Unread post by Moonchild » 2014-07-13, 15:43

Why not use an actually eclipsed blood moon if you're going for that? :)

Here, try this one on for size.
Attachments
bloodmoon.ico
(98.02 KiB) Downloaded 170 times
Preview
Preview
bloodmoon.png (2.48 KiB) Viewed 4956 times
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Night Wing
Knows the dark side
Knows the dark side
Posts: 5151
Joined: 2011-10-03, 10:19
Location: Piney Woods of Southeast Texas, USA

Re: [SOLVED] Different icons for PM Desktop & PM Portable

Unread post by Night Wing » 2014-07-13, 16:45

Even though I don't use PM Portable, if I was using the PM portable, I do like the "blood moon" icon for the portable. :thumbup:
Linux Mint 21.3 (Virginia) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
MX Linux 23.2 (Libretto) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
Linux Debian 12.5 (Bookworm) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox

Locked