Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin numbering when adding plugins is unexpected #2126

Open
isf63 opened this issue Sep 28, 2024 · 2 comments
Open

Plugin numbering when adding plugins is unexpected #2126

isf63 opened this issue Sep 28, 2024 · 2 comments

Comments

@isf63
Copy link
Contributor

isf63 commented Sep 28, 2024

I've never been able to predict the panel plugins' numbering when adding plugins. It presents no significant issue to the end user, but they may be confused by the numbering displayed in Configure Panel -> Widgets. It also confuses people who look at ~/.config/panel.conf.

Expected Behavior

Plugin numbering when adding new plugins coincides with what exists in panel.conf

Current Behavior

Plugin numbering when adding new plugins is hard to predict. (May be fixed by restarting the panel after deleting plugins.)

Possible Solution

Read panel.conf upon adding a new plugin.

Steps to Reproduce (for bugs)
  1. Remove all panels but one and remove all plugins.
  2. Check ~/.config/lxqt/panel.conf and confirm the only sections are [General] and one for the panel.
  3. Manage Widgets -> Add -> and add one of every plugin type.
  4. Observe how about half of the plugins say "2" (e.g. "volume2"), despite no others existing.
System Information
  • LXQt Version: git
  • Distribution & Version: Arch Linux
  • Qt Version: 6.7.2
  • liblxqt Version: git
@tsujan
Copy link
Member

tsujan commented Sep 28, 2024

Yes, it was also weird to me many years ago, but since there was no real problem, I overlooked its ugliness. I might not find the time to look into it soon but will review PRs.

@isf63
Copy link
Contributor Author

isf63 commented Sep 28, 2024

This is a relevant function:

QString PanelPluginsModel::findNewPluginSettingsGroup(const QString &pluginType) const

It seemingly is correct. Starts with <plugin_name> and continues up with <plugin_name>N.

This leads me to believe this is the offending function:

void PanelPluginsModel::addPlugin(const LXQt::PluginInfo &desktopFile)
It needs to re-read panel.conf before calling findNewPluginSettingsGroup.

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

No branches or pull requests

2 participants