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

sni-qt improvements #243

Closed
2 tasks done
bilelmoussaoui opened this issue Dec 9, 2016 · 59 comments
Closed
2 tasks done

sni-qt improvements #243

bilelmoussaoui opened this issue Dec 9, 2016 · 59 comments

Comments

@bilelmoussaoui
Copy link
Owner

bilelmoussaoui commented Dec 9, 2016

In order to get all the sni-qt issues fixed and help us improve user experience here's a list of things that i will try to sort out if have some free time soon.

  • In order to debug issues correctly. We must add a log file somewhere and save all important information; icon names, application name and stuff like that. We can save that here ~/.cache/sni-qt/logs
  • The possibility to use SVG icons too instead of using only png icons which are really ugly.
@andia89
Copy link
Collaborator

andia89 commented Dec 10, 2016

Svg is easy; I already know how to do that. We have to change the way sni-qt icons are handled than though, since we have to do everything with symlinks then.

Currently I'm trying to figure out what's wrong with teamviewer, maybe this solves also the owncloud issue (which I cannot reproduce)

@andia89
Copy link
Collaborator

andia89 commented Dec 10, 2016

It should now be possible to use svg icons instead of png icons. @bil-elmoussaoui Can you try out as well?

@bilelmoussaoui
Copy link
Owner Author

I have to build sni-qt for Archlinux first, i will report back this evening

@bilelmoussaoui
Copy link
Owner Author

By the way do you have any idea what's this is file for? /etc/xdg/sni-qt.conf?

@andia89
Copy link
Collaborator

andia89 commented Dec 10, 2016

No idea.

We have to change the way the script works slightly, in order to make it work with svg files. We can do everything symlink (doesn't matter if they are svg or png), but we have to store them in .local/share/sni-qt/icons/{app}/{size}/.

The modified sni-qt package, then looks for these folders and can determine the correct sizes. The problem is, that there is no easy way to determine original svg sizes in Qt

@andia89
Copy link
Collaborator

andia89 commented Dec 10, 2016

Yeah with my latest improvements (coding in c++ is really really hard for me). We can now use svg icons as well. But we have to change the script as I said already earlier.

Another problem is, that it is not backwards compatible, not much we can do about that unfortunately. So people will have to use that instead of the "old" patched version. I think we have to put that somewhere in the readme very prominent, just as we did it for numix-folders

@bilelmoussaoui
Copy link
Owner Author

Can you update the python script too? If you can't I will do that ;) and my C++ is not that bad, I think I will be able to implement a correct logging system

@andia89
Copy link
Collaborator

andia89 commented Dec 10, 2016

I can. But I'll do that on a separate branch for now until everything is set up correctly.

@bilelmoussaoui
Copy link
Owner Author

bilelmoussaoui commented Dec 10, 2016 via email

@andia89
Copy link
Collaborator

andia89 commented Dec 10, 2016

I guess that's fine. I don't like bzr anyways, this way we can use git, and just mirror it to github for making the ppa

@andia89
Copy link
Collaborator

andia89 commented Dec 10, 2016

Pushed changes to cript to new branch sni-qt

@bilelmoussaoui
Copy link
Owner Author

Looks OK for me, but you have removed the chrome script :P

@andia89
Copy link
Collaborator

andia89 commented Dec 10, 2016

added it again :)

Let's finish the sni-qt programming before we push this to master...

Can you to the transfer to git? I'll add the import on launchpad then who does all the stuff necessary for the ppa

@bilelmoussaoui
Copy link
Owner Author

Done https://github.com/bil-elmoussaoui/sni-qt, i created a PPA just for sni-qt as we can't keep both of them on the same repo (as a branch for example...); Once the script grows bigger, we might move from a simple project repository to a much complex one.

Added you also as a collaborator. I couldn't keep the bzr log history of commits and move it to git as bzr fastimport does not support feature commit-properties. And there's some useful information on the README file of the repository by the way.

I will work on creating a proper Arch package, and see if it's possible to do the same for Fedora. Once it's done, we merge the sni-qt branch

@andia89
Copy link
Collaborator

andia89 commented Dec 11, 2016

I think it would be a good idea to add this to the Same ppa. We can use git Import on launchpaf

@andia89
Copy link
Collaborator

andia89 commented Dec 11, 2016

I uploaded the new git based sni-qt to the ppa. It seems to work. TeamViewer still doesnt though

@bilelmoussaoui
Copy link
Owner Author

Just tried the new PPA on xubuntu. I think that the Installation of Hardcode-Tray is not working as it's supposed to. The hardcode-tray file should be installed on /usr/bin instead of /opt/Hardcode-Tray/

@andia89
Copy link
Collaborator

andia89 commented Dec 11, 2016

But it Generates a symlink, doesnt it?

@bilelmoussaoui
Copy link
Owner Author

Nop it doesn't as far as i can see. I tried hardcode-tray but i get the following message hardcode-tray: command not found

@bilelmoussaoui
Copy link
Owner Author

also, we must bump the version number of sni-qt on our PPA as Ubuntu provide a non patched version of sni-qt with the version 0.2.8.0. Maybe using 0.2.8.1 for the beta tests and after that we release a 0.2.9.0; what do you think?
Also, we can enable debugging by default; in order to avoid users modifying files with root permissions

@andia89
Copy link
Collaborator

andia89 commented Dec 11, 2016

Hmm. It does for me. I included a postinst routine that generates the symlink

@andia89
Copy link
Collaborator

andia89 commented Dec 11, 2016

the latest version ubuntu provides is 2.7.0 so ours should be newer, actually. I don't get how the debugging works. Where is the log stored?

@bilelmoussaoui
Copy link
Owner Author

On Ubuntu 16.04 i have 0.2.8 :P

@andia89
Copy link
Collaborator

andia89 commented Dec 11, 2016

because you were installing from the previous ppa :P, not the official ubuntu sources. It doesn't make a lot of sense to bump the version number to 0.2.8 because if ubuntu releases a new version, this version might be 0.2.8 which means that we should adapt our patches

@andia89
Copy link
Collaborator

andia89 commented Dec 11, 2016

BTW: I'm not sure it is a good idea that we changed the README just yet, because for now the script is not compatible with the ppa

@bilelmoussaoui
Copy link
Owner Author

Alright! For the PPA, i will revert that ;) Btw, the svg icons or the patch doesn't seem to work as it should here on XFCE
screenshot_2016-12-11_15-36-17
On this screenshot, the missing icon is used instead of Skype icons;

@andia89
Copy link
Collaborator

andia89 commented Dec 11, 2016

Hmm. Do the icons exist in /tmp?
And you have installed the sni-qt:i386 version from the ppa?
YOu should have a folder called ~/.local/share/sni-qt/skype/24/...svg do you have that?

@bilelmoussaoui
Copy link
Owner Author

No icons on /tmp. Only an empty folder, which is normal? the sni-qt:i386 is installed and i do have those icons
screenshot_2016-12-11_15-52-53

@andia89
Copy link
Collaborator

andia89 commented Dec 13, 2016

For me it works also with 24px icons, you sure you're not doing anything wrong?

@bilelmoussaoui
Copy link
Owner Author

I have removed XFCE the same day as i fucked up everything on my system.. I will reinstall it later and see if i can reproduce the same issue

@bilelmoussaoui
Copy link
Owner Author

