diff --git a/ChangeLog b/ChangeLog index 7740f495c..26ab57ac4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-03-25 Gonzalo Paniagua Javier + + * api/gtk-api.xml: changed DisplayOptions by SetDisplayOptions. + * sources/Gtk.metadata: added rename hint for DisplayOptions. Moved + GtkHTMLStream hints to 'misc' area (they were in 'rename' area). + + * gtk/Calendar.custom: added a .net style GetDate override. + * sample/CalendarApp.cs: updated to new methods in the Calendar API. + 2003-03-23 Martin Baulig * glib/Object.cs (Dispose): Call `Objects.Remove (_obj)' here diff --git a/api/gtk-api.xml b/api/gtk-api.xml index 22acba81b..8dae98483 100644 --- a/api/gtk-api.xml +++ b/api/gtk-api.xml @@ -1816,7 +1816,7 @@ - + diff --git a/gtk/Calendar.custom b/gtk/Calendar.custom new file mode 100644 index 000000000..1613fc70a --- /dev/null +++ b/gtk/Calendar.custom @@ -0,0 +1,16 @@ +// Gtk.Calendar.Custom - Gtk Calendar class customizations +// +// Author: +// Gonzalo Paniagua Javier (gonzalo@ximian.com) +// +// (c) 2003 Ximian, Inc. (http://www.ximian.com) +// +// This code is inserted after the automatically generated code. + +public DateTime GetDate () +{ + uint year, month, day; + GetDate (out year, out month, out day); + return new DateTime ((int) year, (int) month + 1, (int) day); +} + diff --git a/sample/CalendarApp.cs b/sample/CalendarApp.cs index 5015756ff..33f3da22e 100755 --- a/sample/CalendarApp.cs +++ b/sample/CalendarApp.cs @@ -16,7 +16,9 @@ namespace GtkSamples { public static Calendar CreateCalendar () { Calendar cal = new Calendar(); - cal.DisplayOptions (CalendarDisplayOptions.ShowHeading | CalendarDisplayOptions.ShowDayNames | CalendarDisplayOptions.ShowWeekNumbers); + cal.DisplayOptions = CalendarDisplayOptions.ShowHeading | + CalendarDisplayOptions.ShowDayNames | + CalendarDisplayOptions.ShowWeekNumbers; return cal; } @@ -37,11 +39,7 @@ namespace GtkSamples { static void DaySelected (object obj, EventArgs args) { Calendar activatedCalendar = (Calendar) obj; - uint year, month, day; - activatedCalendar.GetDate(out year, out month, out day); - // The month is zero-based, so tweak it before output - Console.WriteLine ("Selected date: {0}/{1}/{2}", - year, month+1, day); + Console.WriteLine (activatedCalendar.GetDate ().ToString ("yyyy/MM/dd")); } static void Window_Delete (object obj, DeleteEventArgs args) diff --git a/sources/Gtk.metadata b/sources/Gtk.metadata index 28089965b..31aa9e5f4 100644 --- a/sources/Gtk.metadata +++ b/sources/Gtk.metadata @@ -317,6 +317,30 @@ + + + Write + + + + buffer + type + const-guchar* + + + + + + Write + + + + buffer + array + 1 + + + @@ -1425,26 +1449,13 @@ - - Write + + DisplayOptions - - buffer - type - const-guchar* - - - - - - Write - - - - buffer - array - 1 + + name + SetDisplayOptions