RE: [Java-gnome-developer] Adding OptionMenuEvent to LibGlade
Brought to you by:
afcowie
From: Jeffrey M. <Jef...@Br...> - 2004-01-12 11:42:05
|
Thanks for the patch. We can apply this to our 0.8.2 support stream. Please be aware, in gtk 2.3.x the OptionMenu has been deprecated. In order to comply with the rules of the GNOME Platform Bindings this widget will also be deprecated in java-gnome -Jeff > I noticed that the Java bindings don't support OptionMenuEvent > in libglade. Here is the trivial change to add support: > > ------------------------------ > > New file glade/src/java/org/gnu/glade/OptionMenuDelegate.java: > > package org.gnu.glade; > > import java.lang.reflect.Method; > > import org.gnu.gtk.event.OptionMenuEvent; > import org.gnu.gtk.event.OptionMenuListener; > > /** > * OptionMenuListener delegate class. > * > * @author Tom Ball > */ > class OptionMenuDelegate extends ListenerDelegate implements > OptionMenuListener { > > public OptionMenuDelegate(String signal, Object owner, > Method handler, > Object target) throws NoSuchMethodException { > super(signal, owner, handler, target); > } > > public void optionMenuEvent(OptionMenuEvent event) { > fireEvent(event); > } > } > > ---------------------------------- > > Diff to ListenerDelegate.java: > > diff -u -3 -r1.7 ListenerDelegate.java > --- glade/src/java/org/gnu/glade/ListenerDelegate.java > 19 Aug 2003 12:30:42 > -0000 1.7 > +++ glade/src/java/org/gnu/glade/ListenerDelegate.java > 12 Jan 2004 01:24:55 > -0000 > @@ -42,6 +42,7 @@ > import org.gnu.gtk.event.MenuItemListener; > import org.gnu.gtk.event.MouseListener; > import org.gnu.gtk.event.NotebookListener; > +import org.gnu.gtk.event.OptionMenuListener; > import org.gnu.gtk.event.RangeListener; > import org.gnu.gtk.event.ScaleListener; > import org.gnu.gtk.event.SpinListener; > @@ -154,6 +155,7 @@ > delegateMap.put(MenuItemListener.class, > MenuItemDelegate.class); > delegateMap.put(MouseListener.class, > MouseDelegate.class); > delegateMap.put(NotebookListener.class, > NotebookDelegate.class);+ > delegateMap.put(OptionMenuListener.class, > OptionMenuDelegate.class); > delegateMap.put(RangeListener.class, > RangeDelegate.class); > delegateMap.put(ScaleListener.class, > ScaleDelegate.class); > delegateMap.put(SpinListener.class, SpinDelegate.class); > > _________________________________________________________________ > High-speed users-be more efficient online with the new MSN > Premium Internet > Software. http://join.msn.com/?pgmarket=en-us&page=byoa/prem&ST=1 > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. > Perforce is the Fast Software Configuration Management System offering > advanced branching capabilities and atomic changes on 50+ platforms. > Free Eval! http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer > |