mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-24 06:14:25 -04:00
added pastFromClipboard button and confirmation when closing with ESC in channel post creation
This commit is contained in:
parent
25c836d443
commit
8903abe98c
3 changed files with 43 additions and 1 deletions
|
@ -67,6 +67,7 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
|
||||||
|
|
||||||
connect(postButton, SIGNAL(clicked()), this, SLOT(sendMsg()));
|
connect(postButton, SIGNAL(clicked()), this, SLOT(sendMsg()));
|
||||||
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelMsg()));
|
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelMsg()));
|
||||||
|
connect(pasteFromClipboardButton, SIGNAL(clicked()), this, SLOT(pasteLink()));
|
||||||
|
|
||||||
connect(addFileButton, SIGNAL(clicked() ), this , SLOT(addExtraFile()));
|
connect(addFileButton, SIGNAL(clicked() ), this , SLOT(addExtraFile()));
|
||||||
connect(removeAllFilesButton, SIGNAL(clicked() ), this , SLOT(clearAllAttachments()));
|
connect(removeAllFilesButton, SIGNAL(clicked() ), this , SLOT(clearAllAttachments()));
|
||||||
|
@ -159,6 +160,13 @@ void CreateGxsChannelMsg::changeAspectRatio(int s)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void CreateGxsChannelMsg::reject()
|
||||||
|
{
|
||||||
|
if(QMessageBox::warning(nullptr,tr("Close this window?"),tr("Do you really want to discard your post?"),QMessageBox::Ok,QMessageBox::Cancel) == QMessageBox::Cancel)
|
||||||
|
return;
|
||||||
|
|
||||||
|
QDialog::reject();
|
||||||
|
}
|
||||||
void CreateGxsChannelMsg::contextMenu(QPoint /*point*/)
|
void CreateGxsChannelMsg::contextMenu(QPoint /*point*/)
|
||||||
{
|
{
|
||||||
QList<RetroShareLink> links ;
|
QList<RetroShareLink> links ;
|
||||||
|
|
|
@ -41,6 +41,8 @@ public:
|
||||||
/** Default Destructor */
|
/** Default Destructor */
|
||||||
~CreateGxsChannelMsg();
|
~CreateGxsChannelMsg();
|
||||||
|
|
||||||
|
void reject() override;
|
||||||
|
|
||||||
void addHtmlText(const QString& text) ;
|
void addHtmlText(const QString& text) ;
|
||||||
void addSubject(const QString& text) ;
|
void addSubject(const QString& text) ;
|
||||||
void addAttachment(const std::string &path);
|
void addAttachment(const std::string &path);
|
||||||
|
|
|
@ -296,6 +296,38 @@ p, li { white-space: pre-wrap; }
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pasteFromClipboardButton">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>34</width>
|
||||||
|
<height>34</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Paste retroshare link(s) from clipboard.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../icons.qrc">
|
||||||
|
<normaloff>:/icons/png/copy.png</normaloff>:/icons/png/copy.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="removeAllFilesButton">
|
<widget class="QPushButton" name="removeAllFilesButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue