Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Faulty adjustment of icons upon change of icon theme #11

Open
pmattern opened this issue Oct 13, 2016 · 3 comments
Open

Faulty adjustment of icons upon change of icon theme #11

pmattern opened this issue Oct 13, 2016 · 3 comments

Comments

@pmattern
Copy link
Contributor

When the icon theme is changed while LXQt ConnMan Applet is running the application adopts the changes faulty and reverts to reasonable behaviour only when it's restarted.

To reproduce, say Oxygen is in use and everything is working as expected.
When Adwaita is set no icon can be seen any longer in the panel on systems with Ethernet connections only. Upon dis- and reconnecting network-wired of Adwaita is displayed all the time. On systems with WiFi connection only network-wireless of Adwaita comes up in the panel when this theme is chosen. The icon persists whenever a connection is established, upon disconnecting network-wired (sic!) is displayed. In dialog "lxqt-connman-applet" some AP's are represented by network_wireless of Adwaita while others stick with network-wireless-connected-* of Oxygen.
On both systems LXQt ConnMan Applet starts displaying correct icons when it's restarted.

Seen running 41126c9 with recent LXQt on Arch Linux. A similar issue has recently been addressed in palinek/nm-tray@abbe586.

On a side note I wonder whether empty function

IconProducer::~IconProducer()
{
}

in iconproducer.cpp exists on purpose.

@pmattern
Copy link
Contributor Author

Meanwhile it turned out the problem is to some degree related to the one solved in #12 as suggested by the following findings running f0c9425 on Arch Linux:

As for the panel upon switching to an icon theme featuring the whole set of icons that's used by LXQt ConnMan Applet some generic icons as described above may be shown for a little time only but next the proper icon is displayed without restarting lxqt-connman-applet.
Only when an icon theme is chosen that does not feature all needed icons, e. g. Tangerine, some generic icon may be shown as long as the lxqt-connman-applet instance in question is running. The fallback to the genuine SVG icons of LXQt ConnMan Applet takes places upon restarting only.

In dialogue "lxqt-connman-applet" it's different, though. The icons representing WLAN APs remain the ones of theme that was replaced until lxqt-connman-applet is restarted. (Ethernet connections are apparently always represented by some tick in a check box which hence does not have to change anyway.)

On a side note changing the icon theme several times was reproducibly causing crashes of lxqt-connman-applet upon exiting LXQt sessions on a i686 laptop I used to test WLAN connections.
Find the traces in this Gist.

@surlykke
Copy link
Contributor

There's >= 3 issues here:

  • No update of icons the dialogue: That should be fixed now.

  • The delay in updating icons: Lets say an icon is set to QIcon::fromTheme('network-wired'). An instance of QIcon is 'live' in that, when you change icon theme, it will change to what 'network-wired' means in the new theme.

    Once lxqt-connman-applet receives the iconThemeChanged event from LXQt::GlobalSettings it will change the icon to the proper one in the new theme (e.g. 'network-connect').

    I believe that the delay you're experiencing is because LXQt::GlobalSettings takes 1-2 seconds to deliver that event. I haven't looked into why.

  • The crashes: I haven't sorted this out. I must admit that when looking at lxqt-connman-applet code (which I hadn't touched in a while) I'm somewhat disgusted with it's complexity. I don't know what I was thinking.. I've decided to try to simplify it by making use of Qt's model-view framework. Hopefully in the course of 1-2 weeks I have something which might make lxqt-connman-applet easier to maintain and not crash on session-exit

@surlykke
Copy link
Contributor

surlykke commented Nov 8, 2016

So, I've rewritten lxqt-connman-applet to use Qt's model-view framework. Does this new version crash on session exit?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants