mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 01:16:20 -05:00
added pastFromClipboard button and confirmation when closing with ESC in channel post creation
This commit is contained in:
parent
25c836d443
commit
8903abe98c
@ -67,6 +67,7 @@ CreateGxsChannelMsg::CreateGxsChannelMsg(const RsGxsGroupId &cId, RsGxsMessageId
|
||||
|
||||
connect(postButton, SIGNAL(clicked()), this, SLOT(sendMsg()));
|
||||
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelMsg()));
|
||||
connect(pasteFromClipboardButton, SIGNAL(clicked()), this, SLOT(pasteLink()));
|
||||
|
||||
connect(addFileButton, SIGNAL(clicked() ), this , SLOT(addExtraFile()));
|
||||
connect(removeAllFilesButton, SIGNAL(clicked() ), this , SLOT(clearAllAttachments()));
|
||||
@ -159,6 +160,13 @@ void CreateGxsChannelMsg::changeAspectRatio(int s)
|
||||
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*/)
|
||||
{
|
||||
QList<RetroShareLink> links ;
|
||||
|
@ -41,7 +41,9 @@ public:
|
||||
/** Default Destructor */
|
||||
~CreateGxsChannelMsg();
|
||||
|
||||
void addHtmlText(const QString& text) ;
|
||||
void reject() override;
|
||||
|
||||
void addHtmlText(const QString& text) ;
|
||||
void addSubject(const QString& text) ;
|
||||
void addAttachment(const std::string &path);
|
||||
void addAttachment(const RsFileHash &hash, const std::string &fname, uint64_t size, bool local, const RsPeerId &srcId,bool assume_file_ready = false);
|
||||
|
@ -296,6 +296,38 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
<widget class="QPushButton" name="removeAllFilesButton">
|
||||
<property name="sizePolicy">
|
||||
|
Loading…
Reference in New Issue
Block a user