psemiletov / tea-qt

TEA text editor
https://tea.ourproject.org
GNU General Public License v3.0
89 stars 13 forks source link

Opening in gnome (nautilus) #7

Closed Smirftsch closed 7 years ago

Smirftsch commented 7 years ago

Hey there, great editor, was looking for something like this all the time in Linux! I have some minor, but annoying problem, using gnome (nautilus) Tea refuses to open new documents when already open. I need to close it in order to load the document (.txt file). I set it as default editor in gnome. Also would be nice to have it showing up if I click a file which is already open in a tab (perhaps the same issue?). This might be some problem with gnome or tea, or both, or plain some setting I haven't found so far. I haven't tried yet in another window manager. Keep up the good work!

psemiletov commented 7 years ago

I'll try to install Gnome and test TEA in Nautilus. With KDE file opening works fine. Thank you for the report!

Smirftsch commented 7 years ago

I had an idea and tried from console: "QLocalSocket::connectToServer: Connection refused"

is what I get when already open.

Smirftsch commented 7 years ago

had some time yesterday and compiled latest git. Problem persists.

psemiletov commented 7 years ago

Thanks, I need some more time :)

psemiletov commented 7 years ago

Can you show me the contents of tea.desktop file from your system? It must be at /usr/share/applications. Nautilus uses the "exec" line from there to run TEA.

Smirftsch commented 7 years ago

[Desktop Entry] Version=1.0 Name=TEA Exec=tea %U Icon=tea Terminal=false Type=Application GenericName=TEA Text Editor Comment=Powerful text editor on Qt Comment[ru]=Функциональный текстовый редактор на Qt Categories=Utility;TextEditor; MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;

here we go :)

psemiletov commented 7 years ago

What if we change "tea %U" to "tea %f"?

Smirftsch commented 7 years ago

no changes, unfortunately.

psemiletov commented 7 years ago

So, I've tried some DE other than KDE. It seems that QLocalSocket that TEA uses for the single-application mechanism works fine at KDE only :) The logical next step for me is to rewrite single-application code and test is with different DE's. Thank's for your help! I never think that such important bug was hidden in TEA.

Smirftsch commented 7 years ago

Happy I was able to help a bit!

psemiletov commented 7 years ago

I think I have fixed it. Can you try current version from github? Now TEA, on UNIXes uses the shared memory instead of sockets, and on my Gnome now all works good as in KDE.

Smirftsch commented 7 years ago

Sorry for delay, wasn't at home a few days. Works, just one thing left perhaps, it doesn't maximize the tea window again when opening the new file, it stays minimized. No idea if this is intentional, I think such behavior can be wanted sometimes too, but if so an option to configure this behavior would be nice. Thanks!!

psemiletov commented 7 years ago

Do you mean the window maxizing or just the visibility? Currently I've add some fixes that forces to show TEA window after open the file. Is now that is the behavior you talk about?

Smirftsch commented 7 years ago

yes, that's exactly it:)

psemiletov commented 7 years ago

Thank you for your help!