Closed Cyborgscode closed 1 year ago
the problem you face is mostly due to your desktop environment (cinnamon) not being properly configured to accept system tray icons and functionality--maybe missing some extension? might be also that either qt6-svg, qt6-wayland or adwaita-qt6 are not installed to your convenience? none of these are dependencies to qpwgraph per se, but they might help the "visuals" on some gnome-based DEs; please check it out.
otoh. if you don't need it, please disable it on the menu Help > Enable System Tray Icon - OFF.
ps. the bogus title issue has been fixed on latest v0.3.7
sorry to tell you, but it's more likely that your trayicon code is outdated. I also needed to change things to at least GTK3.0, to make my tray working again.
I hope this helps a bit:
"pda" is the iconname (it's a sysicon )
"sys.argv[1]" is just an shell argument to the app.
#!/usr/bin/python
import os
import gi
import sys
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk as gtk, AppIndicator3 as appindicator
def main():
indicator = appindicator.Indicator.new("customtray", "pda", appindicator.IndicatorCategory.APPLICATION_STATUS)
indicator.set_status(appindicator.IndicatorStatus.ACTIVE)
indicator.set_menu(menu())
gtk.main()
def menu():
menu = gtk.Menu()
command_two = gtk.MenuItem(sys.argv[1] +' starten')
command_two.connect('activate', start)
menu.append(command_two)
command_one = gtk.MenuItem(sys.argv[1] +' beenden')
command_one.connect('activate', kill)
menu.append(command_one)
exittray = gtk.MenuItem('Tray beenden')
exittray.connect('activate', quit)
menu.append(exittray)
menu.show_all()
return menu
def start(_):
os.system("/usr/share/pva/pva &");
def kill(_):
os.system("/usr/share/pva/shutdown.sh")
def quit(_):
gtk.main_quit()
if __name__ == "__main__":
main()
Cyborgscode You sound a bit disrespectful to the dev, first of all because you are unaware of the context: Qt was until very recently providing legacy xembed by default in some tools, and your DE (Gnome-Cinnamon) decided to outright remove supprot for xembed by default (which is something that not even Wayland DE's did...) Second of all your solution is using Gtk libs, best case scenario the dev will have to work to adapt it, but also the dev might personally not want any Gtk lib. in his Qt program.
Tracking: https://bugzilla.redhat.com/show_bug.cgi?id=2139348 DE: Cinnamon Name : qpwgraph Version : 0.3.6 Release : 1.fc36
Closing the main window implodes into the systemtray, but icon and title are missing.
ALSO: collapsing into the tray may not the desired behavior as qpwgraph is not offering a long lasting service to the user, so it's most likely not needed after the change the user did. I suggest to remove the functionality at all.
Screenshot: