Author: jpobst
Date: 2008-02-04 11:48:56 -0500 (Mon, 04 Feb 2008)
New Revision: 94759

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DateTimePicker.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MonthCalendar.cs
Log:
2008-02-03  Jonathan Pobst  <[EMAIL PROTECTED]>

        * DateTimePicker.cs: Apply patch from Srikanth Madikeri so we drop
        down the MonthCalendar only on F4, not Alt+F4.
        * MonthCalendar.cs: If we are a popup, close ourselves on Alt+F4.
        [Fixes bug #358340]

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2008-02-04 16:43:50 UTC (rev 94758)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2008-02-04 16:48:56 UTC (rev 94759)
@@ -1,5 +1,12 @@
 2008-02-03  Jonathan Pobst  <[EMAIL PROTECTED]>
 
+       * DateTimePicker.cs: Apply patch from Srikanth Madikeri so we drop
+       down the MonthCalendar only on F4, not Alt+F4.
+       * MonthCalendar.cs: If we are a popup, close ourselves on Alt+F4.
+       [Fixes bug #358340]
+
+2008-02-03  Jonathan Pobst  <[EMAIL PROTECTED]>
+
        * ThemeWin32Classic.cs: For MonthCalendar, draw a dark border
        if its part of a DateTimePicker, else, use the back color.
        [Fixes bug #358339]

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DateTimePicker.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DateTimePicker.cs    
    2008-02-04 16:43:50 UTC (rev 94758)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DateTimePicker.cs    
    2008-02-04 16:48:56 UTC (rev 94759)
@@ -1495,8 +1495,11 @@
                                                break;
                                        }
                                case Keys.F4:
-                                       if (!is_drop_down_visible)
-                                               DropDownMonthCalendar();
+                                       if (!e.Alt && !is_drop_down_visible) {
+                                               DropDownMonthCalendar ();
+                                               e.Handled = true;
+                                       }
+
                                        break;
                        }
                }

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MonthCalendar.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MonthCalendar.cs 
2008-02-04 16:43:50 UTC (rev 94758)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MonthCalendar.cs 
2008-02-04 16:48:56 UTC (rev 94759)
@@ -2143,6 +2143,13 @@
                                                this.OnDateChanged (new 
DateRangeEventArgs (SelectionStart, SelectionEnd));
                                                e.Handled = true;
                                                break;
+                                       case Keys.F4:
+                                               // Close ourselves on Alt-F4 if 
we are a popup
+                                               if (e.Alt && owner != null) {
+                                                       this.Hide ();
+                                                       e.Handled = true;
+                                               }
+                                               break;
                                        default:
                                                break;
                                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to