Closed GoogleCodeExporter closed 9 years ago
I presume Sergey isn't talking about a bug in the odinary minimize to the
taskbar, but a request to have SuperPutty minimze to the system tray /
notification area.
It's simple to implement if there is just one instance of SuperPutty running,
but what it there are are more? If there are multiple instances should they
minimize to multiple icons in the system tray, that would be messy.
Perhaps minimizing to the system tray should only be allowed in the 'Only allow
single instance' flag is set.
Rob
Original comment by roblow...@gmail.com
on 7 May 2012 at 8:24
For myself I have implemented mimimze to tray and have created a patch for
frmSuperPutty.cs which I will upload. Of course there should be an option
whether it should mimimize to tray or to task bar which I have not implemented.
I will not upload a patch for frmSuperPutty.Designer.cs because Visual C#
always re-arranges everything when I edit a form in the Designer.
I used a NotifyIcon called mynotifyicon and a ContextMenuStrip called
mynotifyicon_contextMenuStrip1. mynotifyicon_contextMenuStrip1 only has a
single ToolStripMenuItem called mynotifyicon_toolStripExit for exiting
SuperPutty w/o confirmation. The properties of the objects are as follows:
// mynotifyicon
//
this.mynotifyicon.ContextMenuStrip = this.mynotifyicon_contextMenuStrip1;
this.mynotifyicon.Icon = ((System.Drawing.Icon)(resources.GetObject("mynotifyicon.Icon")));
this.mynotifyicon.Text = "SuperPutty";
// I used single click for restoring the window
this.mynotifyicon.MouseClick += new System.Windows.Forms.MouseEventHandler(this.mynotifyicon_MouseClick);
//
// mynotifyicon_contextMenuStrip1
//
this.mynotifyicon_contextMenuStrip1.AutoSize = false;
this.mynotifyicon_contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(0, 0);
this.mynotifyicon_contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.mynotifyicon_toolStripExit});
this.mynotifyicon_contextMenuStrip1.Name = "mynotifyicon_contextMenuStrip1";
this.mynotifyicon_contextMenuStrip1.ShowImageMargin = false;
this.mynotifyicon_contextMenuStrip1.ShowItemToolTips = false;
this.mynotifyicon_contextMenuStrip1.Size = new System.Drawing.Size(100, 26);
//
// mynotifyicon_toolStripExit
//
this.mynotifyicon_toolStripExit.AutoSize = false;
this.mynotifyicon_toolStripExit.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.mynotifyicon_toolStripExit.Name = "mynotifyicon_toolStripExit";
this.mynotifyicon_toolStripExit.Size = new System.Drawing.Size(100, 22);
this.mynotifyicon_toolStripExit.Text = "Exit SuperPutty";
this.mynotifyicon_toolStripExit.Click += new System.EventHandler(this.mynotifyicon_toolStripExit_Click);
frmSuperPutty.Designer.cs also needs:
this.Resize += new System.EventHandler(this.frmSuperPutty_Resize);
Perhaps this could be integrated in some future release.
Original comment by breker.c...@gmail.com
on 11 May 2012 at 11:29
Patch file
Original comment by breker.c...@gmail.com
on 11 May 2012 at 11:31
Attachments:
Thanks for the patch.
added in along with a user pref (default off)
Original comment by btatey...@gmail.com
on 3 Jun 2012 at 1:28
Original issue reported on code.google.com by
anep...@gmail.com
on 31 Dec 2011 at 5:28