Index: gok/gok-page-feedbacks.c
===================================================================
--- gok/gok-page-feedbacks.c	(revision 2691)
+++ gok/gok-page-feedbacks.c	(working copy)
@@ -1,7 +1,7 @@
 /* gok-page-feedbacks.c
 *
-* Copyright 2002 Sun Microsystems, Inc.,
-* Copyright 2002 University Of Toronto
+* Copyright 2002-2009 Sun Microsystems, Inc.,
+* Copyright 2002-2009 University Of Toronto
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
@@ -409,23 +409,17 @@ void gok_page_feedbacks_button_clicked_change_name
 
 	/* create the 'new feedbacks name' dialog */
 	pDialogChangeName = gtk_dialog_new_with_buttons (_("GOK Feedback Name"),
-												GTK_WINDOW(gok_settingsdialog_get_window()),
-												GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-												GTK_STOCK_OK, GTK_RESPONSE_OK,
-												GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
+							 GTK_WINDOW(gok_settingsdialog_get_window()),
+							 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+							 GTK_STOCK_OK, GTK_RESPONSE_OK,
+							 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
 	/* add a text label */
 	pLabel = gtk_label_new (_("Change the feedback name:"));
-	gtk_widget_ref (pLabel);
-	gtk_object_set_data_full (GTK_OBJECT (pDialogChangeName), "pLabel", pLabel,
-                            (GtkDestroyNotify) gtk_widget_unref);
 	gtk_widget_show (pLabel);
 	gtk_box_pack_start (GTK_BOX(GTK_DIALOG (pDialogChangeName)->vbox), pLabel, FALSE, FALSE, 0);
 
 	/* add a text entry */
 	pEntryNewName = gtk_entry_new ();
-	gtk_widget_ref (pEntryNewName);
-	gtk_object_set_data_full (GTK_OBJECT (pDialogChangeName), "Entry", pEntryNewName,
-                            (GtkDestroyNotify) gtk_widget_unref);
 	gtk_entry_set_text (GTK_ENTRY(pEntryNewName), m_pFeedbackCurrent->pDisplayName);
 	gtk_widget_show (pEntryNewName);
 	gtk_box_pack_start (GTK_BOX(GTK_DIALOG (pDialogChangeName)->vbox), pEntryNewName, FALSE, FALSE, 0);
@@ -447,6 +441,7 @@ void gok_page_feedbacks_button_clicked_change_name
 		/* check if the new feedback name is empty */
 		if (strlen (pNewName) == 0)
 		{
+			/*** TODO: code duplication ***/
 			pDialog = gtk_message_dialog_new (GTK_WINDOW(pDialogChangeName),
 				GTK_DIALOG_DESTROY_WITH_PARENT,
 				GTK_MESSAGE_ERROR,
@@ -466,6 +461,7 @@ void gok_page_feedbacks_button_clicked_change_name
 			{
 				if (strcmp (pFeedback->pDisplayName, pNewName) == 0)
 				{
+					/*** TODO: code duplication ***/
 					pDialog = gtk_message_dialog_new (GTK_WINDOW(pDialogChangeName),
 						GTK_DIALOG_DESTROY_WITH_PARENT,
 						GTK_MESSAGE_ERROR,
@@ -640,6 +636,7 @@ void gok_page_feedbacks_button_clicked_delete ()
 
 	sprintf (buffer, _("Do you wish to delete this feedback (%s)?"), pNameFeedback);
 
+	/*** TODO: code duplication ***/
 	pDialog = gtk_message_dialog_new ((GtkWindow*)gok_settingsdialog_get_window(),
 			GTK_DIALOG_DESTROY_WITH_PARENT,
 			GTK_MESSAGE_QUESTION,
Index: gok/gok-editor.c
===================================================================
--- gok/gok-editor.c	(revision 2691)
+++ gok/gok-editor.c	(working copy)
@@ -87,16 +87,8 @@ void gok_editor_run()
 	
 	/* create the keyboard window */
 	m_pWindowKeyboard = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-	gtk_object_set_data (GTK_OBJECT (m_pWindowKeyboard), "m_pWindowKeyboard", m_pWindowKeyboard);
 	gtk_window_set_title (GTK_WINDOW (m_pWindowKeyboard), _(TITLE_GOK_EDITOR));
 
-	/* create a window group */
-/*	m_pWindowGroup = gtk_window_group_new();	
-	g_assert (m_pWindowGroup!= NULL);
-	gtk_window_group_add_window(m_pWindowGroup, (GtkWindow*)m_pWindowEditor);
-	gtk_window_group_add_window(m_pWindowGroup, (GtkWindow*)m_pWindowKeyboard);
-	*/
-
 	/* handle the 'delete' event so the keyboard window will not close */
 	gtk_signal_connect (GTK_OBJECT (m_pWindowKeyboard), "delete_event",
                       GTK_SIGNAL_FUNC (on_editor_keyboard_delete_event),
@@ -106,9 +98,9 @@ void gok_editor_run()
 
 	/* add the 'fixed' container to the window */
 	fixed1 = gtk_fixed_new ();
-	gtk_widget_ref (fixed1);
-	gtk_object_set_data_full (GTK_OBJECT (m_pWindowKeyboard), "fixed1", fixed1,
-                            (GtkDestroyNotify) gtk_widget_unref);
+	g_object_ref (fixed1);
+	g_object_set_data_full (G_OBJECT (m_pWindowKeyboard), "fixed1", fixed1,
+				(GDestroyNotify) g_object_unref);
 	gtk_widget_show (fixed1);
 	gtk_container_add (GTK_CONTAINER (m_pWindowKeyboard), fixed1);
 	gtk_widget_show (m_pWindowKeyboard);
@@ -147,6 +139,7 @@ void gok_editor_on_exit ()
 	if (m_bFileModified == TRUE)
 	{
 		/* ask if user wants to lose their changes */
+		/*** TODO: code dup ***/
 		pDialog = gtk_message_dialog_new (GTK_WINDOW(m_pWindowEditor),
 					GTK_DIALOG_DESTROY_WITH_PARENT,
 					GTK_MESSAGE_QUESTION,
@@ -180,6 +173,7 @@ void gok_editor_new_file ()
 	if (m_bFileModified == TRUE)
 	{
 		/* ask if user wants to lose their changes */
+		/*** TODO: code dup ***/
 		pDialog = gtk_message_dialog_new (GTK_WINDOW(m_pWindowEditor),
 					GTK_DIALOG_DESTROY_WITH_PARENT,
 					GTK_MESSAGE_QUESTION,
@@ -260,6 +254,7 @@ void gok_editor_open_file()
 	if (m_bFileModified == TRUE)
 	{
 		/* ask if user wants to lose their changes */
+		/*** TODO: code dup ***/
 		pDialog = gtk_message_dialog_new (GTK_WINDOW(m_pWindowEditor),
 					GTK_DIALOG_DESTROY_WITH_PARENT,
 					GTK_MESSAGE_QUESTION,
@@ -1051,7 +1046,7 @@ void gok_editor_message_filename_bad (gchar* Filen
 
 	buffer = g_strdup_printf (_("This is not a valid keyboard filename:\n%s"),
 				  Filename);
-
+	/*** TODO: code dup ***/
 	pDialog = gtk_message_dialog_new (GTK_WINDOW(m_pWindowEditor),
 				GTK_DIALOG_DESTROY_WITH_PARENT,
 				GTK_MESSAGE_ERROR,
Index: gok/gok-keyboard.c
===================================================================
--- gok/gok-keyboard.c	(revision 2691)
+++ gok/gok-keyboard.c	(working copy)
@@ -1964,7 +1964,7 @@ gboolean gok_keyboard_display (GokKeyboard* pKeybo
 
 			/* associate the button with the key */
 			pKey->pButton = pNewButton;
-			gtk_object_set_data (GTK_OBJECT(pNewButton), "key", pKey);
+			g_object_set_data (G_OBJECT (pNewButton), "key", pKey);
 
 			/* set the initial state of the button from pKey state*/
 			if (pNewButton && GTK_IS_TOGGLE_BUTTON (pNewButton))
Index: gok/gok-page-accessmethod.c
===================================================================
--- gok/gok-page-accessmethod.c	(revision 2691)
+++ gok/gok-page-accessmethod.c	(working copy)
@@ -325,7 +325,7 @@ gboolean gok_page_accessmethod_apply_controls (Gok
 						g_assert (pRadioButton != NULL);
 						if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(pRadioButton)) == TRUE)
 						{
-							pRadioControl = (GokControl*)gtk_object_get_data (GTK_OBJECT(pRadioButton), "control");
+							pRadioControl = (GokControl*) g_object_get_data (G_OBJECT (pRadioButton), "control");
 							g_assert (pRadioControl != NULL);
 							if (gok_data_set_setting (NameAccessMethod, pControl->Name, pRadioControl->Value, NULL) == TRUE)
 							{
@@ -589,9 +589,10 @@ void gok_page_accessmethod_draw_controls (gchar* N
 					case CONTROL_TYPE_LABEL:
 						pWidget = gtk_label_new (pControl->String);
 						g_object_set (pWidget, "xalign", 0., NULL);
-						gtk_widget_ref (pWidget);
-						gtk_object_set_data_full (GTK_OBJECT (gok_settingsdialog_get_window()), "GOKlabel", pWidget,
-						                            (GtkDestroyNotify) gtk_widget_unref);
+						g_object_ref (pWidget);
+						g_object_set_data_full (G_OBJECT (gok_settingsdialog_get_window ()),
+									"GOKlabel", pWidget,
+									(GDestroyNotify) g_object_unref);
 						gtk_widget_show (pWidget);
 						gtk_box_pack_start (GTK_BOX (pControlParent->pWidget), pWidget, FALSE, FALSE, 0);
 						gtk_size_group_add_widget (pSizeGroup, pWidget);
@@ -599,9 +600,10 @@ void gok_page_accessmethod_draw_controls (gchar* N
 						
 					case CONTROL_TYPE_HBOX:
 						pWidget = gtk_hbox_new (FALSE, pControl->Spacing);
-						gtk_widget_ref (pWidget);
-						gtk_object_set_data_full (GTK_OBJECT (gok_settingsdialog_get_window()), "GOKhbox", pWidget,
-						                            (GtkDestroyNotify) gtk_widget_unref);
+						g_object_ref (pWidget);
+						g_object_set_data_full (G_OBJECT (gok_settingsdialog_get_window ()),
+									"GOKhbox", pWidget,
+									(GDestroyNotify) g_object_unref);
 						gtk_container_set_border_width (GTK_CONTAINER (pWidget), pControl->Border);
 						gtk_widget_show (pWidget);
 						
@@ -617,9 +619,10 @@ void gok_page_accessmethod_draw_controls (gchar* N
 						
 					case CONTROL_TYPE_VBOX:
 						pWidget = gtk_vbox_new (FALSE, pControl->Spacing);
-						gtk_widget_ref (pWidget);
-						gtk_object_set_data_full (GTK_OBJECT (gok_settingsdialog_get_window()), "GOKvbox", pWidget,
-						                            (GtkDestroyNotify) gtk_widget_unref);
+						g_object_ref (pWidget);
+						g_object_set_data_full (G_OBJECT (gok_settingsdialog_get_window ()),
+									"GOKvbox", pWidget,
+									(GDestroyNotify) g_object_unref);
 						gtk_container_set_border_width (GTK_CONTAINER (pWidget), pControl->Border);
 						gtk_widget_show (pWidget);
 						
@@ -636,9 +639,10 @@ void gok_page_accessmethod_draw_controls (gchar* N
 					case CONTROL_TYPE_COMBOBOX:
 						pControlName = (pControl->Name != NULL) ? pControl->Name : "combobox";
 						pWidget = gtk_combo_new ();
-						gtk_widget_ref (pWidget);
-						gtk_object_set_data_full (GTK_OBJECT (gok_settingsdialog_get_window()), pControlName, pWidget,
-						                            (GtkDestroyNotify) gtk_widget_unref);
+						g_object_ref (pWidget);
+						g_object_set_data_full (G_OBJECT (gok_settingsdialog_get_window ()),
+									pControlName, pWidget,
+									(GDestroyNotify) g_object_unref);
 						atko = gtk_widget_get_accessible (pWidget);
 						atk_object_set_name (atko, pControl->String ? pControl->String : "");
 						gtk_widget_show (pWidget);
@@ -677,9 +681,10 @@ void gok_page_accessmethod_draw_controls (gchar* N
 						
 					case CONTROL_TYPE_SEPERATOR:
 						pWidget = gtk_hseparator_new ();
-						gtk_widget_ref (pWidget);
-						gtk_object_set_data_full (GTK_OBJECT (gok_settingsdialog_get_window()), "GOKseparator", pWidget,
-						                            (GtkDestroyNotify) gtk_widget_unref);
+						g_object_ref (pWidget);
+						g_object_set_data_full (G_OBJECT (gok_settingsdialog_get_window ()),
+									"GOKseparator", pWidget,
+									(GDestroyNotify) g_object_unref);
 						gtk_widget_show (pWidget);
 						gtk_box_pack_start (GTK_BOX (pControlParent->pWidget), pWidget, TRUE, TRUE, 0);
 						break;
@@ -688,9 +693,10 @@ void gok_page_accessmethod_draw_controls (gchar* N
 						pFrameHeader = g_markup_printf_escaped ("<b>%s</b>", pControl->String);
 						pWidget = gtk_frame_new (pFrameHeader);
 						g_free (pFrameHeader);
-						gtk_widget_ref (pWidget);
-						gtk_object_set_data_full (GTK_OBJECT (gok_settingsdialog_get_window()), "GOKframe", pWidget,
-						                            (GtkDestroyNotify) gtk_widget_unref);
+						g_object_ref (pWidget);
+						g_object_set_data_full (G_OBJECT (gok_settingsdialog_get_window ()),
+									"GOKframe", pWidget,
+									(GDestroyNotify) g_object_unref);
 						gtk_label_set_use_markup (GTK_LABEL (gtk_frame_get_label_widget (GTK_FRAME (pWidget))), TRUE);
 						gtk_frame_set_shadow_type (GTK_FRAME (pWidget), GTK_SHADOW_NONE);
 						gtk_widget_show (pWidget);
@@ -700,9 +706,10 @@ void gok_page_accessmethod_draw_controls (gchar* N
 					case CONTROL_TYPE_BUTTON:
 						pControlName = (pControl->Name != NULL) ? pControl->Name : "button";
 						pWidget = gtk_button_new_with_label (pControl->String);
-						gtk_widget_ref (pWidget);
-						gtk_object_set_data_full (GTK_OBJECT (gok_settingsdialog_get_window()), pControlName, pWidget,
-						                            (GtkDestroyNotify) gtk_widget_unref);
+						g_object_ref (pWidget);
+						g_object_set_data_full (G_OBJECT (gok_settingsdialog_get_window ()),
+									pControlName, pWidget,
+									(GDestroyNotify) g_object_unref);
 						gtk_widget_show (pWidget);
 						gtk_box_pack_start (GTK_BOX (pControlParent->pWidget), pWidget, FALSE, FALSE, 0);
 						
@@ -711,9 +718,10 @@ void gok_page_accessmethod_draw_controls (gchar* N
 						
 					case CONTROL_TYPE_CHECKBUTTON:
 						pWidget = gtk_check_button_new_with_label (pControl->String);
-						gtk_widget_ref (pWidget);
-						gtk_object_set_data_full (GTK_OBJECT (gok_settingsdialog_get_window()), "GOKcheckbutton", pWidget,
-						                            (GtkDestroyNotify) gtk_widget_unref);
+						g_object_ref (pWidget);
+						g_object_set_data_full (G_OBJECT (gok_settingsdialog_get_window ()),
+									"GOKcheckbutton", pWidget,
+									(GDestroyNotify) g_object_unref);
 						gtk_widget_show (pWidget);
 						gtk_box_pack_start (GTK_BOX (pControlParent->pWidget), pWidget, FALSE, FALSE, 0);
 
@@ -741,13 +749,14 @@ void gok_page_accessmethod_draw_controls (gchar* N
 
 						pWidget = gtk_radio_button_new_with_label (ListRadioButtons, pControl->String);
 						ListRadioButtons = gtk_radio_button_group (GTK_RADIO_BUTTON (pWidget));
-						gtk_widget_ref (pWidget);
-						gtk_object_set_data_full (GTK_OBJECT (gok_settingsdialog_get_window()), "GOKradiobutton", pWidget,
-						                            (GtkDestroyNotify) gtk_widget_unref);
+						g_object_ref (pWidget);
+						g_object_set_data_full (G_OBJECT (gok_settingsdialog_get_window ()),
+									"GOKradiobutton", pWidget,
+									(GDestroyNotify) g_object_unref);
 						gtk_widget_show (pWidget);
 						gtk_box_pack_start (GTK_BOX (pControlParent->pWidget), pWidget, FALSE, FALSE, 0);
 						
-						gtk_object_set_data(GTK_OBJECT (pWidget), "control", pControl);
+						g_object_set_data (G_OBJECT (pWidget), "control", pControl);
 
 						if ((pControl->Name != NULL) &&
 							(gok_data_get_setting (NameAccessMethod, pControl->Name, &settingInt, &settingString) == TRUE))
@@ -761,16 +770,17 @@ void gok_page_accessmethod_draw_controls (gchar* N
 						
 					case CONTROL_TYPE_SPINBUTTON:
 						spinRateAdjustment = gtk_adjustment_new (pControl->Value, 
-																pControl->Min, 
-																pControl->Max, 
-																pControl->StepIncrement,
-																pControl->PageIncrement,
-																pControl->PageSize);
+											 pControl->Min, 
+											 pControl->Max, 
+											 pControl->StepIncrement,
+											 pControl->PageIncrement,
+											 pControl->PageSize);
 		
 						pWidget = gtk_spin_button_new (GTK_ADJUSTMENT (spinRateAdjustment), 1, 0);
-						gtk_widget_ref (pWidget);
-						gtk_object_set_data_full (GTK_OBJECT (gok_settingsdialog_get_window()), "GOKspinbutton", pWidget,
-						                            (GtkDestroyNotify) gtk_widget_unref);
+						g_object_ref (pWidget);
+						g_object_set_data_full (G_OBJECT (gok_settingsdialog_get_window ()),
+									"GOKspinbutton", pWidget,
+									(GDestroyNotify) g_object_unref);
 						gtk_widget_show (pWidget);
 						gtk_box_pack_start (GTK_BOX (pControlParent->pWidget), pWidget, FALSE, FALSE, 0);
 
Index: gok/main.c
===================================================================
--- gok/main.c	(revision 2691)
+++ gok/main.c	(working copy)
@@ -1938,9 +1938,9 @@ GtkWidget* gok_main_create_window (struct gok_wind
 	gtk_window_set_default_size (GTK_WINDOW (window1), m_OurResizeWidth, m_OurResizeHeight);
 
 	fixed1 = gtk_fixed_new ();
-	gtk_widget_ref (fixed1);
-	gtk_object_set_data_full (GTK_OBJECT (window1), "fixed1", fixed1,
-                            (GtkDestroyNotify) gtk_widget_unref);
+	g_object_ref (fixed1);
+	g_object_set_data_full (G_OBJECT (window1), "fixed1", fixed1,
+				(GDestroyNotify) g_object_unref);
 	gtk_widget_show (fixed1);
 	gtk_container_add (GTK_CONTAINER (window1), fixed1);
 
Index: gok/gok-page-actions.c
===================================================================
--- gok/gok-page-actions.c	(revision 2691)
+++ gok/gok-page-actions.c	(working copy)
@@ -1,7 +1,7 @@
 /* gok-page-actions.c
 *
-* Copyright 2002, 2003 Sun Microsystems, Inc.,
-* Copyright 2002 University Of Toronto
+* Copyright 2002-2009 Sun Microsystems, Inc.,
+* Copyright 2002-2009 University Of Toronto
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
@@ -371,23 +371,17 @@ void gok_page_actions_button_clicked_change_name (
 
 	/* create the 'new action name' dialog */
 	pDialogChangeName = gtk_dialog_new_with_buttons (_("GOK Action Name"),
-												GTK_WINDOW(gok_settingsdialog_get_window()),
-												GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-												GTK_STOCK_OK, GTK_RESPONSE_OK,
-												GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
+							 GTK_WINDOW(gok_settingsdialog_get_window()),
+							 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+							 GTK_STOCK_OK, GTK_RESPONSE_OK,
+							 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL);
 	/* add a text label */
 	pLabel = gtk_label_new (_("Change the action name:"));
-	gtk_widget_ref (pLabel);
-	gtk_object_set_data_full (GTK_OBJECT (pDialogChangeName), "pLabel", pLabel,
-                            (GtkDestroyNotify) gtk_widget_unref);
 	gtk_widget_show (pLabel);
 	gtk_box_pack_start (GTK_BOX(GTK_DIALOG (pDialogChangeName)->vbox), pLabel, FALSE, FALSE, 0);
 
 	/* add a text entry */
 	pEntryNewName = gtk_entry_new ();
-	gtk_widget_ref (pEntryNewName);
-	gtk_object_set_data_full (GTK_OBJECT (pDialogChangeName), "Entry", pEntryNewName,
-                            (GtkDestroyNotify) gtk_widget_unref);
 	gtk_entry_set_text (GTK_ENTRY(pEntryNewName), m_pActionCurrent->pDisplayName);
 	gtk_widget_show (pEntryNewName);
 	gtk_box_pack_start (GTK_BOX(GTK_DIALOG (pDialogChangeName)->vbox), pEntryNewName, FALSE, FALSE, 0);
@@ -409,6 +403,7 @@ void gok_page_actions_button_clicked_change_name (
 		/* check if the new action name is empty */
 		if (strlen (pNewName) == 0)
 		{
+			/*** TODO: code duplication ***/
 			pDialog = gtk_message_dialog_new (GTK_WINDOW(pDialogChangeName),
 				GTK_DIALOG_DESTROY_WITH_PARENT,
 				GTK_MESSAGE_ERROR,
@@ -428,6 +423,7 @@ void gok_page_actions_button_clicked_change_name (
 			{
 				if (strcmp (pAction->pDisplayName, pNewName) == 0)
 				{
+					/*** TODO: code duplication ***/
 					pDialog = gtk_message_dialog_new (GTK_WINDOW(pDialogChangeName),
 						GTK_DIALOG_DESTROY_WITH_PARENT,
 						GTK_MESSAGE_ERROR,
@@ -551,6 +547,7 @@ void gok_page_actions_button_clicked_delete ()
 
 	sprintf (buffer, _("Do you wish to delete this action (%s)?"), pNameAction);
 
+	/*** TODO: code duplication ***/
 	pDialog = gtk_message_dialog_new ((GtkWindow*)gok_settingsdialog_get_window(),
 			GTK_DIALOG_DESTROY_WITH_PARENT,
 			GTK_MESSAGE_QUESTION,
