mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-08 07:53:17 +02:00
2003-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* 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. svn path=/trunk/gtk-sharp/; revision=12799
This commit is contained in:
parent
582723b68b
commit
7ab055de16
@ -1,3 +1,12 @@
|
|||||||
|
2003-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
|
||||||
|
|
||||||
|
* 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 <martin@ximian.com>
|
2003-03-23 Martin Baulig <martin@ximian.com>
|
||||||
|
|
||||||
* glib/Object.cs (Dispose): Call `Objects.Remove (_obj)' here
|
* glib/Object.cs (Dispose): Call `Objects.Remove (_obj)' here
|
||||||
|
@ -1816,7 +1816,7 @@
|
|||||||
<method name="ClearMarks" cname="gtk_calendar_clear_marks">
|
<method name="ClearMarks" cname="gtk_calendar_clear_marks">
|
||||||
<return-type type="void"/>
|
<return-type type="void"/>
|
||||||
</method>
|
</method>
|
||||||
<method name="DisplayOptions" cname="gtk_calendar_display_options">
|
<method name="SetDisplayOptions" cname="gtk_calendar_display_options">
|
||||||
<return-type type="void"/>
|
<return-type type="void"/>
|
||||||
<parameters>
|
<parameters>
|
||||||
<parameter type="GtkCalendarDisplayOptions" name="flags"/>
|
<parameter type="GtkCalendarDisplayOptions" name="flags"/>
|
||||||
|
16
gtk/Calendar.custom
Normal file
16
gtk/Calendar.custom
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
|
@ -16,7 +16,9 @@ namespace GtkSamples {
|
|||||||
public static Calendar CreateCalendar ()
|
public static Calendar CreateCalendar ()
|
||||||
{
|
{
|
||||||
Calendar cal = new Calendar();
|
Calendar cal = new Calendar();
|
||||||
cal.DisplayOptions (CalendarDisplayOptions.ShowHeading | CalendarDisplayOptions.ShowDayNames | CalendarDisplayOptions.ShowWeekNumbers);
|
cal.DisplayOptions = CalendarDisplayOptions.ShowHeading |
|
||||||
|
CalendarDisplayOptions.ShowDayNames |
|
||||||
|
CalendarDisplayOptions.ShowWeekNumbers;
|
||||||
return cal;
|
return cal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,11 +39,7 @@ namespace GtkSamples {
|
|||||||
static void DaySelected (object obj, EventArgs args)
|
static void DaySelected (object obj, EventArgs args)
|
||||||
{
|
{
|
||||||
Calendar activatedCalendar = (Calendar) obj;
|
Calendar activatedCalendar = (Calendar) obj;
|
||||||
uint year, month, day;
|
Console.WriteLine (activatedCalendar.GetDate ().ToString ("yyyy/MM/dd"));
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Window_Delete (object obj, DeleteEventArgs args)
|
static void Window_Delete (object obj, DeleteEventArgs args)
|
||||||
|
@ -317,6 +317,30 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
</data>
|
</data>
|
||||||
</rule>
|
</rule>
|
||||||
|
<rule>
|
||||||
|
<class name="GtkHTMLStream">
|
||||||
|
<method>Write</method>
|
||||||
|
</class>
|
||||||
|
<data>
|
||||||
|
<attribute target="param">
|
||||||
|
<filter level="name">buffer</filter>
|
||||||
|
<name>type</name>
|
||||||
|
<value>const-guchar*</value>
|
||||||
|
</attribute>
|
||||||
|
</data>
|
||||||
|
</rule>
|
||||||
|
<rule>
|
||||||
|
<class name="GtkHTMLStream">
|
||||||
|
<method>Write</method>
|
||||||
|
</class>
|
||||||
|
<data>
|
||||||
|
<attribute target="param">
|
||||||
|
<filter level="name">buffer</filter>
|
||||||
|
<name>array</name>
|
||||||
|
<value>1</value>
|
||||||
|
</attribute>
|
||||||
|
</data>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
|
||||||
<!-- constructor collision hints -->
|
<!-- constructor collision hints -->
|
||||||
@ -1425,26 +1449,13 @@
|
|||||||
</data>
|
</data>
|
||||||
</rule>
|
</rule>
|
||||||
<rule>
|
<rule>
|
||||||
<class name="GtkHTMLStream">
|
<class name="GtkCalendar">
|
||||||
<method>Write</method>
|
<method>DisplayOptions</method>
|
||||||
</class>
|
</class>
|
||||||
<data>
|
<data>
|
||||||
<attribute target="param">
|
<attribute target="method">
|
||||||
<filter level="name">buffer</filter>
|
<name>name</name>
|
||||||
<name>type</name>
|
<value>SetDisplayOptions</value>
|
||||||
<value>const-guchar*</value>
|
|
||||||
</attribute>
|
|
||||||
</data>
|
|
||||||
</rule>
|
|
||||||
<rule>
|
|
||||||
<class name="GtkHTMLStream">
|
|
||||||
<method>Write</method>
|
|
||||||
</class>
|
|
||||||
<data>
|
|
||||||
<attribute target="param">
|
|
||||||
<filter level="name">buffer</filter>
|
|
||||||
<name>array</name>
|
|
||||||
<value>1</value>
|
|
||||||
</attribute>
|
</attribute>
|
||||||
</data>
|
</data>
|
||||||
</rule>
|
</rule>
|
||||||
|
Loading…
Reference in New Issue
Block a user