mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
revert(chatlog): "add action "Go to current date""
This reverts commit 2a9648d12c
.
This commit is contained in:
parent
b9cf7f428d
commit
f29e948bed
|
@ -316,13 +316,6 @@ GenericChatForm::GenericChatForm(const Core& _core, const Contact* contact, ICha
|
||||||
quoteAction = menu.addAction(QIcon(), QString(), this, SLOT(quoteSelectedText()),
|
quoteAction = menu.addAction(QIcon(), QString(), this, SLOT(quoteSelectedText()),
|
||||||
QKeySequence(Qt::ALT + Qt::Key_Q));
|
QKeySequence(Qt::ALT + Qt::Key_Q));
|
||||||
addAction(quoteAction);
|
addAction(quoteAction);
|
||||||
|
|
||||||
menu.addSeparator();
|
|
||||||
|
|
||||||
goCurrentDateAction = menu.addAction(QIcon(), QString(), this, SLOT(goToCurrentDate()),
|
|
||||||
QKeySequence(Qt::CTRL + Qt::Key_G));
|
|
||||||
addAction(goCurrentDateAction);
|
|
||||||
|
|
||||||
menu.addSeparator();
|
menu.addSeparator();
|
||||||
|
|
||||||
searchAction = menu.addAction(QIcon(), QString(), this, SLOT(searchFormShow()),
|
searchAction = menu.addAction(QIcon(), QString(), this, SLOT(searchFormShow()),
|
||||||
|
@ -1060,17 +1053,6 @@ void GenericChatForm::renderMessages(ChatLogIdx begin, ChatLogIdx end,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericChatForm::goToCurrentDate()
|
|
||||||
{
|
|
||||||
chatWidget->clear();
|
|
||||||
messages.clear();
|
|
||||||
auto end = chatLog.getNextIdx();
|
|
||||||
auto numMessages = std::min(DEF_NUM_MSG_TO_LOAD, chatLog.getNextIdx() - chatLog.getFirstIdx());
|
|
||||||
auto begin = end - numMessages;
|
|
||||||
|
|
||||||
renderMessages(begin, end);
|
|
||||||
}
|
|
||||||
|
|
||||||
void GenericChatForm::loadHistoryLower()
|
void GenericChatForm::loadHistoryLower()
|
||||||
{
|
{
|
||||||
auto end = messages.begin()->first;
|
auto end = messages.begin()->first;
|
||||||
|
@ -1122,7 +1104,6 @@ void GenericChatForm::retranslateUi()
|
||||||
quoteAction->setText(tr("Quote selected text"));
|
quoteAction->setText(tr("Quote selected text"));
|
||||||
copyLinkAction->setText(tr("Copy link address"));
|
copyLinkAction->setText(tr("Copy link address"));
|
||||||
searchAction->setText(tr("Search in text"));
|
searchAction->setText(tr("Search in text"));
|
||||||
goCurrentDateAction->setText(tr("Go to current date"));
|
|
||||||
loadHistoryAction->setText(tr("Load chat history..."));
|
loadHistoryAction->setText(tr("Load chat history..."));
|
||||||
exportChatAction->setText(tr("Export to file"));
|
exportChatAction->setText(tr("Export to file"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,6 @@ protected slots:
|
||||||
void renderMessage(ChatLogIdx idx);
|
void renderMessage(ChatLogIdx idx);
|
||||||
void renderMessages(ChatLogIdx begin, ChatLogIdx end,
|
void renderMessages(ChatLogIdx begin, ChatLogIdx end,
|
||||||
std::function<void(void)> onCompletion = std::function<void(void)>());
|
std::function<void(void)> onCompletion = std::function<void(void)>());
|
||||||
void goToCurrentDate();
|
|
||||||
|
|
||||||
void loadHistoryLower();
|
void loadHistoryLower();
|
||||||
void loadHistoryUpper();
|
void loadHistoryUpper();
|
||||||
|
@ -159,7 +158,6 @@ protected:
|
||||||
QAction* searchAction;
|
QAction* searchAction;
|
||||||
QAction* loadHistoryAction;
|
QAction* loadHistoryAction;
|
||||||
QAction* exportChatAction;
|
QAction* exportChatAction;
|
||||||
QAction* goCurrentDateAction;
|
|
||||||
|
|
||||||
QMenu menu;
|
QMenu menu;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user