GNOME Bugzilla – Bug 316721
IconSource methods have incorrect names
Last modified: 2009-08-15 18:40:50 UTC
Distribution/Version: Gentoo The last three methods in IconSource.c has names that uses IconFactory instead of IconSource. JNIEXPORT jint JNICALL Java_org_gnu_gtk_IconFactory_gtk_1icon_1source_1get_1type (JNIEnv *env, jclass cls) JNIEXPORT void JNICALL Java_org_gnu_gtk_IconFactory_gtk_1icon_1source_1set_1icon_1name (JNIEnv *env, jclass cls, jobject source, jstring icon_name) JNIEXPORT jstring JNICALL Java_org_gnu_gtk_IconFactory_gtk_1icon_1source_1get_1icon_1name (JNIEnv *env, jclass cls, jobject source) This causes UnsatisfiedLinkErrors when you try to run a program that would invoke one of these commands. Test Case: import org.gnu.gtk.*; public class Main { public static void main(String[] args) throws Exception { Gtk.init(args); IconSource is = new IconSource(); is.setIconName("gnome-globe"); IconSet set = new IconSet(); set.addSource(is); Image i = new Image(set, IconSize.BUTTON); Window w = new Window(WindowType.TOPLEVEL); w.add(i); w.showAll(); Gtk.main(); } }
Created attachment 52403 [details] [review] patch to change the method names to IconSource
Thanks for the report, the test case and the patch. Applied to CVS HEAD.