/hg/icedtea-web: PR1260: IcedTea-Web should not rely on GTK

dbhole at icedtea.classpath.org dbhole at icedtea.classpath.org
Wed Jan 16 12:35:28 PST 2013


changeset 3960d2a46f51 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=3960d2a46f51
author: Deepak Bhole <dbhole at redhat.com>
date: Wed Jan 16 15:35:09 2013 -0500

	PR1260: IcedTea-Web should not rely on GTK


diffstat:

 ChangeLog                                      |  11 ++++++
 Makefile.am                                    |   6 ---
 NEWS                                           |   1 +
 acinclude.m4                                   |  41 --------------------------
 plugin/icedteanp/IcedTeaJavaRequestProcessor.h |   1 +
 plugin/icedteanp/IcedTeaNPPlugin.cc            |  28 +-----------------
 plugin/icedteanp/IcedTeaNPPlugin.h             |   3 -
 7 files changed, 14 insertions(+), 77 deletions(-)

diffs (216 lines):

diff -r 8fe3531e1769 -r 3960d2a46f51 ChangeLog
--- a/ChangeLog	Wed Jan 16 16:50:13 2013 +0100
+++ b/ChangeLog	Wed Jan 16 15:35:09 2013 -0500
@@ -1,3 +1,14 @@
+2013-01-16  Deepak Bhole <dbhole at redhat.com>
+
+	PR1260: IcedTea-Web should not rely on GTK
+	* Makefile.am: Remove GTK includes and links
+	* acinclude.m4: Remove check for GTK libs
+	* plugin/icedteanp/IcedTeaJavaRequestProcessor.h: Removed gtk.h include
+	and added unistd include (for usleep) which gtk.h brought in before
+	* plugin/icedteanp/IcedTeaNPPlugin.cc: Remove GTK dialog shown when java
+	is not found
+	* plugin/icedteanp/IcedTeaNPPlugin.h: Removed gtk.h include
+
 2013-01-16  Jiri Vanek  <jvanek at redhat.com>
 
 	Fixed set of paths to asm
diff -r 8fe3531e1769 -r 3960d2a46f51 Makefile.am
--- a/Makefile.am	Wed Jan 16 16:50:13 2013 +0100
+++ b/Makefile.am	Wed Jan 16 15:35:09 2013 -0500
@@ -303,7 +303,6 @@
 	  -DICEDTEA_WEB_JRE="\"$(SYSTEM_JRE_DIR)\"" \
 	  -DPLUGIN_BOOTCLASSPATH=$(PLUGIN_BOOTCLASSPATH) \
 	  $(GLIB_CFLAGS) \
-	  $(GTK_CFLAGS) \
 	  $(MOZILLA_CFLAGS) \
   	  -fvisibility=hidden \
 	  -fPIC -o $@ -c $<
@@ -313,7 +312,6 @@
 	$(CXX) $(CXXFLAGS) \
 	  $(PLUGIN_OBJECTS) \
 	  $(GLIB_LIBS) \
-	  $(GTK_LIBS) \
 	  $(MOZILLA_LIBS) \
 	  -shared -o $@
 
@@ -355,7 +353,6 @@
 	  -DICEDTEA_WEB_JRE="\"$(SYSTEM_JRE_DIR)\"" \
 	  -DPLUGIN_BOOTCLASSPATH=$(PLUGIN_BOOTCLASSPATH) \
 	  $(GLIB_CFLAGS) \
-	  $(GTK_CFLAGS) \
 	  $(MOZILLA_CFLAGS) \
 	  "-I$(CPP_UNITTEST_FRAMEWORK_SRCDIR)/src" \
 	  "-I$(PLUGIN_SRCDIR)" \
