diff --git a/mozilla/editor/composer/src/nsComposerCommands.cpp b/mozilla/editor/composer/src/nsComposerCommands.cpp
index 9ae80968cca..60772edc292 100644
--- a/mozilla/editor/composer/src/nsComposerCommands.cpp
+++ b/mozilla/editor/composer/src/nsComposerCommands.cpp
@@ -242,6 +242,7 @@ nsCloseCommand::DoCommand(const nsAReadableString & aCommandName, const nsAReada
#pragma mark -
#endif
+#if 0
NS_IMETHODIMP
nsPrintingCommands::IsCommandEnabled(const nsAReadableString & aCommandName, nsISupports *refCon, PRBool *outCmdEnabled)
{
@@ -284,6 +285,7 @@ nsPrintingCommands::DoCommand(const nsAReadableString & aCommandName, nsISupport
return rv;
}
+#endif
#ifdef XP_MAC
#pragma mark -
diff --git a/mozilla/editor/composer/src/nsComposerCommands.h b/mozilla/editor/composer/src/nsComposerCommands.h
index a6a1fac4b7b..18346262fe4 100644
--- a/mozilla/editor/composer/src/nsComposerCommands.h
+++ b/mozilla/editor/composer/src/nsComposerCommands.h
@@ -253,7 +253,7 @@ protected:
// composer commands
NS_DECL_COMPOSER_COMMAND(nsCloseCommand)
-NS_DECL_COMPOSER_COMMAND(nsPrintingCommands)
+//NS_DECL_COMPOSER_COMMAND(nsPrintingCommands)
// Generic commands
diff --git a/mozilla/editor/composer/src/nsComposerController.cpp b/mozilla/editor/composer/src/nsComposerController.cpp
index fd92fd375bb..2d1ddf5caf9 100644
--- a/mozilla/editor/composer/src/nsComposerController.cpp
+++ b/mozilla/editor/composer/src/nsComposerController.cpp
@@ -162,10 +162,12 @@ nsresult nsComposerController::RegisterComposerCommands(nsIControllerCommandMana
nsresult rv;
// File menu
+/*
NS_REGISTER_FIRST_COMMAND(nsPrintingCommands, "cmd_print");
NS_REGISTER_NEXT_COMMAND(nsPrintingCommands, "cmd_printSetup");
NS_REGISTER_NEXT_COMMAND(nsPrintingCommands,"cmd_print_button");
NS_REGISTER_LAST_COMMAND(nsPrintingCommands, "cmd_printPreview");
+*/
// Edit menu
NS_REGISTER_ONE_COMMAND(nsPasteQuotationCommand, "cmd_pasteQuote");
diff --git a/mozilla/editor/ui/composer/content/ComposerCommands.js b/mozilla/editor/ui/composer/content/ComposerCommands.js
index 0e39f51972c..668b717265a 100644
--- a/mozilla/editor/ui/composer/content/ComposerCommands.js
+++ b/mozilla/editor/ui/composer/content/ComposerCommands.js
@@ -173,6 +173,8 @@ function SetupComposerWindowCommands()
commandManager.registerCommand("cmd_openRemote", nsOpenRemoteCommand);
commandManager.registerCommand("cmd_preview", nsPreviewCommand);
commandManager.registerCommand("cmd_editSendPage", nsSendPageCommand);
+ commandManager.registerCommand("cmd_print", nsPrintCommand);
+ commandManager.registerCommand("cmd_printSetup", nsPrintSetupCommand);
commandManager.registerCommand("cmd_quit", nsQuitCommand);
commandManager.registerCommand("cmd_close", nsCloseCommand);
commandManager.registerCommand("cmd_preferences", nsPreferencesCommand);
@@ -569,6 +571,38 @@ var nsSendPageCommand =
}
};
+//-----------------------------------------------------------------------------------
+var nsPrintCommand =
+{
+ isCommandEnabled: function(aCommand, dummy)
+ {
+ return true; // we can always do this
+ },
+
+ doCommand: function(aCommand)
+ {
+ // In editor.js
+ FinishHTMLSource();
+ window.editorShell.Print();
+ }
+};
+
+//-----------------------------------------------------------------------------------
+var nsPrintSetupCommand =
+{
+ isCommandEnabled: function(aCommand, dummy)
+ {
+ return true; // we can always do this
+ },
+
+ doCommand: function(aCommand)
+ {
+ // In editor.js
+ FinishHTMLSource();
+ goPageSetup();
+ }
+};
+
//-----------------------------------------------------------------------------------
var nsQuitCommand =
{
diff --git a/mozilla/editor/ui/composer/content/editorOverlay.xul b/mozilla/editor/ui/composer/content/editorOverlay.xul
index c0546621099..75bba03bf58 100644
--- a/mozilla/editor/ui/composer/content/editorOverlay.xul
+++ b/mozilla/editor/ui/composer/content/editorOverlay.xul
@@ -302,7 +302,7 @@
-
+
@@ -656,7 +656,7 @@
tooltip="aTooltip" tooltiptext="&printToolbarCmd.tooltip;">