Bug 507404 dialogWindow is unused in DialogOKClicked and DIALOGID is useless
authortimeless@mozdev.org
Wed, 26 Aug 2009 18:27:59 +0200
changeset 31992 de4807724319bc628a445e0097479fb8de39c143
parent 31991 cd00f396920096c71e082d92968cb4a15ab29c34
child 31993 ee61b74622b6cc84fb5a087db9cdadfd2195784b
push idunknown
push userunknown
push dateunknown
bugs507404
milestone1.9.3a1pre
Bug 507404 dialogWindow is unused in DialogOKClicked and DIALOGID is useless r=karlt
modules/plugin/default/unix/nullplugin.c
--- a/modules/plugin/default/unix/nullplugin.c
+++ b/modules/plugin/default/unix/nullplugin.c
@@ -61,18 +61,16 @@
 #include <X11/Intrinsic.h>
 #include <X11/cursorfont.h>
 #endif
 
 #include "npapi.h"
 #include "nullplugin.h"
 #include "prprf.h"
 
-#define DIALOGID "dialog"
-
 /* Global data */
 static MimeTypeElement *head = NULL;
 
 /* destroy the dialog box */
 void
 destroyWidget(PluginInstance *This)
 {
     if (This && This->dialogBox)
@@ -81,21 +79,18 @@ destroyWidget(PluginInstance *This)
     }
 }
 
 /* callback function for the OK button */
 static void 
 DialogOKClicked (GtkButton *button, gpointer data)
 {
     PluginInstance* This = (PluginInstance*) data;
-    GtkWidget* dialogWindow = g_object_get_data(GTK_OBJECT(button), DIALOGID);
     char *url;
 
-    g_object_set_data(GTK_OBJECT(button), DIALOGID, NULL);
-
     if (This->pluginsFileUrl != NULL)
     {
         /* Get the JavaScript command string */
         static const char buf[] = 
           "javascript:netscape.softupdate.Trigger.StartSoftwareUpdate(\"%s\")";
 
         url = NPN_MemAlloc(strlen(This->pluginsFileUrl) + (sizeof(buf) - 2));
         if (url != NULL)
@@ -296,17 +291,16 @@ makeWidget(PluginInstance *This)
     gtk_window_set_resizable(GTK_WINDOW(dialogWindow), FALSE);
 
     PR_snprintf(message, sizeof(message) - 1, MESSAGE, This->type);
     dialogMessage = AddWidget(gtk_label_new (message), 
                    GTK_DIALOG(dialogWindow)->vbox);
 
     okButton= AddWidget(gtk_button_new_with_label (OK_BUTTON), 
                    GTK_DIALOG(dialogWindow)->action_area);
-    g_object_set_data(GTK_OBJECT(okButton), DIALOGID, dialogWindow);
 
     GTK_WIDGET_SET_FLAGS (okButton, GTK_CAN_DEFAULT);
     gtk_widget_grab_default(okButton);
 
     cancelButton= AddWidget(gtk_button_new_with_label (CANCEL_BUTTON), 
                    GTK_DIALOG(dialogWindow)->action_area);
 
     g_signal_connect (GTK_OBJECT(okButton),  "clicked",