bilelmoussaoui / Hardcode-Tray

Fixes Hardcoded tray icons in Linux
Other
863 stars 63 forks source link

Megasync tray icon not replaced #726

Closed mirenradia closed 2 years ago

mirenradia commented 2 years ago

Specifications

Expected behavior and actual behavior

The hardcoded megasync tray icon is not replaced (after a recent update).

Steps to reproduce the problem

  1. Install the above version of megasync from https://mega.io/desktop.
  2. Run sudo harcode-tray --apply

Looking at the output of dpkg -L megasync, I can see there are some status icons in /usr/share/icons/ubuntu-mono-dark/status which is not in megasync.json but replacing these manually didn't seem to work for me.

varlesh commented 2 years ago

I think this icons now used from binary

mirenradia commented 2 years ago

I think this icons now used from binary

I thought this might be the case but I couldn't see any obvious changes in their repo.

varlesh commented 2 years ago

https://github.com/meganz/MEGAsync/blob/master/src/MEGASync/gui/TransfersStateInfoWidget.cpp#L25-L35

mirenradia commented 2 years ago

https://github.com/meganz/MEGAsync/blob/master/src/MEGASync/gui/TransfersStateInfoWidget.cpp#L25-L35

This file hasn't been modified recently and, from a quick search, nor have the other files that refer to this class (e.g. TransferStateInfoWidget.ui).

varlesh commented 2 years ago

But Mega support added in 2017 (on 2021 added flatpak version for all apps ONLY, but not checked) I can't doing anything. You can check replaced tray icons or not (on /usr/share/icons/hicolor/scalable/status directory). If replcaced, but on application used red icons - this means that they are used from binary.

mirenradia commented 2 years ago

But Mega support added in 2017 (on 2021 added flatpak version for all apps ONLY, but not checked) I can't doing anything. You can check replaced tray icons or not (on /usr/share/icons/hicolor/scalable/status directory). If replcaced, but on application used red icons - this means that they are used from binary.

I'm a bit confused by what you mean here. This was working until only a few weeks ago.

varlesh commented 2 years ago

Previously, icons were supported, I confirm this. But at what point they began to be used from the binary, I do not remember

varlesh commented 2 years ago

Anyway, if now used icons from binary - we can't doing anything. You can install previous versions and check this... if needed. On last release paths for tray icons not changed: image DEB package Version: 4.6.6-5.1

varlesh commented 2 years ago

hardcode-tray database:

{
    "name": "Megasync",
    "app_path": [
        "/usr/bin/megasync",
        "/var/lib/flatpak/app/nz.mega.MEGAsync/"
    ],
    "icons_path": [
        "/usr/share/icons/hicolor/scalable/status/",
        "/var/lib/flatpak/app/nz.mega.MEGAsync/current/active/files/share/icons/hicolor/scalable/status/"
    ],
    "icons": {
        "paused": {
            "original": "megapaused.svg",
            "theme": "megapaused"
        },
        "synching": {
            "original": "megasynching.svg",
            "theme": "megasynching"
        },
        "logging": {
            "original": "megalogging.svg",
            "theme": "megalogging"
        },
        "warning": {
            "original": "megawarning.svg",
            "theme": "megawarning"
        },
        "ok": {
            "original": "megauptodate.svg",
            "theme": "megauptodate"
        },
        "alert": {
            "original": "megaalert.svg",
            "theme": "megaalert"
        }
    }
}
varlesh commented 2 years ago

Their repo: https://mega.nz/linux/repo/

varlesh commented 2 years ago

On KDE worked: image Maybe on GTK used ubuntu-mono-dark icons? You can show screenshot?

varlesh commented 2 years ago

It's very interested hm... on KDE icons not hardcoded and used from theme: image

varlesh commented 2 years ago

@mirenradia Try run from terminal with this option: XDG_CURRENT_DESKTOP=KDE megasync

mirenradia commented 2 years ago

@mirenradia Try run from terminal with this option: XDG_CURRENT_DESKTOP=KDE megasync

Hmm, I'm actually already using KDE Plasma (v5.18.8) so the XDG_CURRENT_DESKTOP environment variable is already set to KDE.

varlesh commented 2 years ago

I'm not use Mega and only test it... But current version 4.6.6 worked fine with Papirus icon theme without hardcode-tray on KDE Neon with Plasma 5.24.4