patch : migration from gnomedialog to GtkDialog and porting gtk_type_unique to g_type_register_static

fabrice inconnu <[email protected]> Mon, 28 Jul 2003 16:34:39 +0200 (CEST)
Newsgroups gmane.editors.mlview.bugs
Message-ID <[email protected]>
hello every body,

here is my second patch, sorry for my first mail in
French.

news :
 - porting all GnomeDialog to GtkDialog like u asked
me to do.
 - porting from deprecated method : "gtk_type_unique"
and structure : "GtkTypeInfo" to method :
"g_type_register_static" and structure : "gTypeInfo"

i tested it, it seems to work, but if you see any pb
don t hesitate to contact me. (or for any
recommandation)

sincerely.
Fabrice

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

_______________________________________________
Mlview-bugs mailing list
[email protected]
http://mail.nongnu.org/mailman/listinfo/mlview-bugs
little.patch (application/octet-stream, 81.2 KB)
? Makefile
? Makefile.in
? aclocal.m4
? autom4te.cache
? config.guess
? config.h
? config.h.in
? config.log
? config.status
? config.sub
? configure
? intltool-extract
? intltool-extract.in
? intltool-merge
? intltool-merge.in
? intltool-update
? intltool-update.in
? libtool
? ltmain.sh
? mlview.spec
? stamp-h
? stamp-h.in
? entities-catalog/Makefile
? entities-catalog/Makefile.in
? entities-catalog/docbook-iso-ent/Makefile
? entities-catalog/docbook-iso-ent/Makefile.in
? entities-catalog/docbook-xml_4_1_2/Makefile
? entities-catalog/docbook-xml_4_1_2/Makefile.in
? entities-catalog/docbook-xml_4_1_2/ent/Makefile
? entities-catalog/docbook-xml_4_1_2/ent/Makefile.in
? entities-catalog/docbook-xml_4_2b1/Makefile
? entities-catalog/docbook-xml_4_2b1/Makefile.in
? entities-catalog/docbook-xml_4_2b1/ent/Makefile
? entities-catalog/docbook-xml_4_2b1/ent/Makefile.in
? entities-catalog/xhtml-strict_1_0/Makefile
? entities-catalog/xhtml-strict_1_0/Makefile.in
? entities-catalog/xml-catalog_1_0/Makefile
? entities-catalog/xml-catalog_1_0/Makefile.in
? entities-catalog/xmlcharent_0_1/Makefile
? entities-catalog/xmlcharent_0_1/Makefile.in
? pixmaps/Makefile
? pixmaps/Makefile.in
? po/Makefile.in
? po/Makefile.in.in
? src/Makefile
? src/Makefile.in
? src/mlv
? src/.deps/main.P
? src/.deps/mlview-app-context.P
? src/.deps/mlview-app.P
? src/.deps/mlview-attribute-picker.P
? src/.deps/mlview-attributes-list.P
? src/.deps/mlview-editor.P
? src/.deps/mlview-file-descriptor.P
? src/.deps/mlview-file-selection.P
? src/.deps/mlview-global-settings.P
? src/.deps/mlview-marshal.P
? src/.deps/mlview-name-value-pair.P
? src/.deps/mlview-namespace-editor.P
? src/.deps/mlview-node-editor.P
? src/.deps/mlview-node-type-picker.P
? src/.deps/mlview-parsing-utils.P
? src/.deps/mlview-preferences.P
? src/.deps/mlview-settings-builder.P
? src/.deps/mlview-settings-management.P
? src/.deps/mlview-tree-editor.P
? src/.deps/mlview-tree-editor2.P
? src/.deps/mlview-utils.P
? src/.deps/mlview-xml-doc-tree-view.P
? src/.deps/mlview-xml-document-view.P
? src/.deps/mlview-xml-document.P
? ui/Makefile
? ui/Makefile.in
Index: src/mlview-attribute-picker.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-attribute-picker.c,v
retrieving revision 1.6
diff -u -r1.6 mlview-attribute-picker.c
--- src/mlview-attribute-picker.c	6 Jul 2003 13:44:20 -0000	1.6
+++ src/mlview-attribute-picker.c	28 Jul 2003 14:21:06 -0000
@@ -80,7 +80,7 @@
 #define PRIVATE(object) (object)->private
 
 /*a pointer to the parent class. Necessary for the gtk typing system framework*/
-static GnomeDialogClass * parent_class = NULL ;
+static GtkDialogClass * parent_class = NULL ;
 
 static gboolean gv_attributes_completion = TRUE ;
 
@@ -112,7 +112,7 @@
 	GtkObjectClass * object_class ;
 	g_return_if_fail (a_klass != NULL) ;
 
-	parent_class = gtk_type_class (GNOME_TYPE_DIALOG) ;
+	parent_class = gtk_type_class (GTK_TYPE_DIALOG) ;
 	object_class = GTK_OBJECT_CLASS (a_klass) ;
 	
 	object_class->destroy = mlview_attribute_picker_destroy ;
@@ -129,17 +129,17 @@
 mlview_attribute_picker_init (MlViewAttributePicker * a_picker)
 {
 	GtkWidget * label=NULL, *table=NULL, *vbox=NULL, *separator=NULL;
-	const gchar * buttons[3] = {GNOME_STOCK_BUTTON_OK,
-                                    GNOME_STOCK_BUTTON_CANCEL,
-                                    NULL} ;
-
 	g_return_if_fail (a_picker != NULL) ;
 	g_return_if_fail (MLVIEW_IS_ATTRIBUTE_PICKER (a_picker)) ;
 
-	gnome_dialog_constructv (GNOME_DIALOG (a_picker),
-                                 "",
-                                 (const gchar **)buttons) ;
+	gtk_dialog_add_buttons(GTK_DIALOG(a_picker),
+                               _("OK"),
+                               GTK_RESPONSE_ACCEPT,
+                               _("Cancel"),
+                               GTK_RESPONSE_REJECT,
+                               NULL);
         
+
 	PRIVATE (a_picker) = g_malloc0 (sizeof (MlViewAttributePickerPrivate)) ;
 	
 	label = gtk_label_new (_("attribute name")) ;
@@ -156,7 +156,7 @@
 	gtk_table_attach_defaults (GTK_TABLE (table), 
                                    GTK_WIDGET (PRIVATE (a_picker)->name_edit_entry),
                                    1,2,0,1) ;
-	gtk_box_pack_start( GTK_BOX (GNOME_DIALOG (a_picker)->vbox),
+	gtk_box_pack_start( GTK_BOX (GTK_DIALOG (a_picker)->vbox),
                             table,FALSE,TRUE,0) ;
 	gtk_widget_show_all (table) ;
 	
@@ -174,12 +174,12 @@
 	gtk_table_attach_defaults (GTK_TABLE (table),
                                    GTK_WIDGET (PRIVATE (a_picker)->type_edit_entry),
                                    1,2,0,1) ;
-	gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (a_picker)->vbox),
+	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (a_picker)->vbox),
 			    table, FALSE, TRUE, 0) ;
 	gtk_widget_show_all (table) ;
         
 	separator = gtk_hseparator_new () ; 
-	gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (a_picker)->vbox),
+	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (a_picker)->vbox),
 			    separator, FALSE, TRUE, 0) ;
 	gtk_widget_show (separator) ;
         
@@ -191,7 +191,7 @@
 	gtk_table_attach_defaults (GTK_TABLE (table), 
                                    GTK_WIDGET (PRIVATE (a_picker)->value_edit_entry),
                                    1,2,0,1) ;
-	gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (a_picker)->vbox),
+	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (a_picker)->vbox),
                             table, FALSE, TRUE, 0) ;
 	gtk_widget_show_all (table) ;
         
@@ -230,9 +230,6 @@
 				   vbox,
 				   1,2,1,2) ;
 	gtk_widget_ref (GTK_WIDGET (PRIVATE (a_picker)->value_list_table)) ;
-	
-	gnome_dialog_close_hides (GNOME_DIALOG (a_picker), TRUE) ;
-	gnome_dialog_set_default(GNOME_DIALOG (a_picker), 0) ;
 }
 
 
@@ -377,17 +374,17 @@
 
 	/*make sure the attribute list table is not there already...*/
 	if (GTK_WIDGET (PRIVATE (a_picker)->value_list_table)->parent 
-            == GTK_WIDGET (GNOME_DIALOG (a_picker)->vbox))
-		gtk_container_remove (GTK_CONTAINER (GNOME_DIALOG (a_picker)->vbox),
+            == GTK_WIDGET (GTK_DIALOG (a_picker)->vbox))
+		gtk_container_remove (GTK_CONTAINER (GTK_DIALOG (a_picker)->vbox),
 				      GTK_WIDGET (PRIVATE (a_picker)->value_list_table)) ;
 	
         /*now, pack the attr list table*/
-	gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (a_picker)->vbox),
+	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (a_picker)->vbox),
 			    GTK_WIDGET (PRIVATE (a_picker)->value_list_table),
 			    FALSE, TRUE, 0) ;
 
 	gtk_widget_show_all (GTK_WIDGET (PRIVATE (a_picker)->value_list_table)) ;
-	gtk_widget_show_all (GTK_WIDGET (GNOME_DIALOG (a_picker)->vbox)) ;
+	gtk_widget_show_all (GTK_WIDGET (GTK_DIALOG (a_picker)->vbox)) ;
 }
 
 
@@ -404,10 +401,10 @@
 
 	/*Make sure the value_list_table is packed in the dialog vbox*/
 	if ( GTK_WIDGET (PRIVATE (a_picker)->value_list_table)->parent 
-	     == GTK_WIDGET (GNOME_DIALOG (a_picker)->vbox)) {
-		gtk_container_remove (GTK_CONTAINER (GNOME_DIALOG (a_picker)->vbox),
+	     == GTK_WIDGET (GTK_DIALOG (a_picker)->vbox)) {
+		gtk_container_remove (GTK_CONTAINER (GTK_DIALOG (a_picker)->vbox),
 				      GTK_WIDGET (PRIVATE (a_picker)->value_list_table)) ;
-		gtk_widget_show_all (GTK_WIDGET (GNOME_DIALOG (a_picker)->vbox)) ;
+		gtk_widget_show_all (GTK_WIDGET (GTK_DIALOG (a_picker)->vbox)) ;
 	}
 }
 
@@ -698,15 +695,24 @@
 	
 	if ( !type ) 
         {
-		static const GtkTypeInfo type_info = {
-			"MlViewAttributePicker",
-			sizeof (MlViewAttributePicker) ,
-			sizeof (MlViewAttributePickerClass) ,
-			(GtkClassInitFunc) mlview_attribute_picker_init_class,
-			(GtkObjectInitFunc) mlview_attribute_picker_init,
-			NULL, NULL, NULL
-		} ;
-		type = gtk_type_unique (GNOME_TYPE_DIALOG, &type_info) ;
+                
+                static const GTypeInfo type_info =
+                        {
+                                sizeof (MlViewAttributePickerClass),
+                                NULL, /* base_init */
+                                NULL, /* base_finalize */
+                                (GClassInitFunc) mlview_attribute_picker_init_class,
+                                NULL, /* class_finalize */
+                                NULL, /* class_data */
+                                sizeof (MlViewAttributePicker),
+                                0,
+                                (GInstanceInitFunc) mlview_attribute_picker_init
+                        };
+                
+		type = g_type_register_static (GTK_TYPE_DIALOG, 
+                                          "MlViewAttributePicker",
+                                          &type_info,
+                                          0) ;
 	}
 	return type ;
 }
@@ -726,7 +732,7 @@
 	result = gtk_type_new (MLVIEW_TYPE_ATTRIBUTE_PICKER) ;
 	mlview_attribute_picker_set_app_context (result, a_app_context) ;
 	gtk_window_set_title (GTK_WINDOW (result), a_title) ;
-	mlview_app_context_set_window_icon (a_app_context, GTK_WIDGET (result)) ;
+	//mlview_app_context_set_window_icon (a_app_context, GTK_WIDGET (result)) ;
 	gtk_window_set_wmclass (GTK_WINDOW (result), "attribute-picker", "MlView") ;
 
 	return GTK_WIDGET (result) ;
