kamhix / todoist-linux

The linux desktop application for todoist
http://todoistlinux.hakimouake.com
184 stars 17 forks source link

Added Show button to tray icon menu #3

Closed manuelsteiner closed 9 years ago

manuelsteiner commented 9 years ago

As discussed :)

i outsourced the handler into a separate method to avoid code duplication and just call the method from both when the tray icon is left clickt or the Show button from the menu is clicked.

kamhix commented 9 years ago

I try it and here are some things I detect:

manuelsteiner commented 9 years ago

The tray icon is strange for me when i start the program with

nw .

It is there but doesn't do anything sometimes. If I package the whole thing up and use the compiled program it works fine for me. I have no idea why this is the case.

For the other point, you mean to have one menu item that switches based on the current state (show Show when it's hidden and show Hide when it's in focus), basically the same as with the normal click on the tray icon?

No worries, glad I can help.

kamhix commented 9 years ago

Yes exactly. But actually the hide/show doesn't work on the click on the tray. (Can you check it)

manuelsteiner commented 9 years ago

Ah yes, sorry, my bad. It actually only shows the window because at first I didn't think it was useful to actually toggle it (i.e. the hide part) with a click... But the more I think about it, the more I like it.

I will implement it in the next few hours when I have time.

If you have any idea about the strange behaviour of the tray icon itself, let me know (but I really think it's a Linux/nw problem and not a thing we can change)

kamhix commented 9 years ago

Ok. No problem.

kamhix commented 9 years ago

For the tray icon. When I change it to the transp one it come back again. And when get the icon back it come back again. I don't know why.

manuelsteiner commented 9 years ago

So I ran into a problem. It seems like the menu item is not updating when changing its label. The actual property changes but the GUI doesn't reflect this.

Can we name the button "Show/Hide" without dynamically changing it for now? I searched all over the Internet but could not find a solution.

kamhix commented 9 years ago

yes I think you could use this solution for now.

manuelsteiner commented 9 years ago

I will test it out for a few days until I'm sure it works without flaws. So far it's really helpful. Just click the icon, add your task or whatever, click the close button and go on with your other work.

manuelsteiner commented 9 years ago

Ok so it worked pretty flawlessly for the last week for me. I should add that I'm using Gnome shell as desktop environment. I had one instance though where the tray icon wouldn't react to clicks or right clicks. I have no idea why. All the other times it worked like a charm.

kamhix commented 9 years ago

Cool I will merge it and update the app thanks again

mswiszcz commented 9 years ago

May I ask why this feature was reverted? I would like to have todoist in my tray instead of taking place on application list (I'm using Linux Mint 17.2 with cinnamon)

kamhix commented 9 years ago

It was reverted to fixed the bug with the csrf. In addition there were a little bug with the tray icon. I am planning to work on those features very soon. Thanks

mswiszcz commented 9 years ago

@kamhix If you need any help with this I may be able to help - I've forked your repository and added simple tray icon and it seems to be working, thou' the code is not perfect. I wanted to build the app to test it in production but don't know why nwbuilder hangs on 'Launching app...'

kamhix commented 9 years ago

Ok I will contact you if I want to start, thanks