@@ -371,7 +368,6 @@
 	  $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS)) \
 	  $(CPP_UNITTEST_DIR)/*.o \
 	  $(GLIB_LIBS) \
-	  $(GTK_LIBS) \
 	  $(MOZILLA_LIBS) \
 	  $(CPP_UNITTEST_FRAMEWORK_LIB)\
 	  $(BUILT_CPP_UNIT_TEST_FRAMEWORK) -o $@
@@ -1226,7 +1222,6 @@
 	  -DPLUGIN_BOOTCLASSPATH=$(PLUGIN_COVERAGE_BOOTCLASSPATH) \
 	  -DCOVERAGE_AGENT=$(JACOCO_AGENT_PLUGIN_SWITCH) \
 	  $(GLIB_CFLAGS) \
-	  $(GTK_CFLAGS) \
 	  $(MOZILLA_CFLAGS) \
 	  -fvisibility=hidden \
 	  -fPIC -o $@ -c $<
@@ -1236,7 +1231,6 @@
 	$(CXX) $(CXXFLAGS) \
 	  $(PLUGIN_OBJECTS) \
 	  $(GLIB_LIBS) \
-	  $(GTK_LIBS) \
 	  $(MOZILLA_LIBS) \
 	  -shared -o $@
 
diff -r 8fe3531e1769 -r 3960d2a46f51 NEWS
--- a/NEWS	Wed Jan 16 16:50:13 2013 +0100
+++ b/NEWS	Wed Jan 16 15:35:09 2013 -0500
@@ -25,6 +25,7 @@
   - PR1217: Add command line arguments for plugins
   - PR1189: Icedtea-plugin requires code attribute when using jnlp_href
   - PR1198: JSObject is not passed to javascript correctly
+  - PR1260: IcedTea-Web should not rely on GTK
 * Common
   - PR1049: Extension jnlp's signed jar with the content of only META-INF/* is considered
   - PR955: regression: SweetHome3D fails to run
diff -r 8fe3531e1769 -r 3960d2a46f51 acinclude.m4
--- a/acinclude.m4	Wed Jan 16 16:50:13 2013 +0100
+++ b/acinclude.m4	Wed Jan 16 15:35:09 2013 -0500
@@ -359,56 +359,15 @@
 AC_MSG_RESULT(${enable_plugin})
 ])
 
-dnl ITW_GTK_CHECK_VERSION([gtk version])
-AC_DEFUN([ITW_GTK_CHECK_VERSION],
-[
-  AC_MSG_CHECKING([for GTK$1 version])
-  GTK_VER=`$PKG_CONFIG --modversion gtk+-$1.0`
-  AC_MSG_RESULT([$GTK_VER])
-])
-
-dnl ITW_GTK_CHECK([gtk version])
-AC_DEFUN([ITW_GTK_CHECK],
-[
-  case "$1" in
-    default)
-      PKG_CHECK_MODULES(GTK, gtk+-3.0,
-        [ITW_GTK_CHECK_VERSION([3])],
-        [PKG_CHECK_MODULES(GTK, gtk+-2.0,
-           [ITW_GTK_CHECK_VERSION([2])],
-           [AC_MSG_ERROR([GTK $1 not found])]
-        )]
-      )
-      ;;
-    *)
-      PKG_CHECK_MODULES(GTK, gtk+-$1.0,
-        [ITW_GTK_CHECK_VERSION([$1])],
-        [AC_MSG_ERROR([GTK $1 not found])]
-      )
-      ;;
-  esac
-])
-
 AC_DEFUN_ONCE([IT_CHECK_PLUGIN_DEPENDENCIES],
 [
 dnl Check for plugin support headers and libraries.
 dnl FIXME: use unstable
 AC_REQUIRE([IT_CHECK_PLUGIN])
 if test "x${enable_plugin}" = "xyes" ; then
-  AC_ARG_WITH([gtk],
-    [AS_HELP_STRING([--with-gtk=[2|3|default]],
-    [the GTK+ version to use (default: 3)])],
-    [case "$with_gtk" in
-       2|3|default) ;;
-       *) AC_MSG_ERROR([invalid GTK version specified]) ;;
-     esac],
-    [with_gtk=default])
-  ITW_GTK_CHECK([$with_gtk])
   PKG_CHECK_MODULES(GLIB, glib-2.0)
   AC_SUBST(GLIB_CFLAGS)
   AC_SUBST(GLIB_LIBS)
-  AC_SUBST(GTK_CFLAGS)
-  AC_SUBST(GTK_LIBS)
 
   PKG_CHECK_MODULES(MOZILLA, npapi-sdk, [
     AC_CACHE_CHECK([for xulrunner version], [xulrunner_cv_collapsed_version],[
diff -r 8fe3531e1769 -r 3960d2a46f51 plugin/icedteanp/IcedTeaJavaRequestProcessor.h
--- a/plugin/icedteanp/IcedTeaJavaRequestProcessor.h	Wed Jan 16 16:50:13 2013 +0100
+++ b/plugin/icedteanp/IcedTeaJavaRequestProcessor.h	Wed Jan 16 15:35:09 2013 -0500
@@ -41,6 +41,7 @@
 
 #include <errno.h>
 #include <stdlib.h>
+#include <unistd.h>
 #include <vector>
 
 #include "IcedTeaNPPlugin.h"
diff -r 8fe3531e1769 -r 3960d2a46f51 plugin/icedteanp/IcedTeaNPPlugin.cc
--- a/plugin/icedteanp/IcedTeaNPPlugin.cc	Wed Jan 16 16:50:13 2013 +0100
+++ b/plugin/icedteanp/IcedTeaNPPlugin.cc	Wed Jan 16 15:35:09 2013 -0500
@@ -218,8 +218,6 @@
 static void plugin_data_new (ITNPPluginData** data);
 // Retrieve the current document's documentbase.
 static gchar* plugin_get_documentbase (NPP instance);
-// Notify the user that the appletviewer is not installed correctly.
-static void plugin_display_failure_dialog ();
 // Callback used to monitor input pipe status.
 static gboolean plugin_in_pipe_callback (GIOChannel* source,
                                          GIOCondition condition,
@@ -1100,30 +1098,6 @@
 }
 #endif
 
-// This function displays an error message if the appletviewer has not
-// been installed correctly.
-static void
-plugin_display_failure_dialog ()
-{
-  GtkWidget* dialog = NULL;
-
-  PLUGIN_DEBUG ("plugin_display_failure_dialog\n");
-
-  dialog = gtk_message_dialog_new (NULL,
-                                   GTK_DIALOG_DESTROY_WITH_PARENT,
-                                   GTK_MESSAGE_ERROR,
-                                   GTK_BUTTONS_CLOSE,
-                                   FAILURE_MESSAGE,
-                                   appletviewer_executable);
-  gtk_widget_show_all (dialog);
-  gtk_dialog_run (GTK_DIALOG (dialog));
-  gtk_widget_destroy (dialog);
-
-  PLUGIN_DEBUG ("plugin_display_failure_dialog return\n");
-}
-
-
-
 // plugin_in_pipe_callback is called when data is available on the
 // input pipe, or when the appletviewer crashes or is killed.  It may
 // be called after data has been destroyed in which case it simply
@@ -2205,7 +2179,7 @@
   np_error = plugin_test_appletviewer ();
   if (np_error != NPERR_NO_ERROR)
     {
-      plugin_display_failure_dialog ();
+      fprintf(stderr, "Unable to find java executable %s\n", appletviewer_executable);
       return np_error;
     }
 
diff -r 8fe3531e1769 -r 3960d2a46f51 plugin/icedteanp/IcedTeaNPPlugin.h
--- a/plugin/icedteanp/IcedTeaNPPlugin.h	Wed Jan 16 16:50:13 2013 +0100
+++ b/plugin/icedteanp/IcedTeaNPPlugin.h	Wed Jan 16 15:35:09 2013 -0500
@@ -51,9 +51,6 @@
 #include <glib.h>
 #include <glib/gstdio.h>
 
-// GTK includes.
-#include <gtk/gtk.h>
-
 #include "IcedTeaPluginUtils.h"
 #include "IcedTeaPluginRequestProcessor.h"
 



More information about the distro-pkg-dev mailing list