@@ -796,7 +802,7 @@
 	
 	if ( PRIVATE (a_picker)->name_edit_entry 
 	     && PRIVATE (a_picker)->name_edit_entry->entry)
-		return gtk_entry_get_text (GTK_ENTRY (PRIVATE (a_picker)->name_edit_entry->entry)) ;
+		return (guchar *) gtk_entry_get_text (GTK_ENTRY (PRIVATE (a_picker)->name_edit_entry->entry)) ;
 	else
 		return NULL ;
 }
@@ -814,7 +820,7 @@
 	g_return_val_if_fail (PRIVATE (a_picker) != NULL, NULL) ;
 
 	if ( PRIVATE (a_picker)->value_edit_entry )
-		return gtk_entry_get_text (PRIVATE (a_picker)->value_edit_entry) ;
+		return (guchar *) gtk_entry_get_text (PRIVATE (a_picker)->value_edit_entry) ;
 	else
 		return NULL ;
 }
@@ -835,7 +841,7 @@
 
 	if (PRIVATE (a_picker)->type_edit_entry
 	    && PRIVATE (a_picker)->type_edit_entry->entry)
-		type_str =  gtk_entry_get_text (GTK_ENTRY (PRIVATE (a_picker)->type_edit_entry->entry)) ;
+		type_str =  (guchar *) gtk_entry_get_text (GTK_ENTRY (PRIVATE (a_picker)->type_edit_entry->entry)) ;
 
 	if (type_str != NULL && mlview_utils_is_white_string (type_str) == FALSE) 
         {
Index: src/mlview-attribute-picker.h
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-attribute-picker.h,v
retrieving revision 1.4
diff -u -r1.4 mlview-attribute-picker.h
--- src/mlview-attribute-picker.h	6 Jul 2003 13:44:20 -0000	1.4
+++ src/mlview-attribute-picker.h	28 Jul 2003 14:21:07 -0000
@@ -21,7 +21,6 @@
 #ifndef __MLVIEW_ATTRIBUTE_PICKER_H__
 #define __MLVIEW_ATTRIBUTE_PICKER_H__
 
-#include <gnome.h>
 #include "mlview-app-context.h"
 
 #ifdef __cplusplus
@@ -53,7 +52,7 @@
  */
 struct _MlViewAttributePicker {
         /**The parent class*/
-        GnomeDialog dialog ;
+        GtkDialog dialog ;
         /**The private members of this class*/
         MlViewAttributePickerPrivate * private ;
 };
@@ -100,7 +99,7 @@
 					 MlViewAppContext * a_app_context) ;
 
 struct _MlViewAttributePickerClass {
-        GnomeDialogClass parent_class ;
+        GtkDialogClass parent_class ;
 };
 
 #ifdef __cplusplus
Index: src/mlview-attributes-list.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-attributes-list.c,v
retrieving revision 1.6
diff -u -r1.6 mlview-attributes-list.c
--- src/mlview-attributes-list.c	26 Jul 2003 18:55:44 -0000	1.6
+++ src/mlview-attributes-list.c	28 Jul 2003 14:21:09 -0000
@@ -486,12 +486,12 @@
 			(PRIVATE (a_list)->app_context, 
 			 GTK_WIDGET (PRIVATE (a_list)->attribute_picker)) ;
                 
-		button = gnome_dialog_run 
-			(GNOME_DIALOG (PRIVATE (a_list)->attribute_picker)) ;
+		button = gtk_dialog_run 
+			(GTK_DIALOG (PRIVATE (a_list)->attribute_picker)) ;
 
 		switch (button) 
                 {
-		case 0:
+		case GTK_RESPONSE_ACCEPT:
 			name_str = 
 				mlview_attribute_picker_get_attribute_name 
 				(PRIVATE (a_list)->attribute_picker) ;
@@ -541,10 +541,10 @@
 				loop = FALSE ;
 			}			
 			break ;
-		case 1:
+		case GTK_RESPONSE_REJECT:
 			loop = FALSE ;
 			break ;
-		case -1:
+		case GTK_RESPONSE_CLOSE:
 			loop = FALSE ;
 			break ;
 		default :
@@ -552,7 +552,7 @@
 		}
 	}
 	
-        gnome_dialog_close (GNOME_DIALOG (PRIVATE (a_list)->attribute_picker)) ;
+        gtk_widget_hide (GTK_WIDGET(PRIVATE (a_list)->attribute_picker));
 	
         return result ;
 }
@@ -829,18 +829,25 @@
 	static guint mlview_attributes_list_type = 0 ;
 	if (!mlview_attributes_list_type) 
         {
-		static const GtkTypeInfo t_info = {
-			(guchar*)"MlViewAttributesList",
-			sizeof (MlViewAttributesList),
-			sizeof (MlViewAttributesListClass),
-			(GtkClassInitFunc) mlview_attributes_list_class_init,
-			(GtkObjectInitFunc) mlview_attributes_list_init,
-			NULL, NULL, NULL
-		};
+		static const GTypeInfo type_info =
+                        {
+                                sizeof (MlViewAttributesListClass),
+                                NULL, /* base_init */
+                                NULL, /* base_finalize */
+                                (GClassInitFunc) mlview_attributes_list_class_init,
+                                NULL, /* class_finalize */
+                                NULL, /* class_data */
+                                sizeof (MlViewAttributesList),
+                                0,
+                                (GInstanceInitFunc) mlview_attributes_list_init
+                        };
+                
+		mlview_attributes_list_type = g_type_register_static (GTK_TYPE_VBOX, 
+                                          "MlViewAttributesList",
+                                          &type_info,
+                                          0) ;
 
-		mlview_attributes_list_type = 
-			gtk_type_unique (GTK_TYPE_VBOX, &t_info) ;
-	}
+      	}
 
 	return mlview_attributes_list_type ;
 }
Index: src/mlview-editor.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-editor.c,v
retrieving revision 1.44
diff -u -r1.44 mlview-editor.c
--- src/mlview-editor.c	13 Jul 2003 10:28:08 -0000	1.44
+++ src/mlview-editor.c	28 Jul 2003 14:21:14 -0000
@@ -1566,7 +1566,8 @@
 	xmlDocPtr xml_doc = NULL ;
 	xmlNodePtr xml_node = NULL ;
 	gchar * validation_is_on = NULL ;
-	
+	gboolean loop=TRUE;
+
 	g_return_if_fail (a_editor != NULL) ;
 	g_return_if_fail (MLVIEW_IS_EDITOR (a_editor)) ;
 	g_return_if_fail (PRIVATE (a_editor) != NULL) ;
@@ -1578,17 +1579,20 @@
 		 MLVIEW_STG_K_IS_VALIDATION_ON) ;
 
 	dialog = 
-		gnome_dialog_new (_("Name of the root element"),
-				  GNOME_STOCK_BUTTON_YES,
-				  GNOME_STOCK_BUTTON_CANCEL,
+		gtk_dialog_new_with_buttons (
+                                             _("Name of the root element"),
+                                             NULL,
+                                             GTK_DIALOG_MODAL,
+                                             GTK_STOCK_YES,
+                                             GTK_RESPONSE_ACCEPT,
+                                             GTK_STOCK_CANCEL,
+                                             GTK_RESPONSE_REJECT,
 				  NULL) ;
 	
 	gtk_window_set_wmclass (GTK_WINDOW (dialog), 
 				"root-element-dialog", "MlView") ;
 
-	gnome_dialog_close_hides (GNOME_DIALOG (dialog), FALSE) ;
-	
-	label = gtk_label_new (_("Root element name:")) ;
+        label = gtk_label_new (_("Root element name:")) ;
 	entry = gtk_entry_new () ;
 	table = gtk_table_new (1,2,TRUE) ;
 
@@ -1596,109 +1600,111 @@
 				   0,1,0,1) ;
 	gtk_table_attach_defaults (GTK_TABLE(table), entry,
 				   1,2,0,1) ;
-	gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox),
+	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
 			    table, TRUE, TRUE, 0) ;
 
 	gtk_widget_show_all (table) ;
 	gtk_widget_grab_focus (entry) ;
-	gnome_dialog_set_default (GNOME_DIALOG (dialog),0) ;
-
+	
 	gtk_widget_realize (GTK_WIDGET (dialog)) ;
 	mlview_app_context_set_window_icon (PRIVATE (a_editor)->app_context, 
 					    GTK_WIDGET (dialog)) ;
-	res = gnome_dialog_run (GNOME_DIALOG (dialog)) ;
-
-	if (res == 0) {/*pressed ok*/
-		elname = (guchar *)gtk_entry_get_text (GTK_ENTRY(entry)) ;
-
-		if (elname && *elname) 
-		{
-			enum MlViewStatus status = MLVIEW_OK ;
-			status = mlview_utils_isolat1_str_to_utf8 
-				(elname,  &utf8_elname) ;
-
-			if (status != MLVIEW_OK) 
-			{
-				mlview_utils_trace_debug 
-					("utf8 conversion failed") ;
-				goto release_resources ;
-			}
-
-		} 
-		else 
-		{
-			utf8_elname = NULL ;
-		}
 
-		if (utf8_elname 
-		    && !mlview_utils_is_white_string (utf8_elname)) 
-		{
-			xml_node = xmlNewNode (NULL, utf8_elname) ;
-			xml_doc = xmlNewDoc ("1.0") ;
-			xml_doc->name = g_strdup ("untitled") ;
-			xmlDocSetRootElement (xml_doc, xml_node) ;
-
-			mlview_doc = 
-				mlview_xml_document_new 
-				(xml_doc, 
-				 PRIVATE(a_editor)->app_context) ;
+        while(loop)
+                {
+                        res = gtk_dialog_run (GTK_DIALOG (dialog)) ;
+                        switch(res)
+                                {
+                                case GTK_RESPONSE_ACCEPT :/*pressed ok*/
+                                        elname = (guchar *)gtk_entry_get_text (GTK_ENTRY(entry)) ;
+
+                                        if (elname && *elname) 
+                                                {
+                                                        enum MlViewStatus status = MLVIEW_OK ;
+                                                        status = mlview_utils_isolat1_str_to_utf8 
+                                                                (elname,  &utf8_elname) ;
+
+                                                        if (status != MLVIEW_OK) 
+                                                                {
+                                                                        mlview_utils_trace_debug 
+                                                                                ("utf8 conversion failed") ;
+                                                                        goto release_resources ;
+                                                                }
+                                                        loop=FALSE;
+
+                                                } 
+                                        else 
+                                                {
+                                                        loop=TRUE;
+                                                        utf8_elname = NULL ;
+                                                }
+
+                                        if (utf8_elname 
+                                            && !mlview_utils_is_white_string (utf8_elname)) 
+                                                {
+                                                        xml_node = xmlNewNode (NULL, utf8_elname) ;
+                                                        xml_doc = xmlNewDoc ("1.0") ;
+                                                        xml_doc->name = g_strdup ("untitled") ;
+                                                        xmlDocSetRootElement (xml_doc, xml_node) ;
+
+                                                        mlview_doc = 
+                                                                mlview_xml_document_new 
+                                                                (xml_doc, 
+                                                                 PRIVATE(a_editor)->app_context) ;
 			
 			
-			if (mlview_doc != NULL && (validation_is_on != NULL)
-			    && (strcmp (validation_is_on, MLVIEW_STG_V_YES) 
-			    == 0)) 
-			{
-				mlview_xml_document_associate_dtd_interactive 
-					(mlview_doc) ;
-			}
+                                                        if (mlview_doc != NULL && (validation_is_on != NULL)
+                                                            && (strcmp (validation_is_on, MLVIEW_STG_V_YES) 
+                                                                == 0)) 
+                                                                {
+                                                                        mlview_xml_document_associate_dtd_interactive 
+                                                                                (mlview_doc) ;
+                                                                }
 
-			gnome_dialog_close (GNOME_DIALOG(dialog)) ;
+                                                        gtk_widget_destroy (GTK_WIDGET(dialog)) ;
 			
-			if (PRIVATE (a_editor)->app_context
-			    && mlview_app_context_settings_exist 
-			    (PRIVATE (a_editor)->app_context))
-			{
-				gchar * validation_is_on =
-					mlview_app_context_get_settings_value 
-					(PRIVATE (a_editor)->app_context,
-					 MLVIEW_STG_K_IS_VALIDATION_ON) ;
-
-				if (validation_is_on && !strcmp (validation_is_on, 
-				    MLVIEW_STG_V_YES))
-				{					
-					mlview_parsing_utils_build_required_attributes_list 
-						(PRIVATE (a_editor)->app_context,
-						 xml_node) ;
-
-					mlview_parsing_utils_build_required_children_tree 
-						(PRIVATE (a_editor)->app_context, &xml_node) ;
-				}
-			}
-			if (mlview_doc != NULL) 
-			{
-				MlViewXMLDocumentView *view = NULL ;
-				view = 
-					MLVIEW_XML_DOCUMENT_VIEW
-					(mlview_xml_doc_tree_view_new
-					 (mlview_doc, (gchar*)"", 
-					  PRIVATE (a_editor)->app_context)) ;
-
-				mlview_editor_add_xml_document_view 
-					(a_editor, view) ;
-			}
-		}
-	}
-	else if (res == 1) 
-	{
-                /*pressed cancel button*/
-		gnome_dialog_close (GNOME_DIALOG (dialog)) ;
-
-	} 
-	else if (res == -1) 
-	{
-		gnome_dialog_close (GNOME_DIALOG (dialog)) ;
-	}
-
+                                                        if (PRIVATE (a_editor)->app_context
+                                                            && mlview_app_context_settings_exist 
+                                                            (PRIVATE (a_editor)->app_context))
+                                                                {
+                                                                        gchar * validation_is_on =
+                                                                                mlview_app_context_get_settings_value 
+                                                                                (PRIVATE (a_editor)->app_context,
+                                                                                 MLVIEW_STG_K_IS_VALIDATION_ON) ;
+
+                                                                        if (validation_is_on && !strcmp (validation_is_on, 
+                                                                                                         MLVIEW_STG_V_YES))
+                                                                                {					
+                                                                                        mlview_parsing_utils_build_required_attributes_list 
+                                                                                                (PRIVATE (a_editor)->app_context,
+                                                                                                 xml_node) ;
+
+                                                                                        mlview_parsing_utils_build_required_children_tree 
+                                                                                                (PRIVATE (a_editor)->app_context, &xml_node) ;
+                                                                                }
+                                                                }
+                                                        if (mlview_doc != NULL) 
+                                                                {
+                                                                        MlViewXMLDocumentView *view = NULL ;
+                                                                        view = 
+                                                                                MLVIEW_XML_DOCUMENT_VIEW
+                                                                                (mlview_xml_doc_tree_view_new
+                                                                                 (mlview_doc, (gchar*)"", 
+                                                                                  PRIVATE (a_editor)->app_context)) ;
+
+                                                                        mlview_editor_add_xml_document_view 
+                                                                                (a_editor, view) ;
+                                                                }
+                                                }
+                                        break;
+                                        
+                                case GTK_RESPONSE_REJECT : 
+                                default:       
+                                        loop=FALSE;
+                                        gtk_widget_destroy(GTK_WIDGET (dialog)) ;
+                                        break;
+                                }
+                }
  release_resources:
 	if (utf8_elname) 
 	{
@@ -2271,10 +2277,16 @@
 		return ;
 	}
 	
