diff --git a/retroshare-gui/src/gui/forums/CreateForumMsg.cpp b/retroshare-gui/src/gui/forums/CreateForumMsg.cpp
index 714a9f367..30e8b3ff5 100644
--- a/retroshare-gui/src/gui/forums/CreateForumMsg.cpp
+++ b/retroshare-gui/src/gui/forums/CreateForumMsg.cpp
@@ -61,7 +61,7 @@ CreateForumMsg::CreateForumMsg(std::string fId, std::string pId)
connect( ui.close_action, SIGNAL( triggered (bool) ), this, SLOT( cancelMsg( ) ) );
connect( ui.emoticonButton, SIGNAL(clicked()), this, SLOT(smileyWidgetForums()));
connect( ui.attachFileButton, SIGNAL(clicked() ), this , SLOT(addFile()));
-
+ connect( ui.pastersButton, SIGNAL(clicked() ), this , SLOT(pasteLink()));
newMsg();
@@ -131,6 +131,14 @@ void CreateForumMsg::createMsg()
{
QString name = ui.forumSubject->text();
QString desc = ui.forumMessage->toHtml();
+
+ if(name.isEmpty())
+ { /* error message */
+ QMessageBox::warning(this, tr("RetroShare"),tr("Please set a Forum Subject and Forum Message"),
+ QMessageBox::Ok, QMessageBox::Ok);
+
+ return; //Don't add a empty Subject!!
+ }
ForumMsgInfo msgInfo;
@@ -376,4 +384,23 @@ void CreateForumMsg::fileHashingFinished(AttachFileItem* file) {
}
+void CreateForumMsg::pasteLink()
+{
+
+ QString link = QApplication::clipboard()->text();
+
+ if (link.startsWith("retroshare://", Qt::CaseInsensitive))
+ {
+ ui.forumMessage->setHtml(" " + link + "");
+ }
+ else
+ {
+ QMessageBox::warning(this, tr("RetroShare"),tr("Clipboard does not contains RetroShare link('s)"),
+ QMessageBox::Ok, QMessageBox::Ok);
+
+ return;
+ }
+
+
+}
diff --git a/retroshare-gui/src/gui/forums/CreateForumMsg.h b/retroshare-gui/src/gui/forums/CreateForumMsg.h
index 118217d13..7606627af 100644
--- a/retroshare-gui/src/gui/forums/CreateForumMsg.h
+++ b/retroshare-gui/src/gui/forums/CreateForumMsg.h
@@ -48,6 +48,8 @@ private slots:
/* actions to take.... */
void createMsg();
void cancelMsg();
+ void pasteLink();
+
void smileyWidgetForums();
void addSmileys();
diff --git a/retroshare-gui/src/gui/forums/CreateForumMsg.ui b/retroshare-gui/src/gui/forums/CreateForumMsg.ui
index 4de35a3a1..cc847526d 100644
--- a/retroshare-gui/src/gui/forums/CreateForumMsg.ui
+++ b/retroshare-gui/src/gui/forums/CreateForumMsg.ui
@@ -175,6 +175,20 @@ border: 1px solid #CCCCCC;}
+ -
+
+
+ Paste retroshare link
+
+
+
+
+
+
+ :/images/copyrslink.png:/images/copyrslink.png
+
+
+