Okey, i have tried the latest PPA of sni-qt, on elementary OS 0.4. I have installed both skype and megasync; Megasync works fine, but skype does not :(
screenshot from 2016-12-15 02 27 20

@KottV
Copy link

KottV commented Dec 15, 2016

what megasync version you have? version <2.9.9 was Qt4-based, thus worked fine
my latest 2.9.10 uses Qt5, so, icon cannot be overrided (i guess)?

@andia89
Copy link
Collaborator

andia89 commented Dec 15, 2016

what icons to you have in .local/share/sni-qt/icons? and in /tmp

@KottV
Copy link

KottV commented Dec 15, 2016

I got some troubles right now: #250
so, there no any icons in .local/share/sni-qt/icons

AFAIK, Qt5-apps works with notification protocol native, without sni-qt (which for Qt4, obviously)

@bilelmoussaoui
Copy link
Owner Author

@KottV I'm using MegaSync 2.9.10-25
@wa4557 Sorry for the delay, I had svg icons under 24 or 22 folder. I tried to use png icons but nothing changed :( is there a way to log each icon path? so we can see if the icons paths are correct or not. And we have also to enable logging by default and get the log file (we might need to add those information later to the wiki)

@KottV
Copy link

KottV commented Dec 28, 2016

Excuse me for offtop, is your megasync built against Qt5?

@bilelmoussaoui
Copy link
Owner Author

The default deb package is built using qt4 but on archlinux the package is built using qt5. And I really don't have any idea how to get that fixed as the icons are saved on tmp..

@andia89
Copy link
Collaborator

andia89 commented Jan 1, 2017

Ok so the Icons are in the tmp folders?

@bilelmoussaoui
Copy link
Owner Author

@wa4557 on XFCE the icons are shown in tmp folder. But on on Archlinux, i couldn't find the icons anywhere :( and i don't know if we can modify the binary file (just by looking at the result of hexdump and xxd)

@andia89
Copy link
Collaborator

andia89 commented Jan 1, 2017

Wait what are We talking about? Which binary File? So it works in xfce but Not on Arch? Are you using the correct code for Arch?

@bilelmoussaoui
Copy link
Owner Author

I was talking about megasync icons. On elementary, skype icons are not on tmp folder and i was using the correct script and the correct version of sni-qt.

@andia89
Copy link
Collaborator

andia89 commented Jan 1, 2017

Fine. But this issue ist about sni-qt . I still sonst understand if my Code is now working or Not.

@andia89
Copy link
Collaborator

andia89 commented Jan 1, 2017

Sni qt only works for qt4. It will NEVER work for qt5

@bilelmoussaoui
Copy link
Owner Author

I think skype is like using an old version of Qt, which causes those issues. I will try with other qt applications that uses sni-qt and will see what i got ;)

@bilelmoussaoui
Copy link
Owner Author

bilelmoussaoui commented Jan 2, 2017

@wa4557 Just tried the following application

  • Flareget : works fine
  • Bitcoin does not work even if the icon in /tmp is the correct icon (and it keep using the non monochrome icon) i will restart my system and try again
  • Megasync works fine
  • OwnCloud does not work as per ownCloud Not Being Fixed #226
  • Skype neither
  • Mumble works fine
  • Museeq works fine too
    Edit
  • Seafile does not work at all, the same issue as owncloud (built using qt5?)

@bilelmoussaoui
Copy link
Owner Author

screenshot from 2017-01-02 23 30 49

@andia89
Copy link
Collaborator

andia89 commented Jan 3, 2017

owncloud switched to qt5 so it cannot work with sni-qt. skype is strange, since it works for me fine...
Bitcoin seems to be either qt4 or qt5 I don't know which version you are using.

@bilelmoussaoui
Copy link
Owner Author

@wa4557 bitcoin in my case is using sni-qt (so it uses qt4) but the right icon is not shown...well, i think the best idea to test all of this is to release a beta version using sni-qt; but first we need to test how the debugging works

@bilelmoussaoui
Copy link
Owner Author

@wa4557 I'm going to merge your fix for sni-qt icons to master and release a new version. And we fix the issues that the users will report ;)

@bilelmoussaoui
Copy link
Owner Author

On master! i'm going to create an AUR package for the pached version of sni-qt

@andia89
Copy link
Collaborator

andia89 commented Jan 11, 2017

That's cool! Do you know where the logs are stored?

@bilelmoussaoui
Copy link
Owner Author

Just run the application using terminal and you will have something like this

"sni-qt/31386" DEBUG 23:01:13.831 StatusNotifierItemFactory::StatusNotifierItemFactory() m_iconCacheDir: "/tmp/sni-qt_flareget_31386-VaEb1c" 
"sni-qt/31386" DEBUG 23:01:13.831 void StatusNotifierItemFactory::connectToSnw() 
"sni-qt/31386" DEBUG 23:01:13.832 void StatusNotifierItemFactory::connectToSnw() m_isAvailable: true 
"sni-qt/31386" DEBUG 23:01:13.833 virtual QAbstractSystemTrayIconSys* StatusNotifierItemFactory::create(QSystemTrayIcon*) 
"sni-qt/31386" DEBUG 23:01:13.833 StatusNotifierItem::StatusNotifierItem(QSystemTrayIcon*, IconCache*) this: StatusNotifierItem(0x1aaa9b0) 
"sni-qt/31386" DEBUG 23:01:13.834 StatusNotifierItem::StatusNotifierItem(QSystemTrayIcon*, IconCache*) m_serviceName: "org.kde.StatusNotifierItem-31386-1" 
"sni-qt/31386" DEBUG 23:01:13.834 StatusNotifierItem::StatusNotifierItem(QSystemTrayIcon*, IconCache*) m_objectPath: "/StatusNotifierItem" 
"sni-qt/31386" DEBUG 23:01:13.834 virtual void StatusNotifierItem::updateMenu() menu: QMenu(0x1a79b00) 
"sni-qt/31386" DEBUG 23:01:13.840 void StatusNotifierItemFactory::registerItem(StatusNotifierItem*) 
"sni-qt/31386" DEBUG 23:01:13.841 virtual void StatusNotifierItem::updateVisibility() NewStatus( "Active" ) 
"sni-qt/31386" DEBUG 23:01:14.015 virtual void StatusNotifierItem::showMessage(const QString&, const QString&, QSystemTrayIcon::MessageIcon, int) "FlareGet Trial" "You 

We just need to add more debug information like the icon name used by the application

@bilelmoussaoui
Copy link
Owner Author

@wa4557 btw bitcoin is working perfectly now! except TeamViewer and Skype, everything works as expected except the qt5 apps

@andia89
Copy link
Collaborator

andia89 commented Jan 12, 2017

Weird. Just downloaded megasync and fixed it using the script. I don't see anything at the terminal..

@bilelmoussaoui
Copy link
Owner Author

You should use --debug

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

No branches or pull requests

3 participants