Skip to content

Commit

Permalink
qt6: update shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilledheart committed Aug 29, 2024
1 parent ba47f40 commit bbfd91b
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 69 deletions.
50 changes: 23 additions & 27 deletions src/qt6/lang/yass_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,15 @@
<context>
<name>TrayIcon</name>
<message>
<source>Option</source>
<source>&amp;Show</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Exit</source>
<source>&amp;Option...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>File</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show</source>
<source>E&amp;xit</source>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down Expand Up @@ -88,26 +84,6 @@
<source>YASS</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Option</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Exit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>File</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Help</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Start</source>
<translation type="unfinished"></translation>
Expand Down Expand Up @@ -224,5 +200,25 @@
<source>GUI Variant: </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Option...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>E&amp;xit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;File</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Help</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;About...</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
Binary file modified src/qt6/lang/yass_zh_CN.qm
Binary file not shown.
59 changes: 26 additions & 33 deletions src/qt6/lang/yass_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,16 @@
<context>
<name>TrayIcon</name>
<message>
<source>Option</source>
<translatorcomment>选项</translatorcomment>
<translation>选项</translation>
<source>&amp;Show</source>
<translation>唤醒 (&amp;S)</translation>
</message>
<message>
<source>Exit</source>
<translatorcomment>退出</translatorcomment>
<translation>退出</translation>
<source>&amp;Option...</source>
<translation>选项 (&amp;O)...</translation>
</message>
<message>
<source>File</source>
<translatorcomment>File</translatorcomment>
<translation>文件</translation>
</message>
<message>
<source>Show</source>
<translation>唤醒</translation>
<source>E&amp;xit</source>
<translation>退出 (&amp;X)</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -91,26 +84,6 @@
<source>YASS</source>
<translation>YASS</translation>
</message>
<message>
<source>Option</source>
<translation>选项</translation>
</message>
<message>
<source>Exit</source>
<translation>退出</translation>
</message>
<message>
<source>File</source>
<translation>文件</translation>
</message>
<message>
<source>About</source>
<translation>关于</translation>
</message>
<message>
<source>Help</source>
<translation>帮助</translation>
</message>
<message>
<source>Start</source>
<translation>启动</translation>
Expand Down Expand Up @@ -228,5 +201,25 @@
<source>GUI Variant: </source>
<translation>图形版本: </translation>
</message>
<message>
<source>&amp;Option...</source>
<translation>选项 (&amp;O)...</translation>
</message>
<message>
<source>E&amp;xit</source>
<translation>退出 (&amp;X)</translation>
</message>
<message>
<source>&amp;File</source>
<translation>文件 (&amp;F)</translation>
</message>
<message>
<source>&amp;Help</source>
<translation>帮助 (&amp;H)</translation>
</message>
<message>
<source>&amp;About...</source>
<translation>关于 (&amp;A)...</translation>
</message>
</context>
</TS>
8 changes: 4 additions & 4 deletions src/qt6/tray_icon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ TrayIcon::TrayIcon(QObject* parent) : QSystemTrayIcon(parent) {
setIcon(QIcon(":/res/images/io.github.chilledheart.yass.png"));

// create action
QAction* show_action = new QAction(tr("Show"), this);
QAction* show_action = new QAction(tr("&Show"), this);
connect(show_action, &QAction::triggered, this, &TrayIcon::OnShow);

QAction* option_action = new QAction(tr("Option"), this);
QAction* option_action = new QAction(tr("&Option..."), this);
connect(option_action, &QAction::triggered, this, &TrayIcon::OnOption);

QAction* exit_action = new QAction(tr("Exit"), this);
QAction* exit_action = new QAction(tr("E&xit"), this);
connect(exit_action, &QAction::triggered, this, [&]() { App()->quit(); });

QMenu* menu = new QMenu(tr("File"));
QMenu* menu = new QMenu;
menu->addAction(show_action);
menu->addAction(option_action);
menu->addSeparator();
Expand Down
10 changes: 5 additions & 5 deletions src/qt6/yass_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@ YASSWindow::YASSWindow(QWidget* parent) : QMainWindow(parent) {

// MenuBar << Vertical Box
//
QAction* option_action = new QAction(tr("Option"), this);
QAction* option_action = new QAction(tr("&Option..."), this);
connect(option_action, &QAction::triggered, this, &YASSWindow::OnOption);

QAction* exit_action = new QAction(tr("Exit"), this);
QAction* exit_action = new QAction(tr("E&xit"), this);
connect(exit_action, &QAction::triggered, this, [&]() { App()->quit(); });

QMenu* menu = new QMenu(tr("File"));
QMenu* menu = new QMenu(tr("&File"));
menu->addAction(option_action);
menu->addSeparator();
menu->addAction(exit_action);

QAction* about_action = new QAction(tr("About"), this);
QAction* about_action = new QAction(tr("&About..."), this);
connect(about_action, &QAction::triggered, this, &YASSWindow::OnAbout);

QMenu* help_menu = new QMenu(tr("Help"));
QMenu* help_menu = new QMenu(tr("&Help"));
help_menu->addAction(about_action);

QMenuBar* menubar = new QMenuBar;
Expand Down

0 comments on commit bbfd91b

Please sign in to comment.