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

tray icon problem #767

Closed
starenka opened this issue Oct 24, 2020 · 4 comments · Fixed by #805
Closed

tray icon problem #767

starenka opened this issue Oct 24, 2020 · 4 comments · Fixed by #805
Labels

Comments

@starenka
Copy link

starenka commented Oct 24, 2020

Nicotine+ version: 7a42977 (current master)
Operating System/Distribution: Debian testing, sddm & awesome

Hi folks, ever since I switched to npp 2.0+ (running from source) my tray icon is just this "page with missing stuff" (see screenshot, right next to slack icon). Any ideas, how to get "normal icon"?

(.env) starenka /opt/nicotine-plus master at 7a429774 % pip freeze
backcall==0.2.0
decorator==4.4.2
ipdb==0.13.3
ipython==7.18.1
ipython-genutils==0.2.0
jedi==0.17.2
miniupnpc==2.0.2
mutagen==1.45.1
nicotine==2.1.3.dev1
parso==0.7.1
pexpect==4.8.0
pickleshare==0.7.5
prompt-toolkit==3.0.7
ptyprocess==0.6.0
pycairo==1.19.1
Pygments==2.6.1
PyGObject==3.38.0
pytaglib==1.4.6
six==1.15.0
traitlets==4.3.3
wcwidth==0.2.5

Screenshot_20201024_152413

@starenka starenka added the bug label Oct 24, 2020
@mathiascode
Copy link
Member

Looks like we have to come up with some clever hack to get the correct icon path in Python virtual environments (relevant code location here: https://github.com/Nicotine-Plus/nicotine-plus/blob/master/pynicotine/gtkgui/tray.py#L202), unless there's a better way I'm not aware of. Until then, you'd have to copy the tray icons to /usr/share/icons/hicolor/32x32/apps, create a custom icon theme, or install a Nicotine+ package system-wide.

@starenka
Copy link
Author

starenka commented Oct 26, 2020 via email

@starenka
Copy link
Author

starenka commented Oct 26, 2020

maybe this would be a way to detect env?

starenka /tmp % python3 /tmp/env_check.py
inside venv: False

starenka /tmp % python3 -m venv tempenv
starenka /tmp % tempenv/bin/python env_check.py 
inside venv: True

starenka /tmp % cat /tmp/env_check.py 
# coding=utf-8

import sys


def inside_virtualenv():
    return hasattr(sys, 'real_prefix') or sys.base_prefix != sys.prefix


if __name__ == '__main__':
    print('inside venv: %s' % inside_virtualenv())

(tested on py 3.7 and 3.8)

@starenka
Copy link
Author

starenka commented Nov 2, 2020

cheers!

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

Successfully merging a pull request may close this issue.

2 participants