Index: gtk/gtk.override
===================================================================
RCS file: /cvs/gnome/gnome-python/pygtk/gtk/gtk.override,v
retrieving revision 1.346
diff -u -p -r1.346 gtk.override
--- gtk/gtk.override	3 Oct 2005 17:11:32 -0000	1.346
+++ gtk/gtk.override	11 Jan 2006 15:01:02 -0000
@@ -2806,32 +2806,29 @@ _wrap_gtk_message_dialog_new(PyGObject *
     if (pyg_enum_get_value(GTK_TYPE_BUTTONS_TYPE, py_buttons, (gint *)&buttons))
         return -1;
 
-      /* Note: with current API (gtk 2.4), it is impossible to
-       * construct a GtkMessageDialog through g_object_new(), because
-       * there is no 'message' property and the label field is
-       * private */
-    if (message_format)
-        self->obj = (GObject *)gtk_message_dialog_new(parent, flags, type,
-                                                      buttons, "%s",
-                                                      message_format);
-    else
-        self->obj = (GObject *)gtk_message_dialog_new(parent, flags, type,
-                                                      buttons, message_format);
+    if (flags & GTK_DIALOG_NO_SEPARATOR)
+        g_warning("The gtk.DIALOG_NO_SEPARATOR flag cannot be used for gtk.MessageDialog");
+    
+    pygobject_construct(self, "buttons", buttons,
+                        "message-type", type,
+                        (message_format? "text" : NULL), message_format,
+                        NULL);
+    if (parent != NULL)
+        gtk_window_set_transient_for(GTK_WINDOW(self->obj), parent);
+    
+    if (flags & GTK_DIALOG_MODAL)
+        gtk_window_set_modal(GTK_WINDOW(self->obj), TRUE);
+
+    if (flags & GTK_DIALOG_DESTROY_WITH_PARENT)
+        gtk_window_set_destroy_with_parent(GTK_WINDOW(self->obj), TRUE);
+
     if (!self->obj) {
         PyErr_SetString(PyExc_RuntimeError,
                         "could not create GtkMessageDialog object");
         return -1;
     }
-    
-    g_object_ref(self->obj); /* we don't own the first reference of windows */
-
-    if (pyg_type_from_object((PyObject *) self) != GTK_TYPE_MESSAGE_DIALOG) {
-        PyErr_SetString(PyExc_RuntimeError, "__gobject_init__ must be used "
-                        "when subclassing gtk.MessageDialog");
-        return -1;
-    }
 
-    pygobject_register_wrapper((PyObject *)self);
+    g_object_ref(self->obj); /* we don't own the first reference of windows */
     return 0;
 }
 %%
