diff --git a/src/glade-window.c b/src/glade-window.c
index 01307eb..d98bb4c 100644
--- a/src/glade-window.c
+++ b/src/glade-window.c
@@ -2179,7 +2179,11 @@ menu_item_selected_cb (GtkWidget *item, GladeWindow *window)
 	GtkAction *action;
 	gchar *tooltip;
 
-        action = gtk_widget_get_action (item);
+	#if GTK_MINOR_VERSION >= 16
+		action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (item));
+	#else
+		action = gtk_widget_get_action (item);
+	#endif
 	g_object_get (G_OBJECT (action), "tooltip", &tooltip, NULL);
 
 	if (tooltip != NULL)
@@ -2920,7 +2924,7 @@ glade_window_init (GladeWindow *window)
 	GtkWidget *dockitem;
 	GtkWidget *widget;
 	GtkWidget *sep;
-	GtkAction *action;
+	GtkAction *undo_action, *redo_action;
 	GtkAccelGroup *accel_group;	
 
 	window->priv = priv = GLADE_WINDOW_GET_PRIVATE (window);
@@ -2958,11 +2962,16 @@ glade_window_init (GladeWindow *window)
 	gtk_toolbar_insert (GTK_TOOLBAR (priv->toolbar), GTK_TOOL_ITEM (priv->undo), 4);
 	gtk_toolbar_insert (GTK_TOOLBAR (priv->toolbar), GTK_TOOL_ITEM (priv->redo), 5);
 
-	action = gtk_ui_manager_get_action (priv->ui, "/MenuBar/EditMenu/Undo");
-	gtk_action_connect_proxy (action, GTK_WIDGET (priv->undo));
-
-	action = gtk_ui_manager_get_action (priv->ui, "/MenuBar/EditMenu/Redo");
-	gtk_action_connect_proxy (action, GTK_WIDGET (priv->redo));
+	undo_action = gtk_ui_manager_get_action (priv->ui, "/MenuBar/EditMenu/Undo");
+	redo_action = gtk_ui_manager_get_action (priv->ui, "/MenuBar/EditMenu/Redo");
+	
+	#if GTK_MINOR_VERSION >= 16
+		gtk_activatable_set_related_action (GTK_ACTIVATABLE (priv->undo), undo_action);
+		gtk_activatable_set_related_action (GTK_ACTIVATABLE (priv->redo), redo_action);
+	#else
+		gtk_action_connect_proxy (undo_action, GTK_WIDGET (priv->undo));
+		gtk_action_connect_proxy (redo_action, GTK_WIDGET (priv->redo));
+	#endif
 	
 	/* main contents */
 	hpaned1 = gtk_hpaned_new ();
