mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
UniversalEntry: refinement
This commit is contained in:
parent
3bcc7991cb
commit
373d839497
@ -60,9 +60,11 @@ void VHelpUE::clear(int p_id)
|
||||
bool VHelpUE::initListWidget()
|
||||
{
|
||||
if (m_listWidget->count() == 0) {
|
||||
m_listWidget->addItem(tr("Esc/Ctrl+[: Hide Universal Entry"));
|
||||
m_listWidget->addItem(tr("Esc or Ctrl+[: Hide Universal Entry"));
|
||||
m_listWidget->addItem(tr("Ctrl+U: Clear the command input"));
|
||||
m_listWidget->addItem(tr("Ctrl+E: Clear the command input except the entry key"));
|
||||
m_listWidget->addItem(tr("Ctrl+F: Select the entry key to change"));
|
||||
m_listWidget->addItem(tr("Ctrl+D: Cancel the command"));
|
||||
m_listWidget->addItem(tr("Ctrl+J: Go to next item"));
|
||||
m_listWidget->addItem(tr("Ctrl+K: Go to previous item"));
|
||||
m_listWidget->addItem(tr("Ctrl+R: Go to current item's parent item"));
|
||||
@ -70,6 +72,11 @@ bool VHelpUE::initListWidget()
|
||||
m_listWidget->addItem(tr("Ctrl+S: Sort items"));
|
||||
m_listWidget->addItem(tr("Enter: Activate current item"));
|
||||
m_listWidget->addItem(tr("Ctrl+M: Browse current item folder or the folder containing current item"));
|
||||
m_listWidget->addItem(tr("Magic Switches:"));
|
||||
m_listWidget->addItem(tr("\\c or \\C: Case insensitive or sensitive"));
|
||||
m_listWidget->addItem(tr("\\r or \\R: Disable or enable regular expression"));
|
||||
m_listWidget->addItem(tr("\\f or \\F: Disable or enable fuzzy search"));
|
||||
m_listWidget->addItem(tr("\\w or \\W: Disable or enable whole word only"));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -250,7 +250,6 @@ void VSearcher::initUIFields()
|
||||
VSearchConfig config = VSearchConfig::fromConfig(g_config->getSearchOptions());
|
||||
|
||||
// Scope.
|
||||
m_searchScopeCB->addItem(tr("Current Note"), VSearchConfig::CurrentNote);
|
||||
m_searchScopeCB->addItem(tr("Opened Notes"), VSearchConfig::OpenedNotes);
|
||||
m_searchScopeCB->addItem(tr("Current Folder"), VSearchConfig::CurrentFolder);
|
||||
m_searchScopeCB->addItem(tr("Current Notebook"), VSearchConfig::CurrentNotebook);
|
||||
|
@ -325,6 +325,20 @@ void VUniversalEntry::keyPressEvent(QKeyEvent *p_event)
|
||||
|
||||
break;
|
||||
|
||||
case Qt::Key_F:
|
||||
if (VUtils::isControlModifierForVim(modifiers)) {
|
||||
// Ctrl+F to select the command key.
|
||||
QString cmd = m_cmdEdit->getEvaluatedText();
|
||||
if (!cmd.isEmpty()) {
|
||||
m_cmdTimer->stop();
|
||||
m_cmdEdit->setSelection(0, 1);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case Qt::Key_D:
|
||||
if (VUtils::isControlModifierForVim(modifiers)) {
|
||||
// Ctrl+D to cancel current command.
|
||||
|
Loading…
x
Reference in New Issue
Block a user