2002-06-26 Rachel Hestilow <hestilow@ximian.com>

* parser/Gtk.metadata: Change gtk_label_new to be the
	preferred constructor.

	* gdk/Event.cs: Add "IsValid" property (sometimes NULL events
	get sent in signals).

	* sample/GnomeHelloWorld.cs: Check to make sure iconlist event
	is valid.

svn path=/trunk/gtk-sharp/; revision=5462
This commit is contained in:
Rachel Hestilow 2002-06-26 11:08:22 +00:00
parent 02c9fb725c
commit 34cf63f0cc
7 changed files with 22 additions and 5 deletions

View file

@ -1,3 +1,14 @@
2002-06-26 Rachel Hestilow <hestilow@ximian.com>
* parser/Gtk.metadata: Change gtk_label_new to be the
preferred constructor.
* gdk/Event.cs: Add "IsValid" property (sometimes NULL events
get sent in signals).
* sample/GnomeHelloWorld.cs: Check to make sure iconlist event
is valid.
2002-06-26 Rachel Hestilow <hestilow@ximian.com>
* configure.in, makefile, makefile.win32: add gnome.

View file

@ -23,6 +23,12 @@ namespace Gdk {
return gtksharp_gdk_event_get_event_type (Handle);
}
}
public bool IsValid {
get {
return (Handle != IntPtr.Zero);
}
}
}
}

View file

@ -7,7 +7,7 @@ windows:
linux: gdk-sharp.dll
gdk-sharp.dll: generated/*.cs
gdk-sharp.dll: *.cs generated/*.cs
$(MCS) --unsafe --target library -L ../glib -L ../pango -L ../atk -r glib-sharp -r pango-sharp -r atk-sharp -o gdk-sharp.dll --recurse '*.cs'
clean:

File diff suppressed because one or more lines are too long

View file

@ -71,7 +71,7 @@
<constructor>gtk_toggle_button_new_with_mnemonic</constructor>
</class>
<class name="GtkLabel">
<constructor>gtk_label_new_with_mnemonic</constructor>
<constructor>gtk_label_new</constructor>
</class>
<class name="GtkMenuItem">
<constructor>gtk_menu_item_new_with_mnemonic</constructor>

View file

@ -152,7 +152,7 @@ namespace GtkSamples {
int idx = (int) sa.Args[0];
Event ev = (Event) sa.Args[1];
if (ev.Type == EventType.TwoButtonPress) {
if (ev.IsValid && ev.Type == EventType.TwoButtonPress) {
g_spawn_command_line_async ("mono " + entries[idx].program, IntPtr.Zero);
}
}

View file

@ -71,7 +71,7 @@
<constructor>gtk_toggle_button_new_with_mnemonic</constructor>
</class>
<class name="GtkLabel">
<constructor>gtk_label_new_with_mnemonic</constructor>
<constructor>gtk_label_new</constructor>
</class>
<class name="GtkMenuItem">
<constructor>gtk_menu_item_new_with_mnemonic</constructor>