diff --git a/src/aboutndd.cpp b/src/aboutndd.cpp index c77649b..d38f6c3 100755 --- a/src/aboutndd.cpp +++ b/src/aboutndd.cpp @@ -6,6 +6,7 @@ AboutNdd::AboutNdd(QWidget *parent) ui.setupUi(this); ui.label->setOpenExternalLinks(true); + connect(ui.aboutPushButton, &QPushButton::clicked, this, &AboutNdd::onButtonOkayClicked); } AboutNdd::~AboutNdd() @@ -15,3 +16,8 @@ void AboutNdd::appendText(QString text) { ui.nddMsgText->appendPlainText(text); } + +void AboutNdd::onButtonOkayClicked() +{ + close(); +} diff --git a/src/aboutndd.h b/src/aboutndd.h index 4c54d6c..2e23f65 100755 --- a/src/aboutndd.h +++ b/src/aboutndd.h @@ -13,6 +13,9 @@ public: void appendText(QString text); +private slots: + void onButtonOkayClicked(); + private: Ui::AboutNddClass ui; -}; +}; \ No newline at end of file diff --git a/src/aboutndd.ui b/src/aboutndd.ui index 7f79593..2eb3aa3 100755 --- a/src/aboutndd.ui +++ b/src/aboutndd.ui @@ -7,7 +7,7 @@ 0 0 400 - 114 + 180 @@ -17,7 +17,7 @@ - AboutNdd + About Notepad-- @@ -33,25 +33,76 @@ 2 + + + + + + General Public License + + + Qt::AlignCenter + + + + + + + true + + + This software is licensed under the terms of the GNU General Public License version 3 (GPLv3). You are free to redistribute and modify the software in accordance with the license. + +This software is distributed with the hope that it will be useful, but without any warranties, including the implied warranties of merchantability or fitness for a particular purpose. Please see the GNU General Public License for more information. + +A copy of the GPLv3 license should have been provided along with this software. If you have not received a copy, it can be found at https://www.gnu.org/licenses/. + + + + + - <html><head/><body><p><a href="https://gitee.com/cxasm/notepad--"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Click to get the latest version of notepad-- or source code</span></a></p></body></html> + <html><head/><body><p>Home: <a href="https://gitee.com/cxasm/notepad--"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">https://gitee.com/cxasm/notepad--</span></a></p></body></html> - - - - true - - - opensoure web:https://gitee.com/cxasm/notepad-- - - + + + + + + + 100 + 28 + + + + + 100 + 28 + + + + Okay + + + + - - + + + + Qt::Vertical + + + + 20 + 40 + + + diff --git a/src/cceditor/ccnotepad.cpp b/src/cceditor/ccnotepad.cpp index ae615be..cf50c19 100755 --- a/src/cceditor/ccnotepad.cpp +++ b/src/cceditor/ccnotepad.cpp @@ -3464,7 +3464,7 @@ void CCNotePad::tabClose(int index, bool isInQuit) { QApplication::beep(); - int ret = QMessageBox::question(this, tr("Save File?"), tr("if save file %1 ?").arg(filePath), tr("Yes"), tr("No"), tr("Cancel")); + int ret = QMessageBox::question(this, tr("Do you want to save changes to « %1 » before closing?").arg(filePath), tr("If you don't save the changes you made, you'll lose them forever."), tr("Yes"), tr("No"), tr("Cancel")); //保存 if (ret == 0) @@ -7333,18 +7333,18 @@ void CCNotePad::slot_aboutNdd() { AboutNdd* pWin = new AboutNdd(); pWin->setAttribute(Qt::WA_DeleteOnClose); - QString title = tr("Ndd Version %1").arg(VersionStr); + QString title = tr("Notepad-- Version %1").arg(VersionStr); pWin->setWindowTitle(title); pWin->appendText(title); - int status = NddSetting::getKeyValueFromNumSets(SOFT_STATUS); - if (1 == status) - { - pWin->appendText(tr("Registered Version")); - } - else - { - pWin->appendText(tr("Free Trial")); - } +// int status = NddSetting::getKeyValueFromNumSets(SOFT_STATUS); +// if (1 == status) +// { +// pWin->appendText(tr("Registered Version")); +// } +// else +// { +// pWin->appendText(tr("Free Trial")); +// } pWin->show(); registerEscKeyShort(pWin); #ifdef uos @@ -7352,6 +7352,7 @@ void CCNotePad::slot_aboutNdd() #endif } + void CCNotePad::addWatchFilePath(QString filePath) { getRegularFilePath(filePath); @@ -7646,25 +7647,25 @@ void CCNotePad::slot_donate() #endif } -void CCNotePad::slot_registerCmd(int cmd, int code) -{ - if (cmd == 1) - { - //服务器返回注册码的消息。 //0 试用 1 正版 2 正版过期 3 错误key - int status = NddSetting::getKeyValueFromNumSets(SOFT_STATUS); - if (status != code) - { - NddSetting::updataKeyValueFromNumSets(SOFT_STATUS, code); - } - - emit signRegisterReplay(code); - } -} +// void CCNotePad::slot_registerCmd(int cmd, int code) +// { +// if (cmd == 1) +// { +// //服务器返回注册码的消息。 //0 试用 1 正版 2 正版过期 3 错误key +// int status = NddSetting::getKeyValueFromNumSets(SOFT_STATUS); +// if (status != code) +// { +// NddSetting::updataKeyValueFromNumSets(SOFT_STATUS, code); +// } +// +// emit signRegisterReplay(code); +// } +//} //获取注册码 -void CCNotePad::slot_register() -{ -} +//void CCNotePad::slot_register() +//{ +//} //当前正在使用的所有语言的tags void CCNotePad::getCurUseLexerTags(QVector& tags) @@ -8920,5 +8921,4 @@ void CCNotePad::slot_shortcutManager() adjustWInPos(pWin); #endif pWin->show(); -} - +} \ No newline at end of file diff --git a/src/cceditor/ccnotepad.h b/src/cceditor/ccnotepad.h index b4c51cd..f4063e5 100755 --- a/src/cceditor/ccnotepad.h +++ b/src/cceditor/ccnotepad.h @@ -178,7 +178,7 @@ public slots: void slot_batch_rename(); void slot_options(); void slot_donate(); - void slot_registerCmd(int cmd, int code); + // void slot_registerCmd(int cmd, int code); void slot_viewStyleChange(QString tag, int styleId, QColor & fgColor, QColor & bkColor, QFont & font, bool fontChange); void slot_viewLexerChange(QString tag); void slot_findInDir(); @@ -278,7 +278,7 @@ private slots: void slot_toDarkStyle(); void slot_toLavenderBlush(); void slot_toMistyRose();*/ - void slot_register(); + //void slot_register(); void slot_slectionChanged(); void slot_preHexPage(); diff --git a/src/cceditor/ccnotepad.ui b/src/cceditor/ccnotepad.ui index 2062894..ee9e701 100755 --- a/src/cceditor/ccnotepad.ui +++ b/src/cceditor/ccnotepad.ui @@ -79,7 +79,7 @@ 0 0 1458 - 23 + 27 @@ -87,7 +87,7 @@ Qt::LeftToRight - File(&F) + File (&F) @@ -103,7 +103,7 @@ Qt::LeftToRight - Edit(&E) + Edit (&E) @@ -180,11 +180,11 @@ - Search(&S) + Search (&S) - Book Mark + Bookmark @@ -204,7 +204,7 @@ - View(&V) + View (&V) @@ -232,7 +232,7 @@ - Encoding(&N) + Encoding (&N) @@ -263,7 +263,7 @@ - Language(&L) + Language (&L) @@ -466,7 +466,7 @@ - Set(&T) + Set (&T) @@ -495,7 +495,7 @@ - Tools(&O) + Tools (&O) @@ -1575,11 +1575,6 @@ Chinese - - - Register - - Theme Style @@ -1904,7 +1899,7 @@ - AboutNdd + About Notepad-- @@ -2695,22 +2690,6 @@ - - actionRegister - triggered() - CCNotePad - slot_register() - - - -1 - -1 - - - 601 - 394 - - - actionLanguage_Format triggered() @@ -3497,7 +3476,6 @@ slot_toMistyRose() slot_changeEnglish() slot_changeChinese() - slot_register() slot_langFormat() slot_reOpenTextMode() slot_reOpenHexMode() diff --git a/src/closeDlg.ui b/src/closeDlg.ui index fc09acb..7ccaf01 100755 --- a/src/closeDlg.ui +++ b/src/closeDlg.ui @@ -60,7 +60,7 @@ - save left document ? + Save Left Document? true @@ -70,7 +70,7 @@ - save right document ? + Save Right Document? true @@ -140,7 +140,7 @@ - save selected + Save Selected @@ -159,7 +159,7 @@ - discard + Discard @@ -178,7 +178,7 @@ - cancel + Cancel diff --git a/src/findwin.ui b/src/findwin.ui index 06403f7..81831ea 100755 --- a/src/findwin.ui +++ b/src/findwin.ui @@ -40,7 +40,7 @@ - 0 + 1 @@ -1462,8 +1462,8 @@ close() - 572 - 251 + 674 + 288 169 @@ -1510,8 +1510,8 @@ slot_replaceFindNext() - 94 - 60 + 448 + 69 588 @@ -1526,8 +1526,8 @@ close() - 94 - 45 + 448 + 213 588 @@ -1542,8 +1542,8 @@ slot_replace() - 94 - 64 + 448 + 103 588 @@ -1558,8 +1558,8 @@ slot_replaceAll() - 94 - 67 + 448 + 137 588 @@ -1574,8 +1574,8 @@ slot_replaceAllInOpenDoc() - 94 - 76 + 448 + 180 588 @@ -1638,8 +1638,8 @@ close() - 572 - 142 + 674 + 171 564 @@ -1718,8 +1718,8 @@ slot_findPrev() - 484 - 73 + 674 + 103 294