-	dialog = gnome_dialog_new (_("Document has changed"),
-				   _("Save before closing"), 
-				   _("Close without saving"),
-				   NULL) ;
+	dialog = gtk_dialog_new_with_buttons (
+                                              _("Document has changed"),
+                                              NULL,
+                                              GTK_DIALOG_MODAL,
+                                              _("Save before closing"),
+                                              GTK_RESPONSE_ACCEPT,
+                                              _("Close without saving"),
+                                              GTK_RESPONSE_REJECT,
+
+                                              NULL) ;
 	gtk_window_set_wmclass (GTK_WINDOW (dialog), 
 				"document-has-changed-dialog", "MlView") ;
 
@@ -2282,25 +2294,23 @@
 		gtk_label_new 
 		(_("The document has been modifed. Should I save it before closing it ?")) ;
 	gtk_widget_show_all (label) ;
-	gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), 
+	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), 
 			    label,TRUE,TRUE,0) ;
-	gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE) ;
-	
-	while (go) 
+        while (go) 
 	{
 		int res ;
 		gtk_widget_realize (GTK_WIDGET (dialog)) ;
 		mlview_app_context_set_window_icon 
 			(PRIVATE (a_editor)->app_context, GTK_WIDGET (dialog)) ;
 
-		res = gnome_dialog_run (GNOME_DIALOG (dialog)) ;
-		if (res == 0) 
+		res = gtk_dialog_run (GTK_DIALOG (dialog)) ;
+		if (res == GTK_RESPONSE_ACCEPT) 
 		{
 			gtk_widget_destroy (dialog) ;
 			mlview_editor_save_and_close_xml_document (a_editor) ;
 			go = 0 ;
 		} 
-		else if (res == 1) 
+		else if (res == GTK_RESPONSE_REJECT) 
 		{
 			gtk_widget_destroy (dialog) ;
 			mlview_editor_close_xml_document_without_saving 
Index: src/mlview-file-selection.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-file-selection.c,v
retrieving revision 1.6
diff -u -r1.6 mlview-file-selection.c
--- src/mlview-file-selection.c	6 Jul 2003 13:44:20 -0000	1.6
+++ src/mlview-file-selection.c	28 Jul 2003 14:21:15 -0000
@@ -168,7 +168,7 @@
                                     GdkEvent *a_event,
                                     MlViewFileSelectionRunInfo * a_run_info)
 {
-	g_return_if_fail (a_run_info != NULL) ;
+	g_return_val_if_fail (a_run_info != NULL, FALSE) ;
 	a_run_info->clicked_button = 0 ;
 	mlview_file_selection_event_loop_quit (a_run_info) ;
     
@@ -345,20 +345,24 @@
 
 	if (!mlview_file_selection_type)
 	{
-		static const GtkTypeInfo mlview_file_selection_type_info =
-		{
-			"MlViewFileSelection",
-			sizeof(MlViewFileSelection),
-			sizeof(MlViewFileSelectionClass),
-			(GtkClassInitFunc) mlview_file_selection_class_init,
-			(GtkObjectInitFunc) mlview_file_selection_init,
-			NULL,
-			NULL,
-			(GtkClassInitFunc) NULL
-		} ;
-		mlview_file_selection_type = 
-			gtk_type_unique (gtk_file_selection_get_type(), 
-					 &mlview_file_selection_type_info) ;
+                static const GTypeInfo type_info =
+                        {
+                                sizeof (MlViewFileSelectionClass),
+                                NULL, /* base_init */
+                                NULL, /* base_finalize */
+                                (GClassInitFunc) mlview_file_selection_class_init,
+                                NULL, /* class_finalize */
+                                NULL, /* class_data */
+                                sizeof (MlViewFileSelection),
+                                0,
+                                (GInstanceInitFunc) mlview_file_selection_init
+                        };
+                
+		mlview_file_selection_type = g_type_register_static (GTK_TYPE_FILE_SELECTION, 
+                                          "MlViewFileSelection",
+                                          &type_info,
+                                          0) ;
+
 	}
 
 	return mlview_file_selection_type ;
Index: src/mlview-file-selection.h
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-file-selection.h,v
retrieving revision 1.4
diff -u -r1.4 mlview-file-selection.h
--- src/mlview-file-selection.h	6 Jul 2003 13:44:20 -0000	1.4
+++ src/mlview-file-selection.h	28 Jul 2003 14:21:15 -0000
@@ -28,7 +28,7 @@
 #ifndef __MLVIEW_FILE_SELECTION_DIALOG_H__
 #define __MLVIEW_FILE_SELECTION_DIALOG_H__
 
-#include <gnome.h>
+#include "gnome.h"
 
 #define MLVIEW_TYPE_FILE_SELECTION (mlview_file_selection_get_type())
 #define MLVIEW_FILE_SELECTION(widget) (GTK_CHECK_CAST((widget), MLVIEW_TYPE_FILE_SELECTION, MlViewFileSelection))
Index: src/mlview-name-value-pair.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-name-value-pair.c,v
retrieving revision 1.5
diff -u -r1.5 mlview-name-value-pair.c
--- src/mlview-name-value-pair.c	6 Jul 2003 13:44:20 -0000	1.5
+++ src/mlview-name-value-pair.c	28 Jul 2003 14:21:15 -0000
@@ -49,16 +49,24 @@
 {
 	static guint mlview_name_value_pair_type=0 ;
 	if(!mlview_name_value_pair_type){
-		static const GtkTypeInfo t_info=
-		{
-			"MlViewNameValuePair",
-			sizeof(MlViewNameValuePair),
-			sizeof(MlViewNameValuePairClass),
-			(GtkClassInitFunc)mlview_name_value_pair_init_class,
-			(GtkObjectInitFunc)mlview_name_value_pair_init,
-			NULL,NULL,NULL      
-		};
-		mlview_name_value_pair_type=gtk_type_unique(GTK_TYPE_OBJECT,&t_info) ;
+
+	  static const GTypeInfo t_info =
+                        {
+                                sizeof (MlViewNameValuePairClass),
+                                NULL, /* base_init */
+                                NULL, /* base_finalize */
+                                (GClassInitFunc) mlview_name_value_pair_init_class,
+                                NULL, /* class_finalize */
+                                NULL, /* class_data */
+                                sizeof (MlViewNameValuePair),
+                                0,
+                                (GInstanceInitFunc) mlview_name_value_pair_init
+                        };
+	  
+		mlview_name_value_pair_type=g_type_register_static(GTK_TYPE_OBJECT,
+							    "MlViewNameValuePair",
+							    &t_info,
+							    0) ;
 	}
 	return mlview_name_value_pair_type ;
 }
Index: src/mlview-namespace-editor.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-namespace-editor.c,v
retrieving revision 1.21
diff -u -r1.21 mlview-namespace-editor.c
--- src/mlview-namespace-editor.c	9 Jul 2003 17:27:20 -0000	1.21
+++ src/mlview-namespace-editor.c	28 Jul 2003 14:21:17 -0000
@@ -421,18 +421,22 @@
 	
 	if (p_namespace_picker == NULL) {
 		p_namespace_picker = 
-			gnome_dialog_new (_("add namespace:"),
-					  GNOME_STOCK_BUTTON_OK,
-					  GNOME_STOCK_BUTTON_CANCEL,NULL) ;
+			gtk_dialog_new_with_buttons (
+                                                     _("add namespace:"),
+                                                     NULL,
+                                                     GTK_DIALOG_MODAL,
+                                                     _("OK"),
+                                                     GTK_RESPONSE_ACCEPT,
+                                                     _("Cancel"),
+                                                     GTK_RESPONSE_REJECT,
+                                                     NULL) ;
 
 		gtk_window_set_modal (GTK_WINDOW (p_namespace_picker), TRUE) ;
 
-		gnome_dialog_close_hides (GNOME_DIALOG (p_namespace_picker), 
-					  TRUE) ;
-
+		
 		message = gtk_label_new (_("enter namespace prefix and uri:")) ;
 		gtk_box_pack_start 
-			(GTK_BOX(GNOME_DIALOG (p_namespace_picker)->vbox), 
+			(GTK_BOX(GTK_DIALOG (p_namespace_picker)->vbox), 
 			 message, TRUE, TRUE, 0) ;
 
 		label = gtk_label_new (_("prefix")) ;
@@ -447,7 +451,7 @@
 		gtk_table_attach_defaults (GTK_TABLE (table),prefix,
 					  1,2,0,1) ;
 
-		gtk_box_pack_start (GTK_BOX (GNOME_DIALOG 
+		gtk_box_pack_start (GTK_BOX (GTK_DIALOG 
 					     (p_namespace_picker)->vbox),table,
 				    FALSE, TRUE, 0) ;
 
@@ -463,18 +467,16 @@
 		gtk_table_attach_defaults (GTK_TABLE (table), uri,
 					   1,2,0,1) ;
 
-		gtk_box_pack_start (GTK_BOX(GNOME_DIALOG 
+		gtk_box_pack_start (GTK_BOX(GTK_DIALOG 
 					    (p_namespace_picker)->vbox), table,
 				    FALSE,TRUE,0) ;
 
 		gtk_widget_show_all 
-			(GTK_WIDGET (GNOME_DIALOG (p_namespace_picker)->vbox)) ;
+			(GTK_WIDGET (GTK_DIALOG (p_namespace_picker)->vbox)) ;
 	}
 
 	gtk_widget_grab_focus (prefix) ;
 
-	gnome_dialog_set_default (GNOME_DIALOG (p_namespace_picker), 0) ;
-
 	uri_str = (guchar *)gtk_entry_get_text (GTK_ENTRY (prefix)) ;
 
 	if (!mlview_utils_is_white_string (uri_str))
@@ -488,11 +490,11 @@
 			(PRIVATE (a_editor)->app_context, 
 			 GTK_WIDGET (p_namespace_picker)) ;
 
-		button = gnome_dialog_run (GNOME_DIALOG (p_namespace_picker)) ;
+		button = gtk_dialog_run (GTK_DIALOG (p_namespace_picker)) ;
 
 		switch (button) 
 		{
-		case 0:/*OK*/
+		case GTK_RESPONSE_ACCEPT :/*OK*/
 			prefix_str = (guchar*)gtk_entry_get_text (GTK_ENTRY (prefix));
 			uri_str = (guchar*) gtk_entry_get_text (GTK_ENTRY (uri)) ;
 			result = mlview_namespace_editor_add_namespace_def 
@@ -502,8 +504,8 @@
 			if (result != NULL) 
 			{
 				loop = FALSE ;
-				gnome_dialog_close 
-					(GNOME_DIALOG (p_namespace_picker)) ;
+				gtk_widget_hide
+					(GTK_WIDGET (p_namespace_picker)) ;
 			}
 			else
 			{
@@ -513,10 +515,12 @@
 			}
 			break ;
 
-		case 1:/*cancel*/
+		case GTK_RESPONSE_REJECT :/*cancel*/
 			result = NULL ;
 			loop = FALSE ;
-			gnome_dialog_close (GNOME_DIALOG (p_namespace_picker)) ;
+                        gtk_widget_hide
+                                (GTK_WIDGET 
+                                 (p_namespace_picker)) ;
 			break ;
 
 		case -1:
@@ -553,18 +557,25 @@
 
 	if(!mlview_namespace_editor_type)
 	{
-		const static GtkTypeInfo type_info =
-		{
-			(guchar*)"MlViewNamespaceEditor",
-			sizeof (MlViewNamespaceEditor),
-			sizeof (MlViewNamespaceEditorClass),
-			(GtkClassInitFunc) mlview_namespace_editor_class_init,
-			(GtkObjectInitFunc) mlview_namespace_editor_init,
-			NULL, NULL, (GtkClassInitFunc)NULL
-		} ;
 
-		mlview_namespace_editor_type = 
-			gtk_type_unique(gtk_vbox_get_type(), &type_info) ;
+                static const GTypeInfo type_info =
+                        {
+                                sizeof (MlViewNamespaceEditorClass),
+                                NULL, /* base_init */
+                                NULL, /* base_finalize */
+                                (GClassInitFunc) mlview_namespace_editor_class_init,
+                                NULL, /* class_finalize */
+                                NULL, /* class_data */
+                                sizeof (MlViewNamespaceEditor),
+                                0,
+                                (GInstanceInitFunc) mlview_namespace_editor_init
+                        };
+                
+		mlview_namespace_editor_type = g_type_register_static (GTK_TYPE_VBOX, 
+                                          "MlViewNamespaceEditor",
+                                          &type_info,
+                                          0) ;
+
 	}
 	return mlview_namespace_editor_type ;
 }
Index: src/mlview-namespace-editor.h
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-namespace-editor.h,v
retrieving revision 1.13
diff -u -r1.13 mlview-namespace-editor.h
--- src/mlview-namespace-editor.h	9 Jul 2003 17:27:20 -0000	1.13
+++ src/mlview-namespace-editor.h	28 Jul 2003 14:21:17 -0000
@@ -28,7 +28,6 @@
 #ifndef __MLVIEW_NAMESPACE_EDITOR_H__
 #define __MLVIEW_NAMESPACE_EDITOR_H__
 
-#include <gnome.h>
 #include <libxml/tree.h>
 #include "mlview-app-context.h"
 
Index: src/mlview-node-editor.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-node-editor.c,v
retrieving revision 1.24
diff -u -r1.24 mlview-node-editor.c
--- src/mlview-node-editor.c	9 Jul 2003 17:27:20 -0000	1.24
+++ src/mlview-node-editor.c	28 Jul 2003 14:21:22 -0000
@@ -1933,20 +1933,23 @@
 	static guint mlview_node_editor_type=0 ;
 
 	if(!mlview_node_editor_type){
-		const static GtkTypeInfo mlview_node_editor_type_info =
-		{
-			(guchar*)"MlViewNodeEditor",
-			sizeof(MlViewNodeEditor),
-			sizeof(MlViewNodeEditorClass),
-			(GtkClassInitFunc)mlview_node_editor_class_init ,
-			(GtkObjectInitFunc)mlview_node_editor_init,
-			NULL,
-			NULL,
-			(GtkClassInitFunc)NULL
-		};
-		mlview_node_editor_type = 
-			gtk_type_unique(gtk_hpaned_get_type(), 
-					&mlview_node_editor_type_info);
+                static const GTypeInfo  mlview_node_editor_type_info =
+                        {
+                                sizeof (MlViewNodeEditorClass),
+                                NULL, /* base_init */
+                                NULL, /* base_finalize */
+                                (GClassInitFunc) mlview_node_editor_class_init,
+                                NULL, /* class_finalize */
+                                NULL, /* class_data */
+                                sizeof (MlViewNodeEditor),
+                                0,
+                                (GInstanceInitFunc) mlview_node_editor_init
+                        };
+	  
+		mlview_node_editor_type=g_type_register_static(GTK_TYPE_HPANED,
+							    "MlViewNodeEditor",
+							    &mlview_node_editor_type_info,
+							    0) ;
 	}
 	return mlview_node_editor_type ;
 }
Index: src/mlview-node-editor.h
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-node-editor.h,v
retrieving revision 1.7
diff -u -r1.7 mlview-node-editor.h
--- src/mlview-node-editor.h	6 Jul 2003 13:44:20 -0000	1.7
+++ src/mlview-node-editor.h	28 Jul 2003 14:21:22 -0000
@@ -35,7 +35,6 @@
 #ifndef __MLVIEW_NODE_EDITOR_H__
 #define __MLVIEW_NODE_EDITOR_H__
 
-#include <gnome.h>
 #include <libxml/tree.h>
 #include "mlview-app-context.h"
 #include "mlview-xml-document.h"
Index: src/mlview-node-type-picker.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-node-type-picker.c,v
retrieving revision 1.18
diff -u -r1.18 mlview-node-type-picker.c
--- src/mlview-node-type-picker.c	6 Jul 2003 13:44:20 -0000	1.18
+++ src/mlview-node-type-picker.c	28 Jul 2003 14:21:23 -0000
@@ -31,7 +31,7 @@
 #include "mlview-global-settings.h"
 
 /*a pointer to the parent class structure of MlViewNodeTypePickerClass*/
-static GnomeDialogClass *parent_class = NULL ;
+static GtkDialogClass *parent_class = NULL ;
 static gboolean gv_on_going_validation = TRUE ;
 
 /*the data structure of the private part of MlViewNodeType*/
@@ -147,7 +147,7 @@
 	GtkObjectClass * object_class ;
 	g_return_if_fail (a_klass != NULL) ;
 	
-	parent_class = gtk_type_class (GNOME_TYPE_DIALOG) ;
+	parent_class = gtk_type_class (GTK_TYPE_DIALOG) ;
 	object_class = GTK_OBJECT_CLASS (a_klass);
 	
 	object_class->destroy = mlview_node_type_picker_destroy ;	
@@ -210,7 +210,7 @@
 				   (PRIVATE (a_nt_picker)->node_types_combo),
 				   1,2,0,1) ;
 
-	gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (a_nt_picker)->vbox),
+	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (a_nt_picker)->vbox),
 			   table,FALSE,TRUE,0) ;
 
 	gtk_widget_show (table) ;
@@ -228,7 +228,7 @@
 		 GTK_WIDGET (PRIVATE (a_nt_picker)->node_name_or_content),
 		 1,2,0,1) ;
 
-	gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (a_nt_picker)->vbox),
+	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (a_nt_picker)->vbox),
 			    table,FALSE,TRUE,0) ;	
 
 	gtk_widget_show (table) ;
