Coder Social home page Coder Social logo

Comments (5)

kozec avatar kozec commented on May 29, 2024

The systray icon doesn't go away upon exiting Syncthing-GTK.

I'm aware of this, but I have yet to find way how to tell Windows to remove icon... It looks like it doesn't remove it automatically even if process owning icon exits.

Well... it just opens a "Connection was lost" window with the "Quit" button and ... that's it.

This may happen if daemon is restarting for too long, mainly because "Connection was lost" will not disappear even if connection is restored. I should probably fix that :D

from syncthing-gtk.

 avatar commented on May 29, 2024

I'm aware of this, but I have yet to find way how to tell Windows to remove icon...
It looks like it doesn't remove it automatically even if process owning icon exits.

Well, generally speaking: You need a "OnClose()" handler to send it a "NIM_DELETE" event. Maybe take a look at http://msdn.microsoft.com/en-us/library/windows/desktop/bb762159%28v=vs.85%29.aspx where they explain the Shell_NotifyIcon function.

from syncthing-gtk.

kozec avatar kozec commented on May 29, 2024

Well, I'm using Gtk.StatusIcon here, so I probably can't use native Windows API around it. But I probably can make icon invisible before exiting, so there may be "occupied" space left in systray, but without Syncthing icon.

from syncthing-gtk.

 avatar commented on May 29, 2024

Yea, that's the problem. Due to making it "cross platform" you don't really interact with the win32api class you would need to properly talk to Windows - and splitting the code into 'if platform.system="Linux"' and 'if platform.system="Windows"' sections would only add tons of complexity.

Hiding the icon / making it invisible upon exit sounds like the best idea by looking at the pygtk class reference - since there's obviously no way to explicitly "remove" or "destroy" the icon.

from syncthing-gtk.

kozec avatar kozec commented on May 29, 2024

Well, source is full of if IS_WINDOWS: do_something_crazy() anyway, but there is no chance I'm going to do third trayicon implementation with WinAPI :)

Ok, zombie icon should be gone now, I'll look to 2nd problem later or tomorow.

from syncthing-gtk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.