diff --git a/DSView/DSView.qrc b/DSView/DSView.qrc
index 1fa1c2a1..a1408110 100755
--- a/DSView/DSView.qrc
+++ b/DSView/DSView.qrc
@@ -138,5 +138,7 @@
icons/dsl_logo.svg
icons/dark/minimize.svg
icons/logo.svg
+ icons/light/update.svg
+ icons/dark/update.svg
diff --git a/DSView/config.h b/DSView/config.h
index ec4e51a5..6b44cebb 100755
--- a/DSView/config.h
+++ b/DSView/config.h
@@ -30,6 +30,6 @@
#define DS_VERSION_MAJOR 1
#define DS_VERSION_MINOR 2
#define DS_VERSION_MICRO 0
-#define DS_VERSION_STRING "1.2.0-RC8"
+#define DS_VERSION_STRING "1.2.0-RC10"
#endif
diff --git a/DSView/icons/dark/update.svg b/DSView/icons/dark/update.svg
new file mode 100644
index 00000000..c02bb441
--- /dev/null
+++ b/DSView/icons/dark/update.svg
@@ -0,0 +1,109 @@
+
+
+
+
\ No newline at end of file
diff --git a/DSView/icons/light/update.svg b/DSView/icons/light/update.svg
new file mode 100644
index 00000000..6ae61c73
--- /dev/null
+++ b/DSView/icons/light/update.svg
@@ -0,0 +1,109 @@
+
+
+
+
\ No newline at end of file
diff --git a/DSView/languages/my_25.qm b/DSView/languages/my_25.qm
index 35bbd2f6..304660c3 100755
Binary files a/DSView/languages/my_25.qm and b/DSView/languages/my_25.qm differ
diff --git a/DSView/pv/devicemanager.cpp b/DSView/pv/devicemanager.cpp
index f148ee11..5e0c48c0 100755
--- a/DSView/pv/devicemanager.cpp
+++ b/DSView/pv/devicemanager.cpp
@@ -142,7 +142,7 @@ void DeviceManager::init_drivers()
for (sr_dev_driver **driver = drivers; *driver; driver++) {
if (sr_driver_init(_sr_ctx, *driver) != SR_OK) {
throw runtime_error(
- string("Failed to initialize driver ") +
+ string("Failed to initialize driver ") +
string((*driver)->name));
}
}
diff --git a/DSView/pv/dialogs/applicationpardlg.cpp b/DSView/pv/dialogs/applicationpardlg.cpp
index 282127ec..536c04d0 100644
--- a/DSView/pv/dialogs/applicationpardlg.cpp
+++ b/DSView/pv/dialogs/applicationpardlg.cpp
@@ -43,7 +43,7 @@ ApplicationParamDlg::~ApplicationParamDlg()
bool ApplicationParamDlg::ShowDlg(QWidget *parent)
{
DSDialog dlg(parent, true, true);
- dlg.setTitle("Display options");
+ dlg.setTitle(tr("Display options"));
dlg.setMinimumSize(300, 200);
QFormLayout &lay = *(new QFormLayout());
lay.setContentsMargins(0,20,0,30);
@@ -53,7 +53,7 @@ bool ApplicationParamDlg::ShowDlg(QWidget *parent)
QCheckBox *ck_quickScroll = new QCheckBox();
ck_quickScroll->setChecked(app._appOptions.quickScroll);
- lay.addRow("Quick scroll", ck_quickScroll);
+ lay.addRow(tr("Quick scroll"), ck_quickScroll);
dlg.layout()->addLayout(&lay);
dlg.exec();
diff --git a/DSView/pv/dialogs/applicationpardlg.h b/DSView/pv/dialogs/applicationpardlg.h
index 86c01b01..27abb2a0 100644
--- a/DSView/pv/dialogs/applicationpardlg.h
+++ b/DSView/pv/dialogs/applicationpardlg.h
@@ -29,9 +29,9 @@ namespace pv
namespace dialogs
{
- class ApplicationParamDlg
+ class ApplicationParamDlg : public QObject
{
- // Q_OBJECT
+ Q_OBJECT
public:
ApplicationParamDlg();
diff --git a/DSView/pv/dialogs/decoderoptionsdlg.cpp b/DSView/pv/dialogs/decoderoptionsdlg.cpp
index f11a4520..a6097496 100644
--- a/DSView/pv/dialogs/decoderoptionsdlg.cpp
+++ b/DSView/pv/dialogs/decoderoptionsdlg.cpp
@@ -433,7 +433,7 @@ void DecoderOptionsDlg::commit_decoder_probes(data::decode::Decoder *dec)
void DecoderOptionsDlg::on_accept()
{
if (_cursor1 > 0 && _cursor1 == _cursor2){
- MsgBox::Show("error", "Invalid cursor index for sample range!");
+ MsgBox::Show(tr("error"), tr("Invalid cursor index for sample range!"));
return;
}
diff --git a/DSView/pv/dialogs/dsmessagebox.cpp b/DSView/pv/dialogs/dsmessagebox.cpp
index a2c273e6..482e0ec3 100755
--- a/DSView/pv/dialogs/dsmessagebox.cpp
+++ b/DSView/pv/dialogs/dsmessagebox.cpp
@@ -33,7 +33,7 @@
namespace pv {
namespace dialogs {
-DSMessageBox::DSMessageBox(QWidget *parent,const char *title) :
+DSMessageBox::DSMessageBox(QWidget *parent,const QString title) :
QDialog(parent)
{
(void)parent;
@@ -67,8 +67,8 @@ DSMessageBox::DSMessageBox(QWidget *parent,const char *title) :
_msg->setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint);
- if (title){
- _titlebar->setTitle(QString(title));
+ if (!title.isEmpty()){
+ _titlebar->setTitle(title);
}
else{
_titlebar->setTitle(tr("Message"));
diff --git a/DSView/pv/dialogs/dsmessagebox.h b/DSView/pv/dialogs/dsmessagebox.h
index 7b2a1038..6f33bfea 100755
--- a/DSView/pv/dialogs/dsmessagebox.h
+++ b/DSView/pv/dialogs/dsmessagebox.h
@@ -40,7 +40,7 @@ class DSMessageBox : public QDialog
Q_OBJECT
public:
- DSMessageBox(QWidget *parent, const char *title=0);
+ DSMessageBox(QWidget *parent, const QString title=0);
~DSMessageBox();
diff --git a/DSView/pv/dialogs/storeprogress.cpp b/DSView/pv/dialogs/storeprogress.cpp
index e0542a62..a35eea8a 100755
--- a/DSView/pv/dialogs/storeprogress.cpp
+++ b/DSView/pv/dialogs/storeprogress.cpp
@@ -125,7 +125,7 @@ void StoreProgress::reject()
void StoreProgress::accept()
{
if (_store_session.GetFileName() == ""){
- MsgBox::Show(NULL, "you need to select a file name.");
+ MsgBox::Show(NULL, tr("You need to select a file name."));
return;
}
diff --git a/DSView/pv/dock/keywordlineedit.cpp b/DSView/pv/dock/keywordlineedit.cpp
index 4687896a..58a92ce7 100644
--- a/DSView/pv/dock/keywordlineedit.cpp
+++ b/DSView/pv/dock/keywordlineedit.cpp
@@ -22,9 +22,6 @@
#include "keywordlineedit.h"
#include "../config/appconfig.h"
-#define PROTOCOL_FIND_TITLE "Protocol search..."
-#define PROTOCOL_FIND_TITLE_cn "协议查找..."
-
KeywordLineEdit::KeywordLineEdit(QWidget *parent, IKeywordActive *active)
:QLineEdit(parent)
{
@@ -47,10 +44,7 @@ KeywordLineEdit::KeywordLineEdit(QWidget *parent, IKeywordActive *active)
return;
}
- if (AppConfig::Instance().IsLangCn())
- this->setText(PROTOCOL_FIND_TITLE_cn);
- else
- this->setText(PROTOCOL_FIND_TITLE);
+ this->setText(tr("Protocol search..."));
}
void KeywordLineEdit::SetInputText(QString text)
diff --git a/DSView/pv/dock/protocoldock.cpp b/DSView/pv/dock/protocoldock.cpp
index 57d01dc9..9e0e8188 100755
--- a/DSView/pv/dock/protocoldock.cpp
+++ b/DSView/pv/dock/protocoldock.cpp
@@ -113,9 +113,9 @@ ProtocolDock::ProtocolDock(QWidget *parent, view::View &view, SigSession *sessio
sort(_decoderInfoList.begin(), _decoderInfoList.end(), ProtocolDock::protocol_sort_callback);
if (repeatNammes != ""){
- QString err = "Any protocol have repeated id or name: ";
+ QString err = tr("Any protocol have repeated id or name: ");
err += repeatNammes;
- MsgBox::Show("error", err.toUtf8().data());
+ MsgBox::Show(tr("error"), err.toUtf8().data());
}
_arrow = new QToolButton(_up_widget);
@@ -324,11 +324,11 @@ int ProtocolDock::get_protocol_index_by_id(QString id)
void ProtocolDock::on_add_protocol()
{
if (_decoderInfoList.size() == 0){
- MsgBox::Show(NULL, "Protocol list is empty!");
+ MsgBox::Show(NULL, tr("Protocol list is empty!"));
return;
}
if (_selected_protocol_id == ""){
- MsgBox::Show(NULL, "Please select a protocol!");
+ MsgBox::Show(NULL, tr("Please select a protocol!"));
return;
}
@@ -372,7 +372,7 @@ void ProtocolDock::on_add_protocol()
}
if (pro_id == ""){
- MsgBox::Show("error", "find the base protocol error!");
+ MsgBox::Show(tr("error"), tr("find the base protocol error!"));
for(auto sub: sub_decoders){
delete sub;
@@ -446,11 +446,11 @@ bool ProtocolDock::add_protocol_by_id(QString id, bool silent, std::listget_device()->dev_inst();
if ((!file_dev && strcmp(sdi->driver->name, sessionObj["Device"].toString().toUtf8()) != 0) ||
sdi->mode != sessionObj["DeviceMode"].toDouble()) {
- MsgBox::Show(NULL, "Session File is not compatible with current device or mode!", this);
+ MsgBox::Show(NULL, tr("Session File is not compatible with current device or mode!"), this);
return false;
}
@@ -1295,7 +1295,7 @@ void MainWindow::restore_dock()
}
catch(...)
{
- MsgBox::Show(NULL, "restore window status error!");
+ MsgBox::Show(NULL, tr("restore window status error!"));
}
}
diff --git a/DSView/pv/toolbars/filebar.cpp b/DSView/pv/toolbars/filebar.cpp
index 81996711..eef34b9d 100755
--- a/DSView/pv/toolbars/filebar.cpp
+++ b/DSView/pv/toolbars/filebar.cpp
@@ -121,8 +121,8 @@ void FileBar::reStyle()
_action_load->setIcon(QIcon(iconPath+"/open.svg"));
_action_store->setIcon(QIcon(iconPath+"/save.svg"));
- _action_default->setIcon(QIcon(iconPath+"/settings.svg"));
- _menu_session->setIcon(QIcon(iconPath+"/settings.svg"));
+ _action_default->setIcon(QIcon(iconPath+"/gear.svg"));
+ _menu_session->setIcon(QIcon(iconPath+"/gear.svg"));
_action_open->setIcon(QIcon(iconPath+"/open.svg"));
_action_save->setIcon(QIcon(iconPath+"/save.svg"));
_action_export->setIcon(QIcon(iconPath+"/export.svg"));
@@ -194,7 +194,7 @@ void FileBar::on_actionDefault_triggered()
{
QDir dir(GetResourceDir());
if (!dir.exists()) {
- MsgBox::Show(NULL, "Cannot find default session file for this device!", this);
+ MsgBox::Show(NULL, tr("Cannot find default session file for this device!"), this);
return;
}
diff --git a/DSView/pv/toolbars/logobar.cpp b/DSView/pv/toolbars/logobar.cpp
index c61e26cc..3617c17d 100755
--- a/DSView/pv/toolbars/logobar.cpp
+++ b/DSView/pv/toolbars/logobar.cpp
@@ -72,7 +72,7 @@ LogoBar::LogoBar(SigSession *session, QWidget *parent) :
_logo_button.addAction(_manual);
_issue = new QAction(this);
- _issue->setObjectName(QString::fromUtf8("actionManual"));
+ _issue->setObjectName(QString::fromUtf8("actionIssue"));
_logo_button.addAction(_issue);
_update = new QAction(this);
@@ -140,7 +140,7 @@ void LogoBar::reStyle()
_about->setIcon(QIcon(iconPath+"/about.svg"));
_manual->setIcon(QIcon(iconPath+"/manual.svg"));
_issue->setIcon(QIcon(iconPath+"/bug.svg"));
- _update->setIcon(QIcon(iconPath+"/bug.svg"));
+ _update->setIcon(QIcon(iconPath+"/update.svg"));
if (_connected)
_logo_button.setIcon(QIcon(iconPath+"/logo_color.svg"));
diff --git a/DSView/pv/toolbars/trigbar.cpp b/DSView/pv/toolbars/trigbar.cpp
index 982c3456..8bf7495e 100755
--- a/DSView/pv/toolbars/trigbar.cpp
+++ b/DSView/pv/toolbars/trigbar.cpp
@@ -177,7 +177,7 @@ void TrigBar::reStyle()
_dark_style->setIcon(QIcon(iconPath+"/dark.svg"));
_light_style->setIcon(QIcon(iconPath+"/light.svg"));
- _action_dispalyOptions->setIcon(QIcon(iconPath+"/params.svg"));
+ _action_dispalyOptions->setIcon(QIcon(iconPath+"/gear.svg"));
AppConfig &app = AppConfig::Instance();
diff --git a/DSView/pv/ui/msgbox.cpp b/DSView/pv/ui/msgbox.cpp
index 73c6494b..b579455c 100644
--- a/DSView/pv/ui/msgbox.cpp
+++ b/DSView/pv/ui/msgbox.cpp
@@ -23,7 +23,6 @@
#include "../dialogs/dsmessagebox.h"
#include
#include
-#include
#include "../dsvdef.h"
#include "../appcontrol.h"
@@ -32,9 +31,9 @@
//QMessageBox::information(NULL, "Title", "Content");
//QMessageBox::information(NULL, "Title", "Content",QMessageBox::Yes|QMessageBox::No|QMessageBox::Abort);
-void MsgBox::Show(const char *title, const char *text, QWidget *parent)
+void MsgBox::Show(const QString title, const QString text, QWidget *parent)
{
- assert(text);
+ assert(!text.isEmpty());
QString str;
str.append("\n");
@@ -52,9 +51,9 @@ void MsgBox::Show(const char *title, const char *text, QWidget *parent)
msg.exec();
}
-bool MsgBox::Confirm(const char *text, QWidget *parent)
+bool MsgBox::Confirm(const QString text, QWidget *parent)
{
- assert(text);
+ assert(!text.isEmpty());
QString str;
str.append("\n");
diff --git a/DSView/pv/ui/msgbox.h b/DSView/pv/ui/msgbox.h
index 8fc38ca1..23a0ae7c 100644
--- a/DSView/pv/ui/msgbox.h
+++ b/DSView/pv/ui/msgbox.h
@@ -21,12 +21,14 @@
#pragma once
+#include
+
class QWidget;
class MsgBox
{
public:
- static void Show(const char *title, const char *text, QWidget *parent=0);
+ static void Show(const QString title, const QString text, QWidget *parent=0);
- static bool Confirm(const char *text, QWidget *parent=0);
+ static bool Confirm(const QString text, QWidget *parent=0);
};
\ No newline at end of file
diff --git a/DSView/pv/view/devmode.cpp b/DSView/pv/view/devmode.cpp
index 1c3b5a8d..6acfe774 100755
--- a/DSView/pv/view/devmode.cpp
+++ b/DSView/pv/view/devmode.cpp
@@ -208,7 +208,7 @@ void DevMode::on_close()
DevInst *dev_inst = _session->get_device();
assert(dev_inst);
- if (_bFile && MsgBox::Confirm("are you sure to close the device?")){
+ if (_bFile && MsgBox::Confirm(tr("are you sure to close the device?"))){
_session->close_file(dev_inst);
dev_changed(true);
}