From 097caf6e9839c9a73e0f99862210df69e0e1cd1f Mon Sep 17 00:00:00 2001 From: defnax Date: Tue, 25 May 2010 10:41:26 +0000 Subject: [PATCH] Added File Menu entry Save as Draft for MessageComposer. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2995 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/msgs/MessageComposer.cpp | 10 ++++++++++ retroshare-gui/src/gui/msgs/MessageComposer.h | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/msgs/MessageComposer.cpp b/retroshare-gui/src/gui/msgs/MessageComposer.cpp index 2469a96e5..23ca3e623 100644 --- a/retroshare-gui/src/gui/msgs/MessageComposer.cpp +++ b/retroshare-gui/src/gui/msgs/MessageComposer.cpp @@ -605,6 +605,10 @@ void MessageComposer::setupFileActions() a = new QAction(tr("Save &As..."), this); connect(a, SIGNAL(triggered()), this, SLOT(fileSaveAs())); menu->addAction(a); + + a = new QAction(tr("Save &As Draft"), this); + connect(a, SIGNAL(triggered()), this, SLOT(saveasDraft())); + menu->addAction(a); menu->addSeparator(); a = new QAction(QIcon(":/images/textedit/fileprint.png"), tr("&Print..."), this); @@ -892,6 +896,12 @@ bool MessageComposer::fileSaveAs() return fileSave(); } +void MessageComposer::saveasDraft() +{ + sendMessage_internal(true); +} + + void MessageComposer::filePrint() { #ifndef QT_NO_PRINTER diff --git a/retroshare-gui/src/gui/msgs/MessageComposer.h b/retroshare-gui/src/gui/msgs/MessageComposer.h index 1ab137145..4c42fbe19 100644 --- a/retroshare-gui/src/gui/msgs/MessageComposer.h +++ b/retroshare-gui/src/gui/msgs/MessageComposer.h @@ -84,7 +84,8 @@ private slots: void fileOpen(); bool fileSave(); bool fileSaveAs(); - void filePrint(); + void filePrint(); + void saveasDraft(); //void filePrintPreview(); void filePrintPdf();