YAPA icon indicating copy to clipboard operation
YAPA copied to clipboard

ShowInTaskbar feature does not work

Open microgynon opened this issue 8 years ago • 8 comments

Using the oneclick installer, ShowInTaskbar = false feature doesn't work. There's still a listing in the taskbar with a shaded "progress bar" which I find really annoying.

Changing it to ShowInTaskbar = true doesn't seem to make a difference either.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/38006815-showintaskbar-feature-does-not-work?utm_campaign=plugin&utm_content=tracker%2F2840281&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F2840281&utm_medium=issues&utm_source=github).

microgynon avatar Sep 19 '16 13:09 microgynon

I suppose you mean "Minimize to tray" setting ? What OS ?

shaded "progress bar"

Can you provide a bit more info ? Using latest YAPA version on Windows 8.1 it works fine.

floatas avatar Sep 20 '16 08:09 floatas

While YAPA is not minimized (ie; you can see the clock timer in the top right hand side of the screen), the icon for YAPA is visible on the taskbar.

I'd like to make it so that YAPA never show up on the taskbar. Tried ShowInTaskbar = false, and it doesn't seem to make a difference.

Using windows 10.

microgynon avatar Sep 20 '16 14:09 microgynon

Yes, now I remember. Long time ago someone requested this feature. There is a setting named ShowInTaskbar with default value True. Only way to change it is by editing settings file with notepad. But now with click once installer it's a bit harder to find config file. MainWindow.xaml.cs this.ShowInTaskbar = Properties.Settings.Default.ShowInTaskbar;

and when minimized application will appear in taskbar

private void MainWindow_StateChanged(object sender, EventArgs e)
        {
            if (this.WindowState == WindowState.Minimized && MinimizeToTray == true && Properties.Settings.Default.ShowInTaskbar)
            {
                Hide();
                sysTrayIcon.Visible = true;
            }

            if (!Properties.Settings.Default.ShowInTaskbar)
            {
                if (this.WindowState == WindowState.Minimized)
                {
                    sysTrayIcon.Visible = true;
                }
                else
                {
                    this.ShowInTaskbar = Properties.Settings.Default.ShowInTaskbar;
                }
            }

        }

I will try to think of better way, maybe set this setting from startup arguments.

floatas avatar Sep 20 '16 14:09 floatas

Actually I can think of four scenarios:

  • only show in tray
  • show in taskbar and tray
  • minimized to tray (current behavior)
  • never minimize to tray

fghber avatar Mar 18 '17 11:03 fghber

All of these scenarios are implemented in YAPA2, with this nasty piece of code: https://github.com/YetAnotherPomodoroApp/YAPA-2/blob/master/YAPA/Plugins/MinimizeToTray/MinimizeToTray.cs#L128-L141

floatas avatar Mar 24 '17 10:03 floatas

Cool! Is YAPA2 ready now?

fghber avatar Mar 24 '17 14:03 fghber

Well, it works, at least on my machine. There are still things that I would like to improve, but probably there always be something. I will try to find some time this week and update its description with links to installer and all.

floatas avatar Mar 24 '17 15:03 floatas

Fix from YAPA 2 can be ported here, just need to add one more setting.

floatas avatar Mar 29 '17 09:03 floatas