@@ -476,7 +476,7 @@
 	g_return_if_fail (a_nt_picker != NULL) ;
 	
 	node_type_name = 
-		gtk_entry_get_text (GTK_ENTRY (a_entry)) ;
+		(guchar *)gtk_entry_get_text (GTK_ENTRY (a_entry)) ;
 
 	g_assert (node_type_name != NULL) ;
 	g_assert (gv_xml_node_types_by_names != NULL) ;
@@ -508,7 +508,6 @@
 mlview_node_type_picker_new (MlViewAppContext *a_app_context)
 {
 	GtkWidget * result ;
-	gchar * buttons[] = {GNOME_STOCK_BUTTON_OK,GNOME_STOCK_BUTTON_CANCEL,NULL} ;
 		
 	result = GTK_WIDGET (gtk_type_new (MLVIEW_TYPE_NODE_TYPE_PICKER)) ;
 	g_return_val_if_fail (result != NULL, NULL) ;
@@ -516,11 +515,14 @@
 
 	PRIVATE (MLVIEW_NODE_TYPE_PICKER (result))->app_context = a_app_context ;
 
-	gnome_dialog_constructv (GNOME_DIALOG (result),
-				_("Define a new node"),
-				(const gchar **)buttons) ;
-	
-	gnome_dialog_set_default (GNOME_DIALOG (result), 0) ;
+	gtk_dialog_add_buttons(
+			       GTK_DIALOG(result),
+			       _("OK"),
+			       GTK_RESPONSE_ACCEPT,
+			       _("Cancel"),
+			       GTK_RESPONSE_REJECT,
+			       NULL);
+
 	return result ;
 }
 
@@ -583,7 +585,6 @@
 mlview_node_type_picker_new_with_title (gchar * a_title, MlViewAppContext *a_app_context)
 {
 	GtkWidget * result ;
-	gchar * buttons[] = {GNOME_STOCK_BUTTON_OK,GNOME_STOCK_BUTTON_CANCEL,NULL} ;
 	
 	result = GTK_WIDGET (gtk_type_new (MLVIEW_TYPE_NODE_TYPE_PICKER)) ;
 	g_return_val_if_fail (result != NULL, NULL) ;
@@ -591,11 +592,16 @@
 
 	PRIVATE (MLVIEW_NODE_TYPE_PICKER (result))->app_context = a_app_context ;
 
-	gnome_dialog_constructv (GNOME_DIALOG (result),
-				 a_title,
-				 (const gchar **)buttons) ;
-	gnome_dialog_set_default (GNOME_DIALOG (result), 0) ;
+	gtk_dialog_add_buttons(
+			       GTK_DIALOG(result),
+			       _("OK"),
+			       GTK_RESPONSE_ACCEPT,
+			       _("Cancel"),
+			       GTK_RESPONSE_REJECT,
+			       NULL);
 
+
+	
 	mlview_app_context_set_window_icon (a_app_context, result) ;
 	return result ;
 }
@@ -656,7 +662,7 @@
 		 *invocation of 
 		 *mvliew_node_type_picker_build_element_name_choice_list ()
 		 */
