From f44de1146a90975b1d3955c51a9c4dfbbead5e4c Mon Sep 17 00:00:00 2001 From: defnax Date: Tue, 25 May 2010 22:30:25 +0000 Subject: [PATCH] added Format Menu entry git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3003 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/msgs/MessageComposer.cpp | 14 ++++++++++++++ retroshare-gui/src/gui/msgs/MessageComposer.h | 1 + 2 files changed, 15 insertions(+) diff --git a/retroshare-gui/src/gui/msgs/MessageComposer.cpp b/retroshare-gui/src/gui/msgs/MessageComposer.cpp index 79e4a34de..cd050c560 100644 --- a/retroshare-gui/src/gui/msgs/MessageComposer.cpp +++ b/retroshare-gui/src/gui/msgs/MessageComposer.cpp @@ -134,6 +134,8 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WFlags flags) actionAlignJustify->setShortcut(Qt::CTRL + Qt::Key_J); actionAlignJustify->setCheckable(true); + setupFormatActions(); + /*ui.comboStyle->addItem("Standard"); ui.comboStyle->addItem("Bullet List (Disc)"); ui.comboStyle->addItem("Bullet List (Circle)"); @@ -687,6 +689,18 @@ void MessageComposer::setupInsertActions() } +void MessageComposer::setupFormatActions() +{ + QMenu *menu = new QMenu(tr("&Format"), this); + menuBar()->addMenu(menu); + + menu->addAction(actionAlignLeft); + menu->addAction(actionAlignCenter); + menu->addAction(actionAlignRight); + menu->addAction(actionAlignJustify); + +} + void MessageComposer::textBold() { QTextCharFormat fmt; diff --git a/retroshare-gui/src/gui/msgs/MessageComposer.h b/retroshare-gui/src/gui/msgs/MessageComposer.h index 1d9c56328..b251a728f 100644 --- a/retroshare-gui/src/gui/msgs/MessageComposer.h +++ b/retroshare-gui/src/gui/msgs/MessageComposer.h @@ -126,6 +126,7 @@ private: void setupEditActions(); void setupViewActions(); void setupInsertActions(); + void setupFormatActions(); bool load(const QString &f); bool maybeSave();