I\'m using Win7 but looking for a cross os solution, but this isnt even working in my Win7. I\'m trying to change the icon of just the current profile. So what i did was:
Well, there are some ways that spring to mind, but all with their own issues:
em:unpack and have the icon(s) in chrome/default/icons exactly. It is possible that the Firefox in question has an own set of icons bundled in the $appdir/chrome/default/icons, in particular on *nix and since they are checked first, they will be used instead of the add-on provided add-ons. So while this approach works for custom add-on windows, it might not for built-in ones. firefox.exe).Edit 1:
Actually, thinking more about it, I'd install an add-on with some platform-specific js-ctypes code that would then switch out the icons, e.g. the already mentioned WM_SETICON on Windows.
Usually you'll need a window handle for the platform APIs, which Firefox refuses to provide to JS. But as a workaround for that:
uuid.uuid titled window handle (FindWindow on Windows). mintrayr uses this scheme for Windows/Gnome(GTK/GDK), also not in js-ctypes.HICON on windows). I once had a patch somewhere on bugzilla that enabled loading of arbitrary images as window icons FWIW, but let it slide. Should be still somewhere and could give pointers. WM_SETICON for small/big icon on Windows.Edit 2
Turns out nsIBaseWindow exposes a nativeHandle these days, as I learned from your other question. so the window-title–hack isn't needed any longer. However, nativeHandle might be an 64-bit pointer, which isn't really supported in JS land without some trickery... Better not parseInt it... Also js numbers are floats.
ctypes.voidptr_t(ctypes.UInt64(nativeHandle)) should work, though.