Index: /CKEditor/branches/prototype/_source/plugins/forms/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/forms/plugin.js	(revision 2671)
+++ /CKEditor/branches/prototype/_source/plugins/forms/plugin.js	(revision 2672)
@@ -30,5 +30,5 @@
 				command : 'form'
 			});
-		editor.addCommand( 'form', forms.commands.form );
+		editor.addCommand( 'form', new CKEDITOR.dialogCommand( 'form' ) );
 
 		editor.ui.addButton( 'Checkbox',
@@ -37,5 +37,5 @@
 				command : 'checkbox'
 			});
-		editor.addCommand( 'checkbox', forms.commands.checkbox );
+		editor.addCommand( 'checkbox', new CKEDITOR.dialogCommand( 'checkbox' ) );
 
 		editor.ui.addButton( 'Radio',
@@ -44,5 +44,5 @@
 				command : 'radio'
 			});
-		editor.addCommand( 'radio', forms.commands.radio );
+		editor.addCommand( 'radio', new CKEDITOR.dialogCommand( 'radio' ) );
 
 		editor.ui.addButton( 'TextField',
@@ -51,5 +51,5 @@
 				command : 'textfield'
 			});
-		editor.addCommand( 'textfield', forms.commands.textfield );
+		editor.addCommand( 'textfield', new CKEDITOR.dialogCommand( 'textfield' ) );
 
 		editor.ui.addButton( 'Select',
@@ -58,5 +58,5 @@
 				command : 'select'
 			});
-		editor.addCommand( 'select', forms.commands.select );
+		editor.addCommand( 'select', new CKEDITOR.dialogCommand( 'select' ) );
 
 		editor.ui.addButton( 'Button',
@@ -65,5 +65,5 @@
 				command : 'button'
 			});
-		editor.addCommand( 'button', forms.commands.button );
+		editor.addCommand( 'button', new CKEDITOR.dialogCommand( 'button' ) );
 
 		editor.ui.addButton( 'ImageButton',
@@ -72,5 +72,5 @@
 				command : 'imagebutton'
 			});
-		editor.addCommand( 'imagebutton', forms.commands.imagebutton );
+		editor.addCommand( 'imagebutton', new CKEDITOR.dialogCommand( 'imagebutton' ) );
 
 		editor.ui.addButton( 'HiddenField',
@@ -79,5 +79,5 @@
 				command : 'hiddenfield'
 			});
-		editor.addCommand( 'hiddenfield', forms.commands.hiddenfield );
+		editor.addCommand( 'hiddenfield', new CKEDITOR.dialogCommand( 'hiddenfield' ) );
 
 		CKEDITOR.dialog.add( 'form',		this.path + 'dialogs/form.js' );
@@ -89,67 +89,5 @@
 		CKEDITOR.dialog.add( 'hiddenfield',	this.path + 'dialogs/hiddenfield.js' );
 		CKEDITOR.dialog.add( 'imagebutton',	CKEDITOR.plugins.getPath('image') + 'dialogs/image.js' );
-	}
+	},
+	requires : [ 'image' ]
 } );
-
-CKEDITOR.plugins.forms =
-{
-	commands : 
-	{
-		form :
-		{
-			exec : function( editor )
-			{
-				editor.openDialog( 'form' );
-			}
-		},
-		checkbox :
-		{
-			exec : function( editor )
-			{
-				editor.openDialog( 'checkbox' );
-			}
-		},
-		radio :
-		{
-			exec : function( editor )
-			{
-				editor.openDialog( 'radio' );
-			}
-		},
-		textfield :
-		{
-			exec : function( editor )
-			{
-				editor.openDialog( 'textfield' );
-			}
-		},
-		select :
-		{
-			exec : function( editor )
-			{
-				editor.openDialog( 'select' );
-			}
-		},
-		button :
-		{
-			exec : function( editor )
-			{
-				editor.openDialog( 'button' );
-			}
-		},
-		imagebutton :
-		{
-			exec : function( editor )
-			{
-				editor.openDialog( 'imagebutton' );
-			}
-		},
-		hiddenfield :
-		{
-			exec : function( editor )
-			{
-				editor.openDialog( 'hiddenfield' );
-			}
-		},
-	},
-};
Index: /CKEditor/branches/prototype/_source/plugins/image/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/image/plugin.js	(revision 2671)
+++ /CKEditor/branches/prototype/_source/plugins/image/plugin.js	(revision 2672)
@@ -26,5 +26,5 @@
 		var image = CKEDITOR.plugins.image;
 
-		editor.addCommand( 'image', image);
+		editor.addCommand( 'image', new CKEDITOR.dialogCommand( 'image' ) );
 		editor.ui.addButton( 'Image',
 			{
@@ -36,9 +36,2 @@
 } );
 
-CKEDITOR.plugins.image =
-{
-	exec : function( editor )
-	{
-		editor.openDialog( 'image' );
-	}
-};
