mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-31 10:19:24 -04: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
5 changed files with 26 additions and 4 deletions
|
@ -150,8 +150,8 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point )
|
||||||
QAction *channeldetailsAct = new QAction(QIcon(":/images/info16.png"), tr( "Show Channel Details" ), &contextMnu);
|
QAction *channeldetailsAct = new QAction(QIcon(":/images/info16.png"), tr( "Show Channel Details" ), &contextMnu);
|
||||||
connect( channeldetailsAct , SIGNAL( triggered() ), this, SLOT( showChannelDetails() ) );
|
connect( channeldetailsAct , SIGNAL( triggered() ), this, SLOT( showChannelDetails() ) );
|
||||||
|
|
||||||
//QAction *restoreKeysAct = new QAction(QIcon(":/images/settings16.png"), tr("Restore Publish Rights for Channel" ), &contextMnu);
|
QAction *restoreKeysAct = new QAction(QIcon(":/images/settings16.png"), tr("Restore Publish Rights for Channel" ), &contextMnu);
|
||||||
//connect( restoreKeysAct , SIGNAL( triggered() ), this, SLOT( restoreChannelKeys() ) );
|
connect( restoreKeysAct , SIGNAL( triggered() ), this, SLOT( restoreChannelKeys() ) );
|
||||||
|
|
||||||
QAction *editChannelDetailAct = new QAction(QIcon(":/images/edit_16.png"), tr("Edit Channel Details"), &contextMnu);
|
QAction *editChannelDetailAct = new QAction(QIcon(":/images/edit_16.png"), tr("Edit Channel Details"), &contextMnu);
|
||||||
connect( editChannelDetailAct, SIGNAL( triggered() ), this, SLOT( editChannelDetail() ) );
|
connect( editChannelDetailAct, SIGNAL( triggered() ), this, SLOT( editChannelDetail() ) );
|
||||||
|
@ -171,16 +171,17 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint point )
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
contextMnu.addAction( channeldetailsAct );
|
contextMnu.addAction( channeldetailsAct );
|
||||||
contextMnu.addAction( shareKeyAct );
|
contextMnu.addAction( shareKeyAct );
|
||||||
|
contextMnu.addAction( restoreKeysAct );
|
||||||
} else if (ci.channelFlags & RS_DISTRIB_SUBSCRIBED) {
|
} else if (ci.channelFlags & RS_DISTRIB_SUBSCRIBED) {
|
||||||
contextMnu.addAction( unsubscribechannelAct );
|
contextMnu.addAction( unsubscribechannelAct );
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
contextMnu.addAction( channeldetailsAct );
|
contextMnu.addAction( channeldetailsAct );
|
||||||
// contextMnu.addAction( restoreKeysAct );
|
contextMnu.addAction( restoreKeysAct );
|
||||||
} else {
|
} else {
|
||||||
contextMnu.addAction( subscribechannelAct );
|
contextMnu.addAction( subscribechannelAct );
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
contextMnu.addAction( channeldetailsAct );
|
contextMnu.addAction( channeldetailsAct );
|
||||||
// contextMnu.addAction( restoreKeysAct );
|
contextMnu.addAction( restoreKeysAct );
|
||||||
}
|
}
|
||||||
|
|
||||||
contextMnu.exec(QCursor::pos());
|
contextMnu.exec(QCursor::pos());
|
||||||
|
|
|
@ -150,6 +150,7 @@ PopupChatDialog::PopupChatDialog(const std::string &id, const QString &name, QWi
|
||||||
|
|
||||||
QMenu * toolmenu = new QMenu();
|
QMenu * toolmenu = new QMenu();
|
||||||
toolmenu->addAction(ui.actionClear_Chat);
|
toolmenu->addAction(ui.actionClear_Chat);
|
||||||
|
toolmenu->addAction(ui.actionClear_Chat_History);
|
||||||
toolmenu->addAction(ui.actionSave_Chat_History);
|
toolmenu->addAction(ui.actionSave_Chat_History);
|
||||||
toolmenu->addAction(ui.actionClearOfflineMessages);
|
toolmenu->addAction(ui.actionClearOfflineMessages);
|
||||||
toolmenu->addAction(ui.actionMessageHistory);
|
toolmenu->addAction(ui.actionMessageHistory);
|
||||||
|
@ -826,6 +827,11 @@ void PopupChatDialog::addSmiley()
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
void PopupChatDialog::on_actionClear_Chat_triggered()
|
void PopupChatDialog::on_actionClear_Chat_triggered()
|
||||||
|
{
|
||||||
|
ui.textBrowser->clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PopupChatDialog::on_actionClear_Chat_History_triggered()
|
||||||
{
|
{
|
||||||
ui.textBrowser->clear();
|
ui.textBrowser->clear();
|
||||||
historyKeeper.clearHistory();
|
historyKeeper.clearHistory();
|
||||||
|
|
|
@ -107,6 +107,7 @@ private slots:
|
||||||
void updatePeersCustomStateString(const QString& peer_id, const QString& status_string) ;
|
void updatePeersCustomStateString(const QString& peer_id, const QString& status_string) ;
|
||||||
|
|
||||||
void on_actionClear_Chat_triggered();
|
void on_actionClear_Chat_triggered();
|
||||||
|
void on_actionClear_Chat_History_triggered();
|
||||||
|
|
||||||
bool fileSave();
|
bool fileSave();
|
||||||
bool fileSaveAs();
|
bool fileSaveAs();
|
||||||
|
|
|
@ -886,6 +886,18 @@ background: white;}</string>
|
||||||
<string>Browse History</string>
|
<string>Browse History</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</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>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images.qrc"/>
|
<include location="../images.qrc"/>
|
||||||
|
|
|
@ -256,6 +256,8 @@ void IMHistoryKeeper::clearHistory(){
|
||||||
if(!wri.remove(hfName))
|
if(!wri.remove(hfName))
|
||||||
std::cerr << "\nFailed to remove history file" << std::endl;
|
std::cerr << "\nFailed to remove history file" << std::endl;
|
||||||
|
|
||||||
|
clear();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue