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

check item_proxy attribute before calling - sni_system_tray #227

Merged
merged 1 commit into from
May 25, 2023

Conversation

t-gitt
Copy link
Contributor

@t-gitt t-gitt commented May 25, 2023

not sure why this happens. But it was preventing my tray to load. Added some checks so that it can have a safe fallback and not break if this item_proxy doesn't have these attributes.

related to #224

image

@t-gitt t-gitt changed the title check item_proxy attribute before calling - sni_system_tray #224 check item_proxy attribute before calling - sni_system_tray May 25, 2023
@nwg-piotr
Copy link
Owner

related to #224

Does it resolve the Discord icon missing issue on your side? I only see a blank space in the place where the icon should be.

@nwg-piotr nwg-piotr merged commit 35021e5 into nwg-piotr:master May 25, 2023
@t-gitt
Copy link
Contributor Author

t-gitt commented May 26, 2023

I don't use Discord. I only have my bluetooth manager tray (which was not shown before this pr fix as the tray module was breaking).
I installed discord, I also can't see its tray icon.

When I did this I added a breakpoint item.py:60 so here are some variables values. Maybe they will help you in debugging, maybe this dasbus library was updated or something.

self.__dict__
{'service_name': ':1.714', 'object_path': '/org/blueman/sni', 'on_loaded_callback': <bound method StatusNotifierHostInterface.item_loaded_handler of <nwg_panel.modules.sni_system_tray.host.StatusNo
tifierHostInterface object at 0x7f9647eb3450>>, 'on_updated_callback': <bound method StatusNotifierHostInterface.item_updated_handler of <nwg_panel.modules.sni_system_tray.host.StatusNotifierHostInterface object
 at 0x7f9647eb3450>>, 'session_bus': <dasbus.connection.SessionMessageBus object at 0x7f9647eb2dd0>, 'properties': {'ItemIsMenu': True}, 'item_proxy': <dasbus.client.proxy.ObjectProxy object at 0x7f9647e77380>, 
'item_observer': DBusObserver(:1.714)}                         
                                                                                                                                                    
self.item_proxy
<dasbus.client.proxy.ObjectProxy object at 0x7f9647e77380>
                                                                                                                                    
self.item_proxy.__dir__()
['__module__', '__doc__', '__slots__', '_locals', '__init__', '_get_interface', '_interface_names', '__abstractmethods__', '_abc_impl', '_get_member', '_create_member', '__getattr__', '
__setattr__', '_handler', '_lock', '_members', '__weakref__', '__new__', '__repr__', '__hash__', '__str__', '__getattribute__', '__delattr__', '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__reduc
e_ex__', '__reduce__', '__getstate__', '__subclasshook__', '__init_subclass__', '__format__', '__sizeof__', '__dir__', '__class__']                                                                                

self.item_proxy._interface_names
{'ItemIsMenu': 'org.kde.StatusNotifierItem', 'Menu': 'org.kde.StatusNotifierItem', 'ToolTip': 'org.kde.StatusNotifierItem', 'Title': 'org.kde.StatusNotifierItem', 'Status': 'org.
kde.StatusNotifierItem', 'IconName': 'org.kde.StatusNotifierItem', 'Id': 'org.kde.StatusNotifierItem', 'Category': 'org.kde.StatusNotifierItem', 'NewToolTip': 'org.kde.StatusNotifierItem', 'NewStatus': 'org.kde.
StatusNotifierItem', 'NewIcon': 'org.kde.StatusNotifierItem', 'Activate': 'org.kde.StatusNotifierItem', 'PropertiesChanged': 'org.freedesktop.DBus.Properties', 'Set': 'org.freedesktop.DBus.Properties', 'GetAll':
 'org.freedesktop.DBus.Properties', 'Get': 'org.freedesktop.DBus.Properties', 'GetMachineId': 'org.freedesktop.DBus.Peer', 'Ping': 'org.freedesktop.DBus.Peer', 'Introspect': 'org.freedesktop.DBus.Introspectable'
}

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

Successfully merging this pull request may close these issues.

2 participants