diff options
author | Roland Mainz <roland.mainz@nrubsig.org> | 2004-09-18 00:30:51 +0000 |
---|---|---|
committer | Roland Mainz <roland.mainz@nrubsig.org> | 2004-09-18 00:30:51 +0000 |
commit | 02050676964380bfd5edc5ffbfb87ad0dbbdc876 (patch) | |
tree | 47f36ab818f8b716b5624425ca8c6b917adaa921 /plugin | |
parent | e2a6df6025e2fbecd24be7bd47b65f2f46736691 (diff) |
Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1372 - Initial part
of repairing XRX/Broadway support. This patch fixes both the libxrx.so
plugin and the Xnest-based libxrxnest.so plugin and making them
compatible to newer versions of Mozilla and removing the backwards
compatibility hacks for old Netscape3.x versions with statically linked
Motif.
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/Main.c | 71 | ||||
-rw-r--r-- | plugin/PProcess.c | 2 |
2 files changed, 38 insertions, 35 deletions
diff --git a/plugin/Main.c b/plugin/Main.c index 7f11777..834300e 100644 --- a/plugin/Main.c +++ b/plugin/Main.c @@ -52,11 +52,20 @@ The Open Group. * */ -#include <ctype.h> -#include <stdlib.h> + #include "RxPlugin.h" -#include "X11/StringDefs.h" +#include <X11/StringDefs.h> +#ifdef USE_MOTIF +extern WidgetClass xmLabelGadgetClass; +extern WidgetClass xmPushButtonGadgetClass; +#else +#include <X11/Xaw/Label.h> +#include <X11/Xaw/Command.h> +#endif /* USE_MOTIF */ + +#include <ctype.h> +#include <stdlib.h> /*********************************************************************** * Utility functions to deal with list of arguments @@ -380,14 +389,6 @@ StartCB(Widget widget, XtPointer client_data, XtPointer call_data) StartApplication(This); } -#if defined(linux) || (defined(sun) && !defined(SVR4)) -/* deficient linux linker semantics */ -static WidgetClass xmLabelGadgetClass; -static WidgetClass xmPushButtonGadgetClass; -#else -extern WidgetClass xmLabelGadgetClass; -extern WidgetClass xmPushButtonGadgetClass; -#endif void RxpSetStatusWidget(PluginInstance* This, PluginState state) @@ -415,35 +416,12 @@ RxpSetStatusWidget(PluginInstance* This, PluginState state) XrmPutStringResource (&db, "*Rx_Start.labelString", "Start"); XrmPutStringResource (&db, "RxPlugin_BeenHere", "YES"); } -#if defined(linux) || (defined(sun) && !defined(SVR4)) - /* - lame loader semantics mean we have to go fishing around to - come up with widget class records so we can create some widgets. - - Names of widgets changed in 4.x, so look for those names too - for linux. - - If Microsoft ever does IE for Linux we'll have to figure out - those names too. - */ - if (xmLabelGadgetClass == NULL) { - Widget w; - - w = XtNameToWidget (This->toplevel_widget, "*topLeftArea.urlLabel"); - if (w == NULL) - w = XtNameToWidget (This->toplevel_widget, "*urlBar.urlLocationLabel"); - xmLabelGadgetClass = XtClass (w); - w = XtNameToWidget (This->toplevel_widget, "*toolBar.abort"); - if (w == NULL) - w = XtNameToWidget (This->toplevel_widget, "*PopupMenu.openCustomUrl"); - xmPushButtonGadgetClass = XtClass (w); - } -#endif n = 0; XtSetArg(args[n], "shadowThickness", 1); n++; XtSetArg(args[n], XtNwidth, This->width); n++; XtSetArg(args[n], XtNheight, This->height); n++; +#ifdef USE_MOTIF if (state == LOADING) { /* create a label */ This->status_widget = @@ -465,6 +443,29 @@ RxpSetStatusWidget(PluginInstance* This, PluginState state) } else if (state == RUNNING) { /* nothing else to be done */ } +#else + if (state == LOADING) { + /* create a label */ + This->status_widget = + XtCreateManagedWidget("Rx_Loading", labelWidgetClass, + This->plugin_widget, args, n); +#ifndef NO_STARTING_STATE + } else if (state == STARTING) { + /* create a label */ + This->status_widget = + XtCreateManagedWidget("Rx_Starting", labelWidgetClass, + This->plugin_widget, args, n); +#endif + } else if (state == WAITING) { + /* create a push button */ + This->status_widget = + XtCreateManagedWidget("Rx_Start", commandWidgetClass, + This->plugin_widget, args, n); + XtAddCallback(This->status_widget, XtNcallback, StartCB, This); + } else if (state == RUNNING) { + /* nothing else to be done */ + } +#endif /* USE_MOTIF */ This->state = state; } diff --git a/plugin/PProcess.c b/plugin/PProcess.c index 2de5b39..8d067a8 100644 --- a/plugin/PProcess.c +++ b/plugin/PProcess.c @@ -686,6 +686,7 @@ void RxpTeardown (PluginInstance* This) { if (This->toplevel_widget != NULL) { +#if 0 /* this crashes mozilla/firefox */ /* ConfigureNotify on top level */ XtRemoveRawEventHandler (This->toplevel_widget, StructureNotifyMask, @@ -697,6 +698,7 @@ RxpTeardown (PluginInstance* This) True, RxpWmDelWinHandler, (XtPointer) This); +#endif #if 0 XmRemoveWMProtocolCallback (This->toplevel_widget, RxGlobal.wm_delete_window, |