Skip to content

Commit

Permalink
PR1260: IcedTea-Web should not rely on GTK
Browse files Browse the repository at this point in the history
  • Loading branch information
dbhole committed Jan 16, 2013
1 parent 39606e4 commit c7aae0e
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 77 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2013-01-16 Deepak Bhole <dbhole@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@redhat.com>

Fixed set of paths to asm
Expand Down
6 changes: 0 additions & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ $(PLUGIN_DIR)/%.o: $(PLUGIN_SRCDIR)/%.cc
-DICEDTEA_WEB_JRE="\"$(SYSTEM_JRE_DIR)\"" \
-DPLUGIN_BOOTCLASSPATH=$(PLUGIN_BOOTCLASSPATH) \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
$(MOZILLA_CFLAGS) \
-fvisibility=hidden \
-fPIC -o $@ -c $<
Expand All @@ -313,7 +312,6 @@ $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY): $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJEC
$(CXX) $(CXXFLAGS) \
$(PLUGIN_OBJECTS) \
$(GLIB_LIBS) \
$(GTK_LIBS) \
$(MOZILLA_LIBS) \
-shared -o $@

Expand Down Expand Up @@ -355,7 +353,6 @@ stamps/cpp-unit-tests-compile.stamp: $(CPP_UNITTEST_FRAMEWORK_LIB) $(CPP_UNITTES
-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)" \
Expand All @@ -371,7 +368,6 @@ $(CPP_UNITTEST_EXECUTABLE): $(CPP_UNITTEST_FRAMEWORK_LIB) stamps/cpp-unit-tests-
$(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 $@
Expand Down Expand Up @@ -1226,7 +1222,6 @@ $(COVERABLE_PLUGIN_DIR)/%.o: $(PLUGIN_SRCDIR)/%.cc
-DPLUGIN_BOOTCLASSPATH=$(PLUGIN_COVERAGE_BOOTCLASSPATH) \
-DCOVERAGE_AGENT=$(JACOCO_AGENT_PLUGIN_SWITCH) \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
$(MOZILLA_CFLAGS) \
-fvisibility=hidden \
-fPIC -o $@ -c $<
Expand All @@ -1236,7 +1231,6 @@ $(COVERABLE_PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY): $(addprefix $(COVERABLE_PLUGIN_
$(CXX) $(CXXFLAGS) \
$(PLUGIN_OBJECTS) \
$(GLIB_LIBS) \
$(GTK_LIBS) \
$(MOZILLA_LIBS) \
-shared -o $@

Expand Down
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ New in release 1.4 (2012-XX-XX):
- 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
Expand Down
41 changes: 0 additions & 41 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -359,56 +359,15 @@ AC_ARG_ENABLE([plugin],
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],[
Expand Down
1 change: 1 addition & 0 deletions plugin/icedteanp/IcedTeaJavaRequestProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ exception statement from your version. */

#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <vector>

#include "IcedTeaNPPlugin.h"
Expand Down
28 changes: 1 addition & 27 deletions plugin/icedteanp/IcedTeaNPPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,6 @@ typedef union
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,
Expand Down Expand Up @@ -1100,30 +1098,6 @@ plugin_get_documentbase (NPP instance)
}
#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
Expand Down Expand Up @@ -2205,7 +2179,7 @@ NP_Initialize (NPNetscapeFuncs* browserTable, NPPluginFuncs* pluginTable)
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;
}

Expand Down
3 changes: 0 additions & 3 deletions plugin/icedteanp/IcedTeaNPPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ exception statement from your version. */
#include <glib.h>
#include <glib/gstdio.h>

// GTK includes.
#include <gtk/gtk.h>

#include "IcedTeaPluginUtils.h"
#include "IcedTeaPluginRequestProcessor.h"

Expand Down

0 comments on commit c7aae0e

Please sign in to comment.