diff options
2 files changed, 85 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.GNOME.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.GNOME.properties new file mode 100644 index 0000000000..e0b7109145 --- /dev/null +++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.GNOME.properties @@ -0,0 +1,83 @@ +org_eclipse_swt_internal_gnome_GNOME= +GNOME_GnomeVFSMimeApplication_sizeof= + +GNOME_g_free= +GNOME_g_free_0=cast=gpointer + +GNOME_g_list_next= +GNOME_g_list_next_0= + +GNOME_g_object_unref= +GNOME_g_object_unref_0=cast=gpointer + +GNOME_gnome_icon_lookup= +GNOME_gnome_icon_lookup_0=cast=(GnomeIconTheme *) +GNOME_gnome_icon_lookup_1=cast=GnomeThumbnailFactory * +GNOME_gnome_icon_lookup_2=cast=const char * +GNOME_gnome_icon_lookup_3=cast=const char * +GNOME_gnome_icon_lookup_4=cast=GnomeVFSFileInfo * +GNOME_gnome_icon_lookup_5=cast=const char * +GNOME_gnome_icon_lookup_6=cast=GnomeIconLookupFlags +GNOME_gnome_icon_lookup_7=cast=GnomeIconLookupResultFlags * + +GNOME_gnome_icon_theme_lookup_icon= +GNOME_gnome_icon_theme_lookup_icon_0=cast=GnomeIconTheme * +GNOME_gnome_icon_theme_lookup_icon_1=cast=const char * +GNOME_gnome_icon_theme_lookup_icon_2= +GNOME_gnome_icon_theme_lookup_icon_3=cast=(const GnomeIconData **) +GNOME_gnome_icon_theme_lookup_icon_4= + +GNOME_gnome_icon_theme_new= + +GNOME_gnome_program_init= +GNOME_gnome_program_init_0=cast=const char * +GNOME_gnome_program_init_1=cast=const char * +GNOME_gnome_program_init_2=cast=const GnomeModuleInfo * +GNOME_gnome_program_init_3= +GNOME_gnome_program_init_4=cast=(char **) +GNOME_gnome_program_init_5=cast=void * + +GNOME_gnome_program_locate_file= +GNOME_gnome_program_locate_file_0=cast=GnomeProgram * +GNOME_gnome_program_locate_file_1= +GNOME_gnome_program_locate_file_2=cast=const gchar * +GNOME_gnome_program_locate_file_3=cast=gboolean +GNOME_gnome_program_locate_file_4=cast=GSList ** + +GNOME_gnome_vfs_get_registered_mime_types= + +GNOME_gnome_vfs_init= + +GNOME_gnome_vfs_mime_application_free= +GNOME_gnome_vfs_mime_application_free_0=cast=GnomeVFSMimeApplication * + +GNOME_gnome_vfs_mime_extensions_list_free= +GNOME_gnome_vfs_mime_extensions_list_free_0=cast=GList * + +GNOME_gnome_vfs_mime_get_default_application= +GNOME_gnome_vfs_mime_get_default_application_0= + +GNOME_gnome_vfs_mime_get_extensions_list= +GNOME_gnome_vfs_mime_get_extensions_list_0=cast=const char * + +GNOME_gnome_vfs_mime_get_icon= +GNOME_gnome_vfs_mime_get_icon_0= + +GNOME_gnome_vfs_mime_registered_mime_type_list_free= +GNOME_gnome_vfs_mime_registered_mime_type_list_free_0=cast=GList * + +GNOME_memmove= +GNOME_memmove_0=cast=void *,flags=no_in +GNOME_memmove_1=cast=const void * +GNOME_memmove_2=cast=size_t + + +org_eclipse_swt_internal_gnome_GnomeVFSMimeApplication= +GnomeVFSMimeApplication_id=cast=char * +GnomeVFSMimeApplication_name=cast=char * +GnomeVFSMimeApplication_command=cast=char * +GnomeVFSMimeApplication_can_open_multiple_files=cast=gboolean +GnomeVFSMimeApplication_expects_uris=cast=GnomeVFSMimeApplicationArgumentType +GnomeVFSMimeApplication_supported_uri_schemes=cast=(GList *) +GnomeVFSMimeApplication_requires_terminal=cast=gboolean + diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/motif/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/motif/org/eclipse/swt/program/Program.java index a331834572..f4a758dcaa 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Program/motif/org/eclipse/swt/program/Program.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Program/motif/org/eclipse/swt/program/Program.java @@ -253,7 +253,7 @@ static int getDesktop(Display display) { Integer desktopValue = (Integer)display.getData(DESKTOP_DATA); if (desktopValue != null) return desktopValue.intValue(); int desktop = DESKTOP_UNKNOWN; - if (isGnomeDesktop(display)) { + if (isGnomeDesktop(display) && gnome_init()) { desktop = DESKTOP_GNOME; display.setData(DESKTOP_DATA, new Integer(desktop)); return desktop; @@ -483,7 +483,6 @@ static Program gnome_getProgram(Display display, String mimeType) { static boolean gnome_init() { try { - Library.loadLibrary("swt-gnome"); return GNOME.gnome_vfs_init(); } catch (Throwable e) { return false; @@ -494,7 +493,7 @@ static boolean isGnomeDesktop(Display display) { int xDisplay = display.xDisplay; byte[] name = Converter.wcsToMbcs(null, "_WIN_SUPPORTING_WM_CHECK", true); int atom_set = OS.XInternAtom(xDisplay, name, true); - return atom_set != OS.None ? gnome_init() : false; + return atom_set != OS.None; } static String kde_convertQStringAndFree(int qString) { |