-		return gtk_entry_get_text 
+		return (guchar *) gtk_entry_get_text 
 			(GTK_ENTRY (PRIVATE(a_nt_picker)->node_name_or_content->entry)) ;
 	}
 	return NULL ;
@@ -830,15 +836,24 @@
 	static guint mlview_node_type_picker_type=0 ;
 
 	if ( !mlview_node_type_picker_type ) {
-		static const GtkTypeInfo t_info = {
-			"MlViewNodeTypePicker",
-			sizeof (MlViewNodeTypePicker),
-			sizeof (MlViewNodeTypePickerClass),
-			(GtkClassInitFunc) mlview_node_type_picker_init_class,
-			(GtkObjectInitFunc) mlview_node_type_picker_init,
-			NULL,NULL,NULL
-		};
-		mlview_node_type_picker_type = gtk_type_unique (GNOME_TYPE_DIALOG,&t_info) ;
+	  
+	  static const GTypeInfo t_info =
+                        {
+                                sizeof (MlViewNodeTypePickerClass),
+                                NULL, /* base_init */
+                                NULL, /* base_finalize */
+                                (GClassInitFunc) mlview_node_type_picker_init_class,
+                                NULL, /* class_finalize */
+                                NULL, /* class_data */
+                                sizeof (MlViewNodeTypePicker),
+                                0,
+                                (GInstanceInitFunc) mlview_node_type_picker_init,
+                        };
+
+	  mlview_node_type_picker_type = g_type_register_static (GTK_TYPE_DIALOG,
+								"MlViewNodeTypePicker",
+								&t_info,
+								0) ;
 	}
 	return mlview_node_type_picker_type ;
 }
@@ -872,7 +887,7 @@
 	mlview_node_type_picker_set_focus_to_node_name_or_content_entry (a_nt_picker) ;
 	
 	if ( PRIVATE (a_nt_picker)->node_name_or_content )
-		tmp_str = gtk_entry_get_text (GTK_ENTRY (PRIVATE(a_nt_picker)->node_name_or_content->entry)) ;
+		tmp_str = (guchar *) gtk_entry_get_text (GTK_ENTRY (PRIVATE(a_nt_picker)->node_name_or_content->entry)) ;
 
 	if ( tmp_str != NULL ) {
 		gtk_entry_select_region(GTK_ENTRY (PRIVATE (a_nt_picker)->node_name_or_content->entry), 0, -1) ;
Index: src/mlview-node-type-picker.h
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-node-type-picker.h,v
retrieving revision 1.10
diff -u -r1.10 mlview-node-type-picker.h
--- src/mlview-node-type-picker.h	6 Jul 2003 13:44:20 -0000	1.10
+++ src/mlview-node-type-picker.h	28 Jul 2003 14:21:24 -0000
@@ -36,7 +36,6 @@
 #ifndef __MLV_ELTYPE_PICKER_H__
 #define __MLV_ELTYPE_PICKER_H__
 
-#include <gnome.h>
 #include <libxml/tree.h>
 
 #include "mlview-app-context.h"
@@ -60,14 +59,14 @@
 	/*The MlViewNodeTypePicker instance definition*/
 	struct _MlViewNodeTypePicker
 	{
-		GnomeDialog dialog ;
+		GtkDialog dialog ;
 		MlViewNodeTypePickerPrivate * private ;
 	} ;
 	
 	/*The MlViewNodeTypePicker class definition*/
 	struct _MlViewNodeTypePickerClass
 	{
-		GnomeDialogClass parent_class ;
+		GtkDialogClass parent_class ;
 		/*any signal handler shoud come here*/
 	};
 
Index: src/mlview-parsing-utils.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-parsing-utils.c,v
retrieving revision 1.17
diff -u -r1.17 mlview-parsing-utils.c
--- src/mlview-parsing-utils.c	27 Jul 2003 15:45:36 -0000	1.17
+++ src/mlview-parsing-utils.c	28 Jul 2003 14:21:27 -0000
@@ -795,14 +795,25 @@
 	
 		gv_dtd_choice_dialog = glade_xml_get_widget (gxml, "mlview_dtd_choice");
         }
+        
+        gv_dtd_choice_dialog = glade_xml_get_widget (gxml, "mlview_dtd_choice");
+        
+        
+        
+        
+	
+        glade_xml_signal_autoconnect (gxml);
+        
+        mlview_app_context_set_window_icon (a_app_context, 
+                                            GTK_WIDGET (gv_dtd_choice_dialog)) ;
 
