diff --git a/README_zh_CN.md b/README_zh_CN.md
index 66f4cfbc..7defeaf7 100644
--- a/README_zh_CN.md
+++ b/README_zh_CN.md
@@ -5,7 +5,7 @@
一个舒适的笔记平台!
-更多信息,请访问 [VNote 主页](https://tamlok.gitee.io/vnote) 或者 [Gitee 托管主页](https://tamlok.gitee.io/vnote) 。
+更多信息,请访问 [VNote 主页](https://tamlok.gitee.io/vnote) 或者[由 Gitee 托管的主页](https://tamlok.gitee.io/vnote) 。

diff --git a/src/core/mainconfig.cpp b/src/core/mainconfig.cpp
index 0a004336..b50b43b6 100644
--- a/src/core/mainconfig.cpp
+++ b/src/core/mainconfig.cpp
@@ -118,4 +118,5 @@ void MainConfig::doVersionSpecificOverride()
{
// In a new version, we may want to change one value by force.
m_coreConfig->m_shortcuts[CoreConfig::Shortcut::LocationListDock] = "Ctrl+G, C";
+ m_coreConfig->m_shortcuts[CoreConfig::Shortcut::NewWorkspace] = "";
}
diff --git a/src/core/versioncontroller/dummyversioncontrollerfactory.cpp b/src/core/versioncontroller/dummyversioncontrollerfactory.cpp
index 86359ed8..1de741c9 100644
--- a/src/core/versioncontroller/dummyversioncontrollerfactory.cpp
+++ b/src/core/versioncontroller/dummyversioncontrollerfactory.cpp
@@ -17,7 +17,7 @@ QString DummyVersionControllerFactory::getName() const
QString DummyVersionControllerFactory::getDisplayName() const
{
- return QObject::tr("Dummy Version Control");
+ return QObject::tr("No Version Control");
}
QString DummyVersionControllerFactory::getDescription() const
diff --git a/src/data/core/vnotex.json b/src/data/core/vnotex.json
index 83dc8367..c3de49cf 100644
--- a/src/data/core/vnotex.json
+++ b/src/data/core/vnotex.json
@@ -28,7 +28,7 @@
"MaximizeSplit" : "Ctrl+G, Shift+\\",
"DistributeSplits" : "Ctrl+G, =",
"RemoveSplitAndWorkspace" : "Ctrl+G, R",
- "NewWorkspace" : "Ctrl+G, M",
+ "NewWorkspace" : "",
"Export" : "Ctrl+G, T",
"Quit" : "Ctrl+Q",
"FlashPage" : "Ctrl+Alt+L",
diff --git a/src/data/extra/docs/en/welcome.md b/src/data/extra/docs/en/welcome.md
new file mode 100644
index 00000000..f412ccde
--- /dev/null
+++ b/src/data/extra/docs/en/welcome.md
@@ -0,0 +1,10 @@
+# Welcome To VNote
+A pleasant note-taking platform.
+
+For more information, please visit [**VNote's Home Page**](https://vnotex.github.io/vnote) or [Home Page on Gitee](https://tamlok.gitee.io/vnote).
+
+## FAQs
+* If VNote crashes after update, please delete the `vnotex.json` file under user configuration folder.
+* VNote has a series of powerful shortcuts. Please view the user configuration file `vnotex.json` for a complete list of shortcuts.
+* Feedbacks are appreciated! Please [post an issue](https://github.com/vnotex/vnote/issues) on GitHub if there is any.
+
diff --git a/src/data/extra/docs/zh_CN/welcome.md b/src/data/extra/docs/zh_CN/welcome.md
new file mode 100644
index 00000000..dd14bda9
--- /dev/null
+++ b/src/data/extra/docs/zh_CN/welcome.md
@@ -0,0 +1,10 @@
+# 欢迎使用 VNote
+一个舒适的笔记平台。
+
+更多信息,请访问 [VNote 主页](https://tamlok.gitee.io/vnote) 或者[由 Gitee 托管的主页](https://tamlok.gitee.io/vnote) 。
+
+## 常见问题
+* 如果更新后 VNote 崩溃,请删除用户配置文件夹中的 `vnotex.json` 文件。
+* VNote 有着一系列强大的快捷键。请查看用户配置文件 `vnotex.json` 以获取一个完整的快捷键列表。
+* 使用中有任何问题,欢迎[反馈](https://github.com/vnotex/vnote/issues) 。
+
diff --git a/src/data/extra/extra.qrc b/src/data/extra/extra.qrc
index 2bf112fe..e2505015 100644
--- a/src/data/extra/extra.qrc
+++ b/src/data/extra/extra.qrc
@@ -5,11 +5,13 @@
docs/en/shortcuts.md
docs/en/markdown_guide.md
docs/en/external_programs.md
+ docs/en/welcome.md
docs/zh_CN/get_started.txt
docs/zh_CN/about_vnotex.txt
docs/zh_CN/shortcuts.md
docs/zh_CN/markdown_guide.md
docs/zh_CN/external_programs.md
+ docs/zh_CN/welcome.md
web/markdown-viewer-template.html
web/markdown-export-template.html
web/css/globalstyles.css
diff --git a/src/widgets/mainwindow.cpp b/src/widgets/mainwindow.cpp
index a718705a..81ce263b 100644
--- a/src/widgets/mainwindow.cpp
+++ b/src/widgets/mainwindow.cpp
@@ -28,6 +28,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -45,6 +46,7 @@
#include
#include "searchinfoprovider.h"
#include
+#include
using namespace vnotex;
@@ -95,6 +97,15 @@ void MainWindow::kickOffOnStart(const QStringList &p_paths)
demoWidget();
openFiles(p_paths);
+
+ if (MainConfig::isVersionChanged()) {
+ const auto file = DocsUtils::getDocFile(QStringLiteral("welcome.md"));
+ if (!file.isEmpty()) {
+ auto paras = QSharedPointer::create();
+ paras->m_readOnly = true;
+ emit VNoteX::getInst().openFileRequested(file, paras);
+ }
+ }
});
}
diff --git a/src/widgets/notebookexplorer.cpp b/src/widgets/notebookexplorer.cpp
index 145ce4a3..9a2a17d5 100644
--- a/src/widgets/notebookexplorer.cpp
+++ b/src/widgets/notebookexplorer.cpp
@@ -74,6 +74,8 @@ void NotebookExplorer::setupUI()
auto id = static_cast(m_selector->itemData(p_idx).toULongLong());
emit notebookActivated(id);
});
+ connect(m_selector, &NotebookSelector::newNotebookRequested,
+ this, &NotebookExplorer::newNotebook);
mainLayout->addWidget(m_selector);
const auto &widgetConfig = ConfigMgr::getInst().getWidgetConfig();
diff --git a/src/widgets/notebookselector.cpp b/src/widgets/notebookselector.cpp
index 9d0c39ea..9553d434 100644
--- a/src/widgets/notebookselector.cpp
+++ b/src/widgets/notebookselector.cpp
@@ -176,3 +176,13 @@ void NotebookSelector::clearNavigation()
NavigationMode::clearNavigation();
}
+
+void NotebookSelector::mousePressEvent(QMouseEvent *p_event)
+{
+ if (count() == 0) {
+ emit newNotebookRequested();
+ return;
+ }
+
+ QComboBox::mousePressEvent(p_event);
+}
diff --git a/src/widgets/notebookselector.h b/src/widgets/notebookselector.h
index 7b3b4c14..10b62b48 100644
--- a/src/widgets/notebookselector.h
+++ b/src/widgets/notebookselector.h
@@ -23,6 +23,9 @@ namespace vnotex
void setCurrentNotebook(ID p_id);
+ signals:
+ void newNotebookRequested();
+
// NavigationMode.
protected:
QVector getVisibleNavigationItems() Q_DECL_OVERRIDE;
@@ -36,6 +39,8 @@ namespace vnotex
protected:
bool eventFilter(QObject *p_obj, QEvent *p_event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *p_event) Q_DECL_OVERRIDE;
+
private:
void addNotebookItem(const QSharedPointer &p_notebook);