Index: /CKEditor/branches/prototype/_source/dialogs/testOnly/dialog.js
===================================================================
--- /CKEditor/branches/prototype/_source/dialogs/testOnly/dialog.js	(revision 2676)
+++ /CKEditor/branches/prototype/_source/dialogs/testOnly/dialog.js	(revision 2677)
@@ -65,5 +65,6 @@
 											}
 											return valid;
-										}
+										},
+										isChanged : false 
 									},
 
Index: /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2676)
+++ /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2677)
@@ -185,5 +185,5 @@
 					if ( definition.onOk.call( this, evt ) === false )
 						evt.data.hide = false;
-				}, this, null, 0 );
+				}, this, null, 1 );
 	if ( definition.onCancel )
 		this.on( 'cancel', function( evt )
@@ -191,5 +191,5 @@
 					if ( definition.onCancel.call( this, evt ) === false )
 						evt.data.hide = false;
-				}, this, null, 0);
+				}, this, null, 1 );
 
 	/** @ignore */
@@ -1553,4 +1553,10 @@
 
 			( this._ || ( this._ = {} ) ).dialog = dialog;
+
+			// Override isChanged if it is defined in element definition.
+			if ( typeof( elementDefinition.isChanged ) == 'boolean' )
+				this.isChanged = function(){ return elementDefinition.isChanged; };
+			if ( typeof( elementDefinition.isChanged ) == 'function' )
+				this.isChanged = elementDefinition.isChanged;
 			
 			// Add events.
@@ -1599,5 +1605,5 @@
 					if ( height )
 						styles.push( 'height:' + fixLength( height ) );
-					if ( elementDefinition.padding != undefined )
+					if ( elementDefinition && elementDefinition.padding != undefined )
 						styles.push( 'padding:' + fixLength( elementDefinition.padding ) );
 					if ( styles.length > 0 )
@@ -1609,5 +1615,6 @@
 			};
 			CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition || { type : 'hbox' }, htmlList, 'table', null, 
-					{ align : elementDefinition.align || ( dialog.getParentEditor().lang.dir == 'ltr' ? 'left' : 'right' ) }, innerHTML );
+					{ align : ( elementDefinition && elementDefinition.align ) ||
+						( dialog.getParentEditor().lang.dir == 'ltr' ? 'left' : 'right' ) }, innerHTML );
 		},
 
@@ -1633,10 +1640,10 @@
 				var html = [ '<table cellspacing="0" border="0" ' ];
 				html.push( 'style="' );
-				if ( elementDefinition.expand )
+				if ( elementDefinition && elementDefinition.expand )
 					html.push( 'height:100%;' );
-				html.push( 'width:' + fixLength( elementDefinition.width || '100%' ), ';' );
+				html.push( 'width:' + fixLength( elementDefinition && elementDefinition.width || '100%' ), ';' );
 				html.push( '"' );
 				html.push( 'align="', CKEDITOR.tools.htmlEncode(
-					elementDefinition.align || ( dialog.getParentEditor().lang.dir == 'ltr' ? 'left' : 'right' ) ), '" ' );
+					( elementDefinition && elementDefinition.align ) || ( dialog.getParentEditor().lang.dir == 'ltr' ? 'left' : 'right' ) ), '" ' );
 
 				html.push( '><tbody>' );
@@ -1649,7 +1656,7 @@
 					if ( heights )
 						styles.push( 'height:' + fixLength( heights[i] ) );
-					else if ( elementDefinition.expand )
+					else if ( elementDefinition && elementDefinition.expand )
 						styles.push( 'height:' + Math.floor( 100 / childHtmlList.length ) + '%' );
-					if ( elementDefinition.padding != undefined )
+					if ( elementDefinition && elementDefinition.padding != undefined )
 						styles.push( 'padding:' + fixLength( elementDefinition.padding ) );
 					if ( styles.length > 0 )
Index: /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2676)
+++ /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2677)
@@ -611,5 +611,5 @@
 				{
 					this.focus();
-					this.getElement().$.select();
+					this.getInputElement().$.select();
 				},
 
Index: /CKEditor/branches/prototype/_source/plugins/link/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/link/plugin.js	(revision 2676)
+++ /CKEditor/branches/prototype/_source/plugins/link/plugin.js	(revision 2677)
@@ -29,4 +29,9 @@
 				label : editor.lang.link,
 				command : 'link'
+			} );
+		editor.ui.addButton( 'Unlink',
+			{
+				label : editor.lang.unlink,
+				command : 'unlink'
 			} );
 		CKEDITOR.dialog.add( 'link', CKEDITOR.plugins.link.dialog );
Index: /CKEditor/branches/prototype/_source/plugins/toolbar/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/toolbar/plugin.js	(revision 2676)
+++ /CKEditor/branches/prototype/_source/plugins/toolbar/plugin.js	(revision 2677)
@@ -222,5 +222,5 @@
 CKEDITOR.config.toolbar =
 [
-	[ 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'SelectAll', 'RemoveFormat', '-', 'Link', 'Smiley', 'Image', 'HorizontalRule', '-', 
+	[ 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'SelectAll', 'RemoveFormat', '-', 'Link', 'Unlink', 'Smiley', 'Image', 'HorizontalRule', '-', 
 	'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ]
 ];
Index: /CKEditor/branches/prototype/_source/skins/default/toolbar.css
===================================================================
--- /CKEditor/branches/prototype/_source/skins/default/toolbar.css	(revision 2676)
+++ /CKEditor/branches/prototype/_source/skins/default/toolbar.css	(revision 2677)
@@ -187,4 +187,9 @@
 }
 
+.cke_skin_default a.cke_button_unlink .cke_icon
+{
+	background-position: 0 -544px;
+}
+
 .cke_skin_default a.cke_button_image .cke_icon
 {