-	mlview_app_context_set_window_icon (a_app_context, 
+        mlview_app_context_set_window_icon (a_app_context, 
 					    GTK_WIDGET (gv_dtd_choice_dialog)) ;
 	glade_xml_signal_autoconnect (gxml);
 
 	button = gtk_dialog_run (GTK_DIALOG(gv_dtd_choice_dialog));
-	
-	if (resource) 
+
+        if (resource) 
 	{
 		switch(button)
 		{
Index: src/mlview-parsing-utils.h
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-parsing-utils.h,v
retrieving revision 1.8
diff -u -r1.8 mlview-parsing-utils.h
--- src/mlview-parsing-utils.h	11 Jul 2003 21:35:00 -0000	1.8
+++ src/mlview-parsing-utils.h	28 Jul 2003 14:21:28 -0000
@@ -30,7 +30,6 @@
 
 G_BEGIN_DECLS
 
-#include <gnome.h>
 #include <libxml/tree.h>
 #include "mlview-app-context.h"
 
Index: src/mlview-preferences.h
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-preferences.h,v
retrieving revision 1.2
diff -u -r1.2 mlview-preferences.h
--- src/mlview-preferences.h	21 Jul 2003 19:18:13 -0000	1.2
+++ src/mlview-preferences.h	28 Jul 2003 14:21:28 -0000
@@ -27,7 +27,6 @@
 #ifndef __MLVIEW_PREFERENCES_H__
 #define __MLVIEW_PREFERENCES_H__
 
-#include <gnome.h>
 #include <glade/glade.h>
 #include "mlview-preferences.h"
 #include "mlview-app-context.h"
Index: src/mlview-settings-builder.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-settings-builder.c,v
retrieving revision 1.6
diff -u -r1.6 mlview-settings-builder.c
--- src/mlview-settings-builder.c	6 Jul 2003 13:44:20 -0000	1.6
+++ src/mlview-settings-builder.c	28 Jul 2003 14:21:29 -0000
@@ -311,7 +311,7 @@
 
 	/*get "tree view depth expansion" setting*/
 	depth_str = 
-		gtk_entry_get_text (settings_widgets_struct->tree_exp_depth)  ;
+		(guchar *) gtk_entry_get_text (settings_widgets_struct->tree_exp_depth)  ;
 
 	if(depth_str != NULL && strcmp (depth_str,""))
 		g_hash_table_insert (settings,
@@ -529,18 +529,23 @@
 
 	if (!settings_builder_type) 
 	{
-		static const GtkTypeInfo settings_builder_type_info = 
-		{
-			"MlViewSettingsBuilder",
-			sizeof (MlViewSettingsBuilder) ,
-			sizeof (MlViewSettingsBuilderClass),
-			(GtkClassInitFunc) mlview_settings_builder_init_class ,
-			(GtkObjectInitFunc) mlview_settings_builder_init,
-			NULL, NULL,NULL
-		} ;
-		settings_builder_type = 
-			gtk_type_unique (gtk_object_get_type (),
-					 &settings_builder_type_info) ;
+	  static const GTypeInfo  settings_builder_type_info =
+                        {
+                                sizeof (MlViewSettingsBuilderClass),
+                                NULL, /* base_init */
+                                NULL, /* base_finalize */
+                                (GClassInitFunc) mlview_settings_builder_init_class,
+                                NULL, /* class_finalize */
+                                NULL, /* class_data */
+                                sizeof (MlViewSettingsBuilder),
+                                0,
+                                (GInstanceInitFunc) mlview_settings_builder_init
+                        };
+	  
+		settings_builder_type = g_type_register_static(GTK_TYPE_OBJECT,
+							    "MlViewSettingsBuilder",
+							    &settings_builder_type_info ,
+							    0) ;
 	}
 
 	return settings_builder_type ;
Index: src/mlview-settings-builder.h
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-settings-builder.h,v
retrieving revision 1.3
diff -u -r1.3 mlview-settings-builder.h
--- src/mlview-settings-builder.h	6 Jul 2003 13:44:20 -0000	1.3
+++ src/mlview-settings-builder.h	28 Jul 2003 14:21:29 -0000
@@ -31,7 +31,6 @@
 extern "C" {
 #endif /*__cplusplus*/
 
-#include <gnome.h>
 #include "mlview-app-context.h"
 #include "mlview-settings-management.h"
 
@@ -51,7 +50,7 @@
 	} ;
 
 	struct _MlViewSettingsBuilderClass {
-		GnomeDialogClass parent_class ;
+		GtkDialogClass parent_class ;
 	} ;
 
 	gint          mlview_settings_builder_get_type                             (void) ;	
Index: src/mlview-settings-management.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-settings-management.c,v
retrieving revision 1.9
diff -u -r1.9 mlview-settings-management.c
--- src/mlview-settings-management.c	6 Jul 2003 13:44:20 -0000	1.9
+++ src/mlview-settings-management.c	28 Jul 2003 14:21:31 -0000
@@ -89,7 +89,7 @@
 	GHashTable * settings_entries_map ;
 
 	/*the root property window*/
-	GnomeDialog *settings_dialog ; 
+	GtkDialog *settings_dialog ; 
 
 	GtkHPaned *paned_widget ;
 
@@ -528,16 +528,18 @@
 
 	/*Create the settings dialog window*/
 	PRIVATE (result)->settings_dialog = 
-		GNOME_DIALOG (gnome_dialog_new 
-			      (_("MlView XML Editor Settings"),
-			       GNOME_STOCK_BUTTON_OK, 
-			       GNOME_STOCK_BUTTON_CANCEL, NULL)) ;
+		GTK_DIALOG (gtk_dialog_new_with_buttons(_("MlView XML Editor Settings"),
+							NULL,
+							GTK_DIALOG_MODAL,
+							_("OK"), 
+							GTK_RESPONSE_ACCEPT,
+							_("Cancel"), 
+							GTK_RESPONSE_REJECT,
+							NULL)) ;
 	
 	gtk_window_set_wmclass (GTK_WINDOW (PRIVATE (result)->settings_dialog),
 				"editor-settings-dialog", "MlView") ;
 
-	gnome_dialog_close_hides (PRIVATE (result)->settings_dialog, TRUE) ;
-
 	gtk_window_set_policy (GTK_WINDOW (PRIVATE (result)->settings_dialog), 
 			       FALSE, TRUE, FALSE) ;
 
@@ -590,7 +592,7 @@
  *
  *@return the 
  */
-GnomeDialog *  
+GtkDialog *  
 mlview_settings_manager_get_settings_dialog(MlViewSettingsManager *a_manager)
 {
 	g_return_val_if_fail (a_manager != NULL, NULL) ;
@@ -796,7 +798,7 @@
 void 
 mlview_settings_manager_edit_settings_interactive (MlViewSettingsManager *a_manager)
 {
-	GnomeDialog * dialog ;
+	GtkDialog * dialog ;
 	gint button ;
 
 	dialog = mlview_settings_manager_get_settings_dialog (a_manager) ;
@@ -808,21 +810,21 @@
 	mlview_settings_manager_do_pre_edition_processing (a_manager) ;
 
 	mlview_app_context_set_window_icon (PRIVATE (a_manager)->app_context, GTK_WIDGET (dialog)) ;
-	button = gnome_dialog_run (dialog) ;
+	button = gtk_dialog_run (dialog) ;
 
 	switch (button) {
-	case 0:/*OK Button*/
+	case GTK_RESPONSE_ACCEPT :/*OK Button*/
 		mlview_settings_manager_do_post_edition_processing(a_manager) ;
-		gnome_dialog_close(dialog) ;
+		gtk_widget_hide(GTK_WIDGET(dialog));
 		break ;
-	case 1:/*CANCEL Button*/
-		gnome_dialog_close(dialog) ;
+	case GTK_RESPONSE_REJECT :/*CANCEL Button*/
+		gtk_widget_hide(GTK_WIDGET(dialog));
 		break ;
-	case -1:/*dialog close via Window manager*/
-		gnome_dialog_close(dialog) ;
+	case GTK_RESPONSE_CLOSE :/*dialog close via Window manager*/
+		gtk_widget_hide(GTK_WIDGET(dialog));
 		break ;
 	default :/*Just in case ...*/
-		gnome_dialog_close(dialog) ;
+		gtk_widget_hide(GTK_WIDGET(dialog));
 		break ;
 	}
 }
Index: src/mlview-settings-management.h
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-settings-management.h,v
retrieving revision 1.6
diff -u -r1.6 mlview-settings-management.h
--- src/mlview-settings-management.h	6 Jul 2003 13:44:20 -0000	1.6
+++ src/mlview-settings-management.h	28 Jul 2003 14:21:32 -0000
@@ -27,7 +27,6 @@
 #ifndef __MLVIEW_SETTINGS_MANAGEMENT_H__
 #define __MLVIEW_SETTINGS_MANAGEMENT_H__
 
-#include <gnome.h>
 #include <libxml/tree.h>
 #include <libxml/xpath.h>
 #include <libxml/xpathInternals.h>
@@ -142,7 +141,7 @@
 
 MlViewSettingsManager *  mlview_settings_manager_new(MlViewAppContext *a_app_context) ;
 
-GnomeDialog *  mlview_settings_manager_get_settings_dialog(MlViewSettingsManager *a_manager) ;
+GtkDialog *  mlview_settings_manager_get_settings_dialog(MlViewSettingsManager *a_manager) ;
 void mlview_settings_manager_edit_settings_interactive(MlViewSettingsManager *a_manager) ;
 gint  mlview_settings_manager_install_settings(MlViewSettingsManager *a_settings_manager,
 					       MlViewSettingsEntry *a_entry) ;
Index: src/mlview-tree-editor.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-tree-editor.c,v
retrieving revision 1.60
diff -u -r1.60 mlview-tree-editor.c
--- src/mlview-tree-editor.c	27 Jul 2003 00:15:01 -0000	1.60
+++ src/mlview-tree-editor.c	28 Jul 2003 14:21:38 -0000
@@ -116,7 +116,7 @@
 static const gint MLVIEW_CONTENT_MAX_LEN=512 ;
 static const gint MLVIEW_TREE_EDITOR_DEFAULT_EXPANSION_DEPTH = 2 ;
 
-static GnomeDialog * p_find_dialog = NULL ;
+static GtkDialog * p_find_dialog = NULL ;
 
 
 /*===================================================================
@@ -207,24 +207,24 @@
 
 static gboolean 
 mlview_tree_editor_find_dialog_search_in_names_is_on 
-(GnomeDialog * a_find_dialog) ;
+(GtkDialog * a_find_dialog) ;
 
 static gboolean 
 mlview_tree_editor_find_dialog_search_in_attributes_names_is_on 
-(GnomeDialog * a_find_dialog) ;
+(GtkDialog * a_find_dialog) ;
 
 static gboolean 
 mlview_tree_editor_find_dialog_search_in_attributes_values_is_on 
-(GnomeDialog * a_find_dialog) ;
+(GtkDialog * a_find_dialog) ;
 
 static gboolean 
 mlview_tree_editor_find_dialog_search_in_content_is_on
-(GnomeDialog * a_find_dialog) ;
+(GtkDialog * a_find_dialog) ;
 
 static GtkCTreeNode * 
 mlview_tree_editor_get_data_from_find_dialog_and_perform_search 
 (MlViewTreeEditor *a_tree_editor,
-GnomeDialog *a_dialog, 
+GtkDialog *a_dialog, 
 GtkCTreeNode * a_start_from, 
 gboolean a_start_after) ;
 
@@ -289,11 +289,11 @@
  *helper function to build, cache the find
  * (search) dialog box and to retrieve info from it
  */
-static GnomeDialog * 
+static GtkDialog * 
 mlview_tree_editor_find_dialog_box_retrieve (MlViewAppContext *a_context) ;
 
 static gchar * 
-mlview_tree_editor_find_dialog_get_searched_text (GnomeDialog * a_find_dialog) ;
+mlview_tree_editor_find_dialog_get_searched_text (GtkDialog * a_find_dialog) ;
 
 static guint mlview_tree_editor_signals [NUMBER_OF_SIGNALS] = {0} ;
 static GtkVBoxClass *parent_class=NULL ;
@@ -1265,7 +1265,7 @@
  *@param a_app_context the current "application context".
  *@return the "find" dialog box.
  */
-static GnomeDialog *
+static GtkDialog *
 mlview_tree_editor_find_dialog_box_retrieve (MlViewAppContext *a_app_context)
 {
 	GtkWidget * search_in_names_check = NULL, 
@@ -1278,12 +1278,17 @@
 	if (p_find_dialog == NULL) 
         {
 		p_find_dialog = 
-			GNOME_DIALOG 
-			(gnome_dialog_new 
-			 (_("Find an xml node in this document"),
-			  _("Find"),_("Cancel"), NULL)) ;
+			GTK_DIALOG 
+			(gtk_dialog_new_with_buttons(_("Find an xml node in this document"),
+                                                     NULL,
+                                                     GTK_DIALOG_MODAL,
+                                                     _("Find"),
+                                                     GTK_RESPONSE_ACCEPT,
+                                                     _("Cancel"),
+                                                     GTK_RESPONSE_REJECT,
+                                                     NULL)) ;
 
-                gtk_window_set_modal (GTK_WINDOW (p_find_dialog), FALSE) ;
+                //gtk_window_set_modal (GTK_WINDOW (p_find_dialog), FALSE) ;
 
 		gtk_object_set_data (GTK_OBJECT (p_find_dialog), 
 				     IS_THE_FIND_DIALOG, (gpointer)"yes") ;
@@ -1372,12 +1377,12 @@
  */
 static gboolean 
 mlview_tree_editor_find_dialog_search_in_names_is_on
-(GnomeDialog * a_find_dialog)
+(GtkDialog * a_find_dialog)
 {
 	gchar * check_str ;
 	GtkCheckButton * search_in_names_check_button ;
 
-	g_return_val_if_fail(GNOME_IS_DIALOG(a_find_dialog), FALSE) ;
+	g_return_val_if_fail(GTK_IS_DIALOG(a_find_dialog), FALSE) ;
 	
 	/*
 	 *a SANITY check:
@@ -1411,12 +1416,12 @@
  */
 static gboolean 
 mlview_tree_editor_find_dialog_search_in_attributes_names_is_on
-(GnomeDialog * a_find_dialog)
+(GtkDialog * a_find_dialog)
 {
 	gchar * check_str ;
 	GtkCheckButton * search_in_attribute_names_check_button ;
 
-	g_return_val_if_fail (GNOME_IS_DIALOG (a_find_dialog), FALSE) ;
+	g_return_val_if_fail (GTK_IS_DIALOG (a_find_dialog), FALSE) ;
 	
 	/*a SANITY check:
 	 *get a sanity check string associated to 
@@ -1447,12 +1452,12 @@
  */
 static gboolean 
 mlview_tree_editor_find_dialog_search_in_attributes_values_is_on
-(GnomeDialog * a_find_dialog)
+(GtkDialog * a_find_dialog)
 {
 	gchar * check_str ;
 	GtkCheckButton * search_in_attribute_values_check_button ;
 
-	g_return_val_if_fail(GNOME_IS_DIALOG(a_find_dialog), FALSE) ;
+	g_return_val_if_fail(GTK_IS_DIALOG(a_find_dialog), FALSE) ;
 	
 	/*a SANITY check:
 	 *get a sanity check string associated 
@@ -1483,12 +1488,12 @@
  */
 static gboolean 
 mlview_tree_editor_find_dialog_search_in_content_is_on 
-(GnomeDialog * a_find_dialog)
+(GtkDialog * a_find_dialog)
 {
 	gchar * check_str ;
 	GtkCheckButton * search_in_content_check_button ;
 
-	g_return_val_if_fail(GNOME_IS_DIALOG (a_find_dialog), FALSE) ;
+	g_return_val_if_fail(GTK_IS_DIALOG (a_find_dialog), FALSE) ;
 	
 	/*
 	 *a SANITY check:
@@ -1521,13 +1526,13 @@
  *function mlview_tree_editor_find_dialog_retrieve()
  */
 static gchar * 
-mlview_tree_editor_find_dialog_get_searched_text (GnomeDialog * a_find_dialog)
+mlview_tree_editor_find_dialog_get_searched_text (GtkDialog * a_find_dialog)
 {
 	gchar * check_str ;
 	gchar * result ;
 	GtkEntry * search_string_entry ;
 
-	g_return_val_if_fail(GNOME_IS_DIALOG(a_find_dialog), NULL) ;
+	g_return_val_if_fail(GTK_IS_DIALOG(a_find_dialog), NULL) ;
 	
 	/*
 	 *a SANITY check:
@@ -1569,7 +1574,7 @@
 static GtkCTreeNode *
 mlview_tree_editor_get_data_from_find_dialog_and_perform_search
 (MlViewTreeEditor *a_tree_editor,
- GnomeDialog *a_dialog, 
+ GtkDialog *a_dialog, 
  GtkCTreeNode * a_start_from, 
  gboolean a_start_after)
 {
@@ -3192,7 +3197,6 @@
 			(mlview_node_type_picker_new 
 			 (PRIVATE (a_tree_editor)->app_context)) ;
 
-		gnome_dialog_close_hides (GNOME_DIALOG (nt_picker), TRUE) ;
 		gtk_window_set_modal (GTK_WINDOW (nt_picker),TRUE) ;
 		mlview_tree_editor_set_node_type_picker (a_tree_editor,
 							 nt_picker) ;
@@ -3210,23 +3214,23 @@
 	mlview_app_context_set_window_icon 
 		(PRIVATE (a_tree_editor)->app_context, GTK_WIDGET (nt_picker)) ;
 
-	button = gnome_dialog_run (GNOME_DIALOG (nt_picker)) ;
+	button = gtk_dialog_run (GTK_DIALOG (nt_picker)) ;
 
 	switch (button) {
-	case 0:/*OK button*/
+	case GTK_RESPONSE_ACCEPT:/*OK button*/
 		mlview_tree_editor_handle_nt_picker_ok_button_clicked_to_add_child(a_tree_editor) ;
-		gnome_dialog_close
-			(GNOME_DIALOG
+		gtk_widget_hide
+			(GTK_WIDGET
 			 (PRIVATE(a_tree_editor)->node_type_picker)) ;
 		break ;
-	case 1:/*cancel button*/
-		gnome_dialog_close
-			(GNOME_DIALOG
+	case GTK_RESPONSE_REJECT:/*cancel button*/
+		gtk_widget_hide
+			(GTK_WIDGET
 			 (PRIVATE(a_tree_editor)->node_type_picker)) ;
 		break ;
 	default :
-		gnome_dialog_close
-			(GNOME_DIALOG
+                gtk_widget_hide
+			(GTK_WIDGET
 			 (PRIVATE(a_tree_editor)->node_type_picker)) ;
 		break ;
 	}
@@ -3261,8 +3265,7 @@
 			(mlview_node_type_picker_new 
 			 (PRIVATE (a_tree_editor)->app_context)) ;
 
-		gnome_dialog_close_hides (GNOME_DIALOG (nt_picker), TRUE) ;
-		gtk_window_set_modal (GTK_WINDOW (nt_picker), TRUE) ;
+                gtk_window_set_modal (GTK_WINDOW (nt_picker), TRUE) ;
 
 		mlview_tree_editor_set_node_type_picker (a_tree_editor, 
 							 nt_picker) ;
@@ -3293,23 +3296,23 @@
 	mlview_app_context_set_window_icon 
 		(PRIVATE (a_tree_editor)->app_context, 
 		 GTK_WIDGET (nt_picker)) ;
-	button = gnome_dialog_run (GNOME_DIALOG (nt_picker)) ;
+	button = gtk_dialog_run (GTK_DIALOG (nt_picker)) ;
 
 	switch (button) {
-	case 0:/*OK button*/
+	case GTK_RESPONSE_ACCEPT:/*OK button*/
 		mlview_tree_editor_handle_nt_picker_ok_button_clicked_to_insert_sibling_node (a_tree_editor) ;
-		gnome_dialog_close 
-			(GNOME_DIALOG 
+		gtk_widget_hide(
+			GTK_WIDGET 
 			 (PRIVATE (a_tree_editor)->node_type_picker)) ;
 		break ;
-	case 1:/*cancel button*/
-		gnome_dialog_close 
-			(GNOME_DIALOG 
+	case GTK_RESPONSE_REJECT:/*cancel button*/
+		gtk_widget_hide(
+			GTK_WIDGET
 			 (PRIVATE (a_tree_editor)->node_type_picker)) ;
 		break ;
 	default :
-		gnome_dialog_close 
-			(GNOME_DIALOG 
+		gtk_widget_hide(
+			GTK_WIDGET
 			 (PRIVATE (a_tree_editor)->node_type_picker)) ;
 		break ;
 	}
@@ -3337,7 +3340,6 @@
 			(mlview_node_type_picker_new 
 			 (PRIVATE (a_tree_editor)->app_context)) ;
 
-		gnome_dialog_close_hides (GNOME_DIALOG (nt_picker), TRUE) ;
 		gtk_window_set_modal (GTK_WINDOW(nt_picker), TRUE) ;
 		mlview_tree_editor_set_node_type_picker 
 			(a_tree_editor, nt_picker) ;
@@ -3366,18 +3368,18 @@
 		(PRIVATE (a_tree_editor)->app_context, 
 		 GTK_WIDGET (nt_picker)) ;
 
-	button = gnome_dialog_run (GNOME_DIALOG(nt_picker)) ;
+	button = gtk_dialog_run (GTK_DIALOG(nt_picker)) ;
 
 	switch (button) {
-	case 0:/*OK button*/
+	case GTK_RESPONSE_ACCEPT:/*OK button*/
 		mlview_tree_editor_handle_nt_picker_ok_button_clicked_to_insert_sibling_node(a_tree_editor) ;
-		gnome_dialog_close 
-			(GNOME_DIALOG 
+                gtk_widget_hide(
+                         GTK_WIDGET
 			 (PRIVATE (a_tree_editor)->node_type_picker)) ;
 		break ;
-	case 1:/*cancel button*/
-		gnome_dialog_close 
-			(GNOME_DIALOG 
+	case GTK_RESPONSE_REJECT:/*cancel button*/
+		gtk_widget_hide(
+                         GTK_WIDGET 
 			 (PRIVATE (a_tree_editor)->node_type_picker)) ;
 		break ;
 	default :
@@ -3482,7 +3484,7 @@
 mlview_tree_editor_find_xml_node_that_contains_str_interactive 
 (MlViewTreeEditor *a_tree_editor)
 {
-	GnomeDialog * find_dialog ;
+	GtkDialog * find_dialog ;
 	GtkCTreeNode * previously_found_node=NULL ;
 	gint button ;
 	gboolean go=FALSE, start_after=FALSE ;
@@ -3502,27 +3504,23 @@
 
 	while (go) {
 
-		gnome_dialog_close_hides (find_dialog, TRUE) ;		
 		gtk_widget_realize (GTK_WIDGET (find_dialog)) ;
 		mlview_app_context_set_window_icon 
 			(PRIVATE (a_tree_editor)->app_context, 
 			 GTK_WIDGET (find_dialog)) ;
-		button = gnome_dialog_run (find_dialog) ;
+		button = gtk_dialog_run (find_dialog) ;
 
 		switch (button) {
-		case 0:
+		case GTK_RESPONSE_ACCEPT :
 			start_after = 
 				(previously_found_node != NULL) ? TRUE : FALSE ;
 			previously_found_node = 
 				mlview_tree_editor_get_data_from_find_dialog_and_perform_search (a_tree_editor,
 														 find_dialog,previously_found_node, start_after) ;
 			break ;
-		case 1:
-			gnome_dialog_close (find_dialog) ;
-			go = FALSE ;
-			break ;
+		case GTK_RESPONSE_CLOSE :
 		default :
-			gnome_dialog_close (find_dialog) ;
+			gtk_widget_hide (GTK_WIDGET(find_dialog)) ;
 			go = FALSE ;
 			break ;	       
 		}
Index: src/mlview-tree-editor.h
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-tree-editor.h,v
retrieving revision 1.33
diff -u -r1.33 mlview-tree-editor.h
--- src/mlview-tree-editor.h	9 Jul 2003 17:27:20 -0000	1.33
+++ src/mlview-tree-editor.h	28 Jul 2003 14:21:39 -0000
@@ -35,7 +35,6 @@
 #ifndef __MLVIEW_TREE_EDITOR_H__
 #define __MLVIEW_TREE_EDITOR_H__
 
-#include <gnome.h>
 #include <libxml/tree.h>
 #include "mlview-node-type-picker.h"
 #include "mlview-settings-builder.h"
Index: src/mlview-utils.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-utils.c,v
retrieving revision 1.6
diff -u -r1.6 mlview-utils.c
--- src/mlview-utils.c	27 Jul 2003 21:35:07 -0000	1.6
+++ src/mlview-utils.c	28 Jul 2003 14:21:40 -0000
@@ -1071,7 +1071,7 @@
                                    const guchar *a_msg_format, ...)
 {
         va_list params ;        
-        GnomeDialog * err_dialog = NULL ;
+        GtkDialog * err_dialog = NULL ;
         GnomeApp * app = NULL ;
         GtkText * text_widget = NULL ;
         gchar * err_msg = NULL ;
@@ -1102,30 +1102,28 @@
                          err_msg, strlen (err_msg)) ;
         
 
-        err_dialog = GNOME_DIALOG (gnome_dialog_new (_("Error"),
-                                                     GNOME_STOCK_BUTTON_OK,
-                                                     NULL)) ;
+        err_dialog = GTK_DIALOG (gtk_dialog_new_with_buttons (_("Error"),
+                                                              GTK_WINDOW (app),
+                                                              GTK_DIALOG_MODAL,
+                                                              _("OK"),
+                                                              GTK_RESPONSE_ACCEPT,
+                                                              NULL)) ;
 
         mlview_utils_set_window_deco (GTK_WINDOW (err_dialog),
                                       a_ctxt, "error-dialog") ;
 
         g_return_if_fail (err_dialog) ;
 
-        gnome_dialog_close_hides (err_dialog, FALSE) ;
-
         gtk_box_pack_start_defaults (GTK_BOX (err_dialog->vbox),
                                      GTK_WIDGET (text_widget)) ;
 
-        /*the error dialog stays on top of the mlview app*/
-        gnome_dialog_set_parent (err_dialog, GTK_WINDOW (app)) ;
-
         /*let the window be user resizable*/
         gtk_window_set_policy (GTK_WINDOW (err_dialog),
                                FALSE, TRUE, FALSE) ;
 
         gtk_widget_show_all (GTK_WIDGET (err_dialog)) ;
 
-        gnome_dialog_run (err_dialog) ;
+        gtk_dialog_run (err_dialog) ;
 
         gtk_widget_destroy (GTK_WIDGET (err_dialog)) ;
 
Index: src/mlview-utils.h
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-utils.h,v
retrieving revision 1.6
diff -u -r1.6 mlview-utils.h
--- src/mlview-utils.h	27 Jul 2003 21:35:07 -0000	1.6
+++ src/mlview-utils.h	28 Jul 2003 14:21:41 -0000
@@ -34,7 +34,6 @@
 #include <libxml/parser.h>
 #include <libxml/xmlerror.h>
 
-#include <gnome.h>
 #include "config.h"
 #include "mlview-app-context.h"
 
Index: src/mlview-xml-doc-tree-view.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-xml-doc-tree-view.c,v
retrieving revision 1.20
diff -u -r1.20 mlview-xml-doc-tree-view.c
--- src/mlview-xml-doc-tree-view.c	27 Jul 2003 00:15:01 -0000	1.20
+++ src/mlview-xml-doc-tree-view.c	28 Jul 2003 14:21:44 -0000
@@ -33,7 +33,7 @@
 	MlViewTreeEditor *tree_editor ;
 	MlViewNodeEditor *node_editor ;
 	MlViewAppContext *app_context ;
-	GnomeDialog * expand_tree_dialog ;
+	GtkDialog * expand_tree_dialog ;
 	/*The main paned that divides the view in two main parts*/
 	GtkPaned *main_paned ;
 	GtkPaned *upper_paned1 ;	
@@ -142,7 +142,7 @@
 mlview_xml_doc_tree_view_doc_path_changed_cb (MlViewXMLDocument *a_xml_doc,
 					      gpointer a_xml_doc_tree_view) ;
 
-static GnomeDialog *
+static GtkDialog *
 mlview_xml_doc_tree_view_get_expand_tree_dialog 
 (MlViewXMLDocTreeView * a_view) ;
 
@@ -1047,7 +1047,7 @@
 }
 
 /**
- *This function builds a GnomeDialog that will ask the user
+ *This function builds a GtkDialog that will ask the user
  *to entrer the depth to which she wants the tree to be expanded.
  *The expansion depth is entered in a GtkEntry widget 
  *associated with the returned
@@ -1064,7 +1064,7 @@
  *that captured the "expand-to-leaves" info. 
  *
  */
-static GnomeDialog *
+static GtkDialog *
 mlview_xml_doc_tree_view_get_expand_tree_dialog (MlViewXMLDocTreeView * a_view)
 {
 	GtkWidget *table = NULL, *label = NULL, *depth_entry = NULL ;
@@ -1077,23 +1077,25 @@
 	if (PRIVATE (a_view)->expand_tree_dialog == NULL) 
 	{
 		PRIVATE (a_view)->expand_tree_dialog = 
-			GNOME_DIALOG 
-			(gnome_dialog_new 
-			 (_("Choose the depth of the tree expansion"),
-			  GNOME_STOCK_BUTTON_OK, 
-			  GNOME_STOCK_BUTTON_CANCEL, NULL)) ;
+			GTK_DIALOG 
+			(gtk_dialog_new_with_buttons(_("Choose the depth of the tree expansion"),
+                                                     NULL,
+                                                     GTK_DIALOG_MODAL,
+                                                     _("OK"), 
+                                                     GTK_RESPONSE_ACCEPT,
+                                                     _("Cancel"), 
+                                                     GTK_RESPONSE_REJECT,
+                                                     NULL)) ;
 
-		mlview_app_context_set_window_icon 
+		/*En attendant que l on trouve une solution commune
+                  mlview_app_context_set_window_icon 
 			(PRIVATE (a_view)->app_context, 
-			 GTK_WIDGET (PRIVATE (a_view)->expand_tree_dialog)) ;
+                        GTK_WIDGET (PRIVATE (a_view)->expand_tree_dialog)) ;*/
 
 		gtk_window_set_wmclass (GTK_WINDOW 
 					(PRIVATE (a_view)->expand_tree_dialog),
 					"choose-depth-dialog", "MlView") ;
 
-		gnome_dialog_close_hides (PRIVATE (a_view)->expand_tree_dialog,
-					  TRUE) ;
-
 		expand_to_leaves = gtk_check_button_new_with_label 
 			(_("expand to leaves")) ;
 
@@ -1733,7 +1735,7 @@
 mlview_xml_doc_tree_view_expand_tree_to_depth_interactive 
 (MlViewXMLDocTreeView *a_view)
 {
-	GnomeDialog * dialog = NULL ;
+	GtkDialog * dialog = NULL ;
 	GtkWidget * expand_to_leaves = NULL, *depth_entry = NULL ;
 	gint button = 0, depth = 0 ;
 	gchar *depth_str = NULL ;
@@ -1745,7 +1747,7 @@
 	dialog = mlview_xml_doc_tree_view_get_expand_tree_dialog (a_view) ;
 	g_return_if_fail (dialog != NULL) ;
 
-	button = gnome_dialog_run_and_close (dialog) ;
+	button = gtk_dialog_run (dialog) ;
 
 	expand_to_leaves = gtk_object_get_data (GTK_OBJECT (dialog),
 						"expand-to-leaves") ;
@@ -1757,7 +1759,7 @@
 	
 	switch (button) 
 	{
-	case 0:/*user clicked OK*/
+	case GTK_RESPONSE_ACCEPT :/*user clicked OK*/
 		if (gtk_toggle_button_get_active 
 		    (GTK_TOGGLE_BUTTON (expand_to_leaves)) == TRUE)
 		{
@@ -1777,13 +1779,13 @@
 			}
 		}
 		break ;
-	case 1:/*user clicked CANCEL*/
-	case -1:/*closed the dialog box*/
+	case GTK_RESPONSE_REJECT :/*user clicked CANCEL*/
+	case GTK_RESPONSE_CLOSE :/*closed the dialog box*/
 	default:/*the sky falls on our heads*/
 		break ;
 	}
 
-	gnome_dialog_close (dialog) ;
+	gtk_widget_hide (GTK_WIDGET(dialog)) ;
 }
 
 void
Index: src/mlview-xml-doc-tree-view.h
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-xml-doc-tree-view.h,v
retrieving revision 1.12
diff -u -r1.12 mlview-xml-doc-tree-view.h
--- src/mlview-xml-doc-tree-view.h	9 Jul 2003 17:27:20 -0000	1.12
+++ src/mlview-xml-doc-tree-view.h	28 Jul 2003 14:21:44 -0000
@@ -28,7 +28,6 @@
 #ifndef __MLVIEW_XML_DOC_TREE_VIEW_H__
 #define __MLVIEW_XML_DOC_TREE_VIEW_H__
 
-#include <gnome.h>
 #include <libxml/tree.h>
 #include "mlview-tree-editor.h"
 #include "mlview-node-editor.h"
Index: src/mlview-xml-document-view.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-xml-document-view.c,v
retrieving revision 1.6
diff -u -r1.6 mlview-xml-document-view.c
--- src/mlview-xml-document-view.c	9 Jul 2003 17:27:20 -0000	1.6
+++ src/mlview-xml-document-view.c	28 Jul 2003 14:21:45 -0000
@@ -37,7 +37,7 @@
 	gchar *view_name ;
 
 	/*the interactif name edition widget*/
-	GnomeDialog * name_edition_dialog ;
+	GtkDialog * name_edition_dialog ;
 } ;
 
 
@@ -258,20 +258,24 @@
 static GtkWidget *
 build_name_edition_dialog (MlViewAppContext * a_app_context)
 {
-	GnomeDialog * result = NULL ;
+	GtkDialog * result = NULL ;
 	GtkEntry * name_entry_field = NULL ;
 
 	g_return_val_if_fail (a_app_context != NULL, NULL) ;
 	g_return_val_if_fail (MLVIEW_IS_APP_CONTEXT (a_app_context), NULL) ;
 
 	result = 
-		GNOME_DIALOG 
-		(gnome_dialog_new (_("Type the name of the current view"),
-				   _("OK"), _("Cancel"), NULL)) ;
+		GTK_DIALOG 
+		(gtk_dialog_new_with_buttons (_("Type the name of the current view"),
+                                              NULL,
+                                              GTK_DIALOG_MODAL,
+                                              _("OK"), 
+                                              GTK_RESPONSE_ACCEPT,
+                                              _("Cancel"), 
+                                              GTK_RESPONSE_REJECT,
+                                              NULL)) ;
 
-	gnome_dialog_close_hides (result, TRUE) ;
-
-	name_entry_field =
+        name_entry_field =
 		GTK_ENTRY (gtk_entry_new ()) ;
 
 	gtk_widget_show_all (GTK_WIDGET (name_entry_field)) ;
@@ -303,7 +307,7 @@
 	GtkEntry * name_entry = NULL ;
 
 	g_return_if_fail (a_edition_widget != NULL) ;
-	g_return_if_fail (GNOME_IS_DIALOG (a_edition_widget)) ;
+	g_return_if_fail (GTK_IS_DIALOG (a_edition_widget)) ;
 
 	name_entry = 
 		gtk_object_get_data (GTK_OBJECT (a_edition_widget),
@@ -324,7 +328,7 @@
 	GtkEntry *name_entry = NULL ;
 
 	g_return_val_if_fail (a_edition_widget != NULL, NULL) ;
-	g_return_val_if_fail (GNOME_IS_DIALOG (a_edition_widget), NULL) ;
+	g_return_val_if_fail (GTK_IS_DIALOG (a_edition_widget), NULL) ;
 
 	name_entry =
 		gtk_object_get_data (GTK_OBJECT (a_edition_widget),
@@ -550,7 +554,7 @@
 
 	if (PRIVATE (a_view)->name_edition_dialog == NULL) {
 		PRIVATE (a_view)->name_edition_dialog = 
-			GNOME_DIALOG (build_name_edition_dialog (app_context)) ;
+			GTK_DIALOG (build_name_edition_dialog (app_context)) ;
 	}
 
 	g_return_if_fail (PRIVATE (a_view)->name_edition_dialog != NULL) ;
@@ -560,11 +564,11 @@
 		 mlview_xml_document_view_get_name (a_view)) ;
 
 	button = 
-		gnome_dialog_run (PRIVATE (a_view)->name_edition_dialog) ;
+		gtk_dialog_run (PRIVATE (a_view)->name_edition_dialog) ;
 
 	switch (button) 
 	{
-	case 0:/*user clicked ok*/
+	case GTK_RESPONSE_ACCEPT:/*user clicked ok*/
 		view_name = 
 			(guchar*) get_name_edition_widget_value 
 			(GTK_WIDGET (PRIVATE (a_view)->name_edition_dialog)) ;
@@ -576,7 +580,8 @@
 	default :
 		break ;
 	}
-	gnome_dialog_close (PRIVATE (a_view)->name_edition_dialog) ;
+        
+	gtk_widget_hide(GTK_WIDGET(PRIVATE (a_view)->name_edition_dialog)) ;
 }
 
 
Index: src/mlview-xml-document-view.h
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-xml-document-view.h,v
retrieving revision 1.6
diff -u -r1.6 mlview-xml-document-view.h
--- src/mlview-xml-document-view.h	9 Jul 2003 17:27:20 -0000	1.6
+++ src/mlview-xml-document-view.h	28 Jul 2003 14:21:46 -0000
@@ -29,7 +29,6 @@
 #ifndef __MLVIEW_XML_DOCUMENT_VIEW_H__
 #define __MLVIEW_XML_DOCUMENT_VIEW_H__
 
-#include <gnome.h>
 #include "mlview-app-context.h"
 #include "mlview-xml-document.h"
 
Index: src/mlview-xml-document.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-xml-document.c,v
retrieving revision 1.27
diff -u -r1.27 mlview-xml-document.c
--- src/mlview-xml-document.c	27 Jul 2003 00:15:01 -0000	1.27
+++ src/mlview-xml-document.c	28 Jul 2003 14:21:49 -0000
@@ -709,13 +709,19 @@
 	 */
 	if ( PRIVATE(a_doc)->xml_doc && PRIVATE(a_doc)->xml_doc->extSubset ) 
 	{
-		GnomeDialog * dialog = NULL ;
+		GtkDialog * dialog = NULL ;
 		GtkWidget * label = NULL ;
 		gint button = 0 ;
 
-		dialog = GNOME_DIALOG
-			(gnome_dialog_new(_("Document has already has a Dtd"),
-					  _("YES"),_("CANCEL"), NULL)) ;
+		dialog = GTK_DIALOG
+			(gtk_dialog_new_with_buttons(_("Document has already has a Dtd"),
+                                                     NULL,
+                                                     GTK_DIALOG_MODAL,
+                                                     _("YES"),
+                                                     GTK_RESPONSE_ACCEPT,
+                                                     _("CANCEL"), 
+                                                     GTK_RESPONSE_REJECT,
+                                                     NULL)) ;
 		label = gtk_label_new 
 			(_("This Document already has an associated Dtd.\nDo you want really want to associate another Dtd to this document ?")) ;
 
@@ -723,13 +729,11 @@
 				    label, TRUE,FALSE,0) ;
 
 		gtk_widget_show_all (dialog->vbox) ;
-		gnome_dialog_close_hides (dialog, FALSE) ;
-		gnome_dialog_set_close (dialog, TRUE) ;
-		button = gnome_dialog_run (dialog) ;
+		button = gtk_dialog_run (dialog) ;
 
 		switch ( button ) 
 		{
-		case 0:/*YES button*/
+		case GTK_RESPONSE_ACCEPT :/*YES button*/
 			break ;
 		default :/*CANCEL Button, dialog box closed etc..*/
 			user_cancels = TRUE ;
@@ -847,7 +851,8 @@
                                                              &is_reg_file)
                     && is_reg_file == TRUE)
                 {
-                        GnomeDialog *ok_cancel_dialog = NULL ;
+                        GtkDialog *ok_cancel_dialog = NULL ;
+                        GtkLabel * message = NULL;
                         gchar * str = NULL ;
 
                         str = 
@@ -857,11 +862,25 @@
                                  _(" already exists.\n"),
                                  _("Do you want to overwrite it ?.\n"),
                                  NULL) ;
+                        message=GTK_LABEL(gtk_label_new(str));
 
                         ok_cancel_dialog = 
-                                GNOME_DIALOG 
-                                (gnome_ok_cancel_dialog (str, NULL, NULL)) ;
-
+                                GTK_DIALOG 
+                                (gtk_dialog_new_with_buttons(_("Save"),
+                                                             NULL,
+                                                             GTK_DIALOG_MODAL,
+                                                             GTK_STOCK_YES,
+                                                             GTK_RESPONSE_ACCEPT,
+                                                             GTK_STOCK_NO,
+                                                             GTK_RESPONSE_REJECT,
+                                                             NULL)) ;
+                        gtk_box_pack_start 
+                                (GTK_BOX(GTK_DIALOG (ok_cancel_dialog)->vbox), 
+                                 GTK_WIDGET(message), TRUE, TRUE, 0) ;
+
+                        gtk_widget_show_all 
+                                (GTK_WIDGET (GTK_DIALOG (ok_cancel_dialog)->vbox)) ;
+                        
                         if (str)
                         {
                                 g_free (str) ;
@@ -872,24 +891,22 @@
                         {
                                 gint button = 0 ;
 
-                                gnome_dialog_close_hides (ok_cancel_dialog, 
-                                                          FALSE) ;
-
-                                button = gnome_dialog_run_and_close 
+                                button = gtk_dialog_run 
                                         (ok_cancel_dialog) ;
 
                                 switch (button)
                                 {
-                                case 0: /*The OK Button was pressed*/
+                                case GTK_RESPONSE_ACCEPT: /*The OK Button was pressed*/
                                         save_file = TRUE ;
                                         break ;
 
-                                case 1:/*The cancel Button was pressed*/
-                                case -1:
+                                case GTK_RESPONSE_REJECT:/*The cancel Button was pressed*/
+                                case GTK_RESPONSE_CLOSE:
                                 default :
                                         save_file = FALSE ;
                                         break ;
                                 }
+                                gtk_widget_destroy(GTK_WIDGET(ok_cancel_dialog));
                         }
                 }
         }
Index: src/mlview-xml-document.h
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-xml-document.h,v
retrieving revision 1.21
diff -u -r1.21 mlview-xml-document.h
--- src/mlview-xml-document.h	9 Jul 2003 17:27:20 -0000	1.21
+++ src/mlview-xml-document.h	28 Jul 2003 14:21:49 -0000
@@ -32,7 +32,6 @@
 #endif /*__cplusplus*/
 
 #include <libxml/tree.h>
-#include <gnome.h>
 
 #include "mlview-app-context.h"
 #include "mlview-file-descriptor.h"