mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-03 11:00:14 -05:00
restored channel key restore
created new action for delete channel history git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4017 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c0201b8dd2
commit
dbe0890974
@ -150,8 +150,8 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point )
|
||||
QAction *channeldetailsAct = new QAction(QIcon(":/images/info16.png"), tr( "Show Channel Details" ), &contextMnu);
|
||||
connect( channeldetailsAct , SIGNAL( triggered() ), this, SLOT( showChannelDetails() ) );
|
||||
|
||||
//QAction *restoreKeysAct = new QAction(QIcon(":/images/settings16.png"), tr("Restore Publish Rights for Channel" ), &contextMnu);
|
||||
//connect( restoreKeysAct , SIGNAL( triggered() ), this, SLOT( restoreChannelKeys() ) );
|
||||
QAction *restoreKeysAct = new QAction(QIcon(":/images/settings16.png"), tr("Restore Publish Rights for Channel" ), &contextMnu);
|
||||
connect( restoreKeysAct , SIGNAL( triggered() ), this, SLOT( restoreChannelKeys() ) );
|
||||
|
||||
QAction *editChannelDetailAct = new QAction(QIcon(":/images/edit_16.png"), tr("Edit Channel Details"), &contextMnu);
|
||||
connect( editChannelDetailAct, SIGNAL( triggered() ), this, SLOT( editChannelDetail() ) );
|
||||
@ -171,16 +171,17 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point )
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction( channeldetailsAct );
|
||||
contextMnu.addAction( shareKeyAct );
|
||||
contextMnu.addAction( restoreKeysAct );
|
||||
} else if (ci.channelFlags & RS_DISTRIB_SUBSCRIBED) {
|
||||
contextMnu.addAction( unsubscribechannelAct );
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction( channeldetailsAct );
|
||||
// contextMnu.addAction( restoreKeysAct );
|
||||
contextMnu.addAction( restoreKeysAct );
|
||||
} else {
|
||||
contextMnu.addAction( subscribechannelAct );
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction( channeldetailsAct );
|
||||
// contextMnu.addAction( restoreKeysAct );
|
||||
contextMnu.addAction( restoreKeysAct );
|
||||
}
|
||||
|
||||
contextMnu.exec(QCursor::pos());
|
||||
|
@ -150,6 +150,7 @@ PopupChatDialog::PopupChatDialog(const std::string &id, const QString &name, QWi
|
||||
|
||||
QMenu * toolmenu = new QMenu();
|
||||
toolmenu->addAction(ui.actionClear_Chat);
|
||||
toolmenu->addAction(ui.actionClear_Chat_History);
|
||||
toolmenu->addAction(ui.actionSave_Chat_History);
|
||||
toolmenu->addAction(ui.actionClearOfflineMessages);
|
||||
toolmenu->addAction(ui.actionMessageHistory);
|
||||
@ -826,6 +827,11 @@ void PopupChatDialog::addSmiley()
|
||||
//============================================================================
|
||||
|
||||
void PopupChatDialog::on_actionClear_Chat_triggered()
|
||||
{
|
||||
ui.textBrowser->clear();
|
||||
}
|
||||
|
||||
void PopupChatDialog::on_actionClear_Chat_History_triggered()
|
||||
{
|
||||
ui.textBrowser->clear();
|
||||
historyKeeper.clearHistory();
|
||||
|
@ -107,6 +107,7 @@ private slots:
|
||||
void updatePeersCustomStateString(const QString& peer_id, const QString& status_string) ;
|
||||
|
||||
void on_actionClear_Chat_triggered();
|
||||
void on_actionClear_Chat_History_triggered();
|
||||
|
||||
bool fileSave();
|
||||
bool fileSaveAs();
|
||||
|
@ -886,6 +886,18 @@ background: white;}</string>
|
||||
<string>Browse History</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionClear_Chat_History">
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/edit-clear-history.png</normaloff>:/images/edit-clear-history.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Clear Chat History</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>deletes all stored and displayed chat history </string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
|
@ -256,6 +256,8 @@ void IMHistoryKeeper::clearHistory(){
|
||||
if(!wri.remove(hfName))
|
||||
std::cerr << "\nFailed to remove history file" << std::endl;
|
||||
|
||||
clear();
|
||||
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
Loading…
x
Reference in New Issue
Block a user