Hi, Sascha, Mmmm... that's not the signature for MenuItem's activation... your signal handler seems to be more related to window deletion than to a menu item activation.
Take a look here: http://zetcode.com/gui/gtksharp/menus/ And here: http://zetcode.com/gui/gtksharp/firststeps/ In short, your method should be: == protected void OnMenuQuitActivate(object sender, EventArgs a) { Application.Quit(); } == Hope this helps, -- Baltasar El vie., 10 feb. 2017 a las 14:01, Sascha Manns (<[email protected]>) escribió: > Hello list, > > i have defined a menu item "File/Quit" like so: > > <object class="GtkMenuItem"> > <property name="visible">True</property> > <property name="can_focus">False</property> > <property name="label" translatable="yes">_Datei</property> > <property name="use_underline">True</property> > <child type="submenu"> > <object class="GtkMenu"> > <property name="visible">True</property> > <property name="can_focus">False</property> > <child> > <object class="GtkImageMenuItem" id="menuQuit"> > <property name="label">gtk-quit</property> > <property name="name">menuQuit</property> > <property name="visible">True</property> > <property name="can_focus">False</property> > <property name="use_underline">True</property> > <property name="use_stock">True</property> > <signal name="activate" handler="OnMenuQuitActivate" swapped="no"/> > </object> > </child> > </object> > </child> > </object> > > > How must be the "OnMenuQuitActivate" handler looks like, that it quits the > application? > > I tried out: > > protected void OnMenuQuitActivate(object sender, DeleteEventArgs a) { > Application.Quit(); > a.RetVal = true; > } > > > But that doesn't work. > > Greetings > Sascha > _______________________________________________ > Gtk-sharp-list maillist - [email protected] > http://lists.dot.net/mailman/listinfo/gtk-sharp-list >
_______________________________________________ Gtk-sharp-list maillist - [email protected] http://lists.dot.net/mailman/listinfo/gtk-sharp-list
