2007-07-20 Mike Kestner <mkestner@novell.com>
* gtk/Calendar.custom : workaround invalid states in widget when raising month_changed signals. [Fixes #78524] svn path=/trunk/gtk-sharp/; revision=82387
This commit is contained in:
parent
cdf0658754
commit
6501e5e0ba
2 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-07-20 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* gtk/Calendar.custom : workaround invalid states in widget when
|
||||
raising month_changed signals. [Fixes #78524]
|
||||
|
||||
2007-07-20 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* gtk/gtk-api-2.10.raw : refresh.
|
||||
|
|
|
@ -26,7 +26,15 @@ public DateTime GetDate ()
|
|||
{
|
||||
uint year, month, day;
|
||||
GetDate (out year, out month, out day);
|
||||
return new DateTime ((int) year, (int) month + 1, (int) day);
|
||||
DateTime result;
|
||||
try {
|
||||
result = new DateTime ((int) year, (int) month + 1, (int) day);
|
||||
} catch (ArgumentOutOfRangeException) {
|
||||
// Kluge to workaround GtkCalendar being in an invalid state
|
||||
// when raising month_changed signals, like in bug #78524.
|
||||
result = new DateTime ((int) year, (int) month + 1, DateTime.DaysInMonth ((int) year, (int) month + 1));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue