[Gtk-sharp-list] Glade autoconnection problem.
Kyku
kyku at os.pl
Wed Jun 22 11:29:20 EDT 2005
Hello again.
This time I'm having trouble with Glade.XML.Autoconnect. It doesn't
connect to on_window1_realize even that it is specified as the handler
in glade file. On the contrary on_window1_delete works without problems.
Here is the code:
using System;
using Gtk;
using GladeSharp;
public class Test2 {
[Glade.Widget] private Widget window1;
public void on_window1_realize(object o, EventArgs args) {
Console.WriteLine("on_window1_realize");
}
public void on_window1_delete_event(object o, EventArgs args) {
Console.WriteLine("on_window1_detele");
Application.Quit();
}
public Test2() {
Glade.XML gxml =
new Glade.XML ("test.glade", "window1", null);
gxml.Autoconnect(this);
}
public static void Main() {
Application.Init();
new Test2();
Application.Run();
}
And here, the glade file:
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
<widget class="GtkWindow" id="window1">
<property name="visible">True</property>
<property name="title" translatable="yes">window1</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<signal name="realize" handler="on_window1_realize"
last_modification_time="Wed, 22 Jun 2005 13:58:40 GMT"/>
<signal name="delete_event" handler="on_window1_delete_event"
last_modification_time="Wed, 22 Jun 2005 15:26:43 GMT"/>
<child>
<placeholder/>
</child>
</widget>
</glade-interface>
Thanks for your patience.
-------------------------------
Rejestracja domen internetowych
http://www.adresik.pl
domeny *.pl od 56 zl
domeny *.com od 28 zl
More information about the Gtk-sharp-